add cli option for generating a JWT; simplify templates

This commit is contained in:
Lou Knauer
2022-01-10 16:14:54 +01:00
parent b7432fca5f
commit 290e9b89bf
7 changed files with 117 additions and 75 deletions

View File

@@ -8,13 +8,7 @@
{{define "javascript"}}
<script>
const filterPresets = {{ .FilterPresets }};
const clusterCockpitConfigPromise = Promise.resolve({
plot_general_colorscheme: {{ .Config.plot_general_colorscheme }},
plot_general_lineWidth: {{ .Config.plot_general_lineWidth }},
plot_general_colorBackground: {{ .Config.plot_general_colorBackground }},
plot_list_selectedMetrics: {{ .Config.plot_list_selectedMetrics }},
plot_list_jobsPerPage: {{ .Config.plot_list_jobsPerPage }}
});
const clusterCockpitConfig = {{ .Config }};
</script>
<script src='/build/jobs.js'></script>
{{end}}

View File

@@ -7,16 +7,9 @@
{{end}}
{{define "javascript"}}
<script>
const userInfos = {
userId: "{{ .Infos.userId }}"
};
const clusterCockpitConfigPromise = Promise.resolve({
plot_general_colorscheme: {{ .Config.plot_general_colorscheme }},
plot_general_lineWidth: {{ .Config.plot_general_lineWidth }},
plot_general_colorBackground: {{ .Config.plot_general_colorBackground }},
plot_list_selectedMetrics: {{ .Config.plot_list_selectedMetrics }},
plot_list_jobsPerPage: {{ .Config.plot_list_jobsPerPage }}
});
const userInfos = {{ .Infos }};
const filterPresets = {{ .FilterPresets }};
const clusterCockpitConfig = {{ .Config }};
</script>
<script src='/build/user.js'></script>
{{end}}