diff --git a/resource/static/theme-mdui/mdui.css b/resource/static/theme-mdui/mdui.css new file mode 100644 index 0000000..2b381fb --- /dev/null +++ b/resource/static/theme-mdui/mdui.css @@ -0,0 +1,34 @@ +.mdui-appbar{box-shadow:0 -1px 10px 0 rgb(32 33 36 / 28%)} +.mdui-card,.mdui-btn-raised,.mdui-panel-item{box-shadow:0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);} +.mdui-drawer{box-shadow:-1px 10px 10px 0 rgb(60 64 67 / 30%), 0 1px 3px 1px rgb(60 64 67 / 15%);} +footer{box-shadow:5px 0px 5px 0 rgb(60 64 67 / 30%), 0 1px 3px 1px rgb(60 64 67 / 15%);} +st{font-weight:600;color:#475bca;} +at{font-weight:600;color:#FF4081;} +gt{font-weight:600;color:#00C853;} +yt{font-weight:600;color:#ffbb00;} + +.mdui-theme-layout-dark st{color:#9aa9ff;} +.mdui-theme-layout-dark at{color:#f7a4b9;} +.mt{margin-top:15px;} +.mt-s{margin-top:3px;} +.mdui-card ul.mdui-list{padding-left: 0;} +.text{font-size:20px;} +.text_s{font-size:17px;} +.mdui-switch{height:20px;line-height:20px;} +.stop{background:#b6b6b6;}.stop td{color:#fff;font-weight:bold;} +.ccp:hover,.poh:hover{cursor: pointer;} + +.mdui-drawer, footer{ + /* background-color: #fdfdfdda; */ + backdrop-filter: blur(15px) brightness(110%); +} +.mdui-card{ + border-radius: 6px; + backdrop-filter:blur(7px); + /* background-color: #ffffff8a; */ +} +.btn{ + border-radius: 5px; + font-weight: bold;font-size: 15px; +} + diff --git a/resource/static/theme-mdui/mdui.js b/resource/static/theme-mdui/mdui.js new file mode 100644 index 0000000..29dd6cb --- /dev/null +++ b/resource/static/theme-mdui/mdui.js @@ -0,0 +1,33 @@ +function showConfirm(title, content, callFn, extData) { + mdui.confirm(content, title, + function(){ + callFn(extData); + }); +} + +function logout(id) { + $.post("/api/logout", JSON.stringify({ id: id })) + .done(function (resp) { + if (resp.code == 200) { + mdui.snackbar({ + message: '注销成功', + timeout: 2000, + position: 'top', + }); + window.location.reload(); + } else { + mdui.snackbar({ + message: '注销失败(Error ' + resp.code + '): ' + resp.message, + timeout: 5000, + position: 'top', + }); + } + }) + .fail(function (err) { + mdui.snackbar({ + message: '网络错误: ' + err.responseText, + timeout: 5000, + position: 'top', + }); + }); +} diff --git a/resource/template/dashboard/setting.html b/resource/template/dashboard/setting.html index aaf1b7b..533af98 100644 --- a/resource/template/dashboard/setting.html +++ b/resource/template/dashboard/setting.html @@ -21,6 +21,7 @@ JackieSung DayNight +
ID | +Name | +Up | +Down | +Total Up | +Total Down | +CPU | +RAM | +Online | +
---|---|---|---|---|---|---|---|---|
@#server.ID#@ | +@#server.Name#@ | +
+
+
+
+ @#server.live?parseInt(server.State.CPU):'NaN'#@%
+
+ |
+
+
+
+
+ @#parseInt(server.State?server.State.MemUsed/server.Host.MemTotal*100:0)#@%
+
+ |
+ @#secondToDate(server.State.Uptime)#@ | +
Name | +SLA | +Details of Last 30 Days | +Now | +
---|---|---|---|
{{$service.Monitor.Name}} | +{{float32f (divU64 $service.TotalUp (addU64 $service.TotalUp $service.TotalDown))}}% | ++ {{range $i,$d := $service.Delay}} + {{$percent := (div (index $service.Up $i) (add (index $service.Up $i) (index $service.Down $i)))}} + {{if eq $percent 0.0}} + favorite_border + {{else if ge $percent 95.0}} + favorite + {{else if ge $percent 80.0}} + favorite + {{else}} + favorite + {{end}} + {{end}} + | +
+ {{$percent := (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}}
+ {{if eq $percent 0.0}}
+ sentiment_neutral
+ {{statusName (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}} + {{else if ge $percent 95.0}} + +{{statusName (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}} + {{else if ge $percent 80.0}} + sentiment_dissatisfied +{{statusName (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}} + {{else}} + sentiment_very_dissatisfied +{{statusName (divU64 $service.CurrentUp (addU64 $service.CurrentUp $service.CurrentDown))}} + {{end}} + |
+