From 6eec663a07177771b7c579312fec8cb36074cbb9 Mon Sep 17 00:00:00 2001 From: Varac Date: Thu, 16 Jun 2022 12:17:07 +0200 Subject: [PATCH 1/8] Use stackspin_proxy instead of 127.0.0.1 --- .env.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 7cc1b63365fd69680927b2c9d62b34a19bef05b5 Mon Sep 17 00:00:00 2001 From: Varac Date: Thu, 16 Jun 2022 12:33:03 +0200 Subject: [PATCH 2/8] Lint README.md, document .env file usgae --- README.md | 61 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 21 deletions(-) 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/). From 7ff79db6affb59f21d60cba6913eb1acbc2d9f7f Mon Sep 17 00:00:00 2001 From: Davor Date: Tue, 21 Jun 2022 12:48:51 +0200 Subject: [PATCH 3/8] fix issue with editing users without 'name' --- deployment/helmchart/CHANGELOG.md | 4 ++-- deployment/helmchart/Chart.yaml | 4 ++-- src/components/Form/Input/Input.tsx | 4 ++-- src/components/UserModal/UserModal.tsx | 11 +++++++++-- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/deployment/helmchart/CHANGELOG.md b/deployment/helmchart/CHANGELOG.md index 74878e1..6b91dd7 100644 --- a/deployment/helmchart/CHANGELOG.md +++ b/deployment/helmchart/CHANGELOG.md @@ -1,5 +1,5 @@ -# [1.0.0] +# [1.0.1] ## Bug fixes -* Resolve "New dashboard user management blocks all apps for admin user" #61 +* Resolve "App access role is not persistent" #63 diff --git a/deployment/helmchart/Chart.yaml b/deployment/helmchart/Chart.yaml index 652667c..d851ec1 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.1 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 00fcb9b..bafc99b 100644 --- a/src/components/UserModal/UserModal.tsx +++ b/src/components/UserModal/UserModal.tsx @@ -116,11 +116,18 @@ export const UserModal = ({ open, onClose, userId, setUserId }: UserModalProps)
- +
- +
{isAdmin && ( <> From c6aedc3f3c72036f931811676204799eebe6d917 Mon Sep 17 00:00:00 2001 From: Davor Date: Tue, 21 Jun 2022 12:58:31 +0200 Subject: [PATCH 4/8] change changelog --- deployment/helmchart/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/deployment/helmchart/CHANGELOG.md b/deployment/helmchart/CHANGELOG.md index 6b91dd7..d1cc00d 100644 --- a/deployment/helmchart/CHANGELOG.md +++ b/deployment/helmchart/CHANGELOG.md @@ -3,3 +3,9 @@ ## 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 From a59e311648383207470c9d7c47b4f4f9e0430663 Mon Sep 17 00:00:00 2001 From: Varac Date: Tue, 21 Jun 2022 16:18:14 +0200 Subject: [PATCH 5/8] Update dashboard-backend to v0.2.5 --- deployment/helmchart/CHANGELOG.md | 6 ++++++ deployment/helmchart/Chart.yaml | 2 +- deployment/helmchart/values.yaml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/deployment/helmchart/CHANGELOG.md b/deployment/helmchart/CHANGELOG.md index d1cc00d..7d31389 100644 --- a/deployment/helmchart/CHANGELOG.md +++ b/deployment/helmchart/CHANGELOG.md @@ -1,3 +1,9 @@ +# [1.0.2] + +## Bug fixes + +* Check if app exists before inserting into DB on initialization #64 + # [1.0.1] ## Bug fixes diff --git a/deployment/helmchart/Chart.yaml b/deployment/helmchart/Chart.yaml index d851ec1..8c9db16 100644 --- a/deployment/helmchart/Chart.yaml +++ b/deployment/helmchart/Chart.yaml @@ -23,4 +23,4 @@ name: stackspin-dashboard sources: - https://open.greenhost.net/stackspin/dashboard/ - https://open.greenhost.net/stackspin/dashboard-backend/ -version: 1.0.1 +version: 1.0.2 diff --git a/deployment/helmchart/values.yaml b/deployment/helmchart/values.yaml index 7de2e8b..58f22cd 100644 --- a/deployment/helmchart/values.yaml +++ b/deployment/helmchart/values.yaml @@ -235,7 +235,7 @@ backend: image: registry: open.greenhost.net:4567 repository: stackspin/dashboard-backend/dashboard-backend - tag: 0-2-4 + 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/ From cc28eeffdacd24c05b4023e57b2e9a6ee462783c Mon Sep 17 00:00:00 2001 From: Varac Date: Tue, 21 Jun 2022 17:08:12 +0200 Subject: [PATCH 6/8] Update dashboard to v0.2.5 --- deployment/helmchart/CHANGELOG.md | 10 ++++++++++ deployment/helmchart/Chart.yaml | 2 +- deployment/helmchart/values.yaml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/deployment/helmchart/CHANGELOG.md b/deployment/helmchart/CHANGELOG.md index 7d31389..0d195a8 100644 --- a/deployment/helmchart/CHANGELOG.md +++ b/deployment/helmchart/CHANGELOG.md @@ -1,5 +1,15 @@ +# [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 diff --git a/deployment/helmchart/Chart.yaml b/deployment/helmchart/Chart.yaml index 8c9db16..fb408a5 100644 --- a/deployment/helmchart/Chart.yaml +++ b/deployment/helmchart/Chart.yaml @@ -23,4 +23,4 @@ name: stackspin-dashboard sources: - https://open.greenhost.net/stackspin/dashboard/ - https://open.greenhost.net/stackspin/dashboard-backend/ -version: 1.0.2 +version: 1.0.3 diff --git a/deployment/helmchart/values.yaml b/deployment/helmchart/values.yaml index 58f22cd..4af6af4 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/ From f565228f3b6a30bb8bdb203d2ff8612f8e1e656b Mon Sep 17 00:00:00 2001 From: Varac Date: Wed, 22 Jun 2022 12:28:04 +0200 Subject: [PATCH 7/8] Update dashboard-backend to v0.2.6 --- deployment/helmchart/CHANGELOG.md | 30 +++++++++++++++++++----------- deployment/helmchart/Chart.yaml | 2 +- deployment/helmchart/values.yaml | 2 +- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/deployment/helmchart/CHANGELOG.md b/deployment/helmchart/CHANGELOG.md index 0d195a8..607bf55 100644 --- a/deployment/helmchart/CHANGELOG.md +++ b/deployment/helmchart/CHANGELOG.md @@ -1,27 +1,35 @@ -# [1.0.3] +# Changelog -## Features +## [1.0.4] + +### Bug fixes + +* Don't fail initialize-user job when Dashboard app is already configured #64 + +## [1.0.3] + +### Features * Update frontend to 0.2.5 -# [1.0.2] +## [1.0.2] -## Features +### Features * Update backend to 0.2.5 -## Bug fixes +### Bug fixes * Check if app exists before inserting into DB on initialization #64 -# [1.0.1] +## [1.0.1] -## Bug fixes +### Bug fixes -* Resolve "App access role is not persistent" #63 +* Resolve "App access role is not persistent" #63 -# [1.0.0] +## [1.0.0] -## Bug fixes +### Bug fixes -* Resolve "New dashboard user management blocks all apps for admin user" #61 +* 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 fb408a5..8f63687 100644 --- a/deployment/helmchart/Chart.yaml +++ b/deployment/helmchart/Chart.yaml @@ -23,4 +23,4 @@ name: stackspin-dashboard sources: - https://open.greenhost.net/stackspin/dashboard/ - https://open.greenhost.net/stackspin/dashboard-backend/ -version: 1.0.3 +version: 1.0.4 diff --git a/deployment/helmchart/values.yaml b/deployment/helmchart/values.yaml index 4af6af4..2474310 100644 --- a/deployment/helmchart/values.yaml +++ b/deployment/helmchart/values.yaml @@ -235,7 +235,7 @@ backend: image: registry: open.greenhost.net:4567 repository: stackspin/dashboard-backend/dashboard-backend - tag: 0-2-5 + 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/ From 9349ac889c6ffd0a472ab512fe901de96362949d Mon Sep 17 00:00:00 2001 From: Varac Date: Wed, 22 Jun 2022 16:26:43 +0200 Subject: [PATCH 8/8] Reference backend update in CHANGELOG.md --- deployment/helmchart/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deployment/helmchart/CHANGELOG.md b/deployment/helmchart/CHANGELOG.md index 607bf55..fae3c1f 100644 --- a/deployment/helmchart/CHANGELOG.md +++ b/deployment/helmchart/CHANGELOG.md @@ -6,6 +6,10 @@ * 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