Fix indents app.js
This commit is contained in:
parent
765df5f74f
commit
0a2e180a13
18
app.js
18
app.js
|
@ -349,11 +349,13 @@ const purge_request_data = setInterval(function() {
|
||||||
if (dhcp_requests[key].request_count <= 10)
|
if (dhcp_requests[key].request_count <= 10)
|
||||||
delete dhcp_requests[key];
|
delete dhcp_requests[key];
|
||||||
}
|
}
|
||||||
}, 600 * 1000); /* 10 Minutes */
|
}, 600 * 1000);
|
||||||
|
/* 10 Minutes */
|
||||||
|
|
||||||
const purge_request_data_hour = setInterval(function () {
|
const purge_request_data_hour = setInterval(function () {
|
||||||
dhcp_requests = {};
|
dhcp_requests = {};
|
||||||
}, 3600 * 1000); /* 60 Minutes */
|
}, 3600 * 1000);
|
||||||
|
/* 60 Minutes */
|
||||||
|
|
||||||
wss.on('connection', function connection(ws) {
|
wss.on('connection', function connection(ws) {
|
||||||
socket_clients++;
|
socket_clients++;
|
||||||
|
@ -584,8 +586,7 @@ setTimeout(function(){
|
||||||
utilization >= glass_config.shared_network_warning_threshold &&
|
utilization >= glass_config.shared_network_warning_threshold &&
|
||||||
utilization <= glass_config.shared_network_critical_threshold &&
|
utilization <= glass_config.shared_network_critical_threshold &&
|
||||||
alert_status_networks_warning[dhcp_data['shared-networks'][i].location] == 0
|
alert_status_networks_warning[dhcp_data['shared-networks'][i].location] == 0
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
alert_status_networks_warning[dhcp_data['shared-networks'][i].location] = 1;
|
alert_status_networks_warning[dhcp_data['shared-networks'][i].location] = 1;
|
||||||
|
|
||||||
slack_message(":warning: WARNING: DHCP shared network utilization (" + dhcp_data['shared-networks'][i].location + ") " +
|
slack_message(":warning: WARNING: DHCP shared network utilization (" + dhcp_data['shared-networks'][i].location + ") " +
|
||||||
|
@ -603,8 +604,7 @@ setTimeout(function(){
|
||||||
else if (
|
else if (
|
||||||
utilization <= glass_config.shared_network_warning_threshold &&
|
utilization <= glass_config.shared_network_warning_threshold &&
|
||||||
alert_status_networks_warning[dhcp_data['shared-networks'][i].location] == 1
|
alert_status_networks_warning[dhcp_data['shared-networks'][i].location] == 1
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
alert_status_networks_warning[dhcp_data['shared-networks'][i].location] = 0;
|
alert_status_networks_warning[dhcp_data['shared-networks'][i].location] = 0;
|
||||||
|
|
||||||
slack_message(":white_check_mark: CLEAR: Warning DHCP shared network utilization (" + dhcp_data['shared-networks'][i].location + ") " +
|
slack_message(":white_check_mark: CLEAR: Warning DHCP shared network utilization (" + dhcp_data['shared-networks'][i].location + ") " +
|
||||||
|
@ -626,8 +626,7 @@ setTimeout(function(){
|
||||||
if (
|
if (
|
||||||
utilization >= glass_config.shared_network_critical_threshold &&
|
utilization >= glass_config.shared_network_critical_threshold &&
|
||||||
alert_status_networks_critical[dhcp_data['shared-networks'][i].location] == 0
|
alert_status_networks_critical[dhcp_data['shared-networks'][i].location] == 0
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
alert_status_networks_critical[dhcp_data['shared-networks'][i].location] = 1;
|
alert_status_networks_critical[dhcp_data['shared-networks'][i].location] = 1;
|
||||||
slack_message(":fire: CRITICAL: DHCP shared network utilization (" + dhcp_data['shared-networks'][i].location + ") " +
|
slack_message(":fire: CRITICAL: DHCP shared network utilization (" + dhcp_data['shared-networks'][i].location + ") " +
|
||||||
"Current: (" + utilization + "%) " +
|
"Current: (" + utilization + "%) " +
|
||||||
|
@ -644,8 +643,7 @@ setTimeout(function(){
|
||||||
else if (
|
else if (
|
||||||
utilization <= glass_config.shared_network_critical_threshold &&
|
utilization <= glass_config.shared_network_critical_threshold &&
|
||||||
alert_status_networks_critical[dhcp_data['shared-networks'][i].location] == 1
|
alert_status_networks_critical[dhcp_data['shared-networks'][i].location] == 1
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
alert_status_networks_critical[dhcp_data['shared-networks'][i].location] = 0;
|
alert_status_networks_critical[dhcp_data['shared-networks'][i].location] = 0;
|
||||||
slack_message(":white_check_mark: CLEAR: Critical DHCP shared network utilization (" + dhcp_data['shared-networks'][i].location + ") " +
|
slack_message(":white_check_mark: CLEAR: Critical DHCP shared network utilization (" + dhcp_data['shared-networks'][i].location + ") " +
|
||||||
"Current: (" + utilization + "%) " +
|
"Current: (" + utilization + "%) " +
|
||||||
|
|
Loading…
Reference in New Issue