mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 12:48:14 -05:00
fix: revert service html and block service in backend (#318)
Co-authored-by: LvGJ <lvgj1998@gmail.com>
This commit is contained in:
parent
f3fac9325c
commit
fdb2fd8839
@ -118,6 +118,11 @@ func (p *commonPage) service(c *gin.Context) {
|
||||
var statsStore map[uint64]model.CycleTransferStats
|
||||
copier.Copy(&stats, singleton.ServiceSentinelShared.LoadStats())
|
||||
copier.Copy(&statsStore, singleton.AlertsCycleTransferStatsStore)
|
||||
for k, service := range stats {
|
||||
if !service.Monitor.EnableShowInService {
|
||||
delete(stats, k)
|
||||
}
|
||||
}
|
||||
return []interface {
|
||||
}{
|
||||
stats, statsStore,
|
||||
|
@ -61,7 +61,6 @@
|
||||
</section>
|
||||
<section class="monitor-container">
|
||||
{{range $service := .Services}}
|
||||
{{if $service.Monitor.EnableShowInService}}
|
||||
<section class="monitor-info-container">
|
||||
<div class="monitor-state">
|
||||
<span class="monitor-state-dot {{className (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}}"></span>
|
||||
@ -83,7 +82,6 @@
|
||||
</div>
|
||||
</section>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</section>
|
||||
{{if .CycleTransferStats}}
|
||||
<h2 class="mdui-m-t-5 mdui-text-center">{{tr "CycleTransferStats"}}</h2>
|
||||
|
3
resource/template/theme-default/service.html
vendored
3
resource/template/theme-default/service.html
vendored
@ -18,7 +18,6 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range $service := .Services}}
|
||||
{{if $service.Monitor.EnableShowInService}}
|
||||
<tr>
|
||||
<td class="ui center aligned">{{$service.Monitor.Name}}</td>
|
||||
<td class="ui center aligned">
|
||||
@ -34,7 +33,7 @@
|
||||
class="delay-today {{className (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}}"></i>
|
||||
{{statusName (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}}
|
||||
</td>
|
||||
</tr> {{end}} {{end}}
|
||||
</tr> {{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
</thead>
|
||||
<tbody id="servers">
|
||||
<template v-for="service in services">
|
||||
<tr v-if="service.enableShow === 'true'">
|
||||
<tr>
|
||||
<td class="node-cell center">
|
||||
<div class="delay-today">
|
||||
<i class="delay-today" :class="service.health.className"></i>
|
||||
@ -137,7 +137,6 @@
|
||||
delay: '{{$service.Delay}}'.replaceAll("[","").replaceAll("]","").split(" "),
|
||||
up: '{{$service.Up}}'.replaceAll("[","").replaceAll("]","").split(" "),
|
||||
down: '{{$service.Down}}'.replaceAll("[","").replaceAll("]","").split(" "),
|
||||
enableShow: '{{$service.Monitor.EnableShowInService}}',
|
||||
})
|
||||
{{end}}
|
||||
// @formatter:on
|
||||
|
Loading…
Reference in New Issue
Block a user