Add charmcraft.yaml debug_mode to charmed-osm
[osm/devops.git] / installers / charm / grafana / src / charm.py
index 9bc612e..87776aa 100755 (executable)
@@ -108,15 +108,15 @@ class GrafanaCharm(CharmedOsmBase):
         files_builder = FilesV3Builder()
         files_builder.add_file(
             "dashboard_osm.yaml",
-            Path("files/default_dashboards.yaml").read_text(),
+            Path("templates/default_dashboards.yaml").read_text(),
         )
         if config.osm_dashboards:
             osm_dashboards_mapping = {
-                "kafka_exporter_dashboard.json": "files/kafka_exporter_dashboard.json",
-                "mongodb_exporter_dashboard.json": "files/mongodb_exporter_dashboard.json",
-                "mysql_exporter_dashboard.json": "files/mysql_exporter_dashboard.json",
-                "nodes_exporter_dashboard.json": "files/nodes_exporter_dashboard.json",
-                "summary_dashboard.json": "files/summary_dashboard.json",
+                "kafka_exporter_dashboard.json": "templates/kafka_exporter_dashboard.json",
+                "mongodb_exporter_dashboard.json": "templates/mongodb_exporter_dashboard.json",
+                "mysql_exporter_dashboard.json": "templates/mysql_exporter_dashboard.json",
+                "nodes_exporter_dashboard.json": "templates/nodes_exporter_dashboard.json",
+                "summary_dashboard.json": "templates/summary_dashboard.json",
             }
             for file_name, path in osm_dashboards_mapping.items():
                 files_builder.add_file(file_name, Path(path).read_text())
@@ -126,7 +126,7 @@ class GrafanaCharm(CharmedOsmBase):
         files_builder = FilesV3Builder()
         files_builder.add_file(
             "datasource_prometheus.yaml",
-            Template(Path("files/default_datasources.yaml").read_text()).substitute(
+            Template(Path("templates/default_datasources.yaml").read_text()).substitute(
                 prometheus_host=self.prometheus_client.hostname,
                 prometheus_port=self.prometheus_client.port,
             ),