mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 12:40:07 +00:00
💥 v2.0 必须更新面板,新增服务监控
This commit is contained in:
@@ -76,4 +76,57 @@
|
||||
line-height: 1.75em;
|
||||
color: rgba(255, 255, 255, .7);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.service-status .round>i {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
border-radius: .5rem;
|
||||
display: inline-block;
|
||||
margin-right: .3rem;
|
||||
background-color: slategray;
|
||||
}
|
||||
|
||||
.service-status .danger.button {
|
||||
background-color: crimson;
|
||||
}
|
||||
|
||||
.service-status .good.button {
|
||||
background-color: rgb(0, 235, 139);
|
||||
}
|
||||
|
||||
.service-status .warning.button {
|
||||
background-color: orange;
|
||||
}
|
||||
|
||||
.service-status .danger>i {
|
||||
background-color: crimson;
|
||||
}
|
||||
|
||||
.service-status .good>i {
|
||||
background-color: rgb(0, 235, 139);
|
||||
}
|
||||
|
||||
.service-status .warning>i {
|
||||
background-color: orange;
|
||||
}
|
||||
|
||||
.service-status .three.column p {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.service-status .three.column p:last-child {
|
||||
float: right;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.service-status .eleven.column {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.service-status .eleven.column>.ui.button {
|
||||
width: 8px !important;
|
||||
padding: unset !important;
|
||||
margin-top: unset !important;
|
||||
margin-bottom: unset !important;
|
||||
}
|
||||
@@ -39,7 +39,7 @@ function showFormModal(modelSelector, formID, URL, getData) {
|
||||
obj[item.name] = (item.name.endsWith('_id') ||
|
||||
item.name === 'id' || item.name === 'ID' ||
|
||||
item.name === 'RequestType' || item.name === 'RequestMethod' ||
|
||||
item.name === 'DisplayIndex') ? parseInt(item.value) : item.value;
|
||||
item.name === 'DisplayIndex' || item.name === 'Type') ? parseInt(item.value) : item.value;
|
||||
return obj;
|
||||
}, {});
|
||||
$.post(URL, JSON.stringify(data)).done(function (resp) {
|
||||
@@ -118,6 +118,17 @@ function addOrEditServer(server) {
|
||||
showFormModal('.server.modal', '#serverForm', '/api/server')
|
||||
}
|
||||
|
||||
function addOrEditMonitor(monitor) {
|
||||
const modal = $('.monitor.modal')
|
||||
modal.children('.header').text((monitor ? '修改' : '添加') + '监控')
|
||||
modal.find('.positive.button').html(monitor ? '修改<i class="edit icon"></i>' : '添加<i class="add icon"></i>')
|
||||
modal.find('input[name=ID]').val(monitor ? monitor.ID : null)
|
||||
modal.find('input[name=Name]').val(monitor ? monitor.Name : null)
|
||||
modal.find('input[name=Target]').val(monitor ? monitor.Target : null)
|
||||
modal.find('select[name=Type]').val(monitor ? monitor.Type : 1)
|
||||
showFormModal('.monitor.modal', '#monitorForm', '/api/monitor')
|
||||
}
|
||||
|
||||
function deleteRequest(api) {
|
||||
$.ajax({
|
||||
url: api,
|
||||
|
||||
Reference in New Issue
Block a user