Merge branch 'main' into register-deregister-actions

# Conflicts:
#	pkgs/ui/src/components/sequence_diagram/index.tsx
This commit is contained in:
Arslan, Erdem
2024-01-21 20:45:24 +01:00
7 changed files with 162 additions and 168 deletions

View File

@@ -1,5 +1,25 @@
# cLan - awesome UI
The files in `src/api` are autogenerated from the openapi.json. The openapi.json comes from the backend, from fastapi which autogenerates the openapi.json file from the python code.
We then use orval to generate typescript files to `src/api`
## Build Development Web UI
To build the dev web ui with hotreloading
```bash
npm run dev
```
## Build release Web UI
To build the release version execute
```bash
npm run build
```
## Updating dependencies
After changing dependencies with
@@ -16,14 +36,6 @@ To sort classnames manually:
`cd /clan-core/pkgs/ui/`
## Upload ui to gitea
## Troubleshooting
Create a gitea token here: https://git.clan.lol/user/settings/applications
Than run this command:
```
GITEA_TOKEN=<YOUR_TOKEN> nix run .#update-ui-assets
```
.
Sometimes new endpoints don't appear in `src/api`. Delete the `ui/openapi.json` file and execute `direnv reload`

View File

@@ -1,5 +1,5 @@
{ fetchzip }:
fetchzip {
url = "https://gitea.gchq.icu/api/packages/IoSL/generic/IoSL-service-aware-frontend/1m8l6mwmcwgl25pnh4gyzx7jgbfdrrmnqn61nqh10mmadlxh2lay/assets.tar.gz";
sha256 = "1m8l6mwmcwgl25pnh4gyzx7jgbfdrrmnqn61nqh10mmadlxh2lay";
url = "https://gitea.gchq.icu/api/packages/IoSL/generic/IoSL-service-aware-frontend/0c4ihz96c4q5d0ikjj7b6vpj43fsv0xnj1viicv8v5kjvdz8s6nw/assets.tar.gz";
sha256 = "0c4ihz96c4q5d0ikjj7b6vpj43fsv0xnj1viicv8v5kjvdz8s6nw";
}

View File

@@ -7,6 +7,7 @@ import { HomeTableConfig } from "@/config/home";
import dynamic from "next/dynamic";
import { useEffect } from "react";
import { mutate } from "swr";
import ErrorBoundary from "@/components/error_boundary";
const NoSSRSequenceDiagram = dynamic(
() => import("../../components/sequence_diagram"),
@@ -56,7 +57,9 @@ export default function Home() {
<div>
<h4>Sequence Diagram</h4>
<NoSSRSequenceDiagram />
<ErrorBoundary>
<NoSSRSequenceDiagram />
</ErrorBoundary>
</div>
</div>
);