From 04b63f8aeb395e373e5940f06eca4523a3fb464c Mon Sep 17 00:00:00 2001
From: Fabien Quatravaux <fabien.quatravaux@riseup.net>
Date: Fri, 26 Feb 2021 15:29:34 +0100
Subject: [PATCH] feature: Make the dashboard target configurable

---
 README.md                    | 3 +++
 src/views/page-dashboard.pug | 1 +
 2 files changed, 4 insertions(+)

diff --git a/README.md b/README.md
index 9eb70a70..11c8651f 100644
--- a/README.md
+++ b/README.md
@@ -302,6 +302,9 @@ Module declaration, on `config.json`:
       "type": "dashboard",
       "endpoints": {
         "get": "http://server.url/dashboards/"
+      },
+      "parameters": {
+        "target": "default"
       }
     }
 ```
diff --git a/src/views/page-dashboard.pug b/src/views/page-dashboard.pug
index e92c4ede..98c466d2 100644
--- a/src/views/page-dashboard.pug
+++ b/src/views/page-dashboard.pug
@@ -1,4 +1,5 @@
 div.padding-top-xlarge.padding-right-xsmall.padding-bottom-xlarge.padding-left-xsmall.sm-padding-top-medium.bg-color-grey.whitespace-normal
   solid-dashboard(
     data-src=`${component.endpoints.get}`
+    target=`${component.parameters && component.parameters.target ? component.parameters.target : 'default' }`
   )
-- 
GitLab