Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installer for codegen ui #55

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,15 @@ generate-mocks: mockery ## Generate the mocks for the project as configured in .
clean-ui:
find ${UI_DIR} -type f -name extension.tar -delete

PHONY: codegen-download-openapi
codegen-download-openapi: run-backend
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work as it blocks during run-backend and never executes the yarn command below

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add the missing files; ran in local and able to generate the schema.yaml

@echo "Downloading OpenAPI spec from dev server"
yarn --cwd ${UI_DIR} api:download
ashutosh16 marked this conversation as resolved.
Show resolved Hide resolved

.PHONY: codegen-ui
codegen-ui: ## Generate the UI API files.
ashutosh16 marked this conversation as resolved.
Show resolved Hide resolved
yarn --cwd ${UI_DIR} api:generate

.PHONY: build-ui
build-ui: clean-ui
yarn --cwd ${UI_DIR} install
Expand Down
187 changes: 0 additions & 187 deletions ui/gen/ephemeralAccessAPI.ts

This file was deleted.

33 changes: 18 additions & 15 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
"@fortawesome/free-brands-svg-icons": "^6.6.0",
"@fortawesome/free-solid-svg-icons": "^6.6.0",
"@fortawesome/react-fontawesome": "^0.2.2",
"@react-buddy/ide-toolbox": "^2.4.0",
"@react-buddy/palette-antd": "^5.3.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.53.0",
"react-router-dom": "^6.26.2",
"react-toastify": "9.0.3",
"antd": "^5.20.0",
"classnames": "^2.5.1",
"moment": "^2.29.4",
"moment-timezone": "^0.5.33",
"react-moment": "^0.9.7",
"react-router-dom": "^6.25.1",
"react-moment": "^1.1.3",
"react-hot-loader": "^3.1.3",
"@tanstack/react-query": "4.36.1",
"@tanstack/react-query-devtools": "^5.59.0",
"axios": "1.6.2"
},
"peerDependencies": {
Expand All @@ -27,7 +27,9 @@
},
"scripts": {
"start": "webpack --config ./webpack.config.js --watch",
"build": "webpack --config ./webpack.config.js && tar -C dist -cvf extension.tar resources"
"build": "webpack --config ./webpack.config.js && tar -C dist -cvf extension.tar resources",
"api:download": "curl http://localhost:8888/api/openapi.yaml -o ./src/gen/schema.yaml",
"api:generate": "orval"
},
"eslintConfig": {
"extends": [
Expand All @@ -47,12 +49,11 @@
]
},
"devDependencies": {
"@types/react": "^16.9.3",
"@types/react-dom": "^16.9.3",
"@types/react-helmet": "^6.1.0",
"argo-ui": "git+https://github.com/argoproj/argo-ui.git",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.0",
"@types/react-router-dom": "^5.1.8",
"@types/styled-components": "^5.1.25",
"argo-ui": "git+https://github.com/argoproj/argo-ui.git",
"babel-preset-react": "^6.24.1",
"esbuild-loader": "^3.0.1",
"portable-fetch": "^3.0.0",
Expand All @@ -67,12 +68,14 @@
"typescript": "^4.3.5",
"webpack": "^5.75.0",
"webpack-bundle-analyzer": "^4.8.0",
"webpack-cli": "^4.7.2"
"webpack-cli": "^4.7.2",
"orval": "v7.1.1"
},
"resolutions": {
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.26",
"react-toastify": "9.0.8"
"react-toastify": "9.0.3"
},
"engines": {
"node": ">=16.0.0"
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
2 changes: 1 addition & 1 deletion ui/src/component/ephemeral-access-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
createAccessrequest,
CreateAccessRequestBody,
listAccessrequest
} from '../gen/ephemeralAccessAPI';
} from '../gen/ephemeral-access-api';
import { getHeaders } from '../config/client';

interface AccessDetailsComponentProps {
Expand Down
2 changes: 1 addition & 1 deletion ui/src/component/ephemeral-access-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Application } from '../models/type';
import { ARGO_GRAY6_COLOR } from '../shared/colors';
import { HelpIcon } from 'argo-ui/src/components/help-icon/help-icon';
import { AccessPanel, EnableEphemeralAccess } from '../utils/utils';
import { AccessRequestResponseBody } from '../gen/ephemeralAccessAPI';
import { AccessRequestResponseBody } from '../gen/ephemeral-access-api';
import { getDisplayTime } from '../utils/utils';
const DisplayAccessPermission: React.FC<{ application: Application }> = ({ application }) => {
const [accessRequest, setAccessRequest] = useState<AccessRequestResponseBody | null>(null);
Expand Down
2 changes: 1 addition & 1 deletion ui/src/ephemeral-access.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const RequestAccessBtnFlyout = ({ application }: RequestAccessBtnFlyoutPr
if (!application) return;

const fetchUserInfo = async () => {
const info = await getUserInfo(application);
const info = await getUserInfo(application);
ashutosh16 marked this conversation as resolved.
Show resolved Hide resolved
setUserInfo(info);
};

Expand Down
Loading
Loading