diff --git a/.env.example b/.env.example index dad0d4f..ce5f179 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,2 @@ -REACT_APP_API_URL=http://127.0.0.1:5000/api/v1 -REACT_APP_HYDRA_PUBLIC_URL=https://sso.init.stackspin.net \ No newline at end of file +REACT_APP_API_URL=http://stackspin_proxy:8081/api/v1 +REACT_APP_HYDRA_PUBLIC_URL=https://sso.init.stackspin.net diff --git a/README.md b/README.md index b58e0af..0888ee6 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,65 @@ -# Getting Started with Create React App +# Stackspin Dashboard -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). +This repo hosts the Stackspin Dashboard frontend code. +The backend code is located at +. -## Available Scripts +## Development environment -In the project directory, you can run: +### Setup -### `yarn start` +Create a `.env` file in the project root directory: -Runs the app in the development mode.\ + cp .env.example .env + +and adjust the `REACT_APP_HYDRA_PUBLIC_URL` to the SSO URL of your cluster. + +#### `yarn start` + +Runs the app in the development mode. Open [http://localhost:3000](http://localhost:3000) to view it in the browser. -The page will reload if you make edits.\ +The page will reload if you make edits. You will also see any lint errors in the console. -### `yarn test` +#### `yarn test` -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. +Launches the test runner in the interactive watch mode. +See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) +for more information. -### `yarn build` +#### `yarn build` -Builds the app for production to the `build` folder.\ -It correctly bundles React in production mode and optimizes the build for the best performance. +Builds the app for production to the `build` folder. +It correctly bundles React in production mode and optimizes the build +for the best performance. -The build is minified and the filenames include the hashes.\ +The build is minified and the filenames include the hashes. Your app is ready to be deployed! -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. +See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) +for more information. -### `yarn eject` +#### `yarn eject` **Note: this is a one-way operation. Once you `eject`, you can’t go back!** -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. +If you aren’t satisfied with the build tool and configuration choices, +you can `eject` at any time. This command will remove the single build dependency +from your project. -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. +Instead, it will copy all the configuration files and the transitive dependencies +(webpack, Babel, ESLint, etc) right into your project so you have full control +over them. +All of the commands except `eject` will still work, but they will point to the +copied scripts so you can tweak them. At this point you’re on your own. -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. +You don’t have to ever use `eject`. The curated feature set is suitable for +small and middle deployments, and you shouldn’t feel obligated +to use this feature. +However we understand that this tool wouldn’t be useful +if you couldn’t customize it when you are ready for it. ## Learn More You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). diff --git a/deployment/helmchart/CHANGELOG.md b/deployment/helmchart/CHANGELOG.md index 74878e1..fae3c1f 100644 --- a/deployment/helmchart/CHANGELOG.md +++ b/deployment/helmchart/CHANGELOG.md @@ -1,5 +1,39 @@ -# [1.0.0] +# Changelog -## Bug fixes +## [1.0.4] -* Resolve "New dashboard user management blocks all apps for admin user" #61 +### Bug fixes + +* Don't fail initialize-user job when Dashboard app is already configured #64 + +### Updates + +* Update dashboard-backend to v0.2.6 + +## [1.0.3] + +### Features + +* Update frontend to 0.2.5 + +## [1.0.2] + +### Features + +* Update backend to 0.2.5 + +### Bug fixes + +* Check if app exists before inserting into DB on initialization #64 + +## [1.0.1] + +### Bug fixes + +* Resolve "App access role is not persistent" #63 + +## [1.0.0] + +### Bug fixes + +* Resolve "New dashboard user management blocks all apps for admin user" #61 diff --git a/deployment/helmchart/Chart.yaml b/deployment/helmchart/Chart.yaml index 652667c..8f63687 100644 --- a/deployment/helmchart/Chart.yaml +++ b/deployment/helmchart/Chart.yaml @@ -1,7 +1,7 @@ annotations: category: Dashboard apiVersion: v2 -appVersion: 0.2.4 +appVersion: 0.2.5 dependencies: - name: common # https://artifacthub.io/packages/helm/bitnami/common @@ -23,4 +23,4 @@ name: stackspin-dashboard sources: - https://open.greenhost.net/stackspin/dashboard/ - https://open.greenhost.net/stackspin/dashboard-backend/ -version: 1.0.0 +version: 1.0.4 diff --git a/deployment/helmchart/values.yaml b/deployment/helmchart/values.yaml index 7de2e8b..2474310 100644 --- a/deployment/helmchart/values.yaml +++ b/deployment/helmchart/values.yaml @@ -68,7 +68,7 @@ dashboard: image: registry: open.greenhost.net:4567 repository: stackspin/dashboard/dashboard - tag: 0-1-9 + tag: 0-2-5 ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ @@ -235,7 +235,7 @@ backend: image: registry: open.greenhost.net:4567 repository: stackspin/dashboard-backend/dashboard-backend - tag: 0-2-4 + tag: 0-2-6 ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ diff --git a/src/components/Form/Input/Input.tsx b/src/components/Form/Input/Input.tsx index aa7cdd4..91d5933 100644 --- a/src/components/Form/Input/Input.tsx +++ b/src/components/Form/Input/Input.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { useController } from 'react-hook-form'; /* eslint-disable react/react-in-jsx-scope */ -export const Input = ({ control, name, type = 'text', label, ...props }: InputProps) => { +export const Input = ({ control, name, type = 'text', label, required, ...props }: InputProps) => { const { field, // fieldState: { invalid, isTouched, isDirty }, @@ -10,7 +10,7 @@ export const Input = ({ control, name, type = 'text', label, ...props }: InputPr } = useController({ name, control, - rules: { required: true }, + rules: { required }, defaultValue: '', }); diff --git a/src/components/UserModal/UserModal.tsx b/src/components/UserModal/UserModal.tsx index a851fad..8bb4caa 100644 --- a/src/components/UserModal/UserModal.tsx +++ b/src/components/UserModal/UserModal.tsx @@ -134,11 +134,18 @@ export const UserModal = ({ open, onClose, userId, setUserId }: UserModalProps)
- +
- +
{isAdmin && ( <>