diff options
| author | Space Meyer <spm@google.com> | 2023-06-12 13:57:43 +0200 |
|---|---|---|
| committer | Space Meyer <git@the-space.agency> | 2023-06-12 17:16:51 +0200 |
| commit | 749afb64a55dba8e4a50d96bc287ae06346b4244 (patch) | |
| tree | 3807d8fa6b7f48fdde4417f4d4cb29769ea6682a | |
| parent | 2d0582f691044a9bcc8199bc4bec0aa6979340a2 (diff) | |
dashboard: add fake admin namespace to ns dropdown
The dropdown is the only UI element that lets users exit the admin
page, so removing it from the admin page is not advisable. However
since the admin page is not a real namespace, the dropdown will display
the name of the first namespace, when visiting the admin page. This
confuses new users.
| -rw-r--r-- | dashboard/app/templates.html | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dashboard/app/templates.html b/dashboard/app/templates.html index 9529654e2..6278c1f7d 100644 --- a/dashboard/app/templates.html +++ b/dashboard/app/templates.html @@ -33,6 +33,9 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the </td> <td class="namespace_td"> <select class="namespace" onchange="window.location.href = '/' + this.value + '{{.Subpage}}';"> + {{if .Admin}} + <option value="admin" {{if eq $.Namespace "admin"}}selected="1"{{end}}>Admin</option> + {{end}} {{- range $ns := .Namespaces}} <option value="{{$ns.Name}}" {{if eq $.Namespace $ns.Name}}selected="1"{{end}}> {{- $ns.Caption -}} |
