@gdacm/dashboard-manager 0.1.6 → 0.1.7
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 +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -4458,9 +4458,12 @@ var DashboardManager = class {
|
|
|
4458
4458
|
*/
|
|
4459
4459
|
var createDashboards = async (localFolders, outDir, infosCode, dashboardsInfos) => {
|
|
4460
4460
|
const info = await getInfo(infosCode, localFolders);
|
|
4461
|
-
|
|
4461
|
+
let { projectName, projectRootVid, projectRootGrafanaFolder, projectVidPrefix } = info;
|
|
4462
4462
|
const dashboardManager = new DashboardManager();
|
|
4463
|
-
if (!
|
|
4463
|
+
if (!projectRootVid && projectVidPrefix) projectRootVid = projectVidPrefix;
|
|
4464
|
+
if (!projectVidPrefix && projectRootVid) projectVidPrefix = projectRootVid;
|
|
4465
|
+
if (!projectRootGrafanaFolder || !projectRootVid) throw new Error(`Missing projectRootGrafanaFolder or projectRootVid in info`);
|
|
4466
|
+
if (!projectName) projectName = projectRootVid;
|
|
4464
4467
|
dashboardManager.setupProject(projectName, projectRootVid, projectRootGrafanaFolder, projectVidPrefix, { info });
|
|
4465
4468
|
dashboardManager.registerDashboards(projectName, new DashboardsInfo(dashboardsInfos));
|
|
4466
4469
|
await dashboardManager.generateDashboards(projectName, `${outDir}/${projectRootVid}`);
|