For configuring the dashboard visualizations, we add the following configurations -
First of all to configure any dashboard, an entry has to be made in RoleDashboardMappings configuration. For iFIX dashboard, we made the following entry in RoleDashboardMappings config file -
{ "name": "iFix", "id": "ifix" }
In master dashboard config file, to lay out the format and positioning of various visualizations, the following entry needs to be created -
{ "name": "DSS_IFIX_DASHBOARD", "id": "ifix", "isActive": "", "style": "linear", "visualizations": [ { "row": 1, "name": "DSS_OVERVIEW", "vizArray": [ { "id": 341, "name": "DSS_IFIX_REVENUE", "dimensions": { "height": 350, "width": 5 }, "vizType": "metric-collection", "label": "DSS_IFIX_REVENUE_METRICS", "noUnit": true, "isCollapsible": false, "charts": [ { "id": "dssIfixSurplusCollection", "name": "DSS_IFIX_SURPLUS_COLLECTION", "code": "", "chartType": "metric", "filter": { "title": "TODAY" }, "headers": [] }, { "id": "dssIfixOutstandingCollection", "name": "DSS_IFIX_OUTSTANDING_COLLECTION", "code": "", "chartType": "metric", "filter": "", "headers": [] }, { "id": "dssIfixGpwscsAtRisk", "name": "DSS_IFIX_GPWSCS_AT_RISK", "code": "", "chartType": "metric", "filter": "", "headers": [] }, { "id": "dssIfixOutstandingEBills", "name": "DSS_IFIX_OUTSTANDING_E_BILLS", "code": "", "chartType": "metric", "filter": "", "headers": [] } ] }, { "id": 323, "name": "DSS_IFIX_PENDING_COLLECTIONS", "dimensions": { "height": 350, "width": 4 }, "vizType": "chart", "label": "", "noUnit": false, "isCollapsible": false, "charts": [ { "id": "dssIfixPendingCollections", "name": "DSS_IFIX_PENDING_COLLECTIONS", "code": "", "chartType": "donut", "filter": "", "headers": [] } ] }, { "id": 342, "name": "DSS_IFIX_PENDING_EXPENDITURE", "dimensions": { "height": 350, "width": 4 }, "vizType": "chart", "label": "", "noUnit": false, "isCollapsible": false, "charts": [ { "id": "dssIfixPendingExpenditure", "name": "DSS_IFIX_PENDING_EXPENDITURE", "code": "", "chartType": "donut", "filter": "", "headers": [] } ] } ] }, { "row": 2, "name": "DSS_OVERVIEW", "vizArray": [ { "id": 211, "name": "DSS_IFIX_COLLECTIONS_VS_EXPENDITURE", "dimensions": { "height": 350, "width": 10 }, "vizType": "chart", "isCollapsible": false, "label": "", "charts": [ { "id": "dssIfixCollectionsVsExpenditure", "name": "Monthly", "code": "", "chartType": "line", "filter": "", "headers": [] } ] } ] }, { "row": 3, "name": "DSS_OVERVIEW", "vizArray": [ { "id": 326, "name": "DSS_IFIX_COLLECTIONS_AND_EXPENDITURE_ACTUAL", "dimensions": { "height": 450, "width": 5 }, "vizType": "chart", "isCollapsible": false, "label": "", "charts": [ { "id": "dssIfixCollectionsAndExpenditureActual", "name": "Monthly", "code": "", "chartType": "bar", "filter": "", "headers": [] } ] } ] }, { "row": 4, "name": "DSS_OVERVIEW", "vizArray": [ { "id": 326, "name": "DSS_IFIX_EXPENDITURE_COMPOSITION", "dimensions": { "height": 450, "width": 5 }, "vizType": "chart", "isCollapsible": false, "label": "", "charts": [ { "id": "dssIfixExpenditureComposition", "name": "Monthly", "code": "", "chartType": "bar", "filter": "", "headers": [] } ] } ] }, { "row": 5, "name": "DSS_OVERVIEW", "vizArray": [ { "id": 231, "name": "Comparision of Administrative Entities", "dimensions": { "height": 350, "width": 12 }, "vizType": "chart", "noUnit": false, "isCollapsible": false, "charts": [ { "id": "dssIfixDemandAndBillMetricsByZone", "name": "DSS_IFIX_DEMAND_AND_BILL_METRICS_BY_ZONE", "code": "", "chartType": "table", "filter": "", "headers": [] } ] } ] }, { "row": 6, "name": "DSS_OVERVIEW", "vizArray": [ { "id": 231, "name": "Underperforming GPWSCs", "dimensions": { "height": 350, "width": 12 }, "vizType": "chart", "noUnit": false, "isCollapsible": false, "charts": [ { "id": "dssIfixUnderperformingGPWSCs", "name": "DSS_IFIX_UNDERPERFORMING_GPWSCS", "code": "", "chartType": "table", "filter": "", "headers": [] } ] } ] }, { "row": 7, "name": "DSS_OVERVIEW", "vizArray": [ { "id": 232, "name": "E-Bills Unpaid", "dimensions": { "height": 350, "width": 12 }, "vizType": "chart", "noUnit": false, "isCollapsible": false, "charts": [ { "id": "dssIfixEBillsUnpaid", "name": "DSS_IFIX_EBIILS_UNPAID", "code": "", "chartType": "table", "filter": "", "headers": [] } ] } ] } ] }
Next, to map the visualizations defined in master dashboard config with the query and aggregation paths that needs to be executed, we need to configure the associated queries in ChartApi config file. We have provided the configs for individual visualizations here -
Surplus Collections -
"dssIfixSurplusCollection": { "chartName": "DSS_IFIX_SURPLUS_COLLECTION", "queries": [ { "module": "IFIX", "indexName": "ifix-fiscal-events", "aggrQuery": "{\"aggs\":{\"totalOutstandingAmount\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Demand\",\"Bill\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFields.netAmount\"}}}}}}", "requestQueryMap": "{\"Zone\":\"Data.hierarchyMap.Zone.keyword\",\"Circle\":\"Data.hierarchyMap.Circle.keyword\",\"Department\":\"Data.hierarchyMap.Department.keyword\",\"GP\":\"Data.hierarchyMap.GP.keyword\",\"Division\":\"Data.hierarchyMap.Division.keyword\",\"Sub Division\":\"Data.hierarchyMap.Sub_Division.keyword\",\"Section\":\"Data.hierarchyMap.Section.keyword\"}", "dateRefField": "Data.eventTime" } ], "chartType": "metric", "valueType": "amount", "action": "", "drillChart": "none", "aggregationPaths": [ "totalOutstandingAmount" ], "insight": { }, "_comment": "IFIX Surplus Collection" }
2. Outstanding collections -
"dssIfixOutstandingCollection": { "chartName": "DSS_IFIX_OUTSTANDING_COLLECTION", "queries": [ { "module": "IFIX", "indexName": "ifix-fiscal-events", "aggrQuery": "{\"aggs\":{\"totalOutstandingAmount\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Demand\",\"Receipt\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFields.netAmount\"}}}}}}", "requestQueryMap": "{\"Zone\":\"Data.hierarchyMap.Zone.keyword\",\"Circle\":\"Data.hierarchyMap.Circle.keyword\",\"Department\":\"Data.hierarchyMap.Department.keyword\",\"GP\":\"Data.hierarchyMap.GP.keyword\",\"Division\":\"Data.hierarchyMap.Division.keyword\",\"Sub Division\":\"Data.hierarchyMap.Sub_Division.keyword\",\"Section\":\"Data.hierarchyMap.Section.keyword\"}", "dateRefField": "Data.eventTime" } ], "chartType": "metric", "valueType": "amount", "action": "", "drillChart": "none", "aggregationPaths": [ "totalOutstandingAmount" ], "insight": { }, "_comment": "IFIX Surplus Collection" }
3. GPWSCs at risk -
"dssIfixGpwscsAtRisk": { "chartName": "DSS_IFIX_GPWSCS_AT_RISK", "queries": [ { "module": "IFIX", "indexName": "ifix-fiscal-events", "aggrQuery": "{\"aggs\":{\"GP\":{\"terms\":{\"field\":\"Data.hierarchyMap.GP.keyword\"},\"aggs\":{\"Demand\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Demand\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}},\"Billed\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Bill\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}},\"Paid\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Payment\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}},\"gpwsc-under-risk\":{\"bucket_script\":{\"buckets_path\":{\"demandAmount\":\"Demand>Total\",\"billedAmount\":\"Billed>Total\",\"paidAmount\":\"Paid>Total\"},\"script\":\"if(params.billedAmount-params.paidAmount>params.demandAmount){return 1;}\"}}}},\"count\":{\"sum_bucket\":{\"buckets_path\":\"GP>gpwsc-under-risk\"}}}}", "requestQueryMap": "{\"Zone\":\"Data.hierarchyMap.Zone.keyword\",\"Circle\":\"Data.hierarchyMap.Circle.keyword\",\"Department\":\"Data.hierarchyMap.Department.keyword\",\"GP\":\"Data.hierarchyMap.GP.keyword\",\"Division\":\"Data.hierarchyMap.Division.keyword\",\"Sub Division\":\"Data.hierarchyMap.Sub_Division.keyword\",\"Section\":\"Data.hierarchyMap.Section.keyword\"}", "dateRefField": "Data.eventTime" } ], "chartType": "metric", "valueType": "number", "action": "", "drillChart": "none", "aggregationPaths": [ "count" ], "insight": { }, "_comment": "IFIX Surplus Collection" }
4. Outstanding E Bills -
"dssIfixOutstandingEBills": { "chartName": "DSS_IFIX_OUTSTANDING_E_BILLS", "queries": [ { "module": "IFIX", "indexName": "ifix-fiscal-events", "aggrQuery": "{\"aggs\":{\"totalOutstandingAmount\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Bill\",\"Payment\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFields.electricityExpenseNetAmount\"}}}}}}", "requestQueryMap": "{\"Zone\":\"Data.hierarchyMap.Zone.keyword\",\"Circle\":\"Data.hierarchyMap.Circle.keyword\",\"Department\":\"Data.hierarchyMap.Department.keyword\",\"GP\":\"Data.hierarchyMap.GP.keyword\",\"Division\":\"Data.hierarchyMap.Division.keyword\",\"Sub Division\":\"Data.hierarchyMap.Sub_Division.keyword\",\"Section\":\"Data.hierarchyMap.Section.keyword\"}", "dateRefField": "Data.eventTime" } ], "chartType": "metric", "valueType": "number", "action": "", "drillChart": "none", "aggregationPaths": [ "totalOutstandingAmount" ], "insight": { }, "_comment": "IFIX Surplus Collection" }
5. Pending Collections Pie Chart -
"dssIfixPendingCollections": { "chartName": "DSS_IFIX_PENDING_COLLECTIONS", "queries": [ { "module": "IFIX", "requestQueryMap": "{\"Zone\":\"Data.hierarchyMap.Zone.keyword\",\"Circle\":\"Data.hierarchyMap.Circle.keyword\",\"Department\":\"Data.hierarchyMap.Department.keyword\",\"GP\":\"Data.hierarchyMap.GP.keyword\",\"Division\":\"Data.hierarchyMap.Division.keyword\",\"Sub Division\":\"Data.hierarchyMap.Sub_Division.keyword\",\"Section\":\"Data.hierarchyMap.Section.keyword\"}", "dateRefField": "Data.eventTime", "indexName": "ifix-fiscal-events", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.eventType.keyword\":[\"Demand\",\"Receipt\"]}}]}},\"aggs\":{\"Pending Collections\":{\"terms\":{\"field\":\"Data.eventType.keyword\"},\"aggs\":{\"Amount\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}}}}}}" } ], "chartType": "pie", "valueType": "number", "action": "", "documentType": "_doc", "drillChart": "none", "aggregationPaths": [ "Pending Collections" ], "insight": { }, "_comment": "Pending Collections" }
6. Pending expenditure pie chart -
"dssIfixPendingExpenditure": { "chartName": "DSS_IFIX_PENDING_EXPENDITURE", "queries": [ { "module": "IFIX", "requestQueryMap": "{\"Zone\":\"Data.hierarchyMap.Zone.keyword\",\"Circle\":\"Data.hierarchyMap.Circle.keyword\",\"Department\":\"Data.hierarchyMap.Department.keyword\",\"GP\":\"Data.hierarchyMap.GP.keyword\",\"Division\":\"Data.hierarchyMap.Division.keyword\",\"Sub Division\":\"Data.hierarchyMap.Sub_Division.keyword\",\"Section\":\"Data.hierarchyMap.Section.keyword\"}", "dateRefField": "Data.eventTime", "indexName": "ifix-fiscal-events", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.eventType.keyword\":[\"Bill\",\"Payment\"]}}]}},\"aggs\":{\"Pending Collections\":{\"terms\":{\"field\":\"Data.eventType.keyword\"},\"aggs\":{\"Amount\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}}}}}}" } ], "chartType": "pie", "valueType": "number", "action": "", "documentType": "_doc", "drillChart": "none", "aggregationPaths": [ "Pending Collections" ], "insight": { }, "_comment": "Pending Collections" }
7. Collections vs Expenditure line chart -
"dssIfixCollectionsVsExpenditure": { "chartName": "DSS_IFIX_COLLECTIONS_VS_EXPENDITURE", "queries": [ { "module": "IFIX", "dateRefField": "Data.eventTime", "requestQueryMap": "{\"Zone\":\"Data.hierarchyMap.Zone.keyword\",\"Circle\":\"Data.hierarchyMap.Circle.keyword\",\"Department\":\"Data.hierarchyMap.Department.keyword\",\"GP\":\"Data.hierarchyMap.GP.keyword\",\"Division\":\"Data.hierarchyMap.Division.keyword\",\"Sub Division\":\"Data.hierarchyMap.Sub_Division.keyword\",\"Section\":\"Data.hierarchyMap.Section.keyword\"}", "indexName": "ifix-fiscal-events", "aggrQuery": "{\"aggs\":{\"Total Collection\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"Collection\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Receipt\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}}}},\"Total Expenditure\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"Expenditure\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Payment\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}}}}}}" } ], "chartType": "line", "valueType": "number", "action": "", "drillChart": "none", "documentType": "_doc", "aggregationPaths": [ "Total Collection", "Total Expenditure" ], "isCumulative": false, "interval": "month", "insight": { }, "_comment": "" }
8. Collections and expenditure actuals bar chart -
"dssIfixCollectionsAndExpenditureActual": { "chartName": "DSS_IFIX_COLLECTIONS_AND_EXPENDITURE_ACTUAL", "queries": [ { "module": "IFIX", "dateRefField": "Data.eventTime", "requestQueryMap": "{\"Zone\":\"Data.hierarchyMap.Zone.keyword\",\"Circle\":\"Data.hierarchyMap.Circle.keyword\",\"Department\":\"Data.hierarchyMap.Department.keyword\",\"GP\":\"Data.hierarchyMap.GP.keyword\",\"Division\":\"Data.hierarchyMap.Division.keyword\",\"Sub Division\":\"Data.hierarchyMap.Sub_Division.keyword\",\"Section\":\"Data.hierarchyMap.Section.keyword\"}", "indexName": "ifix-fiscal-events", "aggrQuery": "{\"aggs\":{\"Current Demand\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"currentDemandAmount\":{\"sum\":{\"script\":{\"lang\":\"painless\",\"source\":\"long currentDemandAmount=0;if(params['_source']['Data']['eventType']=='Demand'||params['_source']['Data']['eventType']=='Bill'){long currentEventTime=params['_source']['Data']['eventTime'];for(int i=0;i<params['_source']['Data']['amountDetails'].length;++i){if(currentEventTime>=params['_source']['Data']['amountDetails'][i]['fromBillingPeriod']&¤tEventTime<=params['_source']['Data']['amountDetails'][i]['toBillingPeriod']){currentDemandAmount=currentDemandAmount+params['_source']['Data']['amountDetails'][i]['amount'];}}}return currentDemandAmount;\"}}}}},\"Arrear Demand\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"arrearDemandAmount\":{\"sum\":{\"script\":{\"lang\":\"painless\",\"source\":\"long currentDemandAmount=0;if(params['_source']['Data']['eventType']=='Receipt'){long currentEventTime=params['_source']['Data']['eventTime'];for(int i=0;i<params['_source']['Data']['amountDetails'].length;++i){if(currentEventTime>params['_source']['Data']['amountDetails'][i]['toBillingPeriod']){currentDemandAmount=currentDemandAmount+params['_source']['Data']['amountDetails'][i]['amount'];}}}return currentDemandAmount;\"}}}}},\"Current Bill\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"currentBillAmount\":{\"sum\":{\"script\":{\"lang\":\"painless\",\"source\":\"long currentBillAmount=0;if(params['_source']['Data']['eventType']=='Payment'){long currentEventTime=params['_source']['Data']['eventTime'];for(int i=0;i<params['_source']['Data']['amountDetails'].length;++i){if(currentEventTime<=params['_source']['Data']['amountDetails'][i]['toBillingPeriod']&& currentEventTime>=params['_source']['Data']['amountDetails'][i]['fromBillingPeriod']){currentBillAmount=currentBillAmount+params['_source']['Data']['amountDetails'][i]['amount'];}}}return currentBillAmount;\"}}}}},\"Old Bill\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"oldBillAmount\":{\"sum\":{\"script\":{\"lang\":\"painless\",\"source\":\"long currentBillAmount=0;if(params['_source']['Data']['eventType']=='Payment'){long currentEventTime=params['_source']['Data']['eventTime'];for(int i=0;i<params['_source']['Data']['amountDetails'].length;++i){if(currentEventTime>params['_source']['Data']['amountDetails'][i]['toBillingPeriod']){currentBillAmount=currentBillAmount+params['_source']['Data']['amountDetails'][i]['amount'];}}}return currentBillAmount;\"}}}}}}}" } ], "chartType": "line", "valueType": "number", "action": "", "drillChart": "none", "documentType": "_doc", "aggregationPaths": [ "Current Demand", "Arrear Demand", "Current Bill", "Old Bill" ], "isCumulative": false, "interval": "month", "insight": { }, "_comment": " " }
9. Expenditure Composition bar chart -
"dssIfixExpenditureComposition": { "chartName": "DSS_IFIX_EXPENDITURE_COMPOSITION", "queries": [ { "module": "IFIX", "dateRefField": "Data.eventTime", "requestQueryMap": "{\"Zone\":\"Data.hierarchyMap.Zone.keyword\",\"Circle\":\"Data.hierarchyMap.Circle.keyword\",\"Department\":\"Data.hierarchyMap.Department.keyword\",\"GP\":\"Data.hierarchyMap.GP.keyword\",\"Division\":\"Data.hierarchyMap.Division.keyword\",\"Sub Division\":\"Data.hierarchyMap.Sub_Division.keyword\",\"Section\":\"Data.hierarchyMap.Section.keyword\"}", "indexName": "ifix-fiscal-events", "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Payment\"]}},\"aggs\":{\"Electricity\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFields.electricityHeadAmount\"}}}},\"Operations\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFields.operationsHeadAmount\"}}}},\"Salary\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFields.salaryHeadAmount\"}}}},\"Other\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFields.otherHeadAmount\"}}}}}}}}" } ], "chartType": "line", "valueType": "number", "action": "", "drillChart": "none", "documentType": "_doc", "aggregationPaths": [ "Electricity", "Operations", "Salary", "Other" ], "isCumulative": false, "interval": "month", "insight": { }, "_comment": " " }
10. Demand and bill metrics by zone -
"dssIfixDemandAndBillMetricsByZone": { "chartName": "DSS_IFIX_DEMAND_AND_BILL_METRICS_BY_ZONE", "queries": [ { "module": "IFIX", "requestQueryMap": "{\"Zone\":\"Data.hierarchyMap.Zone.keyword\",\"Circle\":\"Data.hierarchyMap.Circle.keyword\",\"Department\":\"Data.hierarchyMap.Department.keyword\",\"GP\":\"Data.hierarchyMap.GP.keyword\",\"Division\":\"Data.hierarchyMap.Division.keyword\",\"Sub Division\":\"Data.hierarchyMap.Sub_Division.keyword\",\"Section\":\"Data.hierarchyMap.Section.keyword\"}", "dateRefField": "Data.eventTime", "indexName": "ifix-fiscal-events", "aggrQuery": "{\"aggs\":{\"Department\":{\"terms\":{\"field\":\"Data.hierarchyMap.Zone.keyword\"},\"aggs\":{\"Demand\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Demand\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}},\"Billed\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Bill\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}},\"Collections\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Receipt\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}},\"Paid\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Payment\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}}}}}}" } ], "isMdmsEnabled": false, "chartType": "table", "valueType": "number", "action": "", "plotLabel": "Zone", "isPostResponseHandler": true, "postAggregationTheory" : "repsonseToDifferenceOfDates", "documentType": "_doc", "drillChart": "none", "aggregationPaths": [ "Demand", "Billed", "Collections", "Paid" ], "pathDataTypeMapping": [ { "Demand": "amount" }, { "Billed": "amount" }, { "Collections": "amount" }, { "Paid": "amount" } ], "insight": { }, "_comment": "" }
11. Underperforming GPWSCs -
"dssIfixUnderperformingGPWSCs": { "chartName": "DSS_IFIX_UNDERPERFORMING_GPWSCS", "queries": [ { "module": "IFIX", "requestQueryMap": "{\"Zone\":\"Data.hierarchyMap.Zone.keyword\",\"Circle\":\"Data.hierarchyMap.Circle.keyword\",\"Department\":\"Data.hierarchyMap.Department.keyword\",\"GP\":\"Data.hierarchyMap.GP.keyword\",\"Division\":\"Data.hierarchyMap.Division.keyword\",\"Sub Division\":\"Data.hierarchyMap.Sub_Division.keyword\",\"Section\":\"Data.hierarchyMap.Section.keyword\"}", "dateRefField": "Data.eventTime", "indexName": "ifix-fiscal-events", "aggrQuery": "{\"aggs\":{\"Department\":{\"terms\":{\"field\":\"Data.hierarchyMap.Zone.keyword\"},\"aggs\":{\"Demand\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Demand\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}},\"Billed\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Bill\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}},\"Collections\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Receipt\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}},\"Paid\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Payment\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}},\"comparator_script\":{\"bucket_script\":{\"buckets_path\":{\"bill\":\"Billed>Total\",\"paid\":\"Paid>Total\",\"demand\":\"Demand>Total\",\"collection\":\"Collections>Total\"},\"script\":\"Math.max(params.bill-params.paid,params.demand-params.collection)\"}},\"sales_bucket_sort\":{\"bucket_sort\":{\"sort\":[{\"comparator_script\":{\"order\":\"asc\"}}]}}}}}}" } ], "isMdmsEnabled": false, "chartType": "table", "valueType": "number", "action": "", "plotLabel": "GPWSCS", "isPostResponseHandler": true, "postAggregationTheory" : "repsonseToDifferenceOfDates", "documentType": "_doc", "drillChart": "none", "aggregationPaths": [ "Demand", "Billed", "Collections", "Paid" ], "pathDataTypeMapping": [ { "Demand": "amount" }, { "Billed": "amount" }, { "Collections": "amount" }, { "Paid": "amount" } ], "insight": { }, "_comment": "" }
12. E Bills unpaid table chart -
"dssIfixEBillsUnpaid": { "chartName": "DSS_IFIX_EBILLS_UNPAID", "queries": [ { "module": "IFIX", "requestQueryMap": "{\"Zone\":\"Data.hierarchyMap.Zone.keyword\",\"Circle\":\"Data.hierarchyMap.Circle.keyword\",\"Department\":\"Data.hierarchyMap.Department.keyword\",\"GP\":\"Data.hierarchyMap.GP.keyword\",\"Division\":\"Data.hierarchyMap.Division.keyword\",\"Sub Division\":\"Data.hierarchyMap.Sub_Division.keyword\",\"Section\":\"Data.hierarchyMap.Section.keyword\"}", "dateRefField": "Data.eventTime", "indexName": "ifix-fiscal-events", "aggrQuery": "{\"aggs\":{\"Department\":{\"terms\":{\"field\":\"Data.hierarchyMap.Zone.keyword\"},\"aggs\":{\"Pending Amount\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Bill\",\"Payment\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFields.electricityExpenseNetAmount\"}}}}}}}}" } ], "isMdmsEnabled": false, "chartType": "table", "valueType": "number", "action": "", "plotLabel": "GPWSCS", "isPostResponseHandler": true, "postAggregationTheory" : "repsonseToDifferenceOfDates", "documentType": "_doc", "drillChart": "none", "aggregationPaths": [ "Pending Amount" ], "pathDataTypeMapping": [ { "Pending Amount": "amount" } ], "insight": { }, "_comment": "" }
0 Comments