Skip to content

Commit

Permalink
server: dashboard fe fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskaliX committed Nov 19, 2023
1 parent c945ca8 commit 6496a4a
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 13 deletions.
13 changes: 5 additions & 8 deletions server/webconsole/api/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ type homePageResp struct {
Vul []int `json:"vul"`
Critical int `json:"critical"`
High int `json:"high"`
Mid int `json:"mid"`
Low int `json:"low"`
// DB delay
RedisDelay int64 `json:"redis_delay"`
MongoDelay int64 `json:"mongo_delay"`
Expand Down Expand Up @@ -112,16 +114,11 @@ func HomePage(c *gin.Context) {
}
// for debug
m := resp.Alert[6]
m["value"] = m["value"].(int) + 1
m["value"] = m["value"].(int) + 2
resp.Alert[6] = m

// resp.Alert = []map[string]interface{}{
// {"time": "2022-01-01", "value": 1},
// {"time": "2022-01-02", "value": 2},
// {"time": "2022-01-03", "value": 7},
// }
resp.Critical = 2
resp.High = 5
resp.Critical = 1
resp.High = 1
// Ping the redis / mongodb
defer cancel()
start := time.Now()
Expand Down
2 changes: 1 addition & 1 deletion server/webconsole/api/static/frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
</head>
<body>
<div id="root"></div>
<script src="/umi.dcdf44fd.js"></script>
<script src="/umi.a4aff2c8.js"></script>

</body></html>
1 change: 1 addition & 0 deletions server/webconsole/api/static/frontend/linux_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Loading

0 comments on commit 6496a4a

Please sign in to comment.