Skip to content

Commit

Permalink
Merge pull request #10 from 2060-io/feat-schema
Browse files Browse the repository at this point in the history
docs: add exaple values
  • Loading branch information
lotharking authored Jul 8, 2024
2 parents 0731d5b + 6ac8ce5 commit 434581e
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 7 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ FROM node:20-alpine as runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/next.config.mjs ./
# COPY --from=builder /app/.next/standalone ./
# COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules
Expand Down
44 changes: 40 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,46 @@ Build from TailAdmin Next.js - Free Next.js Tailwind Admin Dashboard Template


Demo frontend with TailAdmin + openid + quarkus dashboard-backend
Openid connect info is hard-coded in app.

## TODO
## Pre-requisites
- A bash-compatible shell such as [Git Bash](https://git-scm.com/downloads)
- A nodeV20 such as [Node](https://nodejs.org/en/download/package-manager)
- A yarn such as [Yarn](https://classic.yarnpkg.com/lang/en/docs/install/#debian-stable)

Demo only.
Works only with local dashboard-backend on localhost:2601.
## Try the demo(s)
Once you have ensured you have the project prerequisites, you should clone the project using the command:
```bash
git clone https://github.com/2060-io/dashboard-frontend.git
```

Openid connect info is hard-coded in app.
Subsequently, bear in mind that you can work on the project in a development environment using the command:
```bash
yarn dev
```

### Params
For the successful development of the project, it is essential to use the following variables. These are utilized by the dashboard to interact with the backend responsible for service deployment:
- `NEXT_PUBLIC_BACKEND_BASE_PATH`: Variable pointing to the backend being used.
- `NEXT_PUBLIC_KEYCLOAK_URL`: URL of the identity provider used (Keycloak in this case).
- `NEXT_PUBLIC_KEYCLOAK_CLIENT_ID`: Client ID of the identity provider (Keycloak in this case).
- `NEXT_PUBLIC_KEYCLOAK_REDIRECT_URI`: Redirect URL once authentication is successful.
- `NEXT_PUBLIC_KEYCLOAK_POST_LOGOUT_REDIRECT_URI`: Redirect URL once logout is successful.
- `NEXT_PUBLIC_KEYCLOAK_PRES_REQ_CONF_ID`: Additional variable used for the frontend to interact with the correct identity provider.
- `NEXT_PUBLIC_TEMPLATE_DIR`: Directory of templates repository.
- `NEXT_PUBLIC_TEMPLATE_BRANCH`: Branch in the templates repository.
- `NEXT_PUBLIC_TEMPLATE_SCHEMA_DIR`: Location of the schema file for validating templates.

```.env
NEXT_PUBLIC_BACKEND_BASE_PATH=https://orchestrator_example.2060.io
NEXT_PUBLIC_KEYCLOAK_URL=https://keycloak_example.io/realms/2060io
NEXT_PUBLIC_KEYCLOAK_CLIENT_ID=frontend-example
NEXT_PUBLIC_KEYCLOAK_REDIRECT_URI=http://localhost:3000/
NEXT_PUBLIC_KEYCLOAK_POST_LOGOUT_REDIRECT_URI=http://localhost:3000/
NEXT_PUBLIC_KEYCLOAK_PRES_REQ_CONF_ID=showcase-person
# Template repo
NEXT_PUBLIC_TEMPLATE_DIR=2060-io/dashboard-templates
NEXT_PUBLIC_TEMPLATE_BRANCH=main
NEXT_PUBLIC_TEMPLATE_SCHEMA_DIR=Fastbot/schema_dir.json
```
6 changes: 5 additions & 1 deletion src/components/Services/DtsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ function DtsList() {
const requestParameters = new DtsListPostRequestClass();
requestParameters.dtsFilter = filterw;

api.dtsListPost(requestParameters).then((resp) => setDtsVOs(resp));
api.dtsListPost(requestParameters).then((resp) => setDtsVOs(resp))
.catch((error) => setDtsVOs([
{description: "Description",state: EntityState.Editing,name: "Default name",debug: false, createdTs: new Date()},
{description: "Description",state: EntityState.Editing,name: "Default name 2",debug: false, createdTs: new Date()}
]));
}

useEffect(() => {
Expand Down

0 comments on commit 434581e

Please sign in to comment.