Merge branch 'main' into feat/protect-users-endpoint
This commit is contained in:
commit
e7c4695a66
7 changed files with 94 additions and 34 deletions
|
@ -1,2 +1,2 @@
|
||||||
REACT_APP_API_URL=http://127.0.0.1:5000/api/v1
|
REACT_APP_API_URL=http://stackspin_proxy:8081/api/v1
|
||||||
REACT_APP_HYDRA_PUBLIC_URL=https://sso.init.stackspin.net
|
REACT_APP_HYDRA_PUBLIC_URL=https://sso.init.stackspin.net
|
||||||
|
|
61
README.md
61
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
|
||||||
|
<https://open.greenhost.net/stackspin/dashboard-backend>.
|
||||||
|
|
||||||
## 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.
|
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.
|
You will also see any lint errors in the console.
|
||||||
|
|
||||||
### `yarn test`
|
#### `yarn test`
|
||||||
|
|
||||||
Launches the test runner in the interactive watch mode.\
|
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.
|
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.\
|
Builds the app for production to the `build` folder.
|
||||||
It correctly bundles React in production mode and optimizes the build for the best performance.
|
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!
|
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!**
|
**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
|
## Learn More
|
||||||
|
|
||||||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
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/).
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
annotations:
|
annotations:
|
||||||
category: Dashboard
|
category: Dashboard
|
||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
appVersion: 0.2.4
|
appVersion: 0.2.5
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: common
|
- name: common
|
||||||
# https://artifacthub.io/packages/helm/bitnami/common
|
# https://artifacthub.io/packages/helm/bitnami/common
|
||||||
|
@ -23,4 +23,4 @@ name: stackspin-dashboard
|
||||||
sources:
|
sources:
|
||||||
- https://open.greenhost.net/stackspin/dashboard/
|
- https://open.greenhost.net/stackspin/dashboard/
|
||||||
- https://open.greenhost.net/stackspin/dashboard-backend/
|
- https://open.greenhost.net/stackspin/dashboard-backend/
|
||||||
version: 1.0.0
|
version: 1.0.4
|
||||||
|
|
|
@ -68,7 +68,7 @@ dashboard:
|
||||||
image:
|
image:
|
||||||
registry: open.greenhost.net:4567
|
registry: open.greenhost.net:4567
|
||||||
repository: stackspin/dashboard/dashboard
|
repository: stackspin/dashboard/dashboard
|
||||||
tag: 0-1-9
|
tag: 0-2-5
|
||||||
## Optionally specify an array of imagePullSecrets.
|
## Optionally specify an array of imagePullSecrets.
|
||||||
## Secrets must be manually created in the namespace.
|
## Secrets must be manually created in the namespace.
|
||||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||||
|
@ -235,7 +235,7 @@ backend:
|
||||||
image:
|
image:
|
||||||
registry: open.greenhost.net:4567
|
registry: open.greenhost.net:4567
|
||||||
repository: stackspin/dashboard-backend/dashboard-backend
|
repository: stackspin/dashboard-backend/dashboard-backend
|
||||||
tag: 0-2-4
|
tag: 0-2-6
|
||||||
## Optionally specify an array of imagePullSecrets.
|
## Optionally specify an array of imagePullSecrets.
|
||||||
## Secrets must be manually created in the namespace.
|
## Secrets must be manually created in the namespace.
|
||||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||||
|
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||||
import { useController } from 'react-hook-form';
|
import { useController } from 'react-hook-form';
|
||||||
|
|
||||||
/* eslint-disable react/react-in-jsx-scope */
|
/* 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 {
|
const {
|
||||||
field,
|
field,
|
||||||
// fieldState: { invalid, isTouched, isDirty },
|
// fieldState: { invalid, isTouched, isDirty },
|
||||||
|
@ -10,7 +10,7 @@ export const Input = ({ control, name, type = 'text', label, ...props }: InputPr
|
||||||
} = useController({
|
} = useController({
|
||||||
name,
|
name,
|
||||||
control,
|
control,
|
||||||
rules: { required: true },
|
rules: { required },
|
||||||
defaultValue: '',
|
defaultValue: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -134,11 +134,18 @@ export const UserModal = ({ open, onClose, userId, setUserId }: UserModalProps)
|
||||||
|
|
||||||
<div className="mt-6 grid grid-cols-1 gap-y-6 gap-x-4 sm:grid-cols-6">
|
<div className="mt-6 grid grid-cols-1 gap-y-6 gap-x-4 sm:grid-cols-6">
|
||||||
<div className="sm:col-span-3">
|
<div className="sm:col-span-3">
|
||||||
<Input control={control} name="name" label="Name" onKeyPress={handleKeyPress} />
|
<Input control={control} name="name" label="Name" onKeyPress={handleKeyPress} required={false} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="sm:col-span-3">
|
<div className="sm:col-span-3">
|
||||||
<Input control={control} name="email" label="Email" type="email" onKeyPress={handleKeyPress} />
|
<Input
|
||||||
|
control={control}
|
||||||
|
name="email"
|
||||||
|
label="Email"
|
||||||
|
type="email"
|
||||||
|
onKeyPress={handleKeyPress}
|
||||||
|
required
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
{isAdmin && (
|
{isAdmin && (
|
||||||
<>
|
<>
|
||||||
|
|
Loading…
Reference in a new issue