Bug fixes

This commit is contained in:
Guillermo Bonet 2022-06-21 18:23:33 +02:00
parent 559de34eba
commit f2d1727336
2 changed files with 8 additions and 7 deletions

13
main.js
View File

@ -78,6 +78,7 @@ const urlOrganizations = `${grafanaUrl}/api/orgs`;
const urlDashboards = `${grafanaApi}/search?orgId=`;
const urlUID = `${grafanaApi}/dashboards/uid/`;
let numberOfDashboards = 0;
let totalDashboards = 0;
let numberOfPanels = 0;
let numberOfVariables = 0;
let numberOfObjects = 0;
@ -249,17 +250,17 @@ async function main(){
titlePanels = [];
nameVariables= [];
numberOfObjects = numberOfPanels + numberOfVariables + numberOfObjects
numberOfPanels=0;
numberOfVariables=0;
numberOfObjects = numberOfPanels + numberOfVariables + numberOfObjects;
numberOfPanels = 0;
numberOfVariables = 0;
}
totalDashboards = numberOfDashboards + totalDashboards;
if (!numberOfDashboards)
console.log(`No results found\n`.green);
numberOfDashboards = 0;
};
console.log(colors.green.bold(`-------- Have been found ${numberOfObjects} results in ${numberOfDashboards} dashboards -------\n`));
console.log(colors.green.bold(`-------- Have been found ${numberOfObjects} results in ${totalDashboards} dashboards -------\n`));
process.exit();
}

View File

@ -1,6 +1,6 @@
{
"name": "grafana-find",
"version": "1.0.0",
"version": "1.0.1",
"author": "Verdnatura Levante SL",
"description": "Grafana Find Tool",
"license": "GPL-3.0",