status.ejs : suseendhiran

This commit is contained in:
suseendhiran17 2022-10-13 12:45:28 +05:30
parent c36c44f89a
commit 5dd7767dfe
2 changed files with 7 additions and 5 deletions

View File

@ -6,8 +6,8 @@ const Sequelize = require('sequelize');
const basename = path.basename(__filename);
const env = process.env.NODE_ENV || 'development';
const config = require(__dirname + '/../config/db.config.js')[env];
//console.log(env);
//console.log(config);
// console.log(env);
// console.log(config);
const db = {};
let sequelize;

View File

@ -588,10 +588,11 @@
<script>
$(".index").click(function (evt) {
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({
type: "post",
url: "/api_monitor/api/SingleApiStatus",
url: "/api/SingleApiStatus",
data: {api : api},
success: function(response) {
if (response.success == true)
@ -605,11 +606,12 @@
}
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(3)").html(success);
var sts = $('#check_status_api').length + $('#check_status_server').length + $('#check_status_db').length
console.log(sts,"after");
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 title = 'Status'