aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-12-04 12:13:10 +0100
committerDmitry Vyukov <dvyukov@google.com>2017-12-04 12:13:10 +0100
commitde212f1a0585a4fdd4a50da80307ec3a5792aab7 (patch)
tree04ab20ad6fe592b1c8ce69804f1b47ee713abaff
parent09582d53064aa637f056daa066342127e4e0f763 (diff)
dashboard/app: show manager addresses
-rw-r--r--dashboard/app/api.go1
-rw-r--r--dashboard/app/entities.go1
-rw-r--r--dashboard/app/main.go2
-rw-r--r--dashboard/app/main.html2
4 files changed, 5 insertions, 1 deletions
diff --git a/dashboard/app/api.go b/dashboard/app/api.go
index 53ea252ac..6cf47e1ff 100644
--- a/dashboard/app/api.go
+++ b/dashboard/app/api.go
@@ -628,6 +628,7 @@ func apiManagerStats(c context.Context, ns string, r *http.Request) (interface{}
}
now := timeNow(c)
if err := updateManager(c, ns, req.Name, func(mgr *Manager, stats *ManagerStats) {
+ mgr.Link = req.Addr
mgr.LastAlive = now
mgr.CurrentUpTime = req.UpTime
if cur := int64(req.Corpus); cur > stats.MaxCorpus {
diff --git a/dashboard/app/entities.go b/dashboard/app/entities.go
index 492ca198e..b70354fb1 100644
--- a/dashboard/app/entities.go
+++ b/dashboard/app/entities.go
@@ -27,6 +27,7 @@ const (
type Manager struct {
Namespace string
Name string
+ Link string
CurrentBuild string
FailedBuildBug string
LastAlive time.Time
diff --git a/dashboard/app/main.go b/dashboard/app/main.go
index 1091abbeb..601bc8398 100644
--- a/dashboard/app/main.go
+++ b/dashboard/app/main.go
@@ -38,6 +38,7 @@ type uiMain struct {
type uiManager struct {
Namespace string
Name string
+ Link string
CurrentBuild *uiBuild
FailedBuildBugLink string
LastActive time.Time
@@ -496,6 +497,7 @@ func loadManagers(c context.Context) ([]*uiManager, error) {
results = append(results, &uiManager{
Namespace: mgr.Namespace,
Name: mgr.Name,
+ Link: mgr.Link,
CurrentBuild: uiBuilds[mgr.Namespace+"|"+mgr.CurrentBuild],
FailedBuildBugLink: bugLink(mgr.FailedBuildBug),
LastActive: mgr.LastAlive,
diff --git a/dashboard/app/main.html b/dashboard/app/main.html
index abdc632f5..ba7d094cf 100644
--- a/dashboard/app/main.html
+++ b/dashboard/app/main.html
@@ -38,7 +38,7 @@ Main page.
</tr>
{{range $mgr := $.Managers}}
<tr>
- <td>{{$mgr.Namespace}}/{{$mgr.Name}}</td>
+ <td><a href="{{$mgr.Link}}">{{$mgr.Namespace}}/{{$mgr.Name}}</a></td>
<td class="stat {{if $mgr.LastActiveBad}}bad{{end}}">{{formatLateness $.Now $mgr.LastActive}}</td>
{{if $mgr.CurrentBuild}}
<td class="stat" title="{{$mgr.CurrentBuild.KernelRepo}}/{{$mgr.CurrentBuild.KernelBranch}}/{{$mgr.CurrentBuild.KernelCommit}} (syzkaller {{$mgr.CurrentBuild.SyzkallerCommit}})">{{formatLateness $.Now $mgr.CurrentBuild.Time}}</td>