mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 12:40:07 +00:00
fix: add toggle to service (#317)
* fix: short nework word * fix: add toggle on service * fix: delete console log update main.js version --------- Co-authored-by: LvGJ <lvgj1998@gmail.com>
This commit is contained in:
2
resource/template/common/footer.html
vendored
2
resource/template/common/footer.html
vendored
@@ -10,7 +10,7 @@
|
||||
<script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/semantic-ui/2.4.1/semantic.min.js"></script>
|
||||
<script src="/static/semantic-ui-alerts.min.js"></script>
|
||||
<script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/vue/2.6.14/vue.min.js"></script>
|
||||
<script src="/static/main.js?v20230614"></script>
|
||||
<script src="/static/main.js?v20240213"></script>
|
||||
<script>
|
||||
(function () {
|
||||
updateLang({{.LANG }});
|
||||
|
||||
7
resource/template/component/monitor.html
vendored
7
resource/template/component/monitor.html
vendored
@@ -24,6 +24,12 @@
|
||||
<option value="3">TCP-Ping</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui nb-show-in-service checkbox">
|
||||
<input name="EnableShowInService" type="checkbox" tabindex="0" class="hidden" />
|
||||
<label>{{tr "EnableShowInService"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{tr "Duration"}}</label>
|
||||
<input type="number" name="Duration" placeholder="{{tr "Seconds"}}" />
|
||||
@@ -110,3 +116,4 @@
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
|
||||
@@ -68,4 +68,4 @@
|
||||
<script>
|
||||
$(".checkbox").checkbox();
|
||||
</script>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/semantic-ui/2.4.1/semantic.min.js"></script>
|
||||
<script src="/static/semantic-ui-alerts.min.js"></script>
|
||||
<script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/vue/2.6.14/vue.min.js"></script>
|
||||
<script src="/static/main.js?v20230614"></script>
|
||||
<script src="/static/main.js?v20240213"></script>
|
||||
<script>
|
||||
(function () {
|
||||
updateLang({{.LANG }});
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
</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>
|
||||
@@ -81,6 +82,7 @@
|
||||
{{end}}
|
||||
</div>
|
||||
</section>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</section>
|
||||
{{if .CycleTransferStats}}
|
||||
|
||||
3
resource/template/theme-default/service.html
vendored
3
resource/template/theme-default/service.html
vendored
@@ -18,6 +18,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range $service := .Services}}
|
||||
{{if $service.Monitor.EnableShowInService}}
|
||||
<tr>
|
||||
<td class="ui center aligned">{{$service.Monitor.Name}}</td>
|
||||
<td class="ui center aligned">
|
||||
@@ -33,7 +34,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}}
|
||||
</tr> {{end}} {{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</thead>
|
||||
<tbody id="servers">
|
||||
<template v-for="service in services">
|
||||
<tr>
|
||||
<tr v-if="service.enableShow === 'true'">
|
||||
<td class="node-cell center">
|
||||
<div class="delay-today">
|
||||
<i class="delay-today" :class="service.health.className"></i>
|
||||
@@ -137,6 +137,7 @@
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user