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 -
Code Block |
---|
"dssIfixSurplusCollection": { "chartNamename": "DSS_IFIX_SURPLUS_COLLECTIONiFix", "queriesid": [ { "ifix" } |
In master dashboard config file, to lay out the format and positioning of various visualizations, the following entry needs to be created -
Code Block |
---|
{ "modulename": "DSS_IFIX_DASHBOARD", "indexNameid": "ifix-fiscal-events", "aggrQueryisActive": "{\"aggs\":{\"totalOutstandingAmount\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Demand\",\"Bill\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFields.netAmount\"}}}}}}", ", "style": "linear", "visualizations": [ "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\"}",{ "row": 1, "name": "DSS_OVERVIEW", "vizArray": [ { "id": 341, "name": "DSS_IFIX_REVENUE", "dateRefFielddimensions": "Data.eventTime"{ } ], "chartTypeheight": "metric"350, "valueType": "amount", "action": "", "drillChartwidth": "none",5 "aggregationPaths": [ "totalOutstandingAmount" ]}, "insight": { }, "_commentvizType": "IFIX Surplus Collection" } |
2. Outstanding collections -
Code Block |
---|
"dssIfixOutstandingCollection": {"metric-collection", "chartNamelabel": "DSS_IFIX_OUTSTANDINGREVENUE_COLLECTIONMETRICS", "queries": [ { "noUnit": true, "module": "IFIX", "indexNameisCollapsible": "ifix-fiscal-events"false, "aggrQuery": "{\"aggs\":{\"totalOutstandingAmount\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Demand\",\"Receipt\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFields.netAmount\"}}}}}}", "charts": [ { "id": "dssIfixSurplusCollection", "name": "DSS_IFIX_SURPLUS_COLLECTION", "code": "", "chartType": "metric", "requestQueryMap "filter": "{\"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\"}",{ "title": "TODAY" }, "headers": [] }, { "dateRefField": "Data.eventTime" } ], "chartTypeid": "metricdssIfixOutstandingCollection", "valueType": "amount", "action": "", "drillChartname": "noneDSS_IFIX_OUTSTANDING_COLLECTION", "aggregationPaths": [ "totalOutstandingAmountcode": "", ], "insight": { }, "_commentchartType": "IFIX Surplus Collection" } |
3. GPWSCs at risk -
Code Block |
---|
"dssIfixGpwscsAtRisk": {metric", "chartNamefilter": "DSS_IFIX_GPWSCS_AT_RISK", "queries": [ { "moduleheaders": "IFIX", [] "indexName": "ifix-fiscal-events", }, "aggrQuery { "id": "{\"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\"}}}}","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": "", "requestQueryMapchartType": "{\"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\"}",donut", "filter": "", "headers": [] } "dateRefField": "Data.eventTime"] } ]}, "chartType": "metric", "valueType": "number", { "action": "", "drillChart": "none", "aggregationPathsid": [342, "count" ], "name": "insight": {"DSS_IFIX_PENDING_EXPENDITURE", }, "_commentdimensions": "IFIX{ Surplus Collection" } |
4. Outstanding E Bills -
Code Block |
---|
"dssIfixOutstandingEBills": { "chartName": "DSS_IFIX_OUTSTANDING_E_BILLS", "queriesheight": [350, { "modulewidth": "IFIX", 4 "indexName": "ifix-fiscal-events" }, "aggrQuery": "{\"aggs\":{\"totalOutstandingAmount\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Bill\",\"Payment\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFields.electricityExpenseNetAmount\"}}}}}}", "vizType": "chart", "requestQueryMaplabel": "{\"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\"}",", "noUnit": false, "isCollapsible": false, "charts": [ { "dateRefField": "Data.eventTime" } ], "chartTypeid": "metricdssIfixPendingExpenditure", "valueType": "number", "action": "", "drillChartname": "noneDSS_IFIX_PENDING_EXPENDITURE", "aggregationPaths": [ "totalOutstandingAmount" "code": "", ], "insight": { }, "_commentchartType": "IFIX Surplus Collection"donut", } |
5. Pending Collections Pie Chart -
Code Block |
---|
"dssIfixPendingCollections": { "chartNamefilter": "DSS_IFIX_PENDING_COLLECTIONS", "queries "headers": [] { } "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\"}", } ] }, { "row": 2, "name": "DSS_OVERVIEW", "vizArray": [ "dateRefField": "Data.eventTime", { "indexName": "ifix-fiscal-events", "aggrQueryid": "{\"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\"}}}}}}}}"211, "name": "DSS_IFIX_COLLECTIONS_VS_EXPENDITURE", "dimensions": { "height": 350, "width": 10 }, "vizType": "chart", "isCollapsible": false, "label": "", "charts": [ } ], { "chartType": "pie", "valueType": "number", "action": "", "documentTypeid": "_docdssIfixCollectionsVsExpenditure", "drillChart": "none", "aggregationPathsname": ["Monthly", "Pending Collections" ], "insightcode": {"", }, "_commentchartType": "Pending Collections""line", } |
6. Pending expenditure pie chart -
Code Block |
---|
"dssIfixPendingExpenditure": { "chartNamefilter": "DSS_IFIX_PENDING_EXPENDITURE", "queries "headers": [] { "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\"}", ] } ] }, { "row": 3, "name": "DSS_OVERVIEW", "vizArray": [ "dateRefField": "Data.eventTime", { "indexName": "ifix-fiscal-events", "id": 326, "aggrQueryname": "{\"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\"}}}}}}}}"DSS_IFIX_COLLECTIONS_AND_EXPENDITURE_ACTUAL", "dimensions": { "height": 450, "width": 5 }, "vizType": "chart", "isCollapsible": false, "label": "", "charts": [ } ], "chartType": "pie",{ "valueType": "number", "action": "", "documentTypeid": "_docdssIfixCollectionsAndExpenditureActual", "drillChart": "none", "aggregationPathsname": ["Monthly", "Pending Collections" ], "insightcode": {"", }, "_comment": "Pending Collections" } |
7. Collections vs Expenditure line chart -
Code Block |
---|
"dssIfixCollectionsVsExpenditure": { "chartNamechartType": "DSS_IFIX_COLLECTIONS_VS_EXPENDITUREbar", "queries": [ { "modulefilter": "IFIX", "dateRefField": "Data.eventTime", "requestQueryMapheaders": "{\"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\"}",[] } ] } ] }, { "row": 4, "name": "DSS_OVERVIEW", "vizArray": [ { "id": 326, "name": "DSS_IFIX_EXPENDITURE_COMPOSITION", "dimensions": { "indexNameheight": "ifix-fiscal-events",450, "aggrQuerywidth": "{\"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\"}}}}}}}}" 5 }, "vizType": "chart", "isCollapsible": false, "label": "", "charts": [ { "id": "dssIfixExpenditureComposition", "name": "Monthly", "code": "", "chartType": "bar", "filter": "", } ], "chartTypeheaders": "line",[] "valueType": "number", "action": "", } "drillChart": "none", "documentType": "_doc", ] "aggregationPaths": [ "Total Collection", } "Total Expenditure" ], "isCumulative": false, }, "interval": "month", "insight": { }, "_commentrow": ""5, } |
8. Collections and expenditure actuals bar chart -
Code Block |
---|
"dssIfixCollectionsAndExpenditureActual": { "chartNamename": "DSS_IFIX_COLLECTIONS_AND_EXPENDITURE_ACTUAL",OVERVIEW", "queriesvizArray": [ { "moduleid": "IFIX",231, "dateRefFieldname": "Data.eventTime",Comparision of Administrative Entities", "requestQueryMapdimensions": "{\"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\"}",{ "height": 350, "width": 12 }, "vizType": "chart", "noUnit": false, "isCollapsible": false, "charts": [ { "indexNameid": "ifix-fiscal-eventsdssIfixDemandAndBillMetricsByZone", "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 "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 -
Code Block |
---|
"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 -
Code Block |
---|
"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 -
Code Block |
---|
"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 -
Code Block |
---|
"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 -
Code Block |
---|
"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 -
Code Block |
---|
"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 -
Code Block |
---|
"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 -
Code Block |
---|
"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 -
Code Block |
---|
"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\":{\"oldBillAmountTotal\":{\"sum\":{\"field\":\"Data.computedFields.electricityHeadAmount\"}}}},\"Operations\":{\"scriptdate_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"langTotal\":{\"painlesssum\",:{\"sourcefield\":\"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"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\"}}}}}}}}" } ], "isCumulativechartType": false"line", "intervalvalueType": "monthnumber", "insightaction": { }"", "_commentdrillChart": " " } |
9. Expenditure Composition bar chart -
Code Block |
---|
"dssIfixExpenditureComposition": {none", "chartNamedocumentType": "DSS_IFIX_EXPENDITURE_COMPOSITIONdoc", "queriesaggregationPaths": [ {"Electricity", "Operations", "module": "IFIXSalary", "dateRefFieldOther": "Data.eventTime", ], "requestQueryMapisCumulative": "{\"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\"}",false, "interval": "month", "insight": { }, "_comment": " " } |
10. Demand and bill metrics by zone -
Code Block |
---|
"dssIfixDemandAndBillMetricsByZone": { "chartName": "DSS_IFIX_DEMAND_AND_BILL_METRICS_BY_ZONE", "queries": [ { "indexNamemodule": "ifix-fiscal-eventsIFIX", "aggrQueryrequestQueryMap": "{\"aggsZone\":{\"AGGRData.hierarchyMap.Zone.keyword\":{,\"filter\":{\"termsCircle\":{\"Data.hierarchyMap.eventTypeCircle.keyword\":[\"Payment\"]}},\"aggsDepartment\":{\"Electricity\":{\"date_histogram\":{\"field\":\"Data.eventTimeData.hierarchyMap.Department.keyword\",\"intervalGP\":\"monthData.hierarchyMap.GP.keyword\"},\"aggs\":{\"TotalDivision\":{\"sumData.hierarchyMap.Division.keyword\":{,\"fieldSub Division\":\"Data.computedFields.electricityHeadAmounthierarchyMap.Sub_Division.keyword\"}}}},\"OperationsSection\":{\"date_histogram\":{\"field\":\Data.hierarchyMap.Section.keyword\"}", "dateRefField": "Data.eventTime\",\"interval\ "indexName":\"month\"}, "ifix-fiscal-events", "aggrQuery": "{\"aggs\":{\"TotalDepartment\":{\"sumterms\":{\"field\":\"Data.hierarchyMap.computedFieldsZone.operationsHeadAmountkeyword\"}}}},\"Salaryaggs\":{\"date_histogramDemand\":{\"fieldfilter\":{\"Data.eventTimeterms\",:{\"intervalData.eventType.keyword\":[\"monthDemand\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFieldsamountDetails.salaryHeadAmountamount\"}}}},\"OtherBilled\":{\"date_histogramfilter\":{\"fieldterms\":{\"Data.eventTime\",\"interval.eventType.keyword\":[\"monthBill\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFieldsamountDetails.otherHeadAmountamount\"}}}}}}}}" } ], "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 -
Code Block |
---|
"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\"}", },\"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": [ "dateRefField": "Data.eventTime"Demand", "indexName": "ifix-fiscal-events"Billed", "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 -
Code Block |
---|
"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 -
Code Block |
---|
"dssIfixEBillsUnpaid": { "chartName": "DSS_IFIX_EBILLS_UNPAID", "queries"Collections", "Paid" ], "pathDataTypeMapping": [ { "Demand": "amount" }, { "Billed": "amount" }, { "Collections": "amount" }, { "Paid": "amount" } ], "insight": { }, "_comment": "" } |
11. Underperforming GPWSCs -
Code Block |
---|
"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 -
Code Block |
---|
"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": [ { "modulePending Amount": "IFIXamount", "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\"}", } ], "insight": { }, "_comment": "" } |
Once the aforementioned steps are completed, we require to add role action mapping for the newly configured dashboard by adding the following configs -
Add the following entries in action config -
Code Block |
---|
{ "id": 2032, "dateRefFieldname": "Data.eventTimeDashboard IFIX", "indexNameurl": "ifix-fiscal-eventsurl", "aggrQuerydisplayName": "{\"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\"}}}}}}}}" "IFIX", "orderNumber": 14, "parentModule": "dss-dashboard", "enabled": true, "serviceCode": "DSS", "code": "null", "path": "Dashboard.IFIX", "navigationURL": "/digit-ui/employee/dss/dashboard/ifix", "leftIcon": "places:business-center", "rightIcon": "" }, { "id": 2033, } "name": "DSS Dashboard Config ]IFIX", "isMdmsEnabledurl": false"/dashboard-analytics/dashboard/getDashboardConfig/ifix", "chartTypeparentModule": "table", "valueTypedisplayName": "numberDSS", "actionorderNumber": 0, "enabled": false, "plotLabelserviceCode": "GPWSCSDSS", "isPostResponseHandlercode": true"null", "postAggregationTheorypath" : "repsonseToDifferenceOfDates", "documentType": "_doc",} |
2. Add the following entries in role-action configuration -
Code Block |
---|
{ "drillChartrolecode": "noneEMPLOYEE", "aggregationPathsactionid": [2032, "actioncode"Pending: Amount"", ], "tenantId": "pathDataTypeMappingpb": [ }, { { "Pending Amountrolecode": "amountEMPLOYEE", } "actionid": 2033, ], "insightactioncode": {"", }, "_commenttenantId": "pb" } |