From 802c10588f7dd1d00e02ae1414ab9f3ca4b3a297 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Fri, 9 Sep 2022 15:27:00 +0200 Subject: [PATCH] Completely replace outdated template config rendering - Deleted respective old files - Renamed new components --- internal/routerConfig/routes.go | 1 - web/frontend/rollup.config.js | 2 +- ...gsvelte.root.svelte => Config.root.svelte} | 0 ...lte.entrypoint.js => config.entrypoint.js} | 4 +- web/templates/config.tmpl | 302 +----------------- web/templates/configsvelte.tmpl | 15 - 6 files changed, 14 insertions(+), 310 deletions(-) rename web/frontend/src/{Configsvelte.root.svelte => Config.root.svelte} (100%) rename web/frontend/src/{configsvelte.entrypoint.js => config.entrypoint.js} (74%) delete mode 100644 web/templates/configsvelte.tmpl diff --git a/internal/routerConfig/routes.go b/internal/routerConfig/routes.go index 068709f..ad3a103 100644 --- a/internal/routerConfig/routes.go +++ b/internal/routerConfig/routes.go @@ -36,7 +36,6 @@ type Route struct { var routes []Route = []Route{ {"/", "home.tmpl", "ClusterCockpit", false, setupHomeRoute}, {"/config", "config.tmpl", "Settings", false, func(i InfoType, r *http.Request) InfoType { return i }}, - {"/configsvelte", "configsvelte.tmpl", "Settings as Svelte", false, func(i InfoType, r *http.Request) InfoType { return i }}, {"/monitoring/jobs/", "monitoring/jobs.tmpl", "Jobs - ClusterCockpit", true, func(i InfoType, r *http.Request) InfoType { return i }}, {"/monitoring/job/{id:[0-9]+}", "monitoring/job.tmpl", "Job - ClusterCockpit", false, setupJobRoute}, {"/monitoring/users/", "monitoring/list.tmpl", "Users - ClusterCockpit", true, func(i InfoType, r *http.Request) InfoType { i["listType"] = "USER"; return i }}, diff --git a/web/frontend/rollup.config.js b/web/frontend/rollup.config.js index 199a157..ecee8ca 100644 --- a/web/frontend/rollup.config.js +++ b/web/frontend/rollup.config.js @@ -66,5 +66,5 @@ export default [ entrypoint('node', 'src/node.entrypoint.js'), entrypoint('analysis', 'src/analysis.entrypoint.js'), entrypoint('status', 'src/status.entrypoint.js'), - entrypoint('configsvelte', 'src/configsvelte.entrypoint.js') + entrypoint('config', 'src/config.entrypoint.js') ]; diff --git a/web/frontend/src/Configsvelte.root.svelte b/web/frontend/src/Config.root.svelte similarity index 100% rename from web/frontend/src/Configsvelte.root.svelte rename to web/frontend/src/Config.root.svelte diff --git a/web/frontend/src/configsvelte.entrypoint.js b/web/frontend/src/config.entrypoint.js similarity index 74% rename from web/frontend/src/configsvelte.entrypoint.js rename to web/frontend/src/config.entrypoint.js index 43e3434..5c9e525 100644 --- a/web/frontend/src/configsvelte.entrypoint.js +++ b/web/frontend/src/config.entrypoint.js @@ -1,7 +1,7 @@ import {} from './header.entrypoint.js' -import Configsvelte from './Configsvelte.root.svelte' +import Config from './Config.root.svelte' -new Configsvelte({ +new Config({ target: document.getElementById('svelte-app'), props: { user: user diff --git a/web/templates/config.tmpl b/web/templates/config.tmpl index b8a3027..d4072f5 100644 --- a/web/templates/config.tmpl +++ b/web/templates/config.tmpl @@ -1,295 +1,15 @@ {{define "content"}} -{{if .User.IsAdmin}} -
-
-
-
Create User
-
- - -
Optional, can be blank.
-
-
- - -
Optional, can be blank.
-
-
- - -
Must be unique.
-
-
- - -
Only API users are allowed to have a blank password. Users with a blank password can only authenticate via Tokens.
-
-
-

Role:

-
- - -
-
- - -
-
- - -
-
-

- -

- -
-
-
-
-
Special Users
-

Not created by an LDAP sync and/or having a role other than user

- -
- - - - - - - - - - - - - - - - -
UsernameNameEmailRolesJWTDelete
-
Loading...
-
-
- -
-
-
-
-
-
-
Add Role to User
-
- - - -
- -
-
-
-
-
Scramble Names / Presentation Mode
- - -
-
-
+
{{end}} -
-
-
-
Line Width
- -
- - -
Width of the lines in the timeseries plots.
-
-

- -

- -
-
-
-
-
Plots per Row
- -
- - -
How many plots to show next to each other on pages such as /monitoring/job/, /monitoring/system/...
-
-

- -

- -
-
-
-
-
Colored Backgrounds
- -
-
- - -
-
- - -
-
-

- -

- -
-
-
-
-
-
-
Colorscheme for Timeseries Plots
- - - - -
-

- -

- -
-
-
- +{{define "stylesheets"}} + +{{end}} +{{define "javascript"}} + + {{end}} diff --git a/web/templates/configsvelte.tmpl b/web/templates/configsvelte.tmpl deleted file mode 100644 index ab188b1..0000000 --- a/web/templates/configsvelte.tmpl +++ /dev/null @@ -1,15 +0,0 @@ -{{define "content"}} -
-{{end}} - -{{define "stylesheets"}} - -{{end}} -{{define "javascript"}} - - -{{end}}