Fix header

This commit is contained in:
Lou Knauer 2022-02-16 11:48:06 +01:00
parent dd5d5214d7
commit b685462cb2
10 changed files with 5 additions and 16 deletions

@ -1 +1 @@
Subproject commit 0ade283c31060bbc5b70a36ffc1e7f865740e1d0
Subproject commit 63c44bf55bc1c50a437cc7961918129ca0406988

View File

@ -16,13 +16,15 @@
<script>
const header = {
"username": "{{ .User.Username }}",
"isAdmin": "{{ .User.IsAdmin }}",
"isAdmin": {{ .User.IsAdmin }},
"clusters": {{ .Clusters }},
};
</script>
</head>
<body class="site">
{{block "navigation" .}}
<header id="svelte-header"></header>
{{end}}
<main class="site-content">
<div class="container">

View File

@ -7,7 +7,6 @@
{{end}}
{{define "javascript"}}
<script>
header.currentView = 'analysis';
const cluster = {{ .Infos.cluster }};
const filterPresets = {{ .FilterPresets }};
const clusterCockpitConfig = {{ .Config }};

View File

@ -7,7 +7,6 @@
{{end}}
{{define "javascript"}}
<script>
header.currentView = 'job';
const jobInfos = {
id: "{{ .Infos.id }}",
jobId: "{{ .Infos.jobId }}",

View File

@ -8,7 +8,6 @@
{{define "javascript"}}
<script>
header.currentView = 'jobs';
const filterPresets = {{ .FilterPresets }};
const clusterCockpitConfig = {{ .Config }};
</script>

View File

@ -7,7 +7,6 @@
{{end}}
{{define "javascript"}}
<script>
header.currentView = {{ .Infos.listType }}.toLowerCase() + 's';
const listType = {{ .Infos.listType }};
const filterPresets = {{ .FilterPresets }};
const clusterCockpitConfig = {{ .Config }};

View File

@ -7,7 +7,6 @@
{{end}}
{{define "javascript"}}
<script>
header.currentView = 'node';
const infos = {{ .Infos }};
const clusterCockpitConfig = {{ .Config }};
</script>

View File

@ -7,7 +7,6 @@
{{end}}
{{define "javascript"}}
<script>
header.currentView = 'system';
const infos = {{ .Infos }};
const clusterCockpitConfig = {{ .Config }};
</script>

View File

@ -1,9 +1,3 @@
{{define "javascript"}}
<script>
header.currentView = 'tags';
</script>
<script src='/build/header.js'></script>
{{end}}
{{define "content"}}
<div class="container">
<div class="row justify-content-center">

View File

@ -7,7 +7,6 @@
{{end}}
{{define "javascript"}}
<script>
header.currentView = 'user';
const userInfos = {{ .Infos }};
const filterPresets = {{ .FilterPresets }};
const clusterCockpitConfig = {{ .Config }};