From 7436e2a6a93d49eb072bc19c082ae024a131fb62 Mon Sep 17 00:00:00 2001
From: Darshan Nagesh <darshan.nagesh@tarento.com>
Date: Mon, 21 Mar 2022 13:48:47 +0530
Subject: [PATCH] Adding visualizations for SMF DashboardS

---
 .../resources/schema/SMF_ChartApiConfig.json  | 31 ++++++++++++++++++-
 .../schema/SMF_MasterDashboardConfig.json     | 23 +++++++++++++-
 2 files changed, 52 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/schema/SMF_ChartApiConfig.json b/src/main/resources/schema/SMF_ChartApiConfig.json
index e563d44..9f88db6 100644
--- a/src/main/resources/schema/SMF_ChartApiConfig.json
+++ b/src/main/resources/schema/SMF_ChartApiConfig.json
@@ -7,7 +7,7 @@
         "requestQueryMap": "{\r\n  \"ts\" : \"timestamp\"}",
         "dateRefField": "timestamp",
         "indexName": "fs-forms-data",
-        "esInstance": "QUADNARY",
+        "esInstance": "PRIMARY",
         "aggrQuery": "{\"aggs\":{\"Application Status\":{\"terms\":{\"field\":\"status.keyword\",\"size\":10}}}}"
       }
     ],
@@ -27,5 +27,34 @@
     "alwaysView": "",
     "insight": {},
     "_comment": " "
+  },
+  "applicationSubmissionTrend": {
+    "chartName": "Application Submission Trend",
+    "queries": [
+      {
+        "module": "COMMON",
+        "requestQueryMap": "{\r\n  \"ts\" : \"timestamp\"}",
+        "dateRefField": "timestamp",
+        "indexName": "fs-forms-data",
+        "esInstance": "PRIMARY",
+        "aggrQuery": "{\"aggs\":{\"Application Submission Trend\":{\"date_histogram\":{\"field\":\"timestamp\",\"interval\":\"week\"},\"aggs\":{\"count\":{\"cardinality\":{\"field\":\"_id\"}}}}}}"
+      }
+    ],
+    "chartType": "line",
+    "resultType": "value",
+    "valueType": "number",
+    "isDecimal": true,
+    "action": "",
+    "filter": "",
+    "drillChart": "none",
+    "documentType": "_doc",
+    "aggregationPaths": [
+      "Application Submission Trend"
+    ],
+    "isCumulative": false,
+    "interval": "day",
+    "alwaysView": "",
+    "insight": {},
+    "_comment": " "
   }
 }
\ No newline at end of file
diff --git a/src/main/resources/schema/SMF_MasterDashboardConfig.json b/src/main/resources/schema/SMF_MasterDashboardConfig.json
index 460ac8c..b552616 100644
--- a/src/main/resources/schema/SMF_MasterDashboardConfig.json
+++ b/src/main/resources/schema/SMF_MasterDashboardConfig.json
@@ -27,7 +27,7 @@
           "vizArray": [
             {
               "id": 111,
-              "name": "Overview",
+              "name": "Application Status Count",
               "dimensions": {
                 "height": 250,
                 "width": 4
@@ -45,6 +45,27 @@
                   "headers": []
                 }
               ]
+            },
+            {
+              "id": 111,
+              "name": "Application Submission Trend",
+              "dimensions": {
+                "height": 250,
+                "width": 4
+              },
+              "vizType": "bar",
+              "noUnit": true,
+              "isCollapsible": false,
+              "charts": [
+                {
+                  "id": "applicationSubmissionTrend",
+                  "name": "Application Submission Trend",
+                  "code": "",
+                  "chartType": "line",
+                  "filter": "",
+                  "headers": []
+                }
+              ]
             }
           ]
         }
-- 
GitLab