fixes
This commit is contained in:
parent
70e19e70eb
commit
054e318988
15
main.js
15
main.js
|
@ -33,12 +33,17 @@ if (!process.argv[3]) {
|
|||
process.exit(1);
|
||||
}
|
||||
|
||||
if (process.argv[4]) {
|
||||
console.error(`${error}This command doesn't allow more parameters\n`.red);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const config = require(configFile);
|
||||
const grafanaUrl = config.grafanaUrl;
|
||||
|
||||
const grafanaApi = `${grafanaUrl}/api`;
|
||||
const urlOrganizations = `${grafanaUrl}/api/orgs`;
|
||||
const urlDashboards = `${grafanaApi}/search?orgId=`; //?orgId=2
|
||||
const urlDashboards = `${grafanaApi}/search?orgId=`;
|
||||
const urlUID = `${grafanaApi}/dashboards/uid/`;
|
||||
let numberOfDashboards = 0;
|
||||
let numberOfPanels = 0;
|
||||
|
@ -169,13 +174,11 @@ async function main(){
|
|||
numberOfVariables=0;
|
||||
}
|
||||
|
||||
if (!numberOfDashboards)
|
||||
console.log(`No results found\n`.yellow.bold);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
if (numberOfDashboards===0)
|
||||
console.log(`No results found\n`.yellow.bold);
|
||||
|
||||
console.log(colors.green.bold(`-------- Have been found ${numberOfObjects} results in ${numberOfDashboards} dashboards -------\n`));
|
||||
|
||||
process.exit(0);
|
||||
|
|
Loading…
Reference in New Issue