diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-12-12 14:55:43 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-12-12 14:55:43 +0100 |
| commit | 9d46048cb9b227d292b8587cdfe883ea8576e7f4 (patch) | |
| tree | 056d0df21b4c3e8411c557afa19698f1972c7c78 | |
| parent | 433029d5d48f3f2c13c8a6c4a62adf668d79eb07 (diff) | |
dashboard/app: allow fragment links to namespaces
Now "#foo" link will point to namespace "foo".
| -rw-r--r-- | dashboard/app/main.go | 8 | ||||
| -rw-r--r-- | dashboard/app/main.html | 4 | ||||
| -rw-r--r-- | dashboard/app/templates.html | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/dashboard/app/main.go b/dashboard/app/main.go index 439c9d7fc..99915f1fa 100644 --- a/dashboard/app/main.go +++ b/dashboard/app/main.go @@ -73,6 +73,7 @@ type uiBugPage struct { type uiBugGroup struct { Now time.Time Caption string + Namespace string ShowNamespace bool Bugs []*uiBug } @@ -273,9 +274,10 @@ func fetchBugs(c context.Context) ([]*uiBugGroup, error) { for ns, bugs := range groups { sort.Sort(uiBugSorter(bugs)) res = append(res, &uiBugGroup{ - Now: now, - Caption: fmt.Sprintf("%v (%v)", ns, len(bugs)), - Bugs: bugs, + Now: now, + Caption: fmt.Sprintf("%v (%v)", ns, len(bugs)), + Namespace: ns, + Bugs: bugs, }) } sort.Sort(uiBugGroupSorter(res)) diff --git a/dashboard/app/main.html b/dashboard/app/main.html index ba7d094cf..5007ec533 100644 --- a/dashboard/app/main.html +++ b/dashboard/app/main.html @@ -22,7 +22,7 @@ Main page. </script> <br><br> - <table class="list_table"> + <table class="list_table" id="managers"> <caption>Managers:</caption> <tr> <th>Name</th> @@ -57,7 +57,7 @@ Main page. </table> <br><br> - <table class="list_table"> + <table class="list_table" id="jobs"> <caption>Recent jobs:</caption> <tr> <th>Created</th> diff --git a/dashboard/app/templates.html b/dashboard/app/templates.html index 510d9e49b..b026a9970 100644 --- a/dashboard/app/templates.html +++ b/dashboard/app/templates.html @@ -7,7 +7,7 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the {{define "bug_list"}} {{if .}} {{if .Bugs}} -<table class="list_table"> +<table class="list_table" id="{{$.Namespace}}"> <caption>{{$.Caption}}:</caption> <tr> {{if $.ShowNamespace}}<th>Kernel</th>{{end}} |
