Skip to content

Commit

Permalink
Merge pull request #1438 from bosun-monitor/dashcolors
Browse files Browse the repository at this point in the history
Adding bar for current status to dashboard.
  • Loading branch information
kylebrandt committed Nov 3, 2015
2 parents 7f255e3 + 58f6a3f commit 14ed867
Show file tree
Hide file tree
Showing 7 changed files with 113 additions and 96 deletions.
4 changes: 3 additions & 1 deletion cmd/bosun/sched/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ func (s *Schedule) runHistory(r *RunHistory, ak expr.AlertKey, event *Event, sil
wasOpen := state.Open
// render templates and open alert key if abnormal
if event.Status > StNormal {
s.executeTemplates(state, event, a, r)
if event.Status >= last {
s.executeTemplates(state, event, a, r)
}
state.Open = true
if a.Log {
state.Open = false
Expand Down
48 changes: 26 additions & 22 deletions cmd/bosun/sched/sched.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,11 @@ func (s *Schedule) GetMetadata(metric string, subset opentsdb.TagSet) ([]metadat
type States map[expr.AlertKey]*State

type StateTuple struct {
NeedAck bool
Active bool
Status Status
Silenced bool
NeedAck bool
Active bool
Status Status
CurrentStatus Status
Silenced bool
}

// GroupStates groups by NeedAck, Active, Status, and Silenced.
Expand All @@ -233,10 +234,11 @@ func (states States) GroupStates(silenced map[expr.AlertKey]Silence) map[StateTu
for ak, st := range states {
_, sil := silenced[ak]
t := StateTuple{
st.NeedAck,
st.IsActive(),
st.AbnormalStatus(),
sil,
NeedAck: st.NeedAck,
Active: st.IsActive(),
Status: st.AbnormalStatus(),
CurrentStatus: st.Status(),
Silenced: sil,
}
if _, present := r[t]; !present {
r[t] = make(States)
Expand Down Expand Up @@ -341,16 +343,17 @@ func (s *Schedule) GetOpenStates() States {
}

type StateGroup struct {
Active bool `json:",omitempty"`
Status Status
Silenced bool
IsError bool `json:",omitempty"`
Subject string `json:",omitempty"`
Alert string `json:",omitempty"`
AlertKey expr.AlertKey `json:",omitempty"`
Ago string `json:",omitempty"`
State *State `json:",omitempty"`
Children []*StateGroup `json:",omitempty"`
Active bool `json:",omitempty"`
Status Status
Silenced bool
CurrentStatus Status
IsError bool `json:",omitempty"`
Subject string `json:",omitempty"`
Alert string `json:",omitempty"`
AlertKey expr.AlertKey `json:",omitempty"`
Ago string `json:",omitempty"`
State *State `json:",omitempty"`
Children []*StateGroup `json:",omitempty"`
}

type StateGroups struct {
Expand Down Expand Up @@ -414,10 +417,11 @@ func (s *Schedule) MarshalGroups(T miniprofiler.Timer, filter string) (*StateGro
})
for name, group := range sets {
g := StateGroup{
Active: tuple.Active,
Status: tuple.Status,
Silenced: tuple.Silenced,
Subject: fmt.Sprintf("%s - %s", tuple.Status, name),
Active: tuple.Active,
Status: tuple.Status,
CurrentStatus: tuple.CurrentStatus,
Silenced: tuple.Silenced,
Subject: fmt.Sprintf("%s - %s", tuple.Status, name),
}
for _, ak := range group {
st := s.status[ak].Copy()
Expand Down
139 changes: 71 additions & 68 deletions cmd/bosun/web/static.go
Original file line number Diff line number Diff line change
Expand Up @@ -9098,7 +9098,7 @@ xitlUKAxazlo8/8JAAD//4NB/DtLfAAA

"/js/bosun.js": {
local: "web/static/js/bosun.js",
size: 99679,
size: 99739,
modtime: 0,
compressed: `
H4sIAAAJbogA/+y9fXvbNrI4+vfpp2C0aUTXsmS7Tbfr1MlNk76d07Q9Tdrd/Sk+XkqkJMYSqZCUXzbx
Expand Down Expand Up @@ -9419,16 +9419,16 @@ rfYq+JZiHVvyEFJFTplF0lmZKLwtzuhmiwdS7pgunsim/q0709dlN2g/K+JVrNUCsKg9W+ZlIi1r7ltg
PkbGK4kZZRWd3vh6hzEnKbUdGdSXop26wj98VBUluPkv971G4sFeYCZwrdxNqtf7jKEU+t1AEezwrjtt
BN6JNpe65niv6tRlgujDHuOmPay/R7dDuQ6gNIaXNSghomCvFZqbaXrIo1ADseoWK0WTJal9qaBspZT9
sz/i5WwZR/H5/wjLU6ZDzOYBA+s6uvfxTYYuVH+wacINDUBDK5caUXQeawiuM4kIaXKfLrGdLbGaPrxp
HZkt8c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pwj4zeini
NWlNpHl8zORcO++yOXXLJJaE6d8Xpd9SL5N4z/kVHyFotrptVMRn1AnTRuF48O463DnZGc1xmTp4vTnc
35/YLh9w2zeII17lG7SmNF4Gy0dnpKBdQ2NlLVlSfbeGnat5WUP221mze6xY7fzMgIWgseWd+xQBPpII
pUL8UKxk1pRft6QX1Qn9CQh9KlY6C7rxfqe0I3LJ3zZLVDlIxSb/3BxzQ1gpYc5ol/6mkIOAOy40D/Da
8+fiXowWVHR8AkdXuKx6zfUZvR1/Ha/EpRlb10F3a/RsJ8PIvkO7Csf+28fm5JzqyuTc7kR7SLwzsneM
slbPoEgj7IjLVSxXXXlMMAS7doQL+1NC5d1wSKFTnVLydFn/dJi2Qy9+5+WtLhzwOP0cydYNEsjQ9UGI
mCLmrmR8J6Iz7p4OFuhhEvJ/BwAA//97bdAGm4UBAA==
`,
},

Expand Down Expand Up @@ -12383,36 +12383,37 @@ dbXyA0j6O1j8GwAA//+4yx/k9A8AAA==

"/js/state.ts": {
local: "web/static/js/state.ts",
size: 5227,
size: 5269,
modtime: 0,
compressed: `
H4sIAAAJbogA/8RYX2/bOBJ/dj8FYwSRhDhKeo/JuYEvzTXFtbdA0z4svMGCkWhZa4k0SMqtt/B33xmS
kihLbo12gfWDRZE/zn/ODPXiWaiKz9brOM0lS3S+YWGg1SxZvZGiWgcTMg9OC5FQnQsOb8GpzksmKg3j
sFm4JjyL375zb49MbvKETUiNtcsf7Ytbjcj0Ffn6YiSZriTH0UglYs2uzXBEk9U1CabBBF8yFEXhuy8Z
rqhkydKqYC0WWVKeplS3kzv806xcFzD7SRawcLmmUue0UJfAydCPl7osDLzIOTAPnTiUbyeEFax0Q6q1
VGZcq+AkjxPKQbpHwCaapWRK7DQwINMpCf7PWKoIILj4XLA0YyXjOrhp968pZ8VdQZVq9p6CmIDylgy+
3fOsBe2hcdKjy3giUtZD2WkPp5biMwfY1503mYiioGuF28N8T21/3zx/AshJd8bQMdKO8oWzaAs/O3MS
Wf/CVHy3z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LIZyEYK+
m/zS+umWrqfB+ZBrInemYlUlCVMqhB6B+ofNmOHJ8sG1+RCVhZG0bsaGVMDzEIOcSs/UAwRviCSjpn1r
xDA1NYT/jgxDNrlHJHGWIfWZMaJekzFmBSlb+jfDZfIUzkxgu3//9LJJDgeF1D4zDag5LhFMEvfbi4Ow
5lGvv7Agx9tC//yMByncDgS1ycrbJrPWURv4HZ6b3MaSgbYJCy/D+eTrLowW0WWGaejlb9W/rq6egoEe
1Rjvo6iwzwUZSlG2p6WzGMWVTpw2w6XFwh9sFYIUvYVi6B/PGC/vLQ/77pPt2MRSg9uqbvJCh8F8YK6+
8V2QlzZjeRdGg5sZRyrvMuVP19tfwSWvezk1qHcgy6xOQgPb51eW6W5fiQ9wgfjkijQ0oss8u4W8YugH
JnsfKlcdJgiM6m1nSynK1zB/zFY0ojE2OqykcLP9FX4X799fvH49jro0EfZjNB8erssSyDVZsv7iYmN6
vmjbyW/Fj/kw048edyMwzdoaxBtP8TBvO4HTdCTf82TtENMu1Dnid7P1m92Kiv8QcAcOJoFTs+fqQ3lt
HxMd2VPMkjV+JBv40CUZ2jXR0AvcB9/5NtU0BsjtMDNzQflZdgkSOZKhvcL8LMelobLP8q8AAAD//9be
lySVFAAA
`,
},

Expand Down Expand Up @@ -12930,21 +12931,23 @@ H4sIAAAJbogA/xzLQQ6CMBCF4atMZoMu0AswJF7AOzzaARtqMZ0magh3p+niJW/x/QPIRZgJTyVRXf/J

"/partials/ackgroup.html": {
local: "web/static/partials/ackgroup.html",
size: 1782,
size: 2142,
modtime: 0,
compressed: `
H4sIAAAJbogA/6RVTW/jKhRd5/0KnlUpjvScLNrVkx2pqjSafZejWWC4NkwIWIDzoSj/ffiy47Ruq9Es
IjD3cu65cA4pKT8gIrAxVdZhCaJoteq7DMm2MEwdqyx8m2z7z2KaSwRg3fCTX1+U7NHn11zSKsNkl42I
vRCFgMZm23LDHkOucWXu4pq3zAachQEBxPpZWettHHtr1bihthK5X0Ghwb2wYW72gS0RnOy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tMoixMSZDqbZmkpZzCPE
N8HVVFqPp7SCc0DsI5Zzoy6yFY7nEQWqs7ZStX/sT0Nq3pH0ji9aQC/TbY3YULO/ku4GqxCUOaHVZIw3
MZ4GayUsLSXg7XzHqLpnTydqdFJ6i7YGC6OvEKZ5fouQSW3hKuWDt5xIg+PrdFF2b7HV2jTgrtL9EUwn
vuh6g/Dr++cG6lV2OHBhnTb7yfR4zNZ/xo8ENFx+MUdlXAgkiCnlfjp48O+TIKnZo6OuszF9Ay1Ql8SG
KiVJdd4mlECLqHZkRd6jxCCJ7ivlpoV2k/ShMwaUS9w/jP3OGJ+3mGkpaWthgoTTOJkFX74kcsJJiLZR
IWkJ8srgx1FOXqNCqLZzxO1bQA4O7AmJsyt7wKey0RXI1IxZcE7S6XP0j8l7eMZKfkw9iX1k3I/OKuva
ijqYTPsk5yHL9EGJv9w+sXPdNnLfcsG0Ou/hYTwc57DDww31A5hb0ajxXbyp2T0O5TMc/Z7rN8L/Bn/W
sttArut6gH0UEhSD6jrwsHOTc1f+E1r+eg7nC/dwSCPBhaxwKGZI1Th+PBIqwTh7jjJIZ86XcfTjxF+Z
wlJXe3L5UyJQS37vqb9wrP5OY4WhAfyFYsLJf1BN79crh/kqBuUMRUU/Z3OLcUDwpTGt1zXmgYpOBxHU
H19RiRd+rL2vuZd7fKbHvwEAAP//1kNQfV4IAAA=
`,
},

Expand Down Expand Up @@ -12981,24 +12984,24 @@ NeZtQ48ZNx5cB0tkPLvkz/bBIAzIu+Vq0mH5U/wNAAD//wJxdrNjAwAA

"/partials/alertstate.html": {
local: "web/static/partials/alertstate.html",
size: 3396,
size: 3440,
modtime: 0,
compressed: `
H4sIAAAJbogA/7RWUW/jNgx+zv0KTQc0LTDHSFcUWGG7uAEdVmx72bV7V2zG1qpImSQ3zXL+76NsOXES
Z7dL0ofWDEV9+kiKpKKMv5JUMGNiOmcSRFAAy7jMKZF5kAqevsTUqjwXcHlFkw+DqLjZtrfcCnArg4iR
QsPUiYPI4GprmIv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bosun/web/static/js/bosun.js
Original file line number Diff line number Diff line change
Expand Up @@ -2561,6 +2561,7 @@ bosunApp.directive('tsState', ['$sce', '$http', function ($sce, $http) {
templateUrl: '/partials/alertstate.html',
link: function (scope, elem, attrs) {
var myIdx = attrs["tsGrp"];
scope.currentStatus = attrs["tsGrpstatus"];
scope.name = scope.child.AlertKey;
scope.state = scope.child.State;
scope.action = function (type) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/bosun/web/static/js/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ bosunApp.directive('tsState', ['$sce', '$http', function($sce: ng.ISCEService, $
templateUrl: '/partials/alertstate.html',
link: function(scope: any, elem: any, attrs: any) {
var myIdx = attrs["tsGrp"];

scope.currentStatus = attrs["tsGrpstatus"]
scope.name = scope.child.AlertKey;
scope.state = scope.child.State;
scope.action = (type: string) => {
Expand Down
13 changes: 10 additions & 3 deletions cmd/bosun/web/static/partials/ackgroup.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<style>
.panel-heading{border-radius:3px;}
.panel-danger-box{box-shadow: 5px 0 0 0 #a94442 inset;}
.panel-warning-box{box-shadow: 5px 0 0 0 #8A6D3B inset;}
.panel-success-box{box-shadow: 5px 0 0 0 #3C763D inset;}
.panel-info-box{box-shadow: 5px 0 0 0 #31708f inset;}
</style>
<div class="panel-group" ng-show="groups">
<div class="clearfix">
<h3 ng-bind="ack" class="pull-left"></h3>
Expand All @@ -17,7 +24,7 @@ <h3 ng-bind="ack" class="pull-left"></h3>
</span>
</div>
<div class="panel" ng-class="panelClass(group.Status)" ng-repeat="group in groups" ng-init="idx = $index">
<div class="panel-heading" ng-click="collapse(idx)">
<div class="panel-heading" ng-class="panelClass(group.CurrentStatus)+'-box'" ng-click="collapse(idx)">
<h4 class="panel-title">
<label class="pull-right select">
<input type="checkbox" class="pull-right" ng-model="group.checked" ng-click="click($event, $index)" ng-change="update()">
Expand All @@ -33,9 +40,9 @@ <h4 class="panel-title">
<div class="panel-body panel-group" ng-if="shown[idx]">
<div
class="panel"
ng-class="panelClass(state.last.Status)"
ng-class="panelClass(group.Status)"
ng-repeat="child in group.Children"
ts-state ts-grp="{{idx}}">
ts-state ts-grp="{{idx}}" ts-grpStatus="{{group.CurrentStatus}}">
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion cmd/bosun/web/static/partials/alertstate.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="panel-heading" ng-click="toggle()">
<div class="panel-heading" ng-class="panelClass(currentStatus)+'-box'" ng-click="toggle()">
<h4 class="panel-title">
<a href>
<span class="glyphicon" ng-class="{'glyphicon-exclamation-sign': state.last.Status && state.last.Status != 'normal'}"></span>
Expand Down

0 comments on commit 14ed867

Please sign in to comment.