Skip to content
This repository was archived by the owner on Sep 25, 2019. It is now read-only.

Commit 1f2f164

Browse files
committed
optimize chart page
1 parent 45448f6 commit 1f2f164

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

handler/domain_handler.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ func UrlStatus(w http.ResponseWriter, r *http.Request) {
4848
strategy, err := model.GetStrategyById(sid)
4949
errors.MaybePanic(err)
5050

51+
render.Data(r, "AlarmOn", g.Config.Alarm.Enable)
5152
render.Data(r, "TimeData", timeData)
5253
render.Data(r, "Id", sid)
5354
render.Data(r, "Url", strategy.Url)

static/css/g.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@
4545
padding-bottom:15px;
4646
}
4747

48+
#alarm_title{
49+
text-align:center;
50+
margin-top: 20px;
51+
}
52+
4853
.col-sm-2 {
4954
padding-right:0px;
5055
padding-left:0px;

utils/utils.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package utils
22

33
import (
44
"fmt"
5-
"log"
65
"regexp"
76
"strings"
87
"time"

views/chart/index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88

99
<body>
1010
<div id="main"></div>
11-
11+
{{ if .AlarmOn }}
1212
<div id="event">
13+
<div id="alarm_title">告警历史</div>
1314
<table class="table table-hover table-bordered table-striped">
1415
<thead>
1516
<tr>
@@ -34,7 +35,9 @@
3435
{{end}}
3536
</tbody>
3637
</table>
38+
3739
</div>
40+
{{ end }}
3841

3942

4043
<script type="text/javascript">

0 commit comments

Comments
 (0)