Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added all the configs from works repository #2678

Open
wants to merge 1 commit into
base: DEV
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
* @egovernments/services-pr-reviewer @sirishrao-egov @kapil-eGov @AmanKumar-eGov

## Works
works/ @egovernments/works-dev-pr-reviewers
299 changes: 299 additions & 0 deletions works/egov-dss-dashboard/dashboard-analytics/ChartApiConfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,299 @@
{
"unemployedWageSeekers": {
"chartName": "DSS_MUKTA_UNEMPLOYED_WAGE_SEEKERS",
"queries": [
{
"module": "COMMON",
"dateRefField": "Data.auditDetails.createdTime",
"requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}",
"indexName": "individual-index-v1",
"aggrQuery": "{\n \"aggs\": {\n \"Total Individuals\": {\n \"filter\": {\n \"bool\": {\n \"must_not\": [\n {\n \"term\": {\n \"Data.tenantId\": \"\"\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"Individuals Count\": {\n \"cardinality\": {\n \"field\": \"Data.id.keyword\"\n }\n }\n }\n }\n }\n}"
},
{
"module": "COMMON",
"dateRefField": "Data.auditDetails.createdTime",
"requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}",
"indexName": "muster-roll-inbox",
"aggrQuery": "{\n \"aggs\": {\n \"AGGR\": {\n \"filters\": {\n \"filters\": {\n \"Total Projects\": {\n \"bool\": {\n \"must_not\": [\n {\n \"term\": {\n \"Data.tenantId\": \"\"\n }\n }\n ]\n }\n }\n }\n },\n \"aggs\": {\n \"Count\": {\n \"cardinality\": {\n \"field\": \"Data.individualEntries.attendanceEntries.id.keyword\"\n }\n },\n \"Overall Muster Count\": {\n \"bucket_script\": {\n \"buckets_path\": {\n \"ot\": \"Count\"\n },\n \"script\": \"params.ot * (-1)\"\n }\n }\n }\n }\n }\n}"
}
],
"chartType": "metric",
"valueType": "number",
"drillChart": "none",
"documentType": "_doc",
"action": "",
"aggregationPaths": [
"Individuals Count","Overall Muster Count"
],
"insight": {
},
"_comment": "Unemployed Wage seekers"
},
"musterRollsByStatus": {
"chartName": "DSS_MUKTA_MUSTER_ROLLS_BY_STATUS",
"queries": [
{
"module": "MUSTER-ROLL-SERVICES",
"dateRefField": "Data.auditDetails.createdTime",
"requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}",
"indexName": "muster-roll-inbox",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}},{\"terms\":{\"Data.musterRollStatus.keyword\":[\"REJECTED\"]}}]}},\"aggs\":{\"Muster Rolls\":{\"terms\":{\"script\":{\"source\":\"if(['APPROVED','SUBMITTED'].contains(doc['Data.musterRollStatus.keyword'].value)){return doc['Data.musterRollStatus.keyword'].value}else{return 'YET_TO_APPROVE'}\"}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.auditDetails.createdTime\"}}}}}}}}"
}
],
"chartType": "pie",
"valueType": "number",
"action": "",
"documentType": "_doc",
"drillChart": "none",
"aggregationPaths": [
"Muster Rolls"
],
"insight": {
},
"_comment": "Muster Rolls by status"
},
"pendingBillsByBillNumberType": {
"chartName": "DSS_MUKTA_PENDING_BILLS_BY_BILL_NUMBER_TYPE",
"queries": [
{
"module": "EXPENSE",
"requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}",
"dateRefField": "Data.auditDetails.createdTime",
"indexName": "expense-bill-index",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}},{\"terms\":{\"Data.currentProcessInstance.state.state.keyword\":[\"APPROVED\",\"REJECTED\"]}}]}},\"aggs\":{\"Pending Bills By Bill Type\":{\"terms\":{\"field\":\"Data.businessService.keyword\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.auditDetails.createdTime\"}}}}}}}}"
}
],
"chartType": "pie",
"valueType": "number",
"action": "",
"documentType": "_doc",
"drillChart": "none",
"aggregationPaths": [
"Pending Bills By Bill Type"
],
"insight": {
},
"_comment": "Pending Bills By Their Number"
},
"pendingBillsByBillAmountType": {
"chartName": "DSS_MUKTA_PENDING_BILLS_BY_BILL_AMOUNT_TYPE",
"queries": [
{
"module": "EXPENSE",
"requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}",
"dateRefField": "Data.auditDetails.createdTime",
"indexName": "expense-bill-index",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"terms\":{\"Data.currentProcessInstance.state.state.keyword\":[\"APPROVED\",\"REJECTED\"]}},{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Pending Bills By Bill Type\":{\"terms\":{\"field\":\"Data.businessService.keyword\"},\"aggs\":{\"Sum\":{\"sum\":{\"field\":\"Data.totalAmount\"}}}}}}}}"
}
],
"chartType": "pie",
"valueType": "amount",
"action": "",
"documentType": "_doc",
"drillChart": "none",
"aggregationPaths": [
"Pending Bills By Bill Type"
],
"insight": {
},
"_comment": "Pending Bills By Their Amount"
},
"projectsByProjectNumberType": {
"chartName": "DSS_MUKTA_PROJECTS_BY_PROJECT_TYPE",
"queries": [
{
"module": "PROJECT",
"requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}",
"dateRefField": "Data.auditDetails.createdTime",
"indexName": "project-index",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Projects By Project Type\":{\"terms\":{\"field\":\"Data.projectType.keyword\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.auditDetails.createdTime\"}}}}}}}}"
}
],
"chartType": "pie",
"valueType": "number",
"action": "",
"documentType": "_doc",
"drillChart": "none",
"aggregationPaths": [
"Projects By Project Type"
],
"insight": {
},
"_comment": "Count of Projects by their Project Type"
},
"projectsByProjectAmountType": {
"chartName": "DSS_MUKTA_PROJECTS_BY_PROJECT_TYPE",
"queries": [
{
"module": "PROJECT",
"requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}",
"dateRefField": "Data.auditDetails.createdTime",
"indexName": "project-index",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}},{\"term\":{\"Data.additionalDetails.estimatedCostInRs.keyword\":\"\"}}]}},\"aggs\":{\"Projects By Project Type\":{\"terms\":{\"field\":\"Data.projectType.keyword\"},\"aggs\":{\"Sum\":{\"sum\":{\"script\":{\"source\":\"def estCost=doc['Data.additionalDetails.estimatedCostInRs.keyword'].value;estCost!=null&&estCost!=''?Double.parseDouble(estCost):0.0\"},\"field\":\"Data.auditDetails.createdTime\"}}}}}}}}"
}
],
"chartType": "pie",
"valueType": "amount",
"action": "",
"documentType": "_doc",
"drillChart": "none",
"aggregationPaths": [
"Projects By Project Type"
],
"insight": {
},
"_comment": "Estimated amount of Projects by their Project Type"
},
"projectsByStatusHorizontal":{
"chartName": "DSS_MUKTA_PROJECTS_BY_STATUS_HORIZONTAL",
"queries": [
{
"module": "PROJECT",
"requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}",
"dateRefField": "Data.auditDetails.createdTime",
"indexName": "project-index",
"aggrQuery":"{\"size\":10000,\"aggs\":{\"totalProject\":{\"cardinality\":{\"field\":\"Data.projectNumber.keyword\"}}}}"
}
],
"chartType": "pie",
"valueType": "number",
"action": "",
"documentType": "_doc",
"drillChart": "none",
"aggregationPaths": [
"totalProject"
],
"insight": {
},
"_comment": "Count of Created Projects"
},
"estimatesByStatusHorizontal":{
"chartName": "DSS_MUKTA_ESTIMATES_BY_STATUS_HORIZONTAL",
"queries": [
{
"module": "ESTIMATE",
"requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}",
"dateRefField": "Data.auditDetails.createdTime",
"indexName": "estimate-inbox-v3",
"aggrQuery":"{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"ESTIMATES\":{\"terms\":{\"script\":{\"source\":\"if(['PENDINGFORVERIFICATION','REJECTED','PENDINGFORTECHNICALSANCTION','PENDINGFORAPPROVAL','PENDINGFORCORRECTION'].contains(doc['Data.wfStatus.keyword'].value)){return'YET_TO_APPROVE'}else{return'APPROVED'}\"}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.auditDetails.createdTime\"}}}},\"CREATED\":{\"value_count\":{\"field\":\"Data.auditDetails.createdTime\"}}}}}}"
}
],
"chartType": "pie",
"valueType": "number",
"action": "",
"documentType": "_doc",
"drillChart": "none",
"aggregationPaths": [
"ESTIMATES",
"CREATED"
],
"insight": {
},
"_comment": "Estimates by Statuses"
},
"contractsByStatusHorizontal":{
"chartName": "DSS_MUKTA_CONTRACTS_BY_STATUS_HORIZONTAL",
"queries": [
{
"module": "CONTRACT",
"requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}",
"dateRefField": "Data.auditDetails.createdTime",
"indexName": "contract-inbox",
"aggrQuery":"{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"CONTRACTS\":{\"terms\":{\"script\":{\"source\":\"if(['PENDING_FOR_VERIFICATION','PENDING_FOR_APPROVAL','PENDING_FOR_CORRECTION','PENDING_FOR_REASSIGNMENT','PENDING_FOR_REVERIFICATION'].contains(doc['Data.contractStatus.keyword'].value)){return'YET_TO_APPROVE'}else if(['PENDING_FOR_ACCEPTANCE'].contains(doc['Data.contractStatus.keyword'].value)){return'YET_TO_ACCEPT'}else{return'INPROGRESS'}\"}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.auditDetails.createdTime\"}}}},\"CREATED\":{\"value_count\":{\"field\":\"Data.auditDetails.createdTime\"}}}}}}"

}
],
"chartType": "pie",
"valueType": "number",
"action": "",
"documentType": "_doc",
"drillChart": "none",
"aggregationPaths": [
"CONTRACTS",
"CREATED"
],
"insight": {
},
"_comment": "Contracts by Statuses"
},
"workOrdersNotIssued": {
"chartName" : "DSS_MUKTA_WORK_ORDERS_NOT_ISSUED",
"queries": [
{
"module": "CONTRACT",
"requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}",
"dateRefField": "Data.auditDetails.createdTime",
"indexName": "contract-inbox",
"aggrQuery":"{\n \"aggs\": {\n \"Distinct_Work_Orders\": {\n \"terms\": {\n \"field\": \"Data.tenantId.keyword\",\n \"size\": 10000\n },\n \"aggs\": {\n \"Work_Order\": {\n \"cardinality\": {\n \"field\": \"Data.additionalDetails.projectId.keyword\"\n }\n },\n \"Work_Order_Count\": {\n \"bucket_script\": {\n \"buckets_path\": {\n \"path\": \"Work_Order\"\n },\n \"script\": \"params.path * (-1)\"\n }\n }\n }\n },\n \"Negative Work Order Count\": {\n \"sum_bucket\": {\n \"buckets_path\": \"Distinct_Work_Orders>Work_Order_Count\"\n }\n }\n }\n}"
},
{
"module": "PROJECTS",
"requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}",
"dateRefField": "Data.auditDetails.createdTime",
"indexName": "project-index",
"aggrQuery": "{\n \"aggs\": {\n \"Total Projects\": {\n \"filter\": {\n \"bool\": {\n \"must_not\": {\n \"term\": {\n \"Data.projectNumber.keyword\": \"\"\n }\n }\n }\n },\n \"aggs\": {\n \"Projects\": {\n \"cardinality\": {\n \"field\": \"Data.projectNumber.keyword\"\n }\n }\n }\n }\n }\n}"
}
],
"chartType": "metric",
"valueType": "number",
"drillChart": "none",
"documentType": "_doc",
"action": "",
"aggregationPaths": [
"Projects","Negative Work Order Count"
],
"insight": {
},
"_comment": "Work orders not issued"
},
"totalPayments": {
"chartName": "DSS_MUKTA_TOTAL_PAYMENTS",
"queries": [
{
"module": "EXPENSE",
"dateRefField": "Data.auditDetails.createdTime",
"requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}",
"indexName": "expense-bill-index",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"dayHist\":{\"date_histogram\":{\"field\":\"Data.auditDetails.createdTime\",\"interval\":\"month\"},\"aggs\":{\"TotalAmount\":{\"sum\":{\"field\":\"Data.totalAmount\"}}}}}}}}"
}
],
"chartType": "line",
"valueType": "number",
"action": "",
"drillChart": "none",
"documentType": "_doc",
"aggregationPaths": [
"TotalAmount"
],
"isCumulative": false,
"interval": "month",
"insight": {
},
"_comment": "Total Bill Payment Amount"
},
"totalAttendance": {
"chartName": "DSS_MUKTA_TOTAL_LABOUR_ATTENDANCE",
"queries": [
{
"module": "MUSTER-ROLL-SERVICES",
"dateRefField": "Data.auditDetails.createdTime",
"requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}",
"indexName": "muster-roll-inbox",
"aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}},{\"terms\":{\"Data.musterRollStatus.keyword\":[\"REJECTED\"]}}]}},\"aggs\":{\"dayHist\":{\"date_histogram\":{\"field\":\"Data.auditDetails.createdTime\",\"interval\":\"month\"},\"aggs\":{\"TotalAttendanceSum\":{\"sum\":{\"field\":\"Data.individualEntries.totalAttendance\"}}}}}}}}"
}
],
"chartType": "line",
"valueType": "number",
"action": "",
"drillChart": "none",
"documentType": "_doc",
"aggregationPaths": [
"TotalAttendanceSum"
],
"isCumulative": false,
"interval": "month",
"insight": {
},
"_comment": "Total Labour Attendance"
}
}
Loading