status.ejs : suseendhiran
This commit is contained in:
parent
c36c44f89a
commit
5dd7767dfe
@ -588,10 +588,11 @@
|
|||||||
<script>
|
<script>
|
||||||
$(".index").click(function (evt) {
|
$(".index").click(function (evt) {
|
||||||
var api = $(evt.target).parent().parent("tr").find("td:nth-child(1)").text();
|
var api = $(evt.target).parent().parent("tr").find("td:nth-child(1)").text();
|
||||||
|
var sts = $('#check_status_api').length + $('#check_status_server').length + $('#check_status_db').length
|
||||||
|
console.log(sts);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "post",
|
type: "post",
|
||||||
url: "/api_monitor/api/SingleApiStatus",
|
url: "/api/SingleApiStatus",
|
||||||
data: {api : api},
|
data: {api : api},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
if (response.success == true)
|
if (response.success == true)
|
||||||
@ -605,11 +606,12 @@
|
|||||||
}
|
}
|
||||||
if (response.Status == "Down")
|
if (response.Status == "Down")
|
||||||
{
|
{
|
||||||
var success = '<i class="dot1" style="font-size:14px;color: red;height:15px;width:15px;"></i> <b1>'+response.Status+'</b1>'
|
var success = '<i id="check_status_db" class="dot1" style="font-size:14px;color: red;height:15px;width:15px;"></i> <b1>'+response.Status+'</b1>'
|
||||||
}
|
}
|
||||||
$(evt.target).parent().parent("tr").find("td:nth-child(2)").html(response.StatusCode);
|
$(evt.target).parent().parent("tr").find("td:nth-child(2)").html(response.StatusCode);
|
||||||
$(evt.target).parent().parent("tr").find("td:nth-child(3)").html(success);
|
$(evt.target).parent().parent("tr").find("td:nth-child(3)").html(success);
|
||||||
var sts = $('#check_status_api').length + $('#check_status_server').length + $('#check_status_db').length
|
var sts = $('#check_status_api').length + $('#check_status_server').length + $('#check_status_db').length
|
||||||
|
console.log(sts,"after");
|
||||||
if (sts == 0) {
|
if (sts == 0) {
|
||||||
var status = '<h1><i class="dot" aria-hidden = "true" style="font-size:26px;color:lightgreen"></i> <strong> All systems <span class="uk-text-primary">operational</span></strong></h1>'
|
var status = '<h1><i class="dot" aria-hidden = "true" style="font-size:26px;color:lightgreen"></i> <strong> All systems <span class="uk-text-primary">operational</span></strong></h1>'
|
||||||
var title = 'Status'
|
var title = 'Status'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user