Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3fa4cbbee | ||
|
|
a9da084711 | ||
|
|
f30969e946 |
No files matched your search
@@ -30,6 +30,7 @@ jobs:
|
||||
v: true
|
||||
x: false
|
||||
race: false
|
||||
tags: timetzdata
|
||||
ldflags: -s -w --extldflags '-static -fpic' -X github.com/naiba/nezha/service/singleton.Version=${{ steps.extract_branch.outputs.tag }}
|
||||
buildmode: default
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ jobs:
|
||||
v: true
|
||||
x: false
|
||||
race: false
|
||||
tags: timetzdata
|
||||
ldflags: -s -w --extldflags '-static -fpic' -X github.com/naiba/nezha/service/singleton.Version=test
|
||||
buildmode: default
|
||||
|
||||
@@ -40,5 +40,6 @@ jobs:
|
||||
v: true
|
||||
x: false
|
||||
race: false
|
||||
tags: timetzdata
|
||||
ldflags: -s -w --extldflags '-static -fpic' -X github.com/naiba/nezha/service/singleton.Version=test
|
||||
buildmode: default
|
||||
@@ -79,6 +79,7 @@ You can change the dashboard language in the settings page (`/setting`) after th
|
||||
<a href="https://github.com/nickfox-taterli" title="Tater Li"><img src="https://avatars.githubusercontent.com/u/19658596?v=4" width="50;" alt="Tater Li"/></a>
|
||||
<a href="https://github.com/dreamingsleeping" title="Nanjing Hopefun Network Technology Co. Ltd."><img src="https://avatars.githubusercontent.com/u/13828658?v=4" width="50;" alt="Nanjing Hopefun Network Technology Co. Ltd."/></a>
|
||||
<a href="https://github.com/MartijnLindeman" title="Martijn Lindeman"><img src="https://avatars.githubusercontent.com/u/78365708?v=4" width="50;" alt="Martijn Lindeman"/></a>
|
||||
<a href="https://github.com/funnyzak" title="Leon"><img src="https://avatars.githubusercontent.com/u/2562087?v=4" width="50;" alt="Leon"/></a>
|
||||
<a href="https://github.com/KorenKrita" title="KorenKrita"><img src="https://avatars.githubusercontent.com/u/22239339?v=4" width="50;" alt="KorenKrita"/></a>
|
||||
<a href="https://github.com/techotaku" title="Ian Li"><img src="https://avatars.githubusercontent.com/u/1948179?v=4" width="50;" alt="Ian Li"/></a>
|
||||
<a href="https://github.com/GreenTeodoro839" title="GreenTeodoro839"><img src="https://avatars.githubusercontent.com/u/77104800?v=4" width="50;" alt="GreenTeodoro839"/></a>
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
(function (root, factory) {if (typeof define === 'function' && define.amd) {define(['exports', 'echarts'], factory);} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {factory(exports, require('echarts'));} else {factory({}, root.echarts);}}(this, function (exports, echarts) {var log = function (msg) {if (typeof console !== 'undefined') {console && console.error && console.error(msg);}};if (!echarts) {log('ECharts is not Loaded');return;}if (!echarts.registerMap) {log('ECharts Map is not loaded');return;}echarts.registerMap('world', {"type":"FeatureCollection","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},"features":[{"geometry":{"type":"Polygon","coordinates":["@@@ᠳ࡚с̶ʩт˷˔ƹͮɠͲ˖рԜ҄̕ҴNܾͰؼ÷۸ήԪҮƴ̮¿ঞɪֶϤϲŹƛе²֭ĝDZƊĠǔōϭñėށਓɁȥԯƻԓࣗඩअ৯ڻो֑য়ߝลϓ؇UļāļƫȖɩ̌]ᶼ̈́͘ɮ͜ɪ͚®ĞĚ۪ƼɦːϪǰ;Ąߞᢌᣮ"],"encodeOffsets":[[49130,8189]]},"properties":{"name":"Somalia","childNum":1}},{"geometry":{"type":"Polygon","coordinates":["@@ƛ¬Ð@ĞÆÒªDZ"],"encodeOffsets":[[9810,48188]]},"properties":{"name":"Liechtenstein","childNum":1}},{"geometry":{"type":"Polygon","coordinates":["@@⌗øĒ୬ͪࣆيʊˆ҄ؔ^˶ȇɪÈצϲĐФְദҢڴήࡔլİtʍԾʤIJʢËǒŎɽĠPĀmǶVǢgΤ̑ĮவňȵǑ¼ýĈå²yĞÇÞ³ëąÍĥʹ]ɳƗ{ΡʼnƑcăZÉSÍƫH˃ǨǓѭLJƣġǥÕȿÕǃñÿśıƇħěŽđұĿЍUƉÝåSĵ^čfʉdʇǍ·ণ֣oۋ@Ĺ"],"encodeOffsets":[[-8891,28445]]},"properties":{"name":"Morocco","childNum":1}},{"geometry":{"type":"Polygon","coordinates":["@@⌘
@ķœ@@@Ŕ@@̷@̩@ǕBȍ@ȋ@ƍ@ĩ@@ɋ@@ɭ@ŕ@қ@Oх̉űƽw½gΉɩķƯtįQJdz՟TšRšPėRŏᇷCฝCċα`ý§¨Ƙ࢘ӔŰшΞLJĹèƤ࠴݂Ģָ͌܌۴КͲޞŚƀ","@@i˷@@j˸"],"encodeOffsets":[[-13351,28480],[-8984,28120]]},"properties":{"name":"W. Sahara","childNum":2}},{"geometry":{"type":"Polygon","coordinates":["@@A@ƟwđĵȏÒʁč«Ǔƅ@ã̌Ο˘SǴʒÊÆ`Å_֡˰ϟʊkIDZʪĠɁ˔˶àϷˈȘѬ˻W²ɤ˲ÚͩǀºĬȋːÈĆѠŎNJĘȘoø`Ȓg¤_cº·¶ÙȈėÒ÷´fFfV\\T^QhɿɳkĝƱƨ÷YißMµGuODƎĨãɰİÈßĜhŴĬŬ~Ũ±âZ]ãNÇk¹ėnjƽɣȭkěHãƺ˝Ǵ謡İÃƩǝÿďȫẸ̀Qßço}ß]ĕUΥ@Ʌ±@@"],"encodeOffsets":[[22080,43262]]},"properties":{"name":"Serbia","childNum":1}},{"geometry":{"type":"Polygon","coordinates":["@@хǑޟܯőࡡԧ¡á͘з¤̧սշŊƉˏͭąٝ°̺ٓɥɓӱз·ʫɫƚν@ӧʟƆƋʇğԻzЛϭĭॕʳכ]ʛŷѿĘࣻõЍĺٵȀ͋ĠШъȒȢȌȜxèFƆ·ǴăĆˁȡ|ɍZ{ƒZØaŤDĠƲDèij̎őͨaŦ̰̚˽êóļ@͒ƂDzȸZíĊ´ubSv\\vÀTÎ hňǞjΔö´ƌFgÈèTɶǓЀ«Ȁǫ͊î̲džzĺîĢƘƔ˒Ř˞Lj°òńƲъÖŖ¾ŚǶRɄJǮˊרȋ¦HʲpȮńċľsĺ¤ÚR|¼[þJ¬wNwNÌÛļûĢmnjÂpp^ªô¤ʂĸ®T¸SZ^b\\~VvL¤QȂƓî§R¦¼¶^ê}ĞlôÒÈŒǐ`ƐǢbÀèHϱĸ^ǠŶˌ̆ѨīÞŗɃaÎJĊtÄB~oűځĈʁŔů࠰˨ȦȨˈŢƠ®ĈRľsª_ÂW\\a÷ËvkĄOΘĈ²ʹkÒČѼ§MÕryWJ·oğ}ƽáHiĸã|u^Q"],"encodeOffsets":[[76331,37911]]},"properties":{"name":"Afghanistan","childNum":1}},{"geometry":{"type":"MultiPolygon","coordinates":[["@@ÂR̮cҮƠ͎Åǖ@ǔ|ɔDªĞƶHNJŖ̈ƄĺTNJ|ʖĞGR_¿ƽA½n½¦ʬGɼEҾi°oČýٵ͔ӑĠճēśnʕ¬ÓIàþÖÚ~ɈqɘM͚IJ̴ŐŢdܓ×މoěG±ðƁIĵY@ȗ@@ڟ@ˑ@ˑBౝǶ֡া࡙ࢳǑƵҧƀ¼ҹͺሹTᅍeғ̴ʟÌՋȭǃNOėFǗģµƇo͆ƖËܼɠˌ҆ლζθɌƴȞǀЊ¢ݐс˫ߚ̢̤hˊүஒґۤݴɦƌOՎNዲQĮ
ĘÇƈǕϡÐŻĚƉÆ˕Ԃۻ"],["@@̆Ƅ_øęÞËr___ğıͅ˭DeÌ·ӏɫθƅːОΖ"]],"encodeOffsets":[[[18002,-8293]],[[12802,-4697]]]},"properties":{"name":"Angola","childNum":2}},{"geometry":{"type":"Polygon","coordinates":["@@Π˗ä̋ÝԍȄ́ɊßQÙÚŷűŻȉ̍ǝ©¡aquwW@yÐğBƧůÙPÑXkAűˬѽ̨ŚAĹɐȨࠐDŮȡæ½ʮ̾ϦŒŷɴÒ"],"encodeOffsets":[[20546,43569]]},"properties":{"name":"Albania","childNum":1}},{"geometry":{"type":"MultiPolygon","coordinates":[["@@Ł^ĊĤ³"],["@@ɨ÷ϫƯħƾƊ¡sƜƖ"]],"encodeOffsets":[[[20135,61632]],[[20470,61800]]]},"properties":{"name":"Aland","childNum":2}},{"geometry":{"type":"Polygon","coordinates":["@@Ɵ½íIir[ò\\¢Ö ÈOŢ~y@esQm"],"encodeOffsets":[[1747,43524]]},"properties":{"name":"Andorra","childNum":1}},{"geometry":{"type":"MultiPolygon","coordinates":[["@@ʙOǘøĂç"],["@@šȆĶãŷ"],["@@ø֟˗ȫÁǸǣï
ԿƖw´ŷѡĹÂĹ˧څ[˥ççᒣʾ߳४oǪǘÚȱɴѼƸॺí̆ĐȾĚ̌҂ৎࠠŞɦò_m̙ź"]],"encodeOffsets":[[[55223,24758]],[[54613,24841]],[[57650,26267]]]},"properties":{"name":"United Arab Emirates","childNum":3}},{"geometry":{"type":"MultiPolygon","coordinates":[["@@ؠQۓƫĵÜǪĢ"],["@@nᇜ͠έLJvµǥˠŸɏУࢸНࢴŧʕȣįԭņ¦"],["@@ȴǛߖȡפϿବӗɒ˳͉ӡȧɇ˽ͫЛoÁıξบɿɮȜǴGƌùÚDæ¶ÌEæ¶Ì rºʒàǞȔɌͦʮbΰƠ¥ʐĒɜũȈԵƛ۩ЧʩхŃɫˇԽ˳ƩLine truncated
|
||||
@@ -24,6 +24,9 @@
|
||||
<i :class="item.icon + ' icon'"></i>@#item.name#@
|
||||
<i class="check icon" v-if="preferredTemplate === item.key"></i>
|
||||
</a>
|
||||
<a v-if="defaultTemplate === 'custom'" @click="toggleTemplate('custom')" class="item">
|
||||
<i class="expand icon"></i>Custom
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
+10
-9
@@ -7,19 +7,20 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<title>{{.Title}}</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/semantic.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/assets/font-logos.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/lipis/[email protected]/css/flag-icons.min.css">
|
||||
<link rel="shortcut icon" type="image/png" href="/static/logo.svg" />
|
||||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/semantic.min.css">
|
||||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/assets/font-logos.css">
|
||||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/font/bootstrap-icons.min.css">
|
||||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/css/flag-icons.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="/static/semantic-ui-alerts.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="/static/theme-default/css/main.css?v20240226">
|
||||
<link rel="shortcut icon" type="image/png" href="/static/logo.svg" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.1/dist/semantic.min.js"></script>
|
||||
<script src="https://unpkg.com/[email protected]/dist/jquery.min.js"></script>
|
||||
<script src="https://unpkg.com/[email protected]/dist/semantic.min.js"></script>
|
||||
<script src="https://unpkg.com/vue@2.6.14/dist/vue.min.js"></script>
|
||||
<script src="https://unpkg.com/[email protected]/dist/echarts.min.js"></script>
|
||||
<script src="/static/semantic-ui-alerts.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/echarts.min.js"></script>
|
||||
<script src="/static/theme-default/js/mixin.js?v20240302"></script>
|
||||
</head>
|
||||
<body>
|
||||
{{end}}
|
||||
|
||||
+59
-36
@@ -15,38 +15,50 @@
|
||||
<div v-for="server in group.data" :id="server.ID" class="ui card">
|
||||
<div class="content" v-if="server.Host" style="margin-top: 10px; padding-bottom: 5px">
|
||||
<div class="header">
|
||||
<i style="width: 22px;border-radius: 4px;" :class="'fi fi-' + server.Host.CountryCode"></i> <i v-if='server.Host.Platform == "darwin"'
|
||||
class="apple icon"></i><i v-else-if='isWindowsPlatform(server.Host.Platform)'
|
||||
class="windows icon"></i><i v-else :class="'fl-' + getFontLogoClass(server.Host.Platform)"></i>
|
||||
<i style="width: 22px;border-radius: 4px;" :class="'fi fi-' + server.Host.CountryCode"></i>
|
||||
<i v-if='getFontLogoClass(server.Host.Platform) == "" && server.live' class="fl-tux"></i>
|
||||
<i v-else-if='isWindowsPlatform(server.Host.Platform)' class="windows icon"></i>
|
||||
<i v-else :class="'fl-' + getFontLogoClass(server.Host.Platform)"></i>
|
||||
@#server.Name + (server.live?'':'[{{tr "Offline"}}]')#@
|
||||
<i @click="togglePopup($event, server.ID)" aria-expanded="false" class="nezha-secondary-font info circle icon"></i>
|
||||
<div class="ui content popup" :class="{ 'visible': isActive(server.ID) }" style="margin-bottom: 0;">
|
||||
<i class="closePopup window close icon" @click="closePopup(server.ID)"></i>
|
||||
{{tr "Platform"}}: @#server.Host.Platform#@-@#server.Host.PlatformVersion#@
|
||||
[<span
|
||||
v-if="server.Host.Virtualization">@#server.Host.Virtualization#@:</span>@#server.Host.Arch#@]<br />
|
||||
CPU: @#server.Host.CPU#@<br />
|
||||
[<span v-if="server.Host.Virtualization">@#server.Host.Virtualization#@:</span>@#server.Host.Arch#@]
|
||||
<br />
|
||||
CPU: @#server.Host.CPU#@
|
||||
<br />
|
||||
{{tr "DiskUsed"}}:
|
||||
@#formatByteSize(server.State.DiskUsed)#@/@#formatByteSize(server.Host.DiskTotal)#@<br />
|
||||
@#formatByteSize(server.State.DiskUsed)#@/@#formatByteSize(server.Host.DiskTotal)#@
|
||||
<br />
|
||||
{{tr "MemUsed"}}:
|
||||
@#formatByteSize(server.State.MemUsed)#@/@#formatByteSize(server.Host.MemTotal)#@<br />
|
||||
@#formatByteSize(server.State.MemUsed)#@/@#formatByteSize(server.Host.MemTotal)#@
|
||||
<br />
|
||||
{{tr "SwapUsed"}}:
|
||||
@#formatByteSize(server.State.SwapUsed)#@/@#formatByteSize(server.Host.SwapTotal)#@<br />
|
||||
{{tr "NetTransfer"}}: <i
|
||||
class="arrow alternate circle down outline icon"></i>@#formatByteSize(server.State.NetInTransfer)#@<i
|
||||
class="arrow alternate circle up outline icon"></i>@#formatByteSize(server.State.NetOutTransfer)#@<br />
|
||||
<template v-if="server.Host.SwapTotal === 0">OFF</template>
|
||||
<template v-else>@#formatByteSize(server.State.SwapUsed)#@/@#formatByteSize(server.Host.SwapTotal)#@</template>
|
||||
<br />
|
||||
{{tr "NetTransfer"}}:
|
||||
<i class="arrow alternate circle down outline icon"></i>@#formatByteSize(server.State.NetInTransfer)#@
|
||||
<i class="arrow alternate circle up outline icon"></i>@#formatByteSize(server.State.NetOutTransfer)#@
|
||||
<br />
|
||||
{{tr "Load"}}: @# toFixed2(server.State.Load1) #@/@# toFixed2(server.State.Load5) #@/@#
|
||||
toFixed2(server.State.Load15) #@<br />
|
||||
{{tr "ProcessCount"}}: @# server.State.ProcessCount #@<br />
|
||||
{{tr "ConnCount"}}: TCP @# server.State.TcpConnCount #@ / UDP @# server.State.UdpConnCount #@<br />
|
||||
{{tr "BootTime"}}: @# formatTimestamp(server.Host.BootTime) #@<br />
|
||||
{{tr "LastActive"}}: @# new Date(server.LastActive).toLocaleString() #@<br />
|
||||
{{tr "Version"}}: @#server.Host.Version#@ <br/>
|
||||
toFixed2(server.State.Load15) #@
|
||||
<br />
|
||||
{{tr "ProcessCount"}}: @# server.State.ProcessCount #@
|
||||
<br />
|
||||
{{tr "ConnCount"}}: TCP @# server.State.TcpConnCount #@ / UDP @# server.State.UdpConnCount #@
|
||||
<br />
|
||||
{{tr "BootTime"}}: @# formatTimestamp(server.Host.BootTime) #@
|
||||
<br />
|
||||
{{tr "LastActive"}}: @# new Date(server.LastActive).toLocaleString() #@
|
||||
<br />
|
||||
{{tr "Version"}}: @#server.Host.Version#@
|
||||
<br />
|
||||
{{tr "Temperature"}}:
|
||||
<span v-for="temp in server.State.Temperatures">
|
||||
@#temp.Name#@: @#temp.Temperature#@°C
|
||||
</span>
|
||||
|
||||
<div class="chartbox" :key="server.ID" :ref="`chart${server.ID}`" style="width: 100%; height: auto; margin-bottom: 2px;"></div>
|
||||
</div>
|
||||
<div class="ui divider" style="margin-bottom: 5px"></div>
|
||||
@@ -57,34 +69,32 @@
|
||||
<div class="thirteen wide column">
|
||||
<div :class="formatPercent(server.live,server.State.CPU, 100).class">
|
||||
<div class="bar" :style="formatPercent(server.live,server.State.CPU, 100).style">
|
||||
<small>@#formatPercent(server.live,server.State.CPU,100).percent#@%</small>
|
||||
<small>@#parseInt(server.State.CPU?server.State.CPU:0)#@%</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="three wide column">{{tr "MemUsed"}}</div>
|
||||
<div class="thirteen wide column">
|
||||
<div :class="formatPercent(server.live,server.State.MemUsed, server.Host.MemTotal).class">
|
||||
<div class="bar"
|
||||
:style="formatPercent(server.live,server.State.MemUsed, server.Host.MemTotal).style">
|
||||
<small>@#parseInt(server.State?server.State.MemUsed/server.Host.MemTotal*100:0)#@%</small>
|
||||
<div class="bar" :style="formatPercent(server.live,server.State.MemUsed, server.Host.MemTotal).style">
|
||||
<small>@#parseInt(server.Host.MemTotal?server.State.MemUsed/server.Host.MemTotal*100:0)#@%</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="three wide column">{{tr "SwapUsed"}}</div>
|
||||
<div class="thirteen wide column">
|
||||
<div :class="formatPercent(server.live,server.State.SwapUsed, server.Host.SwapTotal).class">
|
||||
<div class="bar"
|
||||
:style="formatPercent(server.live,server.State.SwapUsed, server.Host.SwapTotal).style">
|
||||
<small>@#parseInt(server.State?server.State.SwapUsed/server.Host.SwapTotal*100:0)#@%</small>
|
||||
<div class="bar" :style="formatPercent(server.live,server.State.SwapUsed, server.Host.SwapTotal).style">
|
||||
<small v-if="server.Host.SwapTotal === 0">OFF</small>
|
||||
<small v-else>@#parseInt(server.State.SwapUsed/server.Host.SwapTotal*100)#@%</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="three wide column">{{tr "DiskUsed"}}</div>
|
||||
<div class="thirteen wide column">
|
||||
<div :class="formatPercent(server.live,server.State.DiskUsed, server.Host.DiskTotal).class">
|
||||
<div class="bar"
|
||||
:style="formatPercent(server.live,server.State.DiskUsed, server.Host.DiskTotal).style">
|
||||
<small>@#parseInt(server.State?server.State.DiskUsed/server.Host.DiskTotal*100:0)#@%</small>
|
||||
<div class="bar" :style="formatPercent(server.live,server.State.DiskUsed, server.Host.DiskTotal).style">
|
||||
<small>@#parseInt(server.Host.DiskTotal?server.State.DiskUsed/server.Host.DiskTotal*100:0)#@%</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -105,11 +115,14 @@
|
||||
</div>
|
||||
<div class="three wide column">{{tr "Stat"}}</div>
|
||||
<div class="thirteen wide column">
|
||||
<i class="bi bi-cpu-fill" style="font-size: 1.1rem; color: #4a86e8;"></i> @#getCoreAndGHz(server.Host.CPU)#@
|
||||
<i class="bi bi-cpu-fill" style="font-size: 1.1rem; color: #4a86e8;"></i>
|
||||
@#getCoreAndGHz(server.Host.CPU)#@
|
||||
|
||||
<i class="bi bi-memory" style="font-size: 1.1rem; color: #00ac0d;"></i> @#getK2Gb(server.Host.MemTotal)#@
|
||||
<i class="bi bi-memory" style="font-size: 1.1rem; color: #00ac0d;"></i>
|
||||
@#getK2Gb(server.Host.MemTotal)#@
|
||||
|
||||
<i class="bi bi-hdd" style="font-size: 1.1rem; color: #e41e10"></i> @#getK2Gb(server.Host.DiskTotal)#@
|
||||
<i class="bi bi-hdd" style="font-size: 1.1rem; color: #e41e10"></i>
|
||||
@#getK2Gb(server.Host.DiskTotal)#@
|
||||
</div>
|
||||
<div class="three wide column">{{tr "Load"}}</div>
|
||||
<div class="thirteen wide column">
|
||||
@@ -356,6 +369,9 @@
|
||||
> -1) {
|
||||
return str;
|
||||
}
|
||||
if (str == 'darwin') {
|
||||
return 'apple';
|
||||
}
|
||||
if (['openwrt', 'linux'].indexOf(str) > -1) {
|
||||
return 'tux';
|
||||
}
|
||||
@@ -365,6 +381,9 @@
|
||||
if (str == 'arch') {
|
||||
return 'archlinux';
|
||||
}
|
||||
if (str.toLowerCase().includes('opensuse')) {
|
||||
return 'opensuse';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
group() {
|
||||
@@ -388,6 +407,9 @@
|
||||
if (percent < 0) {
|
||||
this.cache[percent].style['background-color'] = 'slategray'
|
||||
this.cache[percent].class.offline = true
|
||||
if (!live) {
|
||||
this.cache[percent].percent = 0
|
||||
}
|
||||
} else if (percent < 51) {
|
||||
this.cache[percent].style['background-color'] = '#0a94f2'
|
||||
this.cache[percent].class.fine = true
|
||||
@@ -422,8 +444,8 @@
|
||||
if (!bytes) {
|
||||
return '0B'
|
||||
}
|
||||
const i = Math.floor(Math.log(bytes) / Math.log(1024)),
|
||||
sizes = ["B", "K", "M", "G", "T", "P", "E", "Z", "Y"];
|
||||
const i = Math.floor(Math.log(bytes) / Math.log(1024));
|
||||
const sizes = ["B", "K", "M", "G", "T", "P", "E", "Z", "Y"];
|
||||
return parseFloat((bytes / Math.pow(1024, i)).toFixed(2)) + sizes[i];
|
||||
},
|
||||
getCoreAndGHz(str){
|
||||
@@ -502,8 +524,9 @@
|
||||
statusCards.servers = data.servers
|
||||
for (let i = 0; i < statusCards.servers.length; i++) {
|
||||
const ns = statusCards.servers[i];
|
||||
if (!ns.Host) ns.live = false
|
||||
else {
|
||||
if (!ns.Host) {
|
||||
ns.live = false
|
||||
} else {
|
||||
const lastActive = new Date(ns.LastActive).getTime()
|
||||
if (data.now - lastActive > 10 * 1000) {
|
||||
ns.live = false
|
||||
|
||||
+3
@@ -27,6 +27,9 @@
|
||||
<i :class="item.icon + ' icon'"></i>@#item.name#@
|
||||
<i class="check icon" v-if="preferredTemplate === item.key"></i>
|
||||
</a>
|
||||
<a v-if="defaultTemplate === 'custom'" @click="toggleTemplate('custom')" class="item">
|
||||
<i class="expand icon"></i>Custom
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
@@ -39,6 +39,11 @@
|
||||
<i class="check icon" v-if="preferredTemplate === item.key"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li v-if="defaultTemplate === 'custom'">
|
||||
<a @click="toggleTemplate('custom')" class="item">
|
||||
<i class="expand icon" style="font-size:1em"></i>Custom
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
+20
-13
@@ -6,16 +6,22 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/static/theme-server-status/css/bootstrap-theme.min.css">
|
||||
<link rel="shortcut icon" type="image/png" href="/static/logo.svg" />
|
||||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/css/bootstrap-theme.min.css">
|
||||
<link rel="stylesheet" href="/static/theme-server-status/css/main.css?v20240407">
|
||||
<link rel="stylesheet" href="/static/theme-server-status/css/dark.css?v20240407">
|
||||
<link rel="stylesheet" href="/static/theme-server-status/css/light.css?v20240407">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected].2/font/bootstrap-icons.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-logos@0.17/assets/font-logos.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/lipis/flag-icons@7.0.0/css/flag-icons.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected].1/dist/semantic.min.css">
|
||||
<link rel="shortcut icon" type="image/png" href="/static/logo.svg" />
|
||||
<link rel="stylesheet" href="https://unpkg.com/[email protected].3/font/bootstrap-icons.min.css">
|
||||
<link rel="stylesheet" href="https://unpkg.com/font-logos@1.2.0/assets/font-logos.css">
|
||||
<link rel="stylesheet" href="https://unpkg.com/flag-icons@7.2.3/css/flag-icons.min.css">
|
||||
<link rel="stylesheet" href="https://unpkg.com/[email protected].0/dist/semantic.min.css">
|
||||
<script src="https://unpkg.com/[email protected]/dist/jquery.min.js"></script>
|
||||
<script src="https://unpkg.com/[email protected]/dist/js/bootstrap.min.js"></script>
|
||||
<script src="https://unpkg.com/[email protected]/dist/vue.min.js"></script>
|
||||
<script src="https://unpkg.com/[email protected]/dist/echarts.min.js"></script>
|
||||
<script src="/static/theme-server-status/js/world.js?v20240613"></script>
|
||||
<script src="/static/theme-server-status/js/mixin.js?v20240302"></script>
|
||||
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="/static/theme-server-status/js/html5shiv.js"></script>
|
||||
@@ -24,12 +30,13 @@
|
||||
{{if ts .CustomCode}}
|
||||
{{.CustomCode|safe}}
|
||||
{{end}}
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/echarts.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/echarts/map/js/world.js"></script>
|
||||
<script src="/static/theme-server-status/js/mixin.js?v20240302"></script>
|
||||
</head>
|
||||
<body>
|
||||
{{end}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
</td>
|
||||
<td class="node-cell name center">@#node.name#@</td>
|
||||
<td class="node-cell os center">
|
||||
<i v-if='node.os == "darwin"' class="apple icon"></i>
|
||||
<i v-if='getFontLogoClass(node.host.Platform) == "" && node.online' class="fl-tux"></i>
|
||||
<i v-else-if='isWindowsPlatform(node.host.Platform)' class="windows icon"></i>
|
||||
<i v-else :class="'fl-' + getFontLogoClass(node.host.Platform)"></i>
|
||||
<span class="node-cell-os-text">@#node.os#@</span>
|
||||
<span class="node-cell-os-text">@#getPlatformName(node.os)#@</span>
|
||||
</td>
|
||||
<td style="text-align: center;" class="node-cell location">
|
||||
<i :class="'fi fi-' + node.location"></i>
|
||||
@@ -71,20 +71,23 @@
|
||||
</span>
|
||||
<span class="node-cell-expand" v-if="node.host.CPU">
|
||||
<span class="node-cell-expand-label">CPU:</span>
|
||||
@#node.host.CPU.join(",")#@
|
||||
@#node.host.CPU.join(",")#@ (@#node.cpu.percent#@%)
|
||||
</span>
|
||||
<span class="node-cell-expand">
|
||||
<span class="node-cell-expand-label">{{tr "DiskUsed"}}:</span>
|
||||
@#formatByteSize(node.state.DiskUsed)#@ / @#formatByteSize(node.host.DiskTotal)#@
|
||||
@#formatByteSize(node.state.DiskUsed)#@ / @#formatByteSize(node.host.DiskTotal)#@ (@#node.hdd.percent#@%)
|
||||
</span>
|
||||
<span class="node-cell-expand">
|
||||
<span class="node-cell-expand-label">{{tr "MemUsed"}}:</span>
|
||||
@#formatByteSize(node.state.MemUsed)#@ / @#formatByteSize(node.host.MemTotal)#@ (@#toFixed2(node.state.MemUsed / node.host.MemTotal * 100)#@%)
|
||||
</span>
|
||||
<span class="node-cell-expand">
|
||||
<span v-if="node.host.SwapTotal > 0" class="node-cell-expand">
|
||||
<span class="node-cell-expand-label">{{tr "SwapUsed"}}:</span>
|
||||
@#formatByteSize(node.state.SwapUsed)#@ / @#formatByteSize(node.host.SwapTotal)#@
|
||||
<span v-if="node.host.SwapTotal">(@#toFixed2(node.state.SwapUsed / node.host.SwapTotal * 100)#@%)</span>
|
||||
<span>(@#toFixed2(node.state.SwapUsed / node.host.SwapTotal * 100)#@%)</span>
|
||||
</span>
|
||||
<span v-else class="node-cell-expand">
|
||||
<span class="node-cell-expand-label">{{tr "SwapUsed"}}: OFF</span>
|
||||
</span>
|
||||
<span class="node-cell-expand">
|
||||
<span class="node-cell-expand-label">{{tr "NetTransfer"}}:</span>
|
||||
|
||||
+9
-10
@@ -30,10 +30,10 @@
|
||||
</td>
|
||||
<td class="node-cell name center">@#node.name#@</td>
|
||||
<td class="node-cell os center">
|
||||
<i v-if='node.os == "darwin"' class="apple icon"></i>
|
||||
<i v-if='getFontLogoClass(node.host.Platform) == "" && node.online' class="fl-tux"></i>
|
||||
<i v-else-if='isWindowsPlatform(node.host.Platform)' class="windows icon"></i>
|
||||
<i v-else :class="'fl-' + getFontLogoClass(node.host.Platform)"></i>
|
||||
<span class="node-cell-os-text">@#node.os#@</span>
|
||||
<span class="node-cell-os-text">@#getPlatformName(node.os)#@</span>
|
||||
</td>
|
||||
<td style="text-align: center;" class="node-cell location">
|
||||
<i :class="'fi fi-' + node.location"></i>
|
||||
@@ -74,20 +74,19 @@
|
||||
</span>
|
||||
<span class="node-cell-expand" v-if="node.host.CPU">
|
||||
<span class="node-cell-expand-label">CPU:</span>
|
||||
@#node.host.CPU.join(",")#@
|
||||
@#node.host.CPU.join(",")#@ (@#node.cpu.percent#@%)
|
||||
</span>
|
||||
<span class="node-cell-expand">
|
||||
<span class="node-cell-expand-label">{{tr "DiskUsed"}}:</span>
|
||||
@#formatByteSize(node.state.DiskUsed)#@ / @#formatByteSize(node.host.DiskTotal)#@
|
||||
@#formatByteSize(node.state.DiskUsed)#@ / @#formatByteSize(node.host.DiskTotal)#@ (@#node.hdd.percent#@%)
|
||||
</span>
|
||||
<span class="node-cell-expand">
|
||||
<span class="node-cell-expand-label">{{tr "MemUsed"}}:</span>
|
||||
@#formatByteSize(node.state.MemUsed)#@ / @#formatByteSize(node.host.MemTotal)#@(@#toFixed2(node.state.MemUsed / node.host.MemTotal * 100)#@%)
|
||||
</span>
|
||||
<span class="node-cell-expand">
|
||||
<span v-if="node.host.SwapTotal > 0" class="node-cell-expand">
|
||||
<span class="node-cell-expand-label">{{tr "SwapUsed"}}:</span>
|
||||
@#formatByteSize(node.state.SwapUsed)#@ / @#formatByteSize(node.host.SwapTotal)#@
|
||||
<span v-if="node.host.SwapTotal">(@#toFixed2(node.state.SwapUsed / node.host.SwapTotal * 100)#@%)</span>
|
||||
<span>(@#toFixed2(node.state.SwapUsed / node.host.SwapTotal * 100)#@%)</span>
|
||||
</span>
|
||||
<span v-else class="node-cell-expand">
|
||||
<span class="node-cell-expand-label">{{tr "SwapUsed"}}: OFF</span>
|
||||
</span>
|
||||
<span class="node-cell-expand">
|
||||
<span class="node-cell-expand-label">{{tr "NetTransfer"}}:</span>
|
||||
|
||||
+15
@@ -195,6 +195,12 @@
|
||||
isWindowsPlatform(str) {
|
||||
return str.includes('Windows')
|
||||
},
|
||||
getPlatformName(str){
|
||||
if (str.toLowerCase().includes('opensuse')) {
|
||||
return 'openSUSE';
|
||||
}
|
||||
return str;
|
||||
},
|
||||
getFontLogoClass(str) {
|
||||
if (["almalinux",
|
||||
"alpine",
|
||||
@@ -241,6 +247,9 @@
|
||||
> -1) {
|
||||
return str;
|
||||
}
|
||||
if (str == 'darwin') {
|
||||
return 'apple';
|
||||
}
|
||||
if (['openwrt', 'linux', "immortalwrt"].indexOf(str) > -1) {
|
||||
return 'tux';
|
||||
}
|
||||
@@ -250,6 +259,9 @@
|
||||
if (str == 'arch') {
|
||||
return 'archlinux';
|
||||
}
|
||||
if (str.toLowerCase().includes('opensuse')) {
|
||||
return 'opensuse';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
secondToDate(s) {
|
||||
@@ -276,6 +288,9 @@
|
||||
},
|
||||
formatPercents(live,percent) {
|
||||
//if(!live) { percent = 0; }
|
||||
if (isNaN(percent)) {
|
||||
percent = 0;
|
||||
}
|
||||
if (percent <= 0) {
|
||||
percent = 0;
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ before_show_menu() {
|
||||
|
||||
install_base() {
|
||||
(command -v git >/dev/null 2>&1 && command -v curl >/dev/null 2>&1 && command -v wget >/dev/null 2>&1 && command -v unzip >/dev/null 2>&1 && command -v getenforce >/dev/null 2>&1) ||
|
||||
(install_soft curl wget git unzip tzdata)
|
||||
(install_soft curl wget git unzip)
|
||||
}
|
||||
|
||||
install_arch() {
|
||||
|
||||
Reference in new issue
Block a user