This commit is contained in:
Guillermo Bonet 2022-06-16 13:15:58 +02:00
parent d03611672b
commit 09b5c8047f
1 changed files with 0 additions and 12 deletions

12
main.js
View File

@ -12,8 +12,6 @@ const myArray = grafana.split(delimiter);
async function main(){ async function main(){
for (let i=0; i < myArray.length; i++) { for (let i=0; i < myArray.length; i++) {
let percentage = Math.round((i / myArray.length) * 100);
let url = "https://grafana.verdnatura.es/api/dashboards/uid/" + myArray[i]; let url = "https://grafana.verdnatura.es/api/dashboards/uid/" + myArray[i];
let response = await fetch(url, { let response = await fetch(url, {
method: "GET", method: "GET",
@ -41,18 +39,8 @@ async function main(){
if (isFound) break; if (isFound) break;
} }
} }
/*console.clear();^
console.log("Cargando... " + percentage + "%");
console.clear()*/
if (isFound) if (isFound)
console.log('https://grafana.verdnatura.es/d/' + `${myArray[i]}:`, colors.green(isFound)); console.log('https://grafana.verdnatura.es/d/' + `${myArray[i]}:`, colors.green(isFound));
if (!isFound)
console.log(`${myArray[i]}:`, colors.red(isFound));
} }
/*console.clear();
console.table(myJSON[0][0]);*/
} }
main(); main();