2020-08-04 18:20:23 +08:00
|
|
|
"use strict";
|
|
|
|
|
2020-06-24 21:37:14 +08:00
|
|
|
/**
|
|
|
|
* Used to determine html tag object
|
|
|
|
*/
|
|
|
|
let html;
|
|
|
|
|
2020-07-12 02:38:20 +08:00
|
|
|
/**
|
2020-08-04 18:20:23 +08:00
|
|
|
* Used to determine background object
|
2020-07-12 02:38:20 +08:00
|
|
|
*/
|
2020-08-04 18:20:23 +08:00
|
|
|
let background;
|
2020-07-12 02:38:20 +08:00
|
|
|
|
2024-02-25 01:59:42 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Used to determine background color
|
|
|
|
*/
|
|
|
|
let backgroundColor;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used to determine if we enable the fog
|
|
|
|
*/
|
|
|
|
let enableFog;
|
|
|
|
|
2020-06-30 00:05:12 +08:00
|
|
|
/**
|
2020-08-04 18:20:23 +08:00
|
|
|
* Light theme square
|
2020-06-30 00:05:12 +08:00
|
|
|
*/
|
2020-08-04 18:20:23 +08:00
|
|
|
let lightThemeSquare;
|
2020-07-01 16:43:00 +08:00
|
|
|
|
2020-07-12 02:38:20 +08:00
|
|
|
/**
|
|
|
|
* Dark theme square
|
|
|
|
*/
|
|
|
|
let darkThemeSquare;
|
|
|
|
|
2020-07-01 16:43:00 +08:00
|
|
|
/**
|
2020-07-02 01:54:20 +08:00
|
|
|
* Used to set up server name
|
2020-07-01 16:43:00 +08:00
|
|
|
*/
|
2020-07-02 01:54:20 +08:00
|
|
|
let serverName;
|
2020-07-01 16:43:00 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Used to set up application port
|
|
|
|
*/
|
|
|
|
let port;
|
|
|
|
|
2020-06-16 14:30:44 +08:00
|
|
|
/**
|
2020-07-15 05:49:21 +08:00
|
|
|
* Used for sending setup request
|
2020-06-16 14:30:44 +08:00
|
|
|
*/
|
2020-07-15 05:49:21 +08:00
|
|
|
let setupXHR;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used for sending usage requests
|
|
|
|
*/
|
|
|
|
let usageXHR;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used for sending info requests
|
|
|
|
*/
|
|
|
|
let infoXHR;
|
|
|
|
|
2022-02-18 01:07:23 +08:00
|
|
|
/**
|
|
|
|
* Used for sending uptime requests
|
|
|
|
*/
|
|
|
|
let uptimeXHR;
|
|
|
|
|
2020-06-16 14:30:44 +08:00
|
|
|
/**
|
2020-06-24 21:37:14 +08:00
|
|
|
* Used to hold values of processor usage
|
2020-06-16 14:30:44 +08:00
|
|
|
*/
|
2020-06-24 21:37:14 +08:00
|
|
|
let processorLabelsArray;
|
2020-06-16 14:30:44 +08:00
|
|
|
|
2020-07-15 05:49:21 +08:00
|
|
|
/**
|
|
|
|
* Used to hold value of clock speed
|
|
|
|
*/
|
2020-08-01 06:25:59 +08:00
|
|
|
let currentClockSpeed;
|
2020-07-15 05:49:21 +08:00
|
|
|
|
2020-06-16 14:30:44 +08:00
|
|
|
/**
|
2020-06-24 21:37:14 +08:00
|
|
|
* Used to hold values tens of processor usage
|
2020-06-16 14:30:44 +08:00
|
|
|
*/
|
2020-06-24 21:37:14 +08:00
|
|
|
let ramLabelsArray;
|
2020-06-16 14:30:44 +08:00
|
|
|
|
|
|
|
/**
|
2020-07-15 05:49:21 +08:00
|
|
|
* Used to hold value of processes count
|
2020-06-16 14:30:44 +08:00
|
|
|
*/
|
2020-08-01 06:25:59 +08:00
|
|
|
let currentProcCount;
|
2020-06-16 14:30:44 +08:00
|
|
|
|
2020-06-30 00:05:12 +08:00
|
|
|
/**
|
2020-07-15 05:49:21 +08:00
|
|
|
* Used to hold values ones of processor usage
|
2020-06-30 00:05:12 +08:00
|
|
|
*/
|
2020-07-15 05:49:21 +08:00
|
|
|
let storageLabelsArray;
|
2020-06-30 00:05:12 +08:00
|
|
|
|
|
|
|
/**
|
2020-07-15 05:49:21 +08:00
|
|
|
* Used to hold values of total storage
|
2020-06-30 00:05:12 +08:00
|
|
|
*/
|
2020-08-04 18:20:23 +08:00
|
|
|
let currentTotalStorage
|
2020-06-30 00:05:12 +08:00
|
|
|
|
|
|
|
/**
|
2020-07-15 05:49:21 +08:00
|
|
|
* Used to hold values of disk count
|
2020-06-30 00:05:12 +08:00
|
|
|
*/
|
2020-08-04 18:20:23 +08:00
|
|
|
let currentDiskCount
|
2020-06-30 00:05:12 +08:00
|
|
|
|
2020-06-16 14:30:44 +08:00
|
|
|
/**
|
2020-06-24 21:37:14 +08:00
|
|
|
* Used to manipulate processor triangle div
|
2020-06-16 14:30:44 +08:00
|
|
|
*/
|
2020-06-24 21:37:14 +08:00
|
|
|
let processorTriangle;
|
2020-06-16 14:30:44 +08:00
|
|
|
|
|
|
|
/**
|
2020-06-24 21:37:14 +08:00
|
|
|
* Used to manipulate ram triangle div
|
2020-06-16 14:30:44 +08:00
|
|
|
*/
|
2020-06-24 21:37:14 +08:00
|
|
|
let ramTriangle;
|
2020-06-16 14:30:44 +08:00
|
|
|
|
|
|
|
/**
|
2020-06-24 21:37:14 +08:00
|
|
|
* Used to manipulate storage triangle div
|
2020-06-16 14:30:44 +08:00
|
|
|
*/
|
2020-06-24 21:37:14 +08:00
|
|
|
let storageTriangle;
|
2020-06-16 14:30:44 +08:00
|
|
|
|
2020-07-18 17:51:27 +08:00
|
|
|
/**
|
|
|
|
* Used to determine left cloud
|
|
|
|
*/
|
|
|
|
let cloudLeft
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used to determine right cloud
|
|
|
|
*/
|
|
|
|
let cloudRight
|
|
|
|
|
2020-06-16 14:30:44 +08:00
|
|
|
/**
|
2020-06-24 21:37:14 +08:00
|
|
|
* Used to display current days of uptime
|
|
|
|
*/
|
|
|
|
let days;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used to display current hours of uptime
|
|
|
|
*/
|
|
|
|
let hours;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used to display current minutes of uptime
|
|
|
|
*/
|
|
|
|
let minutes;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used to display current seconds of uptime
|
|
|
|
*/
|
|
|
|
let seconds;
|
|
|
|
|
2020-07-18 17:51:27 +08:00
|
|
|
/**
|
|
|
|
* Used to handle chart object, displays usage for 15 seconds
|
|
|
|
*/
|
|
|
|
let chart;
|
|
|
|
|
2020-06-24 21:37:14 +08:00
|
|
|
/**
|
|
|
|
* Initialises html object and theme value
|
2020-06-16 14:30:44 +08:00
|
|
|
*/
|
2020-06-24 21:37:14 +08:00
|
|
|
function globalsInitialization()
|
|
|
|
{
|
|
|
|
html = document.getElementById("html");
|
|
|
|
}
|