@gdacm/dashboard-manager 0.1.20 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -4431,14 +4431,20 @@ var DashboardManager = class {
|
|
|
4431
4431
|
this.#log(`📁 Folder not found (or name mismatch) on Grafana, creating folder: ${folderInfo.name} with vid: ${folderInfo.vid}`);
|
|
4432
4432
|
await grafanaApi.createFolder(folderInfo.name, folderInfo.vid, folderInfo.parentVid);
|
|
4433
4433
|
}
|
|
4434
|
+
const updatedDashboardUrls = [];
|
|
4434
4435
|
for (const dashboardToCreate of dashboardsToCreate) {
|
|
4435
4436
|
const { content, title, folderVid } = dashboardToCreate;
|
|
4436
4437
|
{
|
|
4437
4438
|
this.#log(`📊 Creating dashboard on Grafana: ${title} in folder vid: ${folderVid}`);
|
|
4438
4439
|
const response = await grafanaApi.createDashboard(content, folderVid, `Autogenerated dashboard for project: ${projectName}, dashboard: ${title}`);
|
|
4439
4440
|
this.#log(`👌 Dashboard created: ${JSON.stringify(response)}`);
|
|
4441
|
+
updatedDashboardUrls.push(`${apiUrl}/d/${dashboardToCreate.uid}`);
|
|
4440
4442
|
}
|
|
4441
4443
|
}
|
|
4444
|
+
if (updatedDashboardUrls.length > 0) {
|
|
4445
|
+
this.#log(`📝 Updated dashboard URLs:`);
|
|
4446
|
+
for (const url of updatedDashboardUrls) this.#log(` 🔀 ${url}`);
|
|
4447
|
+
}
|
|
4442
4448
|
}
|
|
4443
4449
|
return this;
|
|
4444
4450
|
}
|