Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ed7436176 | ||
|
|
2aabe1bd61 | ||
|
|
db5e94d0de | ||
|
|
3eecdc2b3f | ||
|
|
b2740e5f3c | ||
|
|
c3fa4cbbee | ||
|
|
a9da084711 | ||
|
|
f30969e946 |
@@ -30,6 +30,7 @@ jobs:
|
|||||||
v: true
|
v: true
|
||||||
x: false
|
x: false
|
||||||
race: false
|
race: false
|
||||||
|
tags: timetzdata
|
||||||
ldflags: -s -w --extldflags '-static -fpic' -X github.com/naiba/nezha/service/singleton.Version=${{ steps.extract_branch.outputs.tag }}
|
ldflags: -s -w --extldflags '-static -fpic' -X github.com/naiba/nezha/service/singleton.Version=${{ steps.extract_branch.outputs.tag }}
|
||||||
buildmode: default
|
buildmode: default
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ jobs:
|
|||||||
v: true
|
v: true
|
||||||
x: false
|
x: false
|
||||||
race: false
|
race: false
|
||||||
|
tags: timetzdata
|
||||||
ldflags: -s -w --extldflags '-static -fpic' -X github.com/naiba/nezha/service/singleton.Version=test
|
ldflags: -s -w --extldflags '-static -fpic' -X github.com/naiba/nezha/service/singleton.Version=test
|
||||||
buildmode: default
|
buildmode: default
|
||||||
|
|
||||||
|
|||||||
@@ -40,5 +40,6 @@ jobs:
|
|||||||
v: true
|
v: true
|
||||||
x: false
|
x: false
|
||||||
race: false
|
race: false
|
||||||
|
tags: timetzdata
|
||||||
ldflags: -s -w --extldflags '-static -fpic' -X github.com/naiba/nezha/service/singleton.Version=test
|
ldflags: -s -w --extldflags '-static -fpic' -X github.com/naiba/nezha/service/singleton.Version=test
|
||||||
buildmode: default
|
buildmode: default
|
||||||
|
|||||||
@@ -45,13 +45,13 @@ You can change the dashboard language in the settings page (`/setting`) after th
|
|||||||
<a href="https://github.com/xykt" title="xykt"><img src="https://avatars.githubusercontent.com/u/152045469?v=4" width="50;" alt="xykt"/></a>
|
<a href="https://github.com/xykt" title="xykt"><img src="https://avatars.githubusercontent.com/u/152045469?v=4" width="50;" alt="xykt"/></a>
|
||||||
<a href="https://github.com/MikoyChinese" title="MikoyChinese"><img src="https://avatars.githubusercontent.com/u/22676744?v=4" width="50;" alt="MikoyChinese"/></a>
|
<a href="https://github.com/MikoyChinese" title="MikoyChinese"><img src="https://avatars.githubusercontent.com/u/22676744?v=4" width="50;" alt="MikoyChinese"/></a>
|
||||||
<a href="https://github.com/JackieSung4ev" title="JackieSung4ev"><img src="https://avatars.githubusercontent.com/u/24974735?v=4" width="50;" alt="JackieSung4ev"/></a>
|
<a href="https://github.com/JackieSung4ev" title="JackieSung4ev"><img src="https://avatars.githubusercontent.com/u/24974735?v=4" width="50;" alt="JackieSung4ev"/></a>
|
||||||
<a href="https://github.com/uubulb" title="UUBulb"><img src="https://avatars.githubusercontent.com/u/35923940?v=4" width="50;" alt="UUBulb"/></a>
|
|
||||||
<a href="https://github.com/nap0o" title="nap0o"><img src="https://avatars.githubusercontent.com/u/144927971?v=4" width="50;" alt="nap0o"/></a>
|
<a href="https://github.com/nap0o" title="nap0o"><img src="https://avatars.githubusercontent.com/u/144927971?v=4" width="50;" alt="nap0o"/></a>
|
||||||
|
<a href="https://github.com/uubulb" title="UUBulb"><img src="https://avatars.githubusercontent.com/u/35923940?v=4" width="50;" alt="UUBulb"/></a>
|
||||||
<a href="https://github.com/lemoeo" title="Lemoe"><img src="https://avatars.githubusercontent.com/u/18618627?v=4" width="50;" alt="Lemoe"/></a>
|
<a href="https://github.com/lemoeo" title="Lemoe"><img src="https://avatars.githubusercontent.com/u/18618627?v=4" width="50;" alt="Lemoe"/></a>
|
||||||
<a href="https://github.com/cantoblanco" title="Kris"><img src="https://avatars.githubusercontent.com/u/116849421?v=4" width="50;" alt="Kris"/></a>
|
<a href="https://github.com/cantoblanco" title="Kris"><img src="https://avatars.githubusercontent.com/u/116849421?v=4" width="50;" alt="Kris"/></a>
|
||||||
<a href="https://github.com/CosmosZ-code" title="CosmosZ-code"><img src="https://avatars.githubusercontent.com/u/81398224?v=4" width="50;" alt="CosmosZ-code"/></a>
|
|
||||||
<a href="https://github.com/liuyanxi975" title="刘颜溪"><img src="https://avatars.githubusercontent.com/u/24417037?v=4" width="50;" alt="刘颜溪"/></a>
|
|
||||||
<a href="https://github.com/spiritLHLS" title="spiritlhl"><img src="https://avatars.githubusercontent.com/u/103393591?v=4" width="50;" alt="spiritlhl"/></a>
|
<a href="https://github.com/spiritLHLS" title="spiritlhl"><img src="https://avatars.githubusercontent.com/u/103393591?v=4" width="50;" alt="spiritlhl"/></a>
|
||||||
|
<a href="https://github.com/liuyanxi975" title="刘颜溪"><img src="https://avatars.githubusercontent.com/u/24417037?v=4" width="50;" alt="刘颜溪"/></a>
|
||||||
|
<a href="https://github.com/CosmosZ-code" title="CosmosZ-code"><img src="https://avatars.githubusercontent.com/u/81398224?v=4" width="50;" alt="CosmosZ-code"/></a>
|
||||||
<a href="https://github.com/lvgj-stack" title="Ko no dio"><img src="https://avatars.githubusercontent.com/u/38449861?v=4" width="50;" alt="Ko no dio"/></a>
|
<a href="https://github.com/lvgj-stack" title="Ko no dio"><img src="https://avatars.githubusercontent.com/u/38449861?v=4" width="50;" alt="Ko no dio"/></a>
|
||||||
<a href="https://github.com/hhhkkk520" title="Kris"><img src="https://avatars.githubusercontent.com/u/52115472?v=4" width="50;" alt="Kris"/></a>
|
<a href="https://github.com/hhhkkk520" title="Kris"><img src="https://avatars.githubusercontent.com/u/52115472?v=4" width="50;" alt="Kris"/></a>
|
||||||
<a href="https://github.com/1ridic" title="1ridic"><img src="https://avatars.githubusercontent.com/u/88495501?v=4" width="50;" alt="1ridic"/></a>
|
<a href="https://github.com/1ridic" title="1ridic"><img src="https://avatars.githubusercontent.com/u/88495501?v=4" width="50;" alt="1ridic"/></a>
|
||||||
@@ -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/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/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/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/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/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>
|
<a href="https://github.com/GreenTeodoro839" title="GreenTeodoro839"><img src="https://avatars.githubusercontent.com/u/77104800?v=4" width="50;" alt="GreenTeodoro839"/></a>
|
||||||
|
|||||||
+1
-1
@@ -22,7 +22,7 @@ var Themes = map[string]string{
|
|||||||
"mdui": "Neko Mdui",
|
"mdui": "Neko Mdui",
|
||||||
"hotaru": "Hotaru",
|
"hotaru": "Hotaru",
|
||||||
"angel-kanade": "AngelKanade",
|
"angel-kanade": "AngelKanade",
|
||||||
"server-status": "SeverStatus",
|
"server-status": "ServerStatus",
|
||||||
"custom": "Custom(local)",
|
"custom": "Custom(local)",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ const mixinsVue = {
|
|||||||
adaptedTemplates: [
|
adaptedTemplates: [
|
||||||
{ key: 'default', name: 'Default', icon: 'th large' },
|
{ key: 'default', name: 'Default', icon: 'th large' },
|
||||||
{ key: 'angel-kanade', name: 'AngelKanade', icon: 'square' },
|
{ key: 'angel-kanade', name: 'AngelKanade', icon: 'square' },
|
||||||
{ key: 'server-status', name: 'SeverStatus', icon: 'list' }
|
{ key: 'server-status', name: 'ServerStatus', icon: 'list' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ const mixinsVue = {
|
|||||||
adaptedTemplates: [
|
adaptedTemplates: [
|
||||||
{ key: 'default', name: 'Default', icon: 'th large' },
|
{ key: 'default', name: 'Default', icon: 'th large' },
|
||||||
{ key: 'angel-kanade', name: 'AngelKanade', icon: 'square' },
|
{ key: 'angel-kanade', name: 'AngelKanade', icon: 'square' },
|
||||||
{ key: 'server-status', name: 'SeverStatus', icon: 'list' }
|
{ key: 'server-status', name: 'ServerStatus', icon: 'list' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|||||||
@@ -24,6 +24,9 @@
|
|||||||
<i :class="item.icon + ' icon'"></i>@#item.name#@
|
<i :class="item.icon + ' icon'"></i>@#item.name#@
|
||||||
<i class="check icon" v-if="preferredTemplate === item.key"></i>
|
<i class="check icon" v-if="preferredTemplate === item.key"></i>
|
||||||
</a>
|
</a>
|
||||||
|
<a v-if="defaultTemplate === 'custom'" @click="toggleTemplate('custom')" class="item">
|
||||||
|
<i class="expand icon"></i>Custom
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
+10
-9
@@ -7,19 +7,20 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
<meta content="telephone=no" name="format-detection">
|
<meta content="telephone=no" name="format-detection">
|
||||||
<title>{{.Title}}</title>
|
<title>{{.Title}}</title>
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/semantic.min.css">
|
<link rel="shortcut icon" type="image/png" href="/static/logo.svg" />
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/assets/font-logos.css">
|
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/semantic.min.css">
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.2/font/bootstrap-icons.min.css">
|
<link rel="stylesheet" href="https://unpkg.com/font-logos@0.17.0/assets/font-logos.css">
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/lipis/[email protected]/css/flag-icons.min.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/semantic-ui-alerts.min.css">
|
||||||
<link rel="stylesheet" type="text/css" href="/static/theme-default/css/main.css?v20240226">
|
<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://unpkg.com/[email protected]/dist/jquery.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
|
<script src="https://unpkg.com/[email protected]/dist/semantic.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/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="/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>
|
<script src="/static/theme-default/js/mixin.js?v20240302"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
|||||||
+107
-38
@@ -15,38 +15,60 @@
|
|||||||
<div v-for="server in group.data" :id="server.ID" class="ui card">
|
<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="content" v-if="server.Host" style="margin-top: 10px; padding-bottom: 5px">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<i style="width: 22px;border-radius: 4px;" :class="'fi fi-' + server.Host.CountryCode"></i> <i v-if='server.Host.Platform == "darwin"'
|
<i style="width: 22px;border-radius: 4px;" :class="'fi fi-' + server.Host.CountryCode"></i>
|
||||||
class="apple icon"></i><i v-else-if='isWindowsPlatform(server.Host.Platform)'
|
<i v-if='isWindowsPlatform(server.Host.Platform)' class="windows icon"></i>
|
||||||
class="windows icon"></i><i v-else :class="'fl-' + getFontLogoClass(server.Host.Platform)"></i>
|
<i v-else-if='getFontLogoClass(server.Host.Platform) == "" && server.State.Uptime > 0' class="fl-tux"></i>
|
||||||
|
<i v-else :class="'fl-' + getFontLogoClass(server.Host.Platform)"></i>
|
||||||
@#server.Name + (server.live?'':'[{{tr "Offline"}}]')#@
|
@#server.Name + (server.live?'':'[{{tr "Offline"}}]')#@
|
||||||
<i @click="togglePopup($event, server.ID)" aria-expanded="false" class="nezha-secondary-font info circle icon"></i>
|
<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;">
|
<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>
|
<i class="closePopup window close icon" @click="closePopup(server.ID)"></i>
|
||||||
{{tr "Platform"}}: @#server.Host.Platform#@-@#server.Host.PlatformVersion#@
|
{{tr "Platform"}}: @#server.Host.Platform#@-@#server.Host.PlatformVersion#@
|
||||||
[<span
|
[<span v-if="server.Host.Virtualization">@#server.Host.Virtualization#@:</span>@#server.Host.Arch#@]
|
||||||
v-if="server.Host.Virtualization">@#server.Host.Virtualization#@:</span>@#server.Host.Arch#@]<br />
|
<br />
|
||||||
CPU: @#server.Host.CPU#@<br />
|
CPU: @#server.Host.CPU#@
|
||||||
|
<br />
|
||||||
{{tr "DiskUsed"}}:
|
{{tr "DiskUsed"}}:
|
||||||
@#formatByteSize(server.State.DiskUsed)#@/@#formatByteSize(server.Host.DiskTotal)#@<br />
|
@#formatByteSize(server.State.DiskUsed)#@/@#formatByteSize(server.Host.DiskTotal)#@
|
||||||
|
<br />
|
||||||
{{tr "MemUsed"}}:
|
{{tr "MemUsed"}}:
|
||||||
@#formatByteSize(server.State.MemUsed)#@/@#formatByteSize(server.Host.MemTotal)#@<br />
|
@#formatByteSize(server.State.MemUsed)#@/@#formatByteSize(server.Host.MemTotal)#@
|
||||||
|
<br />
|
||||||
{{tr "SwapUsed"}}:
|
{{tr "SwapUsed"}}:
|
||||||
@#formatByteSize(server.State.SwapUsed)#@/@#formatByteSize(server.Host.SwapTotal)#@<br />
|
<template v-if="server.Host.SwapTotal === 0">OFF</template>
|
||||||
{{tr "NetTransfer"}}: <i
|
<template v-else>@#formatByteSize(server.State.SwapUsed)#@/@#formatByteSize(server.Host.SwapTotal)#@</template>
|
||||||
class="arrow alternate circle down outline icon"></i>@#formatByteSize(server.State.NetInTransfer)#@<i
|
<br />
|
||||||
class="arrow alternate circle up outline icon"></i>@#formatByteSize(server.State.NetOutTransfer)#@<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)#@/@#
|
{{tr "Load"}}: @#toFixed2(server.State.Load1)#@/@#toFixed2(server.State.Load5)#@/@#
|
||||||
toFixed2(server.State.Load15) #@<br />
|
toFixed2(server.State.Load15)#@
|
||||||
{{tr "ProcessCount"}}: @# server.State.ProcessCount #@<br />
|
<br />
|
||||||
{{tr "ConnCount"}}: TCP @# server.State.TcpConnCount #@ / UDP @# server.State.UdpConnCount #@<br />
|
{{tr "ProcessCount"}}: @#server.State.ProcessCount#@
|
||||||
{{tr "BootTime"}}: @# formatTimestamp(server.Host.BootTime) #@<br />
|
<br />
|
||||||
{{tr "LastActive"}}: @# new Date(server.LastActive).toLocaleString() #@<br />
|
{{tr "ConnCount"}}: TCP @#server.State.TcpConnCount#@ / UDP @#server.State.UdpConnCount#@
|
||||||
{{tr "Version"}}: @#server.Host.Version#@ <br/>
|
<br />
|
||||||
{{tr "Temperature"}}:
|
{{tr "BootTime"}}: @#formatTimestamp(server.Host.BootTime)#@
|
||||||
<span v-for="temp in server.State.Temperatures">
|
<br />
|
||||||
|
{{tr "LastActive"}}: @#new Date(server.LastActive).toLocaleString()#@
|
||||||
|
<br />
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<template v-if="server.State.Temperatures">
|
||||||
|
<a href="#" @click.prevent="toggleDetailedTemp">
|
||||||
|
{{tr "Temperature"}}: <span v-if="!showDetailedTemp">@#getTemperature(server.State.Temperatures, sensorList)#@°C</span>
|
||||||
|
<span v-else>
|
||||||
|
<span v-for="temp in server.State.Temperatures" :key="temp.Name">
|
||||||
@#temp.Name#@: @#temp.Temperature#@°C
|
@#temp.Name#@: @#temp.Temperature#@°C
|
||||||
</span>
|
</span>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
<br />
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
{{tr "Version"}}: @#server.Host.Version#@
|
||||||
<div class="chartbox" :key="server.ID" :ref="`chart${server.ID}`" style="width: 100%; height: auto; margin-bottom: 2px;"></div>
|
<div class="chartbox" :key="server.ID" :ref="`chart${server.ID}`" style="width: 100%; height: auto; margin-bottom: 2px;"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui divider" style="margin-bottom: 5px"></div>
|
<div class="ui divider" style="margin-bottom: 5px"></div>
|
||||||
@@ -57,34 +79,32 @@
|
|||||||
<div class="thirteen wide column">
|
<div class="thirteen wide column">
|
||||||
<div :class="formatPercent(server.live,server.State.CPU, 100).class">
|
<div :class="formatPercent(server.live,server.State.CPU, 100).class">
|
||||||
<div class="bar" :style="formatPercent(server.live,server.State.CPU, 100).style">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<div class="three wide column">{{tr "MemUsed"}}</div>
|
<div class="three wide column">{{tr "MemUsed"}}</div>
|
||||||
<div class="thirteen wide column">
|
<div class="thirteen wide column">
|
||||||
<div :class="formatPercent(server.live,server.State.MemUsed, server.Host.MemTotal).class">
|
<div :class="formatPercent(server.live,server.State.MemUsed, server.Host.MemTotal).class">
|
||||||
<div class="bar"
|
<div class="bar" :style="formatPercent(server.live,server.State.MemUsed, server.Host.MemTotal).style">
|
||||||
: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>
|
||||||
<small>@#parseInt(server.State?server.State.MemUsed/server.Host.MemTotal*100:0)#@%</small>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="three wide column">{{tr "SwapUsed"}}</div>
|
<div class="three wide column">{{tr "SwapUsed"}}</div>
|
||||||
<div class="thirteen wide column">
|
<div class="thirteen wide column">
|
||||||
<div :class="formatPercent(server.live,server.State.SwapUsed, server.Host.SwapTotal).class">
|
<div :class="formatPercent(server.live,server.State.SwapUsed, server.Host.SwapTotal).class">
|
||||||
<div class="bar"
|
<div class="bar" :style="formatPercent(server.live,server.State.SwapUsed, server.Host.SwapTotal).style">
|
||||||
:style="formatPercent(server.live,server.State.SwapUsed, server.Host.SwapTotal).style">
|
<small v-if="server.Host.SwapTotal === 0">OFF</small>
|
||||||
<small>@#parseInt(server.State?server.State.SwapUsed/server.Host.SwapTotal*100:0)#@%</small>
|
<small v-else>@#parseInt(server.State.SwapUsed/server.Host.SwapTotal*100)#@%</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="three wide column">{{tr "DiskUsed"}}</div>
|
<div class="three wide column">{{tr "DiskUsed"}}</div>
|
||||||
<div class="thirteen wide column">
|
<div class="thirteen wide column">
|
||||||
<div :class="formatPercent(server.live,server.State.DiskUsed, server.Host.DiskTotal).class">
|
<div :class="formatPercent(server.live,server.State.DiskUsed, server.Host.DiskTotal).class">
|
||||||
<div class="bar"
|
<div class="bar" :style="formatPercent(server.live,server.State.DiskUsed, server.Host.DiskTotal).style">
|
||||||
: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>
|
||||||
<small>@#parseInt(server.State?server.State.DiskUsed/server.Host.DiskTotal*100:0)#@%</small>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -105,11 +125,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="three wide column">{{tr "Stat"}}</div>
|
<div class="three wide column">{{tr "Stat"}}</div>
|
||||||
<div class="thirteen wide column">
|
<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>
|
||||||
<div class="three wide column">{{tr "Load"}}</div>
|
<div class="three wide column">{{tr "Load"}}</div>
|
||||||
<div class="thirteen wide column">
|
<div class="thirteen wide column">
|
||||||
@@ -150,6 +173,20 @@
|
|||||||
cache: [],
|
cache: [],
|
||||||
chartDataList: [],
|
chartDataList: [],
|
||||||
activePopup: null,
|
activePopup: null,
|
||||||
|
sensorList: [
|
||||||
|
'TC0D', //CPU Die 温度,代表 CPU 内部的温度
|
||||||
|
'TC0H', //CPU Heatsink 温度,代表 CPU 散热器的温度
|
||||||
|
'TC0P', //CPU Proximity 温度,代表 CPU 附近的温度
|
||||||
|
'coretemp_package_id_0',
|
||||||
|
'soc_thermal',
|
||||||
|
'cpu_thermal_zone',
|
||||||
|
'ACPI\\ThermalZone\\TZ0__0',
|
||||||
|
'ACPI\\ThermalZone\\CPUZ_0',
|
||||||
|
'ACPI\\ThermalZone\\TZ00_0',
|
||||||
|
'ACPI\\ThermalZone\\TZ001_0',
|
||||||
|
'ACPI\\ThermalZone\\THM0_0'
|
||||||
|
],
|
||||||
|
showDetailedTemp: false
|
||||||
},
|
},
|
||||||
mixins: [mixinsVue],
|
mixins: [mixinsVue],
|
||||||
created() {
|
created() {
|
||||||
@@ -356,6 +393,9 @@
|
|||||||
> -1) {
|
> -1) {
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
if (str == 'darwin') {
|
||||||
|
return 'apple';
|
||||||
|
}
|
||||||
if (['openwrt', 'linux'].indexOf(str) > -1) {
|
if (['openwrt', 'linux'].indexOf(str) > -1) {
|
||||||
return 'tux';
|
return 'tux';
|
||||||
}
|
}
|
||||||
@@ -365,6 +405,9 @@
|
|||||||
if (str == 'arch') {
|
if (str == 'arch') {
|
||||||
return 'archlinux';
|
return 'archlinux';
|
||||||
}
|
}
|
||||||
|
if (str.toLowerCase().includes('opensuse')) {
|
||||||
|
return 'opensuse';
|
||||||
|
}
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
group() {
|
group() {
|
||||||
@@ -388,6 +431,9 @@
|
|||||||
if (percent < 0) {
|
if (percent < 0) {
|
||||||
this.cache[percent].style['background-color'] = 'slategray'
|
this.cache[percent].style['background-color'] = 'slategray'
|
||||||
this.cache[percent].class.offline = true
|
this.cache[percent].class.offline = true
|
||||||
|
if (!live) {
|
||||||
|
this.cache[percent].percent = 0
|
||||||
|
}
|
||||||
} else if (percent < 51) {
|
} else if (percent < 51) {
|
||||||
this.cache[percent].style['background-color'] = '#0a94f2'
|
this.cache[percent].style['background-color'] = '#0a94f2'
|
||||||
this.cache[percent].class.fine = true
|
this.cache[percent].class.fine = true
|
||||||
@@ -422,8 +468,8 @@
|
|||||||
if (!bytes) {
|
if (!bytes) {
|
||||||
return '0B'
|
return '0B'
|
||||||
}
|
}
|
||||||
const i = Math.floor(Math.log(bytes) / Math.log(1024)),
|
const i = Math.floor(Math.log(bytes) / Math.log(1024));
|
||||||
sizes = ["B", "K", "M", "G", "T", "P", "E", "Z", "Y"];
|
const sizes = ["B", "K", "M", "G", "T", "P", "E", "Z", "Y"];
|
||||||
return parseFloat((bytes / Math.pow(1024, i)).toFixed(2)) + sizes[i];
|
return parseFloat((bytes / Math.pow(1024, i)).toFixed(2)) + sizes[i];
|
||||||
},
|
},
|
||||||
getCoreAndGHz(str){
|
getCoreAndGHz(str){
|
||||||
@@ -457,6 +503,28 @@
|
|||||||
},
|
},
|
||||||
listTipsMouseleave(obj){
|
listTipsMouseleave(obj){
|
||||||
layer.close(this.layerIndex)
|
layer.close(this.layerIndex)
|
||||||
|
},
|
||||||
|
toggleDetailedTemp(){
|
||||||
|
this.showDetailedTemp = !this.showDetailedTemp;
|
||||||
|
},
|
||||||
|
getTemperature(arr, sensorList) {
|
||||||
|
// 将 sensorList 中的所有项转换为小写
|
||||||
|
const lowerCaseSensorList = sensorList.map(sensor => sensor.toLowerCase());
|
||||||
|
|
||||||
|
// 过滤出 Name 在 sensorList 中的元素(忽略大小写)
|
||||||
|
const filtered = arr.filter(item => lowerCaseSensorList.includes(item.Name.toLowerCase()));
|
||||||
|
|
||||||
|
// 如果有匹配的元素,则计算这些元素的 Temperature 的最大值
|
||||||
|
if (filtered.length > 0) {
|
||||||
|
return filtered.reduce((max, current) => {
|
||||||
|
return current.Temperature > max ? current.Temperature : max;
|
||||||
|
}, filtered[0].Temperature);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果没有匹配的元素,则计算 arr 中所有元素的 Temperature 的最大值
|
||||||
|
return arr.reduce((max, current) => {
|
||||||
|
return current.Temperature > max ? current.Temperature : max;
|
||||||
|
}, arr[0].Temperature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -502,8 +570,9 @@
|
|||||||
statusCards.servers = data.servers
|
statusCards.servers = data.servers
|
||||||
for (let i = 0; i < statusCards.servers.length; i++) {
|
for (let i = 0; i < statusCards.servers.length; i++) {
|
||||||
const ns = statusCards.servers[i];
|
const ns = statusCards.servers[i];
|
||||||
if (!ns.Host) ns.live = false
|
if (!ns.Host) {
|
||||||
else {
|
ns.live = false
|
||||||
|
} else {
|
||||||
const lastActive = new Date(ns.LastActive).getTime()
|
const lastActive = new Date(ns.LastActive).getTime()
|
||||||
if (data.now - lastActive > 10 * 1000) {
|
if (data.now - lastActive > 10 * 1000) {
|
||||||
ns.live = false
|
ns.live = false
|
||||||
|
|||||||
+3
@@ -27,6 +27,9 @@
|
|||||||
<i :class="item.icon + ' icon'"></i>@#item.name#@
|
<i :class="item.icon + ' icon'"></i>@#item.name#@
|
||||||
<i class="check icon" v-if="preferredTemplate === item.key"></i>
|
<i class="check icon" v-if="preferredTemplate === item.key"></i>
|
||||||
</a>
|
</a>
|
||||||
|
<a v-if="defaultTemplate === 'custom'" @click="toggleTemplate('custom')" class="item">
|
||||||
|
<i class="expand icon"></i>Custom
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -39,6 +39,11 @@
|
|||||||
<i class="check icon" v-if="preferredTemplate === item.key"></i>
|
<i class="check icon" v-if="preferredTemplate === item.key"></i>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</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>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
+20
-13
@@ -6,16 +6,22 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<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="shortcut icon" type="image/png" href="/static/logo.svg" />
|
||||||
<link rel="stylesheet" href="/static/theme-server-status/css/bootstrap-theme.min.css">
|
<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/main.css?v20240407">
|
||||||
<link rel="stylesheet" href="/static/theme-server-status/css/dark.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="/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://unpkg.com/[email protected].3/font/bootstrap-icons.min.css">
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/assets/font-logos.css">
|
<link rel="stylesheet" href="https://unpkg.com/[email protected].0/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://unpkg.com/flag-icons@7.2.3/css/flag-icons.min.css">
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected].1/dist/semantic.min.css">
|
<link rel="stylesheet" href="https://unpkg.com/[email protected].0/dist/semantic.min.css">
|
||||||
<link rel="shortcut icon" type="image/png" href="/static/logo.svg" />
|
<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="https://unpkg.com/[email protected]/map/js/world.js"></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 -->
|
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
<script src="/static/theme-server-status/js/html5shiv.js"></script>
|
<script src="/static/theme-server-status/js/html5shiv.js"></script>
|
||||||
@@ -24,12 +30,13 @@
|
|||||||
{{if ts .CustomCode}}
|
{{if ts .CustomCode}}
|
||||||
{{.CustomCode|safe}}
|
{{.CustomCode|safe}}
|
||||||
{{end}}
|
{{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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -27,10 +27,10 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="node-cell name center">@#node.name#@</td>
|
<td class="node-cell name center">@#node.name#@</td>
|
||||||
<td class="node-cell os center">
|
<td class="node-cell os center">
|
||||||
<i v-if='node.os == "darwin"' class="apple icon"></i>
|
<i v-if='isWindowsPlatform(node.host.Platform)' class="windows icon"></i>
|
||||||
<i v-else-if='isWindowsPlatform(node.host.Platform)' class="windows icon"></i>
|
<i v-else-if='getFontLogoClass(node.host.Platform) == "" && node.stateuptime > 0' class="fl-tux"></i>
|
||||||
<i v-else :class="'fl-' + getFontLogoClass(node.host.Platform)"></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>
|
||||||
<td style="text-align: center;" class="node-cell location">
|
<td style="text-align: center;" class="node-cell location">
|
||||||
<i :class="'fi fi-' + node.location"></i>
|
<i :class="'fi fi-' + node.location"></i>
|
||||||
@@ -71,20 +71,23 @@
|
|||||||
</span>
|
</span>
|
||||||
<span class="node-cell-expand" v-if="node.host.CPU">
|
<span class="node-cell-expand" v-if="node.host.CPU">
|
||||||
<span class="node-cell-expand-label">CPU:</span>
|
<span class="node-cell-expand-label">CPU:</span>
|
||||||
@#node.host.CPU.join(",")#@
|
@#node.host.CPU.join(",")#@ (@#node.cpu.percent#@%)
|
||||||
</span>
|
</span>
|
||||||
<span class="node-cell-expand">
|
<span class="node-cell-expand">
|
||||||
<span class="node-cell-expand-label">{{tr "DiskUsed"}}:</span>
|
<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>
|
||||||
<span class="node-cell-expand">
|
<span class="node-cell-expand">
|
||||||
<span class="node-cell-expand-label">{{tr "MemUsed"}}:</span>
|
<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)#@%)
|
@#formatByteSize(node.state.MemUsed)#@ / @#formatByteSize(node.host.MemTotal)#@ (@#toFixed2(node.state.MemUsed / node.host.MemTotal * 100)#@%)
|
||||||
</span>
|
</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>
|
<span class="node-cell-expand-label">{{tr "SwapUsed"}}:</span>
|
||||||
@#formatByteSize(node.state.SwapUsed)#@ / @#formatByteSize(node.host.SwapTotal)#@
|
@#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>
|
||||||
<span class="node-cell-expand">
|
<span class="node-cell-expand">
|
||||||
<span class="node-cell-expand-label">{{tr "NetTransfer"}}:</span>
|
<span class="node-cell-expand-label">{{tr "NetTransfer"}}:</span>
|
||||||
|
|||||||
+12
-9
@@ -30,10 +30,10 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="node-cell name center">@#node.name#@</td>
|
<td class="node-cell name center">@#node.name#@</td>
|
||||||
<td class="node-cell os center">
|
<td class="node-cell os center">
|
||||||
<i v-if='node.os == "darwin"' class="apple icon"></i>
|
<i v-if='isWindowsPlatform(node.host.Platform)' class="windows icon"></i>
|
||||||
<i v-else-if='isWindowsPlatform(node.host.Platform)' class="windows icon"></i>
|
<i v-else-if='getFontLogoClass(node.host.Platform) == "" && node.stateuptime > 0' class="fl-tux"></i>
|
||||||
<i v-else :class="'fl-' + getFontLogoClass(node.host.Platform)"></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>
|
||||||
<td style="text-align: center;" class="node-cell location">
|
<td style="text-align: center;" class="node-cell location">
|
||||||
<i :class="'fi fi-' + node.location"></i>
|
<i :class="'fi fi-' + node.location"></i>
|
||||||
@@ -74,20 +74,23 @@
|
|||||||
</span>
|
</span>
|
||||||
<span class="node-cell-expand" v-if="node.host.CPU">
|
<span class="node-cell-expand" v-if="node.host.CPU">
|
||||||
<span class="node-cell-expand-label">CPU:</span>
|
<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)#@
|
|
||||||
</span>
|
</span>
|
||||||
<span class="node-cell-expand">
|
<span class="node-cell-expand">
|
||||||
<span class="node-cell-expand-label">{{tr "MemUsed"}}:</span>
|
<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)#@%)
|
@#formatByteSize(node.state.MemUsed)#@ / @#formatByteSize(node.host.MemTotal)#@ (@#toFixed2(node.state.MemUsed / node.host.MemTotal * 100)#@%)
|
||||||
</span>
|
</span>
|
||||||
<span class="node-cell-expand">
|
<span class="node-cell-expand">
|
||||||
|
<span class="node-cell-expand-label">{{tr "DiskUsed"}}:</span>
|
||||||
|
@#formatByteSize(node.state.DiskUsed)#@ / @#formatByteSize(node.host.DiskTotal)#@ (@#node.hdd.percent#@%)
|
||||||
|
</span>
|
||||||
|
<span v-if="node.host.SwapTotal > 0" class="node-cell-expand">
|
||||||
<span class="node-cell-expand-label">{{tr "SwapUsed"}}:</span>
|
<span class="node-cell-expand-label">{{tr "SwapUsed"}}:</span>
|
||||||
@#formatByteSize(node.state.SwapUsed)#@ / @#formatByteSize(node.host.SwapTotal)#@
|
@#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>
|
||||||
<span class="node-cell-expand">
|
<span class="node-cell-expand">
|
||||||
<span class="node-cell-expand-label">{{tr "NetTransfer"}}:</span>
|
<span class="node-cell-expand-label">{{tr "NetTransfer"}}:</span>
|
||||||
|
|||||||
+16
@@ -195,6 +195,12 @@
|
|||||||
isWindowsPlatform(str) {
|
isWindowsPlatform(str) {
|
||||||
return str.includes('Windows')
|
return str.includes('Windows')
|
||||||
},
|
},
|
||||||
|
getPlatformName(str){
|
||||||
|
if (str.toLowerCase().includes('opensuse')) {
|
||||||
|
return 'openSUSE';
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
},
|
||||||
getFontLogoClass(str) {
|
getFontLogoClass(str) {
|
||||||
if (["almalinux",
|
if (["almalinux",
|
||||||
"alpine",
|
"alpine",
|
||||||
@@ -241,6 +247,9 @@
|
|||||||
> -1) {
|
> -1) {
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
if (str == 'darwin') {
|
||||||
|
return 'apple';
|
||||||
|
}
|
||||||
if (['openwrt', 'linux', "immortalwrt"].indexOf(str) > -1) {
|
if (['openwrt', 'linux', "immortalwrt"].indexOf(str) > -1) {
|
||||||
return 'tux';
|
return 'tux';
|
||||||
}
|
}
|
||||||
@@ -250,6 +259,9 @@
|
|||||||
if (str == 'arch') {
|
if (str == 'arch') {
|
||||||
return 'archlinux';
|
return 'archlinux';
|
||||||
}
|
}
|
||||||
|
if (str.toLowerCase().includes('opensuse')) {
|
||||||
|
return 'opensuse';
|
||||||
|
}
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
secondToDate(s) {
|
secondToDate(s) {
|
||||||
@@ -276,6 +288,9 @@
|
|||||||
},
|
},
|
||||||
formatPercents(live,percent) {
|
formatPercents(live,percent) {
|
||||||
//if(!live) { percent = 0; }
|
//if(!live) { percent = 0; }
|
||||||
|
if (isNaN(percent)) {
|
||||||
|
percent = 0;
|
||||||
|
}
|
||||||
if (percent <= 0) {
|
if (percent <= 0) {
|
||||||
percent = 0;
|
percent = 0;
|
||||||
}
|
}
|
||||||
@@ -359,6 +374,7 @@
|
|||||||
name: server.Name,
|
name: server.Name,
|
||||||
os: platform,
|
os: platform,
|
||||||
location: server.Host.CountryCode,
|
location: server.Host.CountryCode,
|
||||||
|
stateuptime: server.State.Uptime,
|
||||||
uptime: this.secondToDate(server.State.Uptime),
|
uptime: this.secondToDate(server.State.Uptime),
|
||||||
load: this.toFixed2(server.State.Load1),
|
load: this.toFixed2(server.State.Load1),
|
||||||
network: this.getNetworkSpeed(server.State.NetInSpeed, server.State.NetOutSpeed),
|
network: this.getNetworkSpeed(server.State.NetInSpeed, server.State.NetOutSpeed),
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ before_show_menu() {
|
|||||||
|
|
||||||
install_base() {
|
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) ||
|
(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() {
|
install_arch() {
|
||||||
|
|||||||
Reference in New Issue
Block a user