FSM-DSS Documentation
FSM-DSS has two sides to it. One being the process in which the Data is pooled to ElasticSearch and the other being the way it is fetched, aggregated, computed, transformed and sent across.
Here is the DSS-Backend Configuration manual
As this revolves around a variety of Data Set, there is a need for making this configurable. So that, tomorrow, given a new scenario is introduced, then it is just a configuration away from getting the newly introduced scenario involved in this flow of process.
This document explains the steps on how to define the configurations for Analytics Side Of DSS for FSM.
What is analytics?
Analytics : Micro Service which is responsible for building, fetching, aggregating and computing the Data on ElasticSearch to a consumable Data Response. Which shall be later used for visualizations and graphical representations.
Analytics Configurations:
Below is a list of configurations that need to be changed to run fsm successfully.
Chart API Configuration
Master Dashboard Configuration
Role Dashboard Mappings Configuration
Description :
Chart API Configuration :
Each Visualization has its own properties. Each Visualization comes from different data sources (Sometimes it is a combination of different data sources)
In order to configure each visualization and their properties, we have a Chart API Configuration Document.
In this, Visualization Code, which happens to be the key, will be having its properties configured as a part of configuration and are easily changeable.
Here is link for ChartApiConfiguration.json, which also contains the FSM related configuration.
Code Block |
---|
"fsmTotalrequest": {
"chartName": "DSS_FSM_TOTAL_REQUESTS",
"queries": [
{
"module": "FSM",
"indexName": "fsm",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.fsm.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Total Application\":{\"value_count\":{\"field\":\"Data.fsm.@timestamp\"}}}}}}",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"dateRefField": "Data.fsm.@timestamp"
}
],
"chartType": "metric",
"valueType": "number",
"action": "",
"drillChart": "none",
"aggregationPaths": [
"Total Application"
],
"insight": {
"chartResponseMap" : "totalApplication",
"action" : "differenceOfNumbers",
"upwardIndicator" : "positive",
"downwardIndicator" : "negative",
"textMessage" : "$indicator$value% than last $insightInterval",
"colorCode" : "#228B22",
"insightInterval" : "year",
"isRoundOff": true
},
"_comment": " FSM Total Applications"
},
"totalSludgeTreated": {
"chartName": "DSS_FSM_TOTAL_SLUDGE_TREATED",
"queries": [
{
"module": "FSM",
"indexName": "vehicletrip",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.vehicleTrip.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Total Sludge Collection\":{\"sum\":{\"script\":{\"source\":\"(doc['Data.vehicleTrip.volumeCarried'].value)/1000.0\"}}}}}}}",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"dateRefField": "Data.vehicleTrip.@timestamp"
}
],
"chartType": "metric",
"valueType": "number",
"action": "",
"drillChart": "none",
"aggregationPaths": [
"Total Sludge Collection"
],
"insight": {
"chartResponseMap" : "totalSludgeTreated",
"action" : "differenceOfNumbers",
"upwardIndicator" : "positive",
"downwardIndicator" : "negative",
"textMessage" : "$indicator$value% than last $insightInterval",
"colorCode" : "#228B22",
"insightInterval" : "year",
"isRoundOff": true
},
"_comment": " FSM Total Sludge Treated"
},
"avgFSMCostRequest": {
"chartName": "DSS_FSM_AVG_FSM_COST_OR_REQ",
"queries": [
{
"module": "FSM",
"indexName": "fsm",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}],\"must\":[{\"term\":{\"Data.payments.paymentDetails.businessService.keyword\":\"FSM.TRIP_CHARGES\"}}]}},\"aggs\":{\"Average Collection\":{\"avg\":{\"field\":\"Data.payments.paymentDetails.bill.billDetails.amountPaid\"}}}}}}",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"dateRefField": "Data.fsm.@timestamp"
}
],
"chartType": "metric",
"valueType": "amount",
"action": "",
"drillChart": "none",
"isRoundOff": true,
"aggregationPaths": [
"Average Collection"
],
"insight": {
"chartResponseMap" : "averageCollection",
"action" : "differenceOfNumbers",
"upwardIndicator" : "positive",
"downwardIndicator" : "negative",
"textMessage" : "$indicator$value% than last $insightInterval",
"colorCode" : "#228B22",
"insightInterval" : "year",
"isRoundOff": true
},
"_comment": " FSM Average Collection"
},
"totalCollectioninLacs": {
"chartName": "DSS_FSM_TOTAL_COLLECTION",
"queries": [
{
"module": "FSM",
"indexName": "fsm",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}],\"must\":[{\"term\":{\"Data.payments.paymentDetails.businessService.keyword\":\"FSM.TRIP_CHARGES\"}}]}},\"aggs\":{\"Total Collection\":{\"sum\":{\"field\":\"Data.payments.paymentDetails.bill.billDetails.amountPaid\"}}}}}}",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"dateRefField": "Data.fsm.@timestamp"
}
],
"chartType": "metric",
"valueType": "amount",
"action": "",
"drillChart": "none",
"documentType": "_doc",
"aggregationPaths": [
"Total Collection"
],
"insight": {
"chartResponseMap" : "totalCollection",
"action" : "differenceOfNumbers",
"upwardIndicator" : "positive",
"downwardIndicator" : "negative",
"textMessage" : "$indicator$value% than last $insightInterval",
"colorCode" : "#228B22",
"insightInterval" : "year",
"isRoundOff": true
},
"_comment": " FSM Total Collection"
},
"slaCompliance": {
"chartName": "DSS_FSM_SLA_COMPLIANCE",
"queries": [
{
"module": "FSM",
"indexName": "fsm",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.service.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Closed With In Sla\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}},{\"script\":{\"script\":{\"source\":\"doc['Data.fsm.auditDetails.lastModifiedTime'].value - doc['Data.fsm.auditDetails.createdTime'].value < params.threshold\",\"lang\":\"painless\",\"params\":{\"threshold\":172800000}}}}]}},\"aggs\":{\"count\":{\"terms\":{\"field\":\"Data.fsm.tenantId.keyword\"},\"aggs\":{\"tenant_count\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}}}}}},\"Total Applications\":{\"terms\":{\"field\":\"Data.fsm.tenantId.keyword\"},\"aggs\":{\"tenant_count\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}}}}}}}}",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"dateRefField": "Data.fsm.@timestamp"
}
],
"chartType": "metric",
"valueType": "percentage",
"drillChart": "none",
"documentType": "_doc",
"action": "percentage",
"isRoundOff": true,
"aggregationPaths": [
"Closed With In Sla",
"Total Applications"
],
"insight": {
"chartResponseMap" : "slaCompliance",
"action" : "differenceOfNumbers",
"upwardIndicator" : "positive",
"downwardIndicator" : "negative",
"textMessage" : "$indicator$value% than last $insightInterval",
"colorCode" : "#228B22",
"insightInterval" : "year",
"isRoundOff": true
},
"_comment": " SLA Compliance"
},
"citizenAvgRating": {
"chartName": "DSS_FSM_CITIZEN_AVG_RATING",
"queries": [
{
"module": "FSM",
"indexName": "fsm",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.fsm.tenantId.keyword\":\"pb.testing\"}}],\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\"]}},{\"term\":{\"Data.history.action.keyword\":\"RATE\"}},{\"exists\":{\"field\":\"Data.history\"}},{\"range\":{\"Data.history.rating\":{\"gte\":1}}}]}},\"aggs\":{\"Citizen Average Rating\":{\"avg\":{\"script\":\"int sum = 0;int count =0;if(params['_source']['Data']['history']!=null){ for (item in params['_source']['Data']['history']) {if(item.rating!=null){ sum += item.rating;} }} return sum;\"}}}}}}",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"dateRefField": "Data.fsm.@timestamp"
}
],
"chartType": "metric",
"valueType": "number",
"action": "",
"drillChart": "none",
"documentType": "_doc",
"aggregationPaths": [
"Citizen Average Rating"
],
"postAggregationTheory": "",
"insight": {},
"_comment": " Citizen Average rating"
},
"fsmCollectionByUsageType": {
"chartName": "DSS_FSM_COLLECTION_BY_USAGE_TYPE",
"queries": [
{
"module": "FSM",
"dateRefField": "Data.fsm.@timestamp",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"indexName": "fsm",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.fsm.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Usage Type\":{\"terms\":{\"field\":\"Data.fsm.propertyUsage.keyword\"},\"aggs\":{\"Assessed Properties\":{\"sum\":{\"field\":\"Data.payments.paymentDetails.bill.billDetails.amountPaid\"}}}}}}}}"
}
],
"chartType": "pie",
"valueType": "amount",
"action": "",
"documentType": "_doc",
"drillChart": "none",
"aggregationPaths": [
"Usage Type"
],
"insight": {
},
"_comment": " "
},
"fsmTotalCumulativeCollection": {
"chartName": "DSS_FSM_TOTAL_CUMULATIVE_COLLECTION",
"queries": [
{
"module": "FSM",
"dateRefField": "Data.fsm.@timestamp",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"indexName": "fsm",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.fsm.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Total Collection\":{\"date_histogram\":{\"field\":\"Data.fsm.@timestamp\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"Data.payments.paymentDetails.bill.billDetails.amountPaid\"}}}}}}}}"
}
],
"chartType": "line",
"valueType": "amount",
"action": "",
"drillChart": "none",
"documentType": "_doc",
"aggregationPaths": [
"Total Collection"
],
"isCumulative": true,
"interval": "month",
"insight": {
},
"_comment": " "
},
"fsmTopUlbByPerformance": {
"chartName": "DSS_FSM_TOP_ULB_BY_PERFORMANCE",
"queries": [
{
"module": "FSM",
"dateRefField": "Data.fsm.@timestamp",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"indexName": "fsm",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.fsm.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Closed With In Sla\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}},{\"script\":{\"script\":{\"source\":\"doc['Data.fsm.auditDetails.lastModifiedTime'].value - doc['Data.fsm.auditDetails.createdTime'].value < params.threshold\",\"lang\":\"painless\",\"params\":{\"threshold\":172800000}}}}]}},\"aggs\":{\"count\":{\"terms\":{\"field\":\"Data.fsm.tenantId.keyword\"},\"aggs\":{\"tenant_count\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}}}}}},\"Total Applications\":{\"terms\":{\"field\":\"Data.fsm.tenantId.keyword\"},\"aggs\":{\"tenant_count\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}}}}}}}}"
}
],
"chartType": "perform",
"valueType": "percentage",
"drillChart": "none",
"documentType": "_doc",
"drillChart": "ulbTopDrillChart",
"action": "percentage",
"plotLabel": "DSS_COMPLETION_RATE",
"isRoundOff": true,
"order": "desc",
"limit": 3,
"aggregationPaths": [
"Closed With In Sla",
"Total Applications"
],
"isCumulative": false,
"interval": "month",
"insight": {
},
"_comment": ""
},
"ulbTopDrillChart": {
"chartName": "DSS_FSM_ULB_PERFORMANCE",
"queries": [
{
"module": "FSM",
"dateRefField": "Data.fsm.@timestamp",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"indexName": "fsm",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"data.fsm.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"ULB\":{\"terms\":{\"field\":\"Data.fsm.tenantId.keyword\",\"size\":1000,\"order\":{\"_count\":\"desc\"}},\"aggs\":{\"TotalRequests\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}},\"ClosedWithInSLA\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}},{\"script\":{\"script\":{\"source\":\"doc['Data.fsm.auditDetails.lastModifiedTime'].value - doc['Data.fsm.auditDetails.createdTime'].value < params.threshold\",\"lang\":\"painless\",\"params\":{\"threshold\":172800000}}}}]}},\"aggs\":{\"valueCount\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}}}},\"ClosedOutsideSLA\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}},{\"script\":{\"script\":{\"source\":\"doc['Data.fsm.auditDetails.lastModifiedTime'].value - doc['Data.fsm.auditDetails.createdTime'].value > params.threshold\",\"lang\":\"painless\",\"params\":{\"threshold\":172800000}}}}]}},\"aggs\":{\"valueCount\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}}}},\"CitizenAverageRating\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\"]}},{\"term\":{\"Data.history.action.keyword\":\"RATE\"}},{\"exists\":{\"field\":\"Data.history\"}},{\"range\":{\"Data.history.rating\":{\"gte\":1}}}]}},\"aggs\":{\"CitizenAvgRating\":{\"avg\":{\"script\":\"int sum = 0;int count =0;if(params['_source']['Data']['history']!=null){ for (item in params['_source']['Data']['history']) {if(item.rating!=null){ sum += item.rating;} }} return sum;\"}}}}}}}}}}"
}
],
"filterKeys": [
{"key": "tenantId", "column": "ULB"}
],
"isPostResponseHandler": true,
"chartType": "table",
"valueType": "number",
"action": "",
"documentType": "_doc",
"drillChart": "none",
"plotLabel":"ULB",
"aggregationPaths": [
"TotalRequests",
"ClosedWithInSLA",
"ClosedOutsideSLA",
"CitizenAverageRating"
],
"pathDataTypeMapping": [
{
"TotalRequests" : "number"
},
{
"ClosedWithInSLA" : "number"
},
{
"ClosedOutsideSLA" : "number"
},
{
"CitizenAverageRating" : "number"
}
],
"isCumulative": true,
"interval": "month",
"insight": {
},
"_comment": " "
},
"fsmBottomUlbByPerformance": {
"chartName": "DSS_FSM_BOTTOM_ULB_BY_PERFORMANCE",
"queries": [
{
"module": "FSM",
"dateRefField": "Data.fsm.@timestamp",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"indexName": "fsm",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.fsm.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Closed With In Sla\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}},{\"script\":{\"script\":{\"source\":\"doc['Data.fsm.auditDetails.lastModifiedTime'].value - doc['Data.fsm.auditDetails.createdTime'].value < params.threshold\",\"lang\":\"painless\",\"params\":{\"threshold\":172800000}}}}]}},\"aggs\":{\"count\":{\"terms\":{\"field\":\"Data.fsm.tenantId.keyword\"},\"aggs\":{\"tenant_count\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}}}}}},\"Total Applications\":{\"terms\":{\"field\":\"Data.fsm.tenantId.keyword\"},\"aggs\":{\"tenant_count\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}}}}}}}}"
}
],
"chartType": "perform",
"valueType": "percentage",
"drillChart": "none",
"documentType": "_doc",
"drillChart": "ulbBottomDrillChart",
"action": "percentage",
"isRoundOff": true,
"plotLabel": "DSS_COMPLETION_RATE",
"order": "asc",
"limit": 3,
"aggregationPaths": [
"Closed With In Sla",
"Total Applications"
],
"isCumulative": false,
"interval": "month",
"insight": {
},
"_comment": ""
},
"ulbBottomDrillChart": {
"chartName": "DSS_FSM_ULB_PERFORMANCE",
"queries": [
{
"module": "FSM",
"dateRefField": "Data.fsm.@timestamp",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"indexName": "fsm",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"data.fsm.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"ULB\":{\"terms\":{\"field\":\"Data.fsm.tenantId.keyword\",\"size\":1000,\"order\":{\"_count\":\"asc\"}},\"aggs\":{\"TotalRequests\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}},\"ClosedWithInSLA\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}},{\"script\":{\"script\":{\"source\":\"doc['Data.fsm.auditDetails.lastModifiedTime'].value - doc['Data.fsm.auditDetails.createdTime'].value < params.threshold\",\"lang\":\"painless\",\"params\":{\"threshold\":172800000}}}}]}},\"aggs\":{\"valueCount\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}}}},\"ClosedOutsideSLA\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}},{\"script\":{\"script\":{\"source\":\"doc['Data.fsm.auditDetails.lastModifiedTime'].value - doc['Data.fsm.auditDetails.createdTime'].value > params.threshold\",\"lang\":\"painless\",\"params\":{\"threshold\":172800000}}}}]}},\"aggs\":{\"valueCount\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}}}},\"CitizenAverageRating\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\"]}},{\"term\":{\"Data.history.action.keyword\":\"RATE\"}},{\"exists\":{\"field\":\"Data.history\"}},{\"range\":{\"Data.history.rating\":{\"gte\":1}}}]}},\"aggs\":{\"CitizenAvgRating\":{\"avg\":{\"script\":\"int sum = 0;int count =0;if(params['_source']['Data']['history']!=null){ for (item in params['_source']['Data']['history']) {if(item.rating!=null){ sum += item.rating;} }} return sum;\"}}}}}}}}}}"
}
],
"filterKeys": [
{"key": "tenantId", "column": "ULB"}
],
"isPostResponseHandler": true,
"chartType": "table",
"valueType": "number",
"action": "",
"documentType": "_doc",
"drillChart": "none",
"plotLabel":"ULB",
"aggregationPaths": [
"TotalRequests",
"ClosedWithInSLA",
"ClosedOutsideSLA",
"CitizenAverageRating"
],
"pathDataTypeMapping": [
{
"TotalRequests" : "number"
},
{
"ClosedWithInSLA" : "number"
},
{
"ClosedOutsideSLA" : "number"
},
{
"CitizenAverageRating" : "number"
}
],
"isCumulative": true,
"interval": "month",
"insight": {
},
"_comment": " "
},
"fsmCapacityUtilization": {
"chartName": "DSS_FSTP_CAPACITY_UTILIZATION",
"queries": [
{
"module": "FSM",
"dateRefField": "Data.vehicleTrip.@timestamp",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"indexName": "vehicletrip",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.vehicleTrip.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Capacity Utilization\":{\"date_histogram\":{\"field\":\"Data.vehicleTrip.@timestamp\",\"interval\":\"month\"},\"aggs\":{\"Count\":{\"sum\":{\"script\":{\"source\":\"(doc['Data.vehicleTrip.volumeCarried'].value)/1000.0\"}}}}}}}}}"
}
],
"chartType": "line",
"valueType": "amount",
"action": "",
"isRoundOff": true,
"documentType": "_doc",
"drillChart": "none",
"aggregationPaths": [
"Capacity Utilization"
],
"isCumulative": true,
"interval": "month",
"insight": {
},
"_comment": " "
},
"fsmMonthlyWasteCal": {
"chartName": "DSS_FSM_MONTHLY_WASTE_CAL",
"queries": [
{
"module": "FSM",
"dateRefField": "Data.vehicleTrip.@timestamp",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"indexName": "vehicletrip",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.vehicleTrip.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Septage Dumped At Plant\":{\"date_histogram\":{\"field\":\"Data.vehicleTrip.@timestamp\",\"interval\":\"month\"},\"aggs\":{\"Count\":{\"sum\":{\"script\":{\"source\":\"(doc['Data.vehicleTrip.volumeCarried'].value)/1000.0\"}}}}},\"Septage Collected\":{\"date_histogram\":{\"field\":\"Data.vehicleTrip.@timestamp\",\"interval\":\"month\"},\"aggs\":{\"Count\":{\"sum\":{\"script\":{\"source\":\"(doc['Data.vehicleTrip.tripDetails.volume'].value)/1000.0\"}}}}}}}}}"
}
],
"chartType": "line",
"valueType": "number",
"action": "",
"isRoundOff": true,
"documentType": "_doc",
"drillChart": "none",
"aggregationPaths": [
"Septage Collected",
"Septage Dumped At Plant"
],
"isCumulative": false,
"interval": "month",
"insight": {
},
"_comment": " "
},
"fsmTopDsoByPerformance": {
"chartName": "DSS_FSM_TOP_DSO_BY_PERFORMANCE",
"queries": [
{
"module": "FSM",
"dateRefField": "Data.fsm.@timestamp",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"indexName": "fsm",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.fsm.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Raised\":{\"terms\":{\"field\":\"Data.vendor.name.keyword\",\"size\":3,\"order\":{\"_count\":\"desc\"}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.vendor.name.keyword\"}}}},\"Closed Within SLA\":{\"terms\":{\"field\":\"Data.vendor.name.keyword\",\"size\":3,\"order\":{\"_count\":\"desc\"}},\"aggs\":{\"Count\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}},{\"script\":{\"script\":{\"source\":\"doc['Data.fsm.auditDetails.lastModifiedTime'].value - doc['Data.fsm.auditDetails.createdTime'].value < params.threshold\",\"lang\":\"painless\",\"params\":{\"threshold\":172800000}}}}]}},\"aggs\":{\"valueCount\":{\"value_count\":{\"field\":\"Data.vendor.name.keyword\"}}}}}},\"Closed Outside SLA\":{\"terms\":{\"field\":\"Data.vendor.name.keyword\",\"size\":3,\"order\":{\"_count\":\"desc\"}},\"aggs\":{\"Count\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}},{\"script\":{\"script\":{\"source\":\"doc['Data.fsm.auditDetails.lastModifiedTime'].value - doc['Data.fsm.auditDetails.createdTime'].value > params.threshold\",\"lang\":\"painless\",\"params\":{\"threshold\":172800000}}}}]}},\"aggs\":{\"valueCount\":{\"value_count\":{\"field\":\"Data.vendor.name.keyword\"}}}}}}}}}}"
}
],
"chartType": "line",
"valueType": "number",
"action": "",
"drillChart": "dsoTopDrillChart",
"documentType": "_doc",
"aggregationPaths": [
"Raised",
"Closed Within SLA",
"Closed Outside SLA"
],
"isCumulative": false,
"interval": "month",
"insight": {
},
"_comment": ""
},
"dsoTopDrillChart": {
"chartName": "DSS_FSM_DSO_PERFORMANCE",
"queries": [
{
"module": "FSM",
"dateRefField": "Data.fsm.@timestamp",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"indexName": "fsm",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"data.fsm.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"DSOName\":{\"terms\":{\"field\":\"Data.vendor.name.keyword\",\"size\":1000,\"order\":{\"_count\":\"desc\"}},\"aggs\":{\"TotalRequest\":{\"value_count\":{\"field\":\"Data.vendor.name.keyword\"}},\"ClosedWithinSLA\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}},{\"script\":{\"script\":{\"source\":\"doc['Data.fsm.auditDetails.lastModifiedTime'].value - doc['Data.fsm.auditDetails.createdTime'].value < params.threshold\",\"lang\":\"painless\",\"params\":{\"threshold\":172800000}}}}]}},\"aggs\":{\"valueCount\":{\"value_count\":{\"field\":\"Data.vendor.name.keyword\"}}}},\"ClosedOutsideSLA\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}},{\"script\":{\"script\":{\"source\":\"doc['Data.fsm.auditDetails.lastModifiedTime'].value - doc['Data.fsm.auditDetails.createdTime'].value > params.threshold\",\"lang\":\"painless\",\"params\":{\"threshold\":172800000}}}}]}},\"aggs\":{\"valueCount\":{\"value_count\":{\"field\":\"Data.vendor.name.keyword\"}}}},\"CitizenAverageRating\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\"]}},{\"term\":{\"Data.history.action.keyword\":\"RATE\"}},{\"exists\":{\"field\":\"Data.history\"}},{\"range\":{\"Data.history.rating\":{\"gte\":1}}}]}},\"aggs\":{\"CitizenAvgRating\":{\"avg\":{\"script\":\"int sum = 0;int count =0;if(params['_source']['Data']['history']!=null){ for (item in params['_source']['Data']['history']) {if(item.rating!=null){ sum += item.rating;} }} return sum;\"}}}}}}}}}}"
}
],
"filterKeys": [
{"key": "dsoName", "column": "DSOName"}
],
"isPostResponseHandler": true,
"chartType": "table",
"valueType": "number",
"action": "",
"documentType": "_doc",
"drillChart": "none",
"plotLabel":"DSOName",
"aggregationPaths": [
"TotalRequest",
"ClosedWithinSLA",
"ClosedOutsideSLA",
"CitizenAverageRating"
],
"pathDataTypeMapping": [
{
"TotalRequest" : "number"
},
{
"ClosedWithinSLA" : "number"
},
{
"ClosedOutsideSLA" : "number"
},
{
"CitizenAverageRating" : "number"
}
],
"isCumulative": true,
"interval": "month",
"insight": {
},
"_comment": " "
},
"fsmBottomDsoByPerformance": {
"chartName": "DSS_FSM_BOTTOM_DSO_BY_PERFORMANCE",
"queries": [
{
"module": "FSM",
"dateRefField": "Data.fsm.@timestamp",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"indexName": "fsm",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.fsm.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Raised\":{\"terms\":{\"field\":\"Data.vendor.name.keyword\",\"size\":3,\"order\":{\"_count\":\"asc\"}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.vendor.name.keyword\"}}}},\"Closed Within SLA\":{\"terms\":{\"field\":\"Data.vendor.name.keyword\",\"size\":3,\"order\":{\"_count\":\"asc\"}},\"aggs\":{\"Count\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}},{\"script\":{\"script\":{\"source\":\"doc['Data.fsm.auditDetails.lastModifiedTime'].value - doc['Data.fsm.auditDetails.createdTime'].value < params.threshold\",\"lang\":\"painless\",\"params\":{\"threshold\":172800000}}}}]}},\"aggs\":{\"valueCount\":{\"value_count\":{\"field\":\"Data.vendor.name.keyword\"}}}}}},\"Closed Outside SLA\":{\"terms\":{\"field\":\"Data.vendor.name.keyword\",\"size\":3,\"order\":{\"_count\":\"asc\"}},\"aggs\":{\"Count\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}},{\"script\":{\"script\":{\"source\":\"doc['Data.fsm.auditDetails.lastModifiedTime'].value - doc['Data.fsm.auditDetails.createdTime'].value > params.threshold\",\"lang\":\"painless\",\"params\":{\"threshold\":172800000}}}}]}},\"aggs\":{\"valueCount\":{\"value_count\":{\"field\":\"Data.vendor.name.keyword\"}}}}}}}}}}"
}
],
"chartType": "line",
"valueType": "number",
"action": "",
"drillChart": "dsoBottomDrillChart",
"documentType": "_doc",
"aggregationPaths": [
"Raised",
"Closed Within SLA",
"Closed Outside SLA"
],
"isCumulative": false,
"interval": "month",
"insight": {
},
"_comment": ""
},
"dsoBottomDrillChart": {
"chartName": "DSS_FSM_DSO_PERFORMANCE",
"queries": [
{
"module": "FSM",
"dateRefField": "Data.fsm.@timestamp",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"indexName": "fsm",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"data.fsm.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"DSOName\":{\"terms\":{\"field\":\"Data.vendor.name.keyword\",\"size\":1000,\"order\":{\"_count\":\"asc\"}},\"aggs\":{\"TotalRequest\":{\"value_count\":{\"field\":\"Data.vendor.name.keyword\"}},\"ClosedWithinSLA\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}},{\"script\":{\"script\":{\"source\":\"doc['Data.fsm.auditDetails.lastModifiedTime'].value - doc['Data.fsm.auditDetails.createdTime'].value < params.threshold\",\"lang\":\"painless\",\"params\":{\"threshold\":172800000}}}}]}},\"aggs\":{\"valueCount\":{\"value_count\":{\"field\":\"Data.vendor.name.keyword\"}}}},\"ClosedOutsideSLA\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}},{\"script\":{\"script\":{\"source\":\"doc['Data.fsm.auditDetails.lastModifiedTime'].value - doc['Data.fsm.auditDetails.createdTime'].value > params.threshold\",\"lang\":\"painless\",\"params\":{\"threshold\":172800000}}}}]}},\"aggs\":{\"valueCount\":{\"value_count\":{\"field\":\"Data.vendor.name.keyword\"}}}},\"CitizenAverageRating\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\"]}},{\"term\":{\"Data.history.action.keyword\":\"RATE\"}},{\"exists\":{\"field\":\"Data.history\"}},{\"range\":{\"Data.history.rating\":{\"gte\":1}}}]}},\"aggs\":{\"CitizenAvgRating\":{\"avg\":{\"script\":\"int sum = 0;int count =0;if(params['_source']['Data']['history']!=null){ for (item in params['_source']['Data']['history']) {if(item.rating!=null){ sum += item.rating;} }} return sum;\"}}}}}}}}}}"
}
],
"filterKeys": [
{"key": "dsoName", "column": "DSOName"}
],
"isPostResponseHandler": true,
"chartType": "table",
"valueType": "number",
"action": "",
"documentType": "_doc",
"drillChart": "none",
"plotLabel":"DSOName",
"aggregationPaths": [
"TotalRequest",
"ClosedWithinSLA",
"ClosedOutsideSLA",
"CitizenAverageRating"
],
"pathDataTypeMapping": [
{
"TotalRequest" : "number"
},
{
"ClosedWithinSLA" : "number"
},
{
"ClosedOutsideSLA" : "number"
},
{
"CitizenAverageRating" : "number"
}
],
"isCumulative": true,
"interval": "month",
"insight": {
},
"_comment": " "
},
"fsmTotalReqByDistrict": {
"chartName": "DSS_FSM_TOTAL_REQ_BY_DISTRICT",
"queries": [
{
"module": "FSM",
"dateRefField": "Data.fsm.@timestamp",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtName\"}",
"indexName": "fsm",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.fsm.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Open_Req\":{\"filter\":{\"bool\":{\"must_not\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}}]}},\"aggs\":{\"OpenReq\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}}}},\"Closed_Req\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}}]}},\"aggs\":{\"ClosedReq\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}}}},\"TotalReq\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}},\"Closed_With_In_Sla\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}},{\"script\":{\"script\":{\"source\":\"doc['Data.fsm.auditDetails.lastModifiedTime'].value - doc['Data.fsm.auditDetails.createdTime'].value < params.threshold\",\"lang\":\"painless\",\"params\":{\"threshold\":172800000}}}}]}},\"aggs\":{\"ClosedWithInSla\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}}}},\"TotalCollection\":{\"sum\":{\"field\":\"Data.payments.paymentDetails.bill.billDetails.amountPaid\"}}}}}}"
}
],
"isMdmsEnabled": true,
"filterKeys": [
{"key": "tenantId", "column": "District"}
],
"chartType": "xtable",
"valueType": "number",
"isRoundOff": true,
"drillChart": "fsmTotalReqByTenant",
"plotLabel": "District",
"excludedColumns": ["ClosedWithInSla"],
"computedFields": [
{
"postAggregationTheory" : "",
"actionName": "PercentageComputedField",
"fields" : ["ClosedReq", "TotalReq"],
"newField" : "CompletionRateIn%",
"_comments": "fields are field names picked from its aggregation query to use post aggregation newField value with given new field name "
},
{
"postAggregationTheory" : "",
"actionName": "PercentageComputedField",
"fields" : ["ClosedWithInSla","TotalReq"],
"newField" : "SLAAchievedIn%",
"_comments": "fields are field names picked from its aggregation query to use post aggregation newField value with given new field name "
}
],
"chartSpecificProperty": {
"XtableColumnOrder":[
"S.N.",
"District",
"OpenReq",
"ClosedReq",
"TotalReq",
"CompletionRateIn%",
"SLAAchievedIn%",
"TotalCollection"
]
},
"insight": {
},
"_comment": " "
},
"fsmTotalReqByTenant": {
"chartName": "DSS_FSM_TOTAL_REQ_BY_ULB",
"queries": [
{
"module": "FSM",
"dateRefField": "Data.fsm.@timestamp",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtName\"}",
"indexName": "fsm",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.fsm.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"ULBs\":{\"terms\":{\"field\":\"Data.fsm.tenantId.keyword\",\"size\":1000},\"aggs\":{\"Open_Req\":{\"filter\":{\"bool\":{\"must_not\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}}]}},\"aggs\":{\"OpenReq\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}}}},\"Closed_Req\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}}]}},\"aggs\":{\"ClosedReq\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}}}},\"TotalReq\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}},\"Closed_With_In_Sla\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}},{\"script\":{\"script\":{\"source\":\"doc['Data.fsm.auditDetails.lastModifiedTime'].value - doc['Data.fsm.auditDetails.createdTime'].value < params.threshold\",\"lang\":\"painless\",\"params\":{\"threshold\":172800000}}}}]}},\"aggs\":{\"ClosedWithInSla\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}}}},\"TotalCollection\":{\"sum\":{\"field\":\"Data.payments.paymentDetails.bill.billDetails.amountPaid\"}}}}}}}}"
}
],
"filterKeys": [
{"key": "tenantId", "column": "ULB"}
],
"chartType": "xtable",
"valueType": "number",
"isRoundOff": true,
"drillChart": "fsmTotalReqByWard",
"plotLabel": "ULB",
"excludedColumns": ["ClosedWithInSla"],
"computedFields": [
{
"postAggregationTheory" : "",
"actionName": "PercentageComputedField",
"fields" : ["ClosedReq", "TotalReq"],
"newField" : "CompletionRateIn%",
"_comments": "fields are field names picked from its aggregation query to use post aggregation newField value with given new field name "
},
{
"postAggregationTheory" : "",
"actionName": "PercentageComputedField",
"fields" : ["ClosedWithInSla","TotalReq"],
"newField" : "SLAAchievedIn%",
"_comments": "fields are field names picked from its aggregation query to use post aggregation newField value with given new field name "
}
],
"chartSpecificProperty": {
"XtableColumnOrder":[
"S.N.",
"ULB",
"OpenReq",
"ClosedReq",
"TotalReq",
"CompletionRateIn%",
"SLAAchievedIn%",
"TotalCollection"
]
},
"insight": {
},
"_comment": " "
},
"fsmTotalReqByWard": {
"chartName": "DSS_FSM_TOTAL_REQ_BY_WARD",
"queries": [
{
"module": "FSM",
"dateRefField": "Data.fsm.@timestamp",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"indexName": "fsm",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.fsm.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Ward\":{\"terms\":{\"field\":\"Data.ward.name.keyword\",\"size\":1000},\"aggs\":{\"Open_Req\":{\"filter\":{\"bool\":{\"must_not\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}}]}},\"aggs\":{\"OpenReq\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}}}},\"Closed_Req\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}}]}},\"aggs\":{\"ClosedReq\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}}}},\"TotalReq\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}},\"Closed_With_In_Sla\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.fsm.applicationStatus.keyword\":[\"COMPLETED\",\"CITIZEN_FEEDBACK_PENDING\"]}},{\"script\":{\"script\":{\"source\":\"doc['Data.fsm.auditDetails.lastModifiedTime'].value - doc['Data.fsm.auditDetails.createdTime'].value < params.threshold\",\"lang\":\"painless\",\"params\":{\"threshold\":172800000}}}}]}},\"aggs\":{\"ClosedWithInSla\":{\"value_count\":{\"field\":\"Data.fsm.tenantId.keyword\"}}}},\"TotalCollection\":{\"sum\":{\"field\":\"Data.payments.paymentDetails.bill.billDetails.amountPaid\"}}}}}}}}"
}
],
"filterKeys": [
{"key": "wardId", "column": "Ward"},
{"key": "ulbId", "column": "ULB"}
],
"chartType": "xtable",
"valueType": "number",
"isRoundOff": true,
"drillChart": "none",
"action": "",
"documentType": "_doc",
"plotLabel": "Ward",
"excludedColumns": ["ClosedWithInSla"],
"computedFields": [
{
"postAggregationTheory" : "",
"actionName": "PercentageComputedField",
"fields" : ["ClosedReq", "TotalReq"],
"newField" : "CompletionRateIn%",
"_comments": "fields are field names picked from its aggregation query to use post aggregation newField value with given new field name "
},
{
"postAggregationTheory" : "",
"actionName": "PercentageComputedField",
"fields" : ["ClosedWithInSla","TotalReq"],
"newField" : "SLAAchievedIn%",
"_comments": "fields are field names picked from its aggregation query to use post aggregation newField value with given new field name "
}
],
"chartSpecificProperty": {
"XtableColumnOrder":[
"S.N.",
"Ward",
"OpenReq",
"ClosedReq",
"TotalReq",
"CompletionRateIn%",
"SLAAchievedIn%",
"TotalCollection"
]
},
"insight": {
},
"_comment": " "
},
"fsmVehicleLogReportByDDR": {
"chartName": "DSS_FSM_VECHILE_LOG_REPORT",
"queries": [
{
"module": "FSM",
"dateRefField": "Data.vehicleTrip.@timestamp",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtName\"}",
"indexName": "vehicletrip",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"data.vehicleTrip.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"NoOfTrips\":{\"value_count\":{\"field\":\"Data.vehicleTrip.@timestamp\"}},\"TotalSeptageCollected\":{\"sum\":{\"script\":{\"source\":\"(doc['Data.vehicleTrip.tripDetails.volume'].value)/1000.0\"}}},\"TotalSeptageDumped\":{\"sum\":{\"script\":{\"source\":\"(doc['Data.vehicleTrip.volumeCarried'].value)/1000.0\"}}},\"CapacityUtilization\":{\"sum\":{\"script\":{\"source\":\"(doc['Data.vehicleTrip.volumeCarried'].value)/1000.0\"}}}}}}}"
}
],
"isMdmsEnabled": true,
"filterKeys": [
{"key": "tenantId", "column": "District"}
],
"isPostResponseHandler": true,
"chartType": "xtable",
"valueType": "number",
"action": "",
"isRoundOff": true,
"documentType": "_doc",
"drillChart": "fsmVehicleLogReportByTenant",
"plotLabel":"District",
"aggregationPaths": [
"NoOfTrips",
"TotalSeptageCollected",
"TotalSeptageDumped",
"CapacityUtilization"
],
"pathDataTypeMapping": [
{
"NoOfTrips" : "number"
},
{
"TotalSeptageCollected" : "number"
},
{
"TotalSeptageDumped" : "number"
},
{
"CapacityUtilization" : "number"
}
],
"isCumulative": true,
"interval": "month",
"insight": {
},
"_comment": " "
},
"fsmVehicleLogReportByTenant": {
"chartName": "DSS_FSM_VECHILE_LOG_REPORT",
"queries": [
{
"module": "FSM",
"dateRefField": "Data.vehicleTrip.@timestamp",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtName\"}",
"indexName": "vehicletrip",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"data.vehicleTrip.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"ULBs \":{\"terms\":{\"field\":\"Data.vehicleTrip.tenantId.keyword\",\"size\":1000},\"aggs\":{\"NoOfTrips\":{\"value_count\":{\"field\":\"Data.vehicleTrip.@timestamp\"}},\"TotalSeptageCollected\":{\"sum\":{\"script\":{\"source\":\"(doc['Data.vehicleTrip.tripDetails.volume'].value)/1000.0\"}}},\"TotalSeptageDumped\":{\"sum\":{\"script\":{\"source\":\"(doc['Data.vehicleTrip.volumeCarried'].value)/1000.0\"}}},\"CapacityUtilization\":{\"sum\":{\"script\":{\"source\":\"(doc['Data.vehicleTrip.volumeCarried'].value)/1000.0\"}}}}}}}}}"
}
],
"filterKeys": [
{"key": "tenantId", "column": "Boundary"}
],
"isPostResponseHandler": true,
"chartType": "xtable",
"valueType": "number",
"action": "",
"isRoundOff": true,
"documentType": "_doc",
"drillChart": "fsmVehicleLogReportByVehicleNo",
"plotLabel":"Boundary",
"aggregationPaths": [
"NoOfTrips",
"TotalSeptageCollected",
"TotalSeptageDumped",
"CapacityUtilization"
],
"pathDataTypeMapping": [
{
"NoOfTrips" : "number"
},
{
"TotalSeptageCollected" : "number"
},
{
"TotalSeptageDumped" : "number"
},
{
"CapacityUtilization" : "number"
}
],
"isCumulative": true,
"interval": "month",
"insight": {
},
"_comment": " "
},
"fsmVehicleLogReportByVehicleNo": {
"chartName": "DSS_FSM_VECHILE_LOG_REPORT",
"queries": [
{
"module": "FSM",
"dateRefField": "Data.vehicleTrip.@timestamp",
"requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" , \"district\" : \"Data.tenantData.city.districtCode\"}",
"indexName": "vehicletrip",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"data.vehicleTrip.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Vehicle Reg No\":{\"terms\":{\"field\":\"Data.vehicleTrip.vehicle.registrationNumber.keyword\",\"size\":1000},\"aggs\":{\"NoOfTrips\":{\"value_count\":{\"field\":\"Data.vehicleTrip.@timestamp\"}},\"TotalSeptageCollected\":{\"sum\":{\"script\":{\"source\":\"(doc['Data.vehicleTrip.tripDetails.volume'].value)/1000.0\"}}},\"TotalSeptageDumped\":{\"sum\":{\"script\":{\"source\":\"(doc['Data.vehicleTrip.volumeCarried'].value)/1000.0\"}}},\"CapacityUtilization\":{\"sum\":{\"script\":{\"source\":\"(doc['Data.vehicleTrip.volumeCarried'].value)/1000.0\"}}},\"TankCapacity\":{\"sum\":{\"script\":{\"source\":\"(doc['Data.vehicleTrip.vehicle.tankCapacity'].value)/1000.0\"}}}}}}}}}"
}
],
"filterKeys": [
{"key": "registrationNumber", "column": "Vehicle_No"},
{"key": "wardId", "column": "Ward"},
{"key": "ulbId", "column": "ULB"}
],
"isPostResponseHandler": true,
"chartType": "xtable",
"valueType": "number",
"action": "",
"isRoundOff": true,
"documentType": "_doc",
"drillChart": "none",
"plotLabel":"Vehicle_No",
"aggregationPaths": [
"NoOfTrips",
"TotalSeptageCollected",
"TotalSeptageDumped",
"CapacityUtilization",
"TankCapacity"
],
"pathDataTypeMapping": [
{
"NoOfTrips" : "number"
},
{
"TotalSeptageCollected" : "number"
},
{
"TotalSeptageDumped" : "number"
},
{
"CapacityUtilization" : "number"
},
{
"TankCapacity" : "number"
}
],
"isCumulative": true,
"interval": "month",
"insight": {
},
"_comment": " "
} |
Click here to check the complete configuration
Master Dashboard Configuration:
Master Dashboard Configuration is the main configuration which defines as which are the Dashboards which are to be painted on screen.
It includes all the Visualizations, their groups, the charts which comes within them and even their dimensions as what should be their height and width.
Code Block |
---|
{
"name": "DSS_FSM_DASHBOARD",
"id": "fsm",
"isActive": "",
"style": "linear",
"visualizations": [
{
"row": 1,
"name": "DSS_REVENUE",
"vizArray": [
{
"id": 311,
"name": "DSS_OVERVIEW",
"dimensions": {
"height": 450,
"width": 4
},
"vizType": "metric-collection",
"label": "DSS_OVERVIEW",
"noUnit": true,
"isCollapsible": false,
"charts": [
{
"id": "fsmTotalrequest",
"name": "DSS_FSM_TOTAL_REQUESTS",
"code": "",
"chartType": "metric",
"filter": "",
"headers": []
},
{
"id": "totalSludgeTreated",
"name": "DSS_FSM_TOTAL_SLUDGE_TREATED",
"code": "",
"chartType": "metric",
"filter": "",
"headers": []
},
{
"id": "avgFSMCostRequest",
"name": "DSS_FSM_AVG_FSM_COST_OR_REQ",
"code": "",
"chartType": "metric",
"filter": "",
"headers": []
},
{
"id": "totalCollectioninLacs",
"name": "DSS_FSM_TOTAL_COLLECTION",
"code": "",
"chartType": "metric",
"filter": "",
"headers": []
},
{
"id": "slaCompliance",
"name": "DSS_FSM_SLA_COMPLIANCE",
"code": "",
"chartType": "metric",
"filter": "",
"headers": []
},
{
"id": "citizenAvgRating",
"name": "DSS_FSM_CITIZEN_AVG_RATING",
"code": "",
"chartType": "metric",
"filter": "",
"headers": []
}
]
},
{
"id": 322,
"name": "DSS_FSM_TOTAL_CUMULATIVE_COLLECTION",
"dimensions": {
"height": 450,
"width": 6
},
"vizType": "chart",
"label": "",
"noUnit": true,
"isCollapsible": false,
"charts": [
{
"id": "fsmTotalCumulativeCollection",
"name": "Monthly",
"code": "",
"chartType": "line",
"filter": "",
"headers": []
}
]
}
]
},
{
"row": 2,
"name": "DSS_REVENUE",
"vizArray": [
{
"id": 321,
"name": "DSS_FSM_TOP_ULB_BY_PERFORMANCE",
"dimensions": {
"height": 250,
"width": 3
},
"vizType": "performing-metric",
"label": "",
"noUnit": false,
"isCollapsible": false,
"charts": [
{
"id": "fsmTopUlbByPerformance",
"name": "Monthly",
"code": "",
"chartType": "bar",
"filter": "",
"headers": []
}
]
},
{
"id": 322,
"name": "DSS_FSM_BOTTOM_ULB_BY_PERFORMANCE",
"dimensions": {
"height": 250,
"width": 3
},
"vizType": "performing-metric",
"label": "",
"noUnit": false,
"isCollapsible": false,
"charts": [
{
"id": "fsmBottomUlbByPerformance",
"name": "Monthly",
"code": "",
"chartType": "bar",
"filter": "",
"headers": []
}
]
},
{
"id": 323,
"name": "DSS_FSM_COLLECTION_BY_USAGE_TYPE",
"dimensions": {
"height": 250,
"width": 4
},
"vizType": "chart",
"label": "",
"noUnit": false,
"isCollapsible": false,
"charts": [
{
"id": "fsmCollectionByUsageType",
"name": "DSS_FSM_COLLECTION_BY_USAGE_TYPE",
"code": "",
"chartType": "donut",
"filter": "",
"headers": []
}
]
}
]
},
{
"row": 3,
"name": "DSS_REVENUE",
"vizArray": [
{
"id": 325,
"name": "DSS_FSTP_CAPACITY_UTILIZATION",
"dimensions": {
"height": 450,
"width": 5
},
"vizType": "chart",
"label": "",
"noUnit": true,
"isCollapsible": false,
"charts": [
{
"id": "fsmCapacityUtilization",
"name": "Monthly",
"code": "",
"chartType": "line",
"filter": "",
"headers": []
}
]
},
{
"id": 326,
"name": "DSS_FSM_MONTHLY_WASTE_CAL",
"dimensions": {
"height": 450,
"width": 5
},
"vizType": "chart",
"label": "",
"noUnit": true,
"isCollapsible": false,
"charts": [
{
"id": "fsmMonthlyWasteCal",
"name": "Monthly",
"code": "",
"chartType": "bar",
"filter": "",
"headers": []
}
]
}
]
},
{
"row": 4,
"name": "DSS_REVENUE",
"vizArray": [
{
"id": 327,
"name": "DSS_FSM_TOP_DSO_BY_PERFORMANCE",
"dimensions": {
"height": 450,
"width": 5
},
"vizType": "chart",
"label": "",
"noUnit": true,
"isCollapsible": false,
"charts": [
{
"id": "fsmTopDsoByPerformance",
"name": "Monthly",
"code": "",
"chartType": "horizontalBar",
"filter": "",
"headers": []
}
]
},
{
"id": 329,
"name": "DSS_FSM_BOTTOM_DSO_BY_PERFORMANCE",
"dimensions": {
"height": 450,
"width": 5
},
"vizType": "chart",
"label": "",
"noUnit": true,
"isCollapsible": false,
"charts": [
{
"id": "fsmBottomDsoByPerformance",
"name": "Monthly",
"code": "",
"chartType": "horizontalBar",
"filter": "",
"headers": []
}
]
}
]
},
{
"row": 5,
"name": "DSS_REVENUE",
"vizArray": [
{
"id": 339,
"name": "DSS_FSM_TOTAL_REQ_BY_DISTRICT",
"dimensions": {
"height": 350,
"width": 10
},
"vizType": "chart",
"label": "",
"noUnit": false,
"isCollapsible": true,
"charts": [
{
"id": "fsmTotalReqByDistrict",
"name": "DSS_FSM_TOTAL_REQ_BY_DISTRICT",
"code": "",
"chartType": "table",
"filter": "",
"headers": [],
"tabName": "Boundary"
}
]
}
]
},
{
"row": 6,
"name": "DSS_REVENUE",
"vizArray": [
{
"id": 331,
"name": "DSS_FSM_VECHILE_LOG_REPORT",
"dimensions": {
"height": 350,
"width": 10
},
"vizType": "chart",
"label": "",
"noUnit": false,
"isCollapsible": true,
"charts": [
{
"id": "fsmVehicleLogReportByDDR",
"name": "DSS_FSM_VECHILE_LOG_REPORT",
"code": "",
"chartType": "table",
"filter": "",
"headers": [],
"tabName": "Boundary"
}
]
}
]
}
]
}, |
Click here for the complete configuration
Role Dashboard Mappings Configuration:
Master Dashboard Configuration which was explained earlier hold the list of Dashboards which are available.
Given the instance where Role Action Mapping is not maintained in the Application Service, this configuration will act as Role - Dashboard Mapping Configuration
In this, each Role is mapped against the Dashboard which they are authorized to see
This was used earlier when the Role Action Mapping of eGov was not integrated.
Later, when the Role Action Mapping started controlling the Dashboards to be seen on the client side, this configuration was just used to enable the Dashboards for viewing.
Code Block |
---|
{
"_comment": "Holds mapping for each role with and its associated dashboards",
"roles" : [
{
"_comment":"This role is super role which can access all the available dashboards: [other/new roles are suppose to be added]",
"roleId": 6,
"roleName" : "Admin",
"isSuper" : "",
"orgId": "",
"dashboards": [
{
"name": "Facial Sludge Management",
"id": "fsm"
}
]
},
{
"_comment":"This role is super role which can access all the available dashboards: [other/new roles are suppose to be added]",
"roleId": 7,
"roleName" : "Commissioner",
"isSuper" : "",
"orgId": "",
"dashboards": [
{
"id": "ulb-fsm"
}
]
}
]
} |
Click here to check the configuration
MDMS Configuration to be added:
common-masters/uiCommonConstants.json
Code Block |
---|
"fsm":{
"routePath":"/dashboard/fsm",
"isOrigin":true
},
"ulb-fsm":{
"routePath":"/dashboard/ulb-fsm",
"isOrigin":true
} |
roleaction.json
Code Block |
---|
{
"rolecode": "STADMIN",
"actionid": 2129,
"actioncode": "",
"tenantId": "pb"
} |
Action test.json:
Code Block |
---|
{
"id": 2129,
"name": "DSS Dashboard Config Facial Sludge Management",
"url": "/dashboard-analytics/dashboard/getDashboardConfig/fsm",
"parentModule": "",
"displayName": "DSS",
"orderNumber": 0,
"enabled": false,
"serviceCode": "DSS",
"code": "null",
"path": ""
}, |
FSM-DSS Consists of multiple graphs which represent the data of FSM. Each graph has its own configuration which will describe the chart and its type.
...