fix dumb typo and fix CSS
This commit is contained in:
8
stats.js
8
stats.js
@@ -28,7 +28,7 @@ async function observe(instances){
|
|||||||
}
|
}
|
||||||
if(!api||api===""){
|
if(!api||api===""){
|
||||||
|
|
||||||
setSatus(instance,false);
|
setStatus(instance,false);
|
||||||
console.warn(instance.name+" does not resolve api URL");
|
console.warn(instance.name+" does not resolve api URL");
|
||||||
setTimeout(_=>{resolveinstance(instance)},1000*60*30,);
|
setTimeout(_=>{resolveinstance(instance)},1000*60*30,);
|
||||||
return
|
return
|
||||||
@@ -37,7 +37,7 @@ async function observe(instances){
|
|||||||
api+=api.endsWith("/")?"":"/"
|
api+=api.endsWith("/")?"":"/"
|
||||||
function check(){
|
function check(){
|
||||||
fetch(api+"ping").then(_=>{
|
fetch(api+"ping").then(_=>{
|
||||||
setSatus(instance,_.ok);
|
setStatus(instance,_.ok);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
setTimeout(
|
setTimeout(
|
||||||
@@ -56,7 +56,7 @@ async function observe(instances){
|
|||||||
await Promise.allSettled(promlist);
|
await Promise.allSettled(promlist);
|
||||||
for(const key of Object.keys(uptimeObject)){
|
for(const key of Object.keys(uptimeObject)){
|
||||||
if(!active.has(key)){
|
if(!active.has(key)){
|
||||||
setSatus(key,false);
|
setStatus(key,false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -120,7 +120,7 @@ function calcStats(instance){
|
|||||||
* @param {string|Object} instance
|
* @param {string|Object} instance
|
||||||
* @param {boolean} status
|
* @param {boolean} status
|
||||||
*/
|
*/
|
||||||
function setSatus(instance,status){
|
function setStatus(instance,status){
|
||||||
let name=instance.name;
|
let name=instance.name;
|
||||||
if(typeof instance==="string" ){
|
if(typeof instance==="string" ){
|
||||||
name=instance;
|
name=instance;
|
||||||
|
Reference in New Issue
Block a user