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> <script>
const header = { const header = {
"username": "{{ .User.Username }}", "username": "{{ .User.Username }}",
"isAdmin": "{{ .User.IsAdmin }}", "isAdmin": {{ .User.IsAdmin }},
"clusters": {{ .Clusters }}, "clusters": {{ .Clusters }},
}; };
</script> </script>
</head> </head>
<body class="site"> <body class="site">
<header id="svelte-header"></header> {{block "navigation" .}}
<header id="svelte-header"></header>
{{end}}
<main class="site-content"> <main class="site-content">
<div class="container"> <div class="container">

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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