From 188af846c9d5a8afa574562545808f2f418865e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Feb 2021 02:09:40 +0000 Subject: [PATCH 01/15] build(deps): bump cryptography in /results-tabulation-api Bumps [cryptography](https://github.com/pyca/cryptography) from 3.2 to 3.3.2. - [Release notes](https://github.com/pyca/cryptography/releases) - [Changelog](https://github.com/pyca/cryptography/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/3.2...3.3.2) Signed-off-by: dependabot[bot] --- results-tabulation-api/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/results-tabulation-api/requirements.txt b/results-tabulation-api/requirements.txt index 363b72fd..68bfcc02 100644 --- a/results-tabulation-api/requirements.txt +++ b/results-tabulation-api/requirements.txt @@ -7,7 +7,7 @@ chardet==3.0.4 Click==7.0 clickclick==1.2.2 connexion==2.2.0 -cryptography==3.2 +cryptography==3.3.2 decorator==4.4.0 docopt==0.6.2 ecdsa==0.15 From e36aeb3d4d1084d7c720782f6d90e02d9e27f375 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Feb 2021 02:12:55 +0000 Subject: [PATCH 02/15] build(deps): bump cryptography in /results-tabulation-dashboard Bumps [cryptography](https://github.com/pyca/cryptography) from 3.2 to 3.3.2. - [Release notes](https://github.com/pyca/cryptography/releases) - [Changelog](https://github.com/pyca/cryptography/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/3.2...3.3.2) Signed-off-by: dependabot[bot] --- results-tabulation-dashboard/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/results-tabulation-dashboard/requirements.txt b/results-tabulation-dashboard/requirements.txt index c930e11b..faa1072d 100644 --- a/results-tabulation-dashboard/requirements.txt +++ b/results-tabulation-dashboard/requirements.txt @@ -8,7 +8,7 @@ chardet==3.0.4 Click==7.0 clickclick==1.2.2 connexion==2.2.0 -cryptography==3.2 +cryptography==3.3.2 decorator==4.4.0 docopt==0.6.2 ecdsa==0.15 From fd071658373544b308820f0c4f49aa417d90568b Mon Sep 17 00:00:00 2001 From: umayanga Date: Wed, 17 Feb 2021 13:36:06 +0530 Subject: [PATCH 03/15] copy from parliment election --- .../create-dashboard-tables-and-views.sql | 180 + .../drop-dashboard-tables-and-views.sql | 7 + ...ent-election-2020-all-island-counting.json | 4505 +++++++++++++++++ ...ment-election-2020-all-island-results.json | 1661 ++++++ ...tion-2020-electoral-district-counting.json | 4209 +++++++++++++++ ...ction-2020-electoral-district-results.json | 1725 +++++++ .../update-counting-dashboard-tables.sql | 278 + 7 files changed, 12565 insertions(+) create mode 100644 results-tabulation-dashboard/provincial-council-election-2021/create-dashboard-tables-and-views.sql create mode 100644 results-tabulation-dashboard/provincial-council-election-2021/drop-dashboard-tables-and-views.sql create mode 100644 results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-all-island-counting.json create mode 100644 results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-all-island-results.json create mode 100644 results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-electoral-district-counting.json create mode 100644 results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-electoral-district-results.json create mode 100644 results-tabulation-dashboard/provincial-council-election-2021/update-counting-dashboard-tables.sql diff --git a/results-tabulation-dashboard/provincial-council-election-2021/create-dashboard-tables-and-views.sql b/results-tabulation-dashboard/provincial-council-election-2021/create-dashboard-tables-and-views.sql new file mode 100644 index 00000000..e124c3da --- /dev/null +++ b/results-tabulation-dashboard/provincial-council-election-2021/create-dashboard-tables-and-views.sql @@ -0,0 +1,180 @@ +CREATE TABLE IF NOT EXISTS ext_pe2020_dashboard_increment ( + id INT AUTO_INCREMENT NOT NULL, + active INT, + PRIMARY KEY(id) +) ENGINE=INNODB; + +CREATE TABLE IF NOT EXISTS ext_pe2020_dashboard_tally_sheet_status ( + id INT AUTO_INCREMENT, + incrementId INT NOT NULL, + electionId INT NOT NULL, + electoralDistrictId INT, + pollingDivisionId INT, + countingCentreId INT, + templateName VARCHAR(50) NOT NULL, + voteType VARCHAR(50) NOT NULL, + partyId INT, + verifiedTallySheetCount INT NOT NULL, + releasedTallySheetCount INT NOT NULL, + emptyTallySheetCount INT NOT NULL, + savedTallySheetCount INT NOT NULL, + totalTallySheetCount INT NOT NULL, + PRIMARY KEY(id) +) ENGINE=INNODB; + +CREATE TABLE IF NOT EXISTS ext_pe2020_dashboard_party_wise_vote_results ( + id INT AUTO_INCREMENT, + incrementId INT NOT NULL, + electionId INT NOT NULL, + electoralDistrictId INT, + pollingDivisionId INT, + countingCentreId INT, + voteType VARCHAR(50) NOT NULL, + partyId INT, + voteCount INT, + PRIMARY KEY(id) +) ENGINE=INNODB; + +CREATE TABLE IF NOT EXISTS ext_pe2020_dashboard_vote_results ( + id INT AUTO_INCREMENT, + incrementId INT NOT NULL, + electionId INT NOT NULL, + electoralDistrictId INT, + pollingDivisionId INT, + countingCentreId INT, + voteType VARCHAR(50) NOT NULL, + validVoteCount INT, + rejectedVoteCount INT, + voteCount INT, + PRIMARY KEY(id) +) ENGINE=INNODB; + +CREATE TABLE IF NOT EXISTS ext_pe2020_dashboard_party_wise_seat_allocation ( + id INT AUTO_INCREMENT, + incrementId INT NOT NULL, + electionId INT NOT NULL, + electoralDistrictId INT, + partyId INT, + seatCount INT, + PRIMARY KEY(id) +) ENGINE=INNODB; + +CREATE TABLE IF NOT EXISTS ext_pe2020_dashboard_party_wise_national_list_seat_allocation ( + id INT AUTO_INCREMENT, + incrementId INT NOT NULL, + electionId INT NOT NULL, + partyId INT, + nationalListSeatCount INT, + PRIMARY KEY(id) +) ENGINE=INNODB; + +CREATE TABLE IF NOT EXISTS ext_pe2020_dashboard_area_map ( + id INT AUTO_INCREMENT, + electionId INT, + countryId INT, + electoralDistrictId INT, + pollingDivisionId INT, + countingCentreId INT, + registeredVotersCount INT, + registeredPostalVotersCount INT, + registeredDisplacedVotersCount INT, + voteType VARCHAR(50) NOT NULL, + PRIMARY KEY(id) +) ENGINE=INNODB; + +DELETE FROM ext_pe2020_dashboard_area_map; + +INSERT INTO ext_pe2020_dashboard_area_map (electionId, countryId, electoralDistrictId, pollingDivisionId, + countingCentreId, voteType, registeredVotersCount, registeredPostalVotersCount, registeredDisplacedVotersCount) + SELECT + country.electionId, + country.areaId as countryId, + electoralDistrict.areaId as electoralDistrictId, + pollingDivision.areaId as pollingDivisionId, + countingCentre.areaId as countingCentreId, + "NonPostal" as voteType, + COALESCE(SUM(pollingStation._registeredVotersCount)) AS registeredVotersCount, + COALESCE(SUM(pollingStation._registeredPostalVotersCount)) AS registeredPostalVotersCount, + COALESCE(SUM(pollingStation._registeredDisplacedVotersCount)) AS registeredDisplacedVotersCount + FROM + area country, area electoralDistrict, area pollingDivision, area pollingDistrict, area pollingStation, + area electionCommission, area districtCentre, area countingCentre, + + area_area country_electoralDistrict, + area_area electoralDistrict_pollingDivision, + area_area pollingDivision_pollingDistrict, + area_area pollingDistrict_pollingStation, + + area_area electionCommission_districtCentre, + area_area districtCentre_countingCentre, + area_area countingCentre_pollingStation + WHERE + country_electoralDistrict.parentAreaId = country.areaId + and country_electoralDistrict.childAreaId = electoralDistrict.areaId + + and electoralDistrict_pollingDivision.parentAreaId = electoralDistrict.areaId + and electoralDistrict_pollingDivision.childAreaId = pollingDivision.areaId + + and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId + and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId + + and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId + and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId + + and electionCommission_districtCentre.parentAreaId = electionCommission.areaId + and electionCommission_districtCentre.childAreaId = districtCentre.areaId + + and districtCentre_countingCentre.parentAreaId = districtCentre.areaId + and districtCentre_countingCentre.childAreaId = countingCentre.areaId + + and countingCentre_pollingStation.parentAreaId = countingCentre.areaId + and countingCentre_pollingStation.childAreaId = pollingStation.areaId + + and country.areaType = "Country" and electoralDistrict.areaType = "ElectoralDistrict" + and pollingDivision.areaType = "PollingDivision" and pollingDistrict.areaType = "PollingDistrict" + and pollingStation.areaType = "PollingStation" and countingCentre.areaType = "CountingCentre" + and districtCentre.areaType = "DistrictCentre" and electionCommission.areaType = "ElectionCommission" + GROUP BY + country.areaId, + electoralDistrict.areaId, + pollingDivision.areaId, + countingCentre.areaId; + +INSERT INTO ext_pe2020_dashboard_area_map (electionId, countryId, electoralDistrictId, pollingDivisionId, + countingCentreId, voteType) + SELECT + country.electionId, + country.areaId as countryId, + electoralDistrict.areaId as electoralDistrictId, + electoralDistrict.areaId as pollingDivisionId, + countingCentre.areaId as countingCentreId, + "Postal" AS voteType + FROM + area country, area electoralDistrict, + area electionCommission, area districtCentre, area countingCentre, + + area_area country_electoralDistrict, + area_area electoralDistrict_countingCentre, + + area_area electionCommission_districtCentre, + area_area districtCentre_countingCentre + WHERE + country_electoralDistrict.parentAreaId = country.areaId + and country_electoralDistrict.childAreaId = electoralDistrict.areaId + + and electoralDistrict_countingCentre.parentAreaId = electoralDistrict.areaId + and electoralDistrict_countingCentre.childAreaId = countingCentre.areaId + + and electionCommission_districtCentre.parentAreaId = electionCommission.areaId + and electionCommission_districtCentre.childAreaId = districtCentre.areaId + + and districtCentre_countingCentre.parentAreaId = districtCentre.areaId + and districtCentre_countingCentre.childAreaId = countingCentre.areaId + + and country.areaType = "Country" and electoralDistrict.areaType = "ElectoralDistrict" + and countingCentre.areaType = "CountingCentre" and districtCentre.areaType = "DistrictCentre" + and electionCommission.areaType = "ElectionCommission" + GROUP BY + country.areaId, + electoralDistrict.areaId, + countingCentre.areaId; diff --git a/results-tabulation-dashboard/provincial-council-election-2021/drop-dashboard-tables-and-views.sql b/results-tabulation-dashboard/provincial-council-election-2021/drop-dashboard-tables-and-views.sql new file mode 100644 index 00000000..04717cd0 --- /dev/null +++ b/results-tabulation-dashboard/provincial-council-election-2021/drop-dashboard-tables-and-views.sql @@ -0,0 +1,7 @@ +DROP table ext_pe2020_dashboard_increment; +DROP table ext_pe2020_dashboard_tally_sheet_status; +DROP table ext_pe2020_dashboard_area_map; +DROP table ext_pe2020_dashboard_party_wise_vote_results; +DROP table ext_pe2020_dashboard_vote_results; +DROP table ext_pe2020_dashboard_party_wise_seat_allocation; +DROP table ext_pe2020_dashboard_party_wise_national_list_seat_allocation; \ No newline at end of file diff --git a/results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-all-island-counting.json b/results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-all-island-counting.json new file mode 100644 index 00000000..4d20251b --- /dev/null +++ b/results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-all-island-counting.json @@ -0,0 +1,4505 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 44, + "iteration": 1596623404308, + "links": [], + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 27, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "ALL ISLAND COUNTING DASHBOARD", + "prefixFontSize": "100%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT \"Sri Lanka\"", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "170%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "first" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 46, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 0, + "y": 4 + }, + "id": 79, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "30%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "PE-27", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 4, + "y": 4 + }, + "id": 38, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "ED", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": true, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 9, + "y": 4 + }, + "id": 18, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n\n\n-- SELECT\n-- CONCAT(\n-- SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedTallySheetCount), \"/\", COUNT(*), \" - \",\n-- ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedTallySheetCount) * 100 / COUNT(*), 0), \"%\"\n-- ) AS \"\"\n-- FROM\n-- (SELECT\n-- SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedTallySheetCount\n-- FROM\n-- ext_pe2020_dashboard_tally_sheet_status\n-- WHERE\n-- ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n-- and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n-- and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n-- and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\n-- GROUP BY\n-- ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 14, + "y": 4 + }, + "id": 8, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PV PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 19, + "y": 4 + }, + "id": 107, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "DV PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 9, + "y": 5 + }, + "id": 109, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "CC", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n\n\n-- SELECT\n-- CONCAT(\n-- SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedTallySheetCount), \"/\", COUNT(*), \" - \",\n-- ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedTallySheetCount) * 100 / COUNT(*), 0), \"%\"\n-- ) AS \"\"\n-- FROM\n-- (SELECT\n-- SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedTallySheetCount\n-- FROM\n-- ext_pe2020_dashboard_tally_sheet_status\n-- WHERE\n-- ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n-- and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n-- and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n-- and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\n-- GROUP BY\n-- ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 14, + "y": 5 + }, + "id": 110, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PV CC", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n\n\n-- SELECT\n-- CONCAT(\n-- SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedTallySheetCount), \"/\", COUNT(*), \" - \",\n-- ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedTallySheetCount) * 100 / COUNT(*), 0), \"%\"\n-- ) AS \"\"\n-- FROM\n-- (SELECT\n-- SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedTallySheetCount\n-- FROM\n-- ext_pe2020_dashboard_tally_sheet_status\n-- WHERE\n-- ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n-- and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n-- and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n-- and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\n-- GROUP BY\n-- ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 19, + "y": 5 + }, + "id": 111, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "DV CC", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n\n\n-- SELECT\n-- CONCAT(\n-- SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedTallySheetCount), \"/\", COUNT(*), \" - \",\n-- ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedTallySheetCount) * 100 / COUNT(*), 0), \"%\"\n-- ) AS \"\"\n-- FROM\n-- (SELECT\n-- SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedTallySheetCount\n-- FROM\n-- ext_pe2020_dashboard_tally_sheet_status\n-- WHERE\n-- ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n-- and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n-- and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n-- and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\n-- GROUP BY\n-- ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 6 + }, + "id": 45, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 0, + "y": 7 + }, + "id": 80, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "30%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "CE-201", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 4, + "y": 7 + }, + "id": 39, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "ED", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 9, + "y": 7 + }, + "id": 19, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 14, + "y": 7 + }, + "id": 9, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PV PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 19, + "y": 7 + }, + "id": 108, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "DV PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 9, + "y": 8 + }, + "id": 112, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "CC", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 14, + "y": 8 + }, + "id": 113, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PV CC", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 19, + "y": 8 + }, + "id": 114, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "DV CC", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 47, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 0, + "y": 10 + }, + "id": 81, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "30%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "PE-CE-RO-V1", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 4, + "y": 10 + }, + "id": 85, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "ED", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 9, + "y": 10 + }, + "id": 84, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 14, + "y": 10 + }, + "id": 86, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PV PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 19, + "y": 10 + }, + "id": 115, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PV PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 9, + "y": 11 + }, + "id": 93, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "RELEASED", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId,\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 14, + "y": 11 + }, + "id": 116, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "RELEASED", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId,\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 19, + "y": 11 + }, + "id": 117, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "RELEASED", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId,\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 75, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 0, + "y": 13 + }, + "id": 15, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "30%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "PE-4", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 4, + "y": 13 + }, + "id": 66, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "parties", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-4\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 2, + "w": 14, + "x": 10, + "y": 13 + }, + "id": 106, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "text" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 9, + "x": 0, + "y": 14 + }, + "id": 83, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 0, + "y": 15 + }, + "id": 97, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "30%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "PE-CE-RO-PR-1", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 4, + "y": 15 + }, + "id": 98, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "parties", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-1\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 10, + "y": 15 + }, + "id": 88, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "30%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "PE-CE-RO-V2", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 14, + "y": 15 + }, + "id": 82, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "ED", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V2\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 19, + "y": 15 + }, + "id": 95, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "RELEASED", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V2\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 9, + "x": 0, + "y": 16 + }, + "id": 76, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 14, + "x": 10, + "y": 16 + }, + "id": 103, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 0, + "y": 17 + }, + "id": 99, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "30%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "PE-CE-RO-PR-2", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 4, + "y": 17 + }, + "id": 101, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "parties", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-2\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 10, + "y": 17 + }, + "id": 78, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "30%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "PE-R2", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 14, + "y": 17 + }, + "id": 92, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "ED", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-R2\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 19, + "y": 17 + }, + "id": 96, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "RELEASED", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-R2\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 9, + "x": 0, + "y": 18 + }, + "id": 90, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 14, + "x": 10, + "y": 18 + }, + "id": 104, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 0, + "y": 19 + }, + "id": 100, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "30%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "PE-CE-RO-PR-3", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 4, + "y": 19 + }, + "id": 102, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "parties", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-3\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 10, + "y": 19 + }, + "id": 87, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "30%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "PE-21", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 14, + "y": 19 + }, + "id": 91, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "ED", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-21\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 19, + "y": 19 + }, + "id": 94, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "RELEASED", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-21\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 9, + "x": 0, + "y": 20 + }, + "id": 89, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 14, + "x": 10, + "y": 20 + }, + "id": 105, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + } + ], + "refresh": "5m", + "schemaVersion": 22, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "text": "307 - PE 2020 - All Island Test 2", + "value": "307" + }, + "datasource": "MySQL", + "definition": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PARLIAMENT_ELECTION_2020' and parentElectionId IS NULL;", + "hide": 0, + "includeAll": false, + "index": -1, + "label": "Election", + "multi": false, + "name": "rootElectionId", + "options": [], + "query": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PARLIAMENT_ELECTION_2020' and parentElectionId IS NULL;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Parliament Election 2020 - Counting - All Island", + "uid": "GXrbHAVMk", + "variables": { + "list": [] + }, + "version": 3 +} \ No newline at end of file diff --git a/results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-all-island-results.json b/results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-all-island-results.json new file mode 100644 index 00000000..b467a5ee --- /dev/null +++ b/results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-all-island-results.json @@ -0,0 +1,1661 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 35, + "iteration": 1596658668941, + "links": [], + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 3, + "w": 15, + "x": 0, + "y": 0 + }, + "id": 27, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "ALL ISLAND RESULTS DASHBOARD", + "prefixFontSize": "70%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT \"Sri Lanka\"", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "150%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "first" + }, + { + "cacheTimeout": null, + "datasource": null, + "gridPos": { + "h": 20, + "w": 6, + "x": 18, + "y": 0 + }, + "id": 63, + "links": [], + "options": { + "displayMode": "gradient", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "purple", + "value": null + } + ] + }, + "title": "$__cell_1" + }, + "limit": 20, + "overrides": [], + "values": true + }, + "orientation": "horizontal", + "showUnfilled": true + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n NOW() as \"time\", party.partyName AS \"name\", \n COALESCE(SUM(ext_pe2020_dashboard_party_wise_seat_allocation.seatCount), 0) AS aggregatedSeatCount\nFROM ext_pe2020_dashboard_party_wise_seat_allocation, party\nWHERE \n party.partyId = ext_pe2020_dashboard_party_wise_seat_allocation.partyId\n and ext_pe2020_dashboard_party_wise_seat_allocation.electionId = $rootElectionId\n and ext_pe2020_dashboard_party_wise_seat_allocation.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\nGROUP BY\n party.partyId\nORDER BY\n aggregatedSeatCount DESC, party.partyId\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Seat allocation per party ", + "transparent": true, + "type": "bargauge" + }, + { + "cacheTimeout": null, + "datasource": null, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 3 + }, + "id": 37, + "links": [], + "options": { + "displayMode": "gradient", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "yellow", + "value": null + } + ] + }, + "title": "$__cell_1" + }, + "limit": 10, + "overrides": [], + "values": true + }, + "orientation": "horizontal", + "showUnfilled": true + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n NOW() as \"time\", party.partyName as \"name\", COALESCE(SUM(ext_pe2020_dashboard_party_wise_vote_results.voteCount), 0) AS aggregatedVoteCount\nFROM\n ext_pe2020_dashboard_party_wise_vote_results, party\nWHERE \n party.partyId = ext_pe2020_dashboard_party_wise_vote_results.partyId\n and ext_pe2020_dashboard_party_wise_vote_results.electionId = $rootElectionId\n and ext_pe2020_dashboard_party_wise_vote_results.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\nGROUP BY\n ext_pe2020_dashboard_party_wise_vote_results.partyId\nORDER BY\n aggregatedVoteCount DESC,\n ext_pe2020_dashboard_party_wise_vote_results.partyId;\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Top 10 parties", + "transparent": true, + "type": "bargauge" + }, + { + "cacheTimeout": null, + "datasource": null, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 3 + }, + "id": 44, + "links": [], + "options": { + "displayMode": "gradient", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "title": "$__cell_1" + }, + "limit": 10, + "overrides": [], + "values": true + }, + "orientation": "horizontal", + "showUnfilled": true + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n NOW() as \"time\", party.partyName AS \"name\", \n COALESCE(SUM(ext_pe2020_dashboard_party_wise_national_list_seat_allocation.nationalListSeatCount), 0) AS aggregatedSeatCount\nFROM ext_pe2020_dashboard_party_wise_national_list_seat_allocation, party\nWHERE \n party.partyId = ext_pe2020_dashboard_party_wise_national_list_seat_allocation.partyId\n and ext_pe2020_dashboard_party_wise_national_list_seat_allocation.electionId = $rootElectionId\n and ext_pe2020_dashboard_party_wise_national_list_seat_allocation.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\nGROUP BY\n party.partyId\nORDER BY\n aggregatedSeatCount DESC, party.partyId\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "National List", + "transparent": true, + "type": "bargauge" + }, + { + "cacheTimeout": null, + "content": "", + "datasource": null, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 10 + }, + "id": 51, + "links": [], + "mode": "markdown", + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "text" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#37872D", + "#37872D", + "#37872D" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 2, + "y": 10 + }, + "id": 50, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT 0;", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "0,1,2", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "Electors", + "value": "0" + } + ], + "valueName": "first" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#37872D", + "#37872D", + "#37872D" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 6, + "y": 10 + }, + "id": 60, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT 0;", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "0,1,2", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "Votes", + "value": "0" + } + ], + "valueName": "first" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#37872D", + "#37872D", + "#37872D" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 10, + "y": 10 + }, + "id": 52, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT 0;", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "0,1,2", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "Valid Votes", + "value": "0" + } + ], + "valueName": "first" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#37872D", + "#37872D", + "#37872D" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 14, + "y": 10 + }, + "id": 57, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT 0;", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "0,1,2", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "Rejected Votes", + "value": "0" + } + ], + "valueName": "first" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#37872D", + "#37872D", + "#37872D" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 12 + }, + "id": 62, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT 0;", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "0,1,2", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "Postal", + "value": "0" + } + ], + "valueName": "first" + }, + { + "datasource": null, + "gridPos": { + "h": 8, + "w": 4, + "x": 2, + "y": 12 + }, + "id": 46, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "title": " " + }, + "overrides": [], + "values": false + }, + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal" + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT \n COALESCE(SUM(areaMap.registeredPostalVotersCount), 0) AS \"\",\n COALESCE(SUM(areaMap.registeredDisplacedVotersCount), 0) AS \"\",\n COALESCE(SUM(areaMap.registeredVotersCount), 0) AS \"\",\n COALESCE(SUM(areaMap.registeredPostalVotersCount + areaMap.registeredVotersCount + areaMap.registeredDisplacedVotersCount), 0) AS \"\"\nFROM\n ext_pe2020_dashboard_area_map as areaMap\nWHERE \n areaMap.electionId = $rootElectionId\n\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "stat" + }, + { + "datasource": null, + "gridPos": { + "h": 8, + "w": 4, + "x": 6, + "y": 12 + }, + "id": 56, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "title": " " + }, + "overrides": [], + "values": false + }, + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal" + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Postal\", ext_pe2020_dashboard_vote_results.voteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Displaced\", ext_pe2020_dashboard_vote_results.voteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"NonPostal\", ext_pe2020_dashboard_vote_results.voteCount, 0)), 0) AS \"\",\n COALESCE(SUM(ext_pe2020_dashboard_vote_results.voteCount), 0) AS \"\"\nFROM\n ext_pe2020_dashboard_vote_results\nWHERE \n ext_pe2020_dashboard_vote_results.electionId = $rootElectionId\n and ext_pe2020_dashboard_vote_results.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "stat" + }, + { + "datasource": null, + "gridPos": { + "h": 8, + "w": 4, + "x": 10, + "y": 12 + }, + "id": 48, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "title": " " + }, + "overrides": [], + "values": false + }, + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal" + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Postal\", ext_pe2020_dashboard_vote_results.validVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Displaced\", ext_pe2020_dashboard_vote_results.validVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"NonPostal\", ext_pe2020_dashboard_vote_results.validVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(ext_pe2020_dashboard_vote_results.validVoteCount), 0) AS \"\"\nFROM\n ext_pe2020_dashboard_vote_results\nWHERE \n ext_pe2020_dashboard_vote_results.electionId = $rootElectionId\n and ext_pe2020_dashboard_vote_results.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "stat" + }, + { + "datasource": null, + "gridPos": { + "h": 8, + "w": 4, + "x": 14, + "y": 12 + }, + "id": 59, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "title": " " + }, + "overrides": [], + "values": false + }, + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal" + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Postal\", ext_pe2020_dashboard_vote_results.rejectedVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Displaced\", ext_pe2020_dashboard_vote_results.rejectedVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"NonPostal\", ext_pe2020_dashboard_vote_results.rejectedVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(ext_pe2020_dashboard_vote_results.rejectedVoteCount), 0) AS \"\"\nFROM\n ext_pe2020_dashboard_vote_results\nWHERE \n ext_pe2020_dashboard_vote_results.electionId = $rootElectionId\n and ext_pe2020_dashboard_vote_results.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "stat" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#37872D", + "#37872D", + "#37872D" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 14 + }, + "id": 54, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT 0;", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "0,1,2", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "Displaced", + "value": "0" + } + ], + "valueName": "first" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#37872D", + "#37872D", + "#37872D" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 16 + }, + "id": 61, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT 0;", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "0,1,2", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "Non Postal", + "value": "0" + } + ], + "valueName": "first" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#37872D", + "#37872D", + "#37872D" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 18 + }, + "id": 55, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT 0;", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "0,1,2", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "All", + "value": "0" + } + ], + "valueName": "first" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 2, + "w": 6, + "x": 9, + "y": 20 + }, + "id": 17, + "mode": "markdown", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n createdAt AS \"time\",\n statusReportId\nFROM dashboard_status_report\nWHERE\n $__timeFilter(createdAt)\nORDER BY createdAt", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "text" + } + ], + "refresh": "5m", + "schemaVersion": 22, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "tags": [], + "text": "307 - PE 2020 - All Island Test 2", + "value": "307" + }, + "datasource": "MySQL", + "definition": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PARLIAMENT_ELECTION_2020' and parentElectionId IS NULL;", + "hide": 0, + "includeAll": false, + "index": -1, + "label": "Election", + "multi": false, + "name": "rootElectionId", + "options": [], + "query": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PARLIAMENT_ELECTION_2020' and parentElectionId IS NULL;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Parliament Election 2020 - Results - All Island", + "uid": "YMS0mb7Gz", + "variables": { + "list": [] + }, + "version": 15 +} \ No newline at end of file diff --git a/results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-electoral-district-counting.json b/results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-electoral-district-counting.json new file mode 100644 index 00000000..4a7e6e83 --- /dev/null +++ b/results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-electoral-district-counting.json @@ -0,0 +1,4209 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 45, + "iteration": 1596623250599, + "links": [], + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 27, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "ELECTORAL DISTRICT COUNTING DASHBOARD", + "prefixFontSize": "100%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT GROUP_CONCAT(areaName) FROM area WHERE areaId IN ($electoralDistrictIds)", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "170%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "first" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 46, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 0, + "y": 4 + }, + "id": 13, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "70%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "PE-27", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 4, + "y": 4 + }, + "id": 18, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 9, + "y": 4 + }, + "id": 92, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PV PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 14, + "y": 4 + }, + "id": 93, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "DV PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 5, + "x": 19, + "y": 4 + }, + "id": 98, + "options": { + "displayMode": "lcd", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "links": [], + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 20 + }, + { + "color": "#EAB839", + "value": 50 + }, + { + "color": "green", + "value": 80 + } + ] + } + }, + "overrides": [], + "values": false + }, + "orientation": "horizontal", + "showUnfilled": true + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "bargauge" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 4, + "y": 5 + }, + "id": 8, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "CC", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 9, + "y": 5 + }, + "id": 28, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PV CC", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 14, + "y": 5 + }, + "id": 53, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "DV CC", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 6 + }, + "id": 45, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 0, + "y": 7 + }, + "id": 14, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "CE-201", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 4, + "y": 7 + }, + "id": 19, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 9, + "y": 7 + }, + "id": 94, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 14, + "y": 7 + }, + "id": 95, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 5, + "x": 19, + "y": 7 + }, + "id": 99, + "options": { + "displayMode": "lcd", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 20 + }, + { + "color": "#EAB839", + "value": 50 + }, + { + "color": "green", + "value": 80 + } + ] + } + }, + "overrides": [], + "values": false + }, + "orientation": "horizontal", + "showUnfilled": true + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName IN (\"CE-201\", \"CE-201-PV\")\n) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "bargauge" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 4, + "y": 8 + }, + "id": 9, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "CC", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 9, + "y": 8 + }, + "id": 30, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PV CC", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 14, + "y": 8 + }, + "id": 48, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "DV CC", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 47, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 0, + "y": 10 + }, + "id": 79, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n createdAt AS \"time\",\n statusReportId\nFROM dashboard_status_report\nWHERE\n $__timeFilter(createdAt)\nORDER BY createdAt", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "PE-CE-RO-V1", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 4, + "y": 10 + }, + "id": 80, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 9, + "y": 10 + }, + "id": 81, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PV PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 14, + "y": 10 + }, + "id": 82, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "DV PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 5, + "x": 19, + "y": 10 + }, + "id": 100, + "options": { + "displayMode": "lcd", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 20 + }, + { + "color": "#EAB839", + "value": 50 + }, + { + "color": "green", + "value": 80 + } + ] + } + }, + "overrides": [], + "values": false + }, + "orientation": "horizontal", + "showUnfilled": true + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "bargauge" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 11 + }, + "id": 78, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 0, + "y": 12 + }, + "id": 77, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n createdAt AS \"time\",\n statusReportId\nFROM dashboard_status_report\nWHERE\n $__timeFilter(createdAt)\nORDER BY createdAt", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "PE-4", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 4, + "y": 12 + }, + "id": 21, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "Parties", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-4\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 9, + "y": 12 + }, + "id": 34, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PV Parties", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-4\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 14, + "y": 12 + }, + "id": 66, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "DV Parties", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-4\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 5, + "x": 19, + "y": 12 + }, + "id": 101, + "options": { + "displayMode": "lcd", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 20 + }, + { + "color": "#EAB839", + "value": 50 + }, + { + "color": "green", + "value": 80 + } + ] + } + }, + "overrides": [], + "values": false + }, + "orientation": "horizontal", + "showUnfilled": true + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-4\"\n) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "bargauge" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 13 + }, + "id": 76, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 0, + "y": 14 + }, + "id": 83, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n createdAt AS \"time\",\n statusReportId\nFROM dashboard_status_report\nWHERE\n $__timeFilter(createdAt)\nORDER BY createdAt", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "PE-CE-RO-PR-1", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 4, + "y": 14 + }, + "id": 84, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "Parties", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-1\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n\n\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 9, + "y": 14 + }, + "id": 85, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "PV Parties", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 14, + "y": 14 + }, + "id": 86, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "DV Parties", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 5, + "x": 19, + "y": 14 + }, + "id": 102, + "options": { + "displayMode": "lcd", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 20 + }, + { + "color": "#EAB839", + "value": 50 + }, + { + "color": "green", + "value": 80 + } + ] + } + }, + "overrides": [], + "values": false + }, + "orientation": "horizontal", + "showUnfilled": true + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-1\"\n) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "bargauge" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 15 + }, + "id": 75, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 0, + "y": 16 + }, + "id": 87, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n createdAt AS \"time\",\n statusReportId\nFROM dashboard_status_report\nWHERE\n $__timeFilter(createdAt)\nORDER BY createdAt", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "PE-CE-RO-PR-2", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 4, + "y": 16 + }, + "id": 88, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "Parties", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-2\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n\n\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 5, + "x": 19, + "y": 16 + }, + "id": 103, + "options": { + "displayMode": "lcd", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 20 + }, + { + "color": "#EAB839", + "value": 50 + }, + { + "color": "green", + "value": 80 + } + ] + } + }, + "overrides": [], + "values": false + }, + "orientation": "horizontal", + "showUnfilled": true + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-2\"\n) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "bargauge" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 17 + }, + "id": 89, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 0, + "y": 18 + }, + "id": 90, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n createdAt AS \"time\",\n statusReportId\nFROM dashboard_status_report\nWHERE\n $__timeFilter(createdAt)\nORDER BY createdAt", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "PE-CE-RO-PR-2", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 4, + "y": 18 + }, + "id": 91, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "Parties", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-3\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n\n\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 5, + "x": 19, + "y": 18 + }, + "id": 104, + "options": { + "displayMode": "lcd", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 20 + }, + { + "color": "#EAB839", + "value": 50 + }, + { + "color": "green", + "value": 80 + } + ] + } + }, + "overrides": [], + "values": false + }, + "orientation": "horizontal", + "showUnfilled": true + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-3\"\n) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "bargauge" + } + ], + "refresh": "5m", + "schemaVersion": 22, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "text": "307 - PE 2020 - All Island Test 2", + "value": "307" + }, + "datasource": "MySQL", + "definition": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PARLIAMENT_ELECTION_2020' and parentElectionId IS NULL;", + "hide": 0, + "includeAll": false, + "index": -1, + "label": "Election", + "multi": false, + "name": "rootElectionId", + "options": [], + "query": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PARLIAMENT_ELECTION_2020' and parentElectionId IS NULL;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "tags": [], + "text": "13 - Digamadulla", + "value": "115499" + }, + "datasource": "MySQL", + "definition": "SELECT \n areaName AS __text, areaId AS __value \nFROM area, election \nWHERE \n election.electionId = area.electionId and election.rootElectionId = $rootElectionId and areaType = 'ElectoralDistrict';", + "hide": 0, + "includeAll": false, + "index": -1, + "label": null, + "multi": false, + "name": "electoralDistrictIds", + "options": [ + { + "selected": false, + "text": "01 - Colombo", + "value": "98479" + }, + { + "selected": false, + "text": "02 - Gampaha", + "value": "101115" + }, + { + "selected": false, + "text": "03 - Kalutara", + "value": "103795" + }, + { + "selected": false, + "text": "04 - Kandy", + "value": "105255" + }, + { + "selected": false, + "text": "05 - Matale", + "value": "107140" + }, + { + "selected": false, + "text": "06 - NuwaraEliya", + "value": "107862" + }, + { + "selected": false, + "text": "07 - Galle", + "value": "108949" + }, + { + "selected": false, + "text": "08 - Matara", + "value": "110520" + }, + { + "selected": false, + "text": "09 - Hambantota", + "value": "111576" + }, + { + "selected": false, + "text": "10 - Jaffna", + "value": "112490" + }, + { + "selected": true, + "text": "11 - Vanni", + "value": "113820" + }, + { + "selected": false, + "text": "12 - Batticaloa", + "value": "114578" + }, + { + "selected": false, + "text": "13 - Digamadulla", + "value": "115499" + }, + { + "selected": false, + "text": "14 - Trincomalee", + "value": "116606" + }, + { + "selected": false, + "text": "15 - Kurunegala", + "value": "117260" + }, + { + "selected": false, + "text": "16 - Puttalam", + "value": "119355" + }, + { + "selected": false, + "text": "17 - Anuradhapura", + "value": "120292" + }, + { + "selected": false, + "text": "18 - Polonnaruwa", + "value": "121664" + }, + { + "selected": false, + "text": "19 - Badulla", + "value": "122291" + }, + { + "selected": false, + "text": "20 - Monaragala", + "value": "123466" + }, + { + "selected": false, + "text": "21 - Ratnapura", + "value": "124296" + }, + { + "selected": false, + "text": "22 - Kegalle", + "value": "125692" + } + ], + "query": "SELECT \n areaName AS __text, areaId AS __value \nFROM area, election \nWHERE \n election.electionId = area.electionId and election.rootElectionId = $rootElectionId and areaType = 'ElectoralDistrict';", + "refresh": 0, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Parliament Election 2020 - Counting - Electoral District", + "uid": "TUq9Vx7Mz", + "variables": { + "list": [] + }, + "version": 6 +} \ No newline at end of file diff --git a/results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-electoral-district-results.json b/results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-electoral-district-results.json new file mode 100644 index 00000000..8f22fdde --- /dev/null +++ b/results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-electoral-district-results.json @@ -0,0 +1,1725 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 46, + "iteration": 1596657503874, + "links": [], + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 27, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "ELECTORAL DISTRICT RESULTS DASHBOARD", + "prefixFontSize": "70%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT GROUP_CONCAT(area.areaName) FROM area WHERE areaId IN ($electoralDistrictIds)", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "150%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "first" + }, + { + "cacheTimeout": null, + "datasource": null, + "gridPos": { + "h": 7, + "w": 18, + "x": 0, + "y": 3 + }, + "id": 37, + "links": [], + "options": { + "displayMode": "gradient", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "yellow", + "value": null + } + ] + }, + "title": "$__cell_1" + }, + "limit": 10, + "overrides": [], + "values": true + }, + "orientation": "horizontal", + "showUnfilled": true + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n NOW() as \"time\", party.partyName as \"name\", COALESCE(SUM(ext_pe2020_dashboard_party_wise_vote_results.voteCount), 0) AS aggregatedVoteCount\nFROM\n ext_pe2020_dashboard_party_wise_vote_results, party\nWHERE \n party.partyId = ext_pe2020_dashboard_party_wise_vote_results.partyId\n and ext_pe2020_dashboard_party_wise_vote_results.electionId = $rootElectionId\n and ext_pe2020_dashboard_party_wise_vote_results.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_party_wise_vote_results.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\nGROUP BY\n ext_pe2020_dashboard_party_wise_vote_results.partyId\nORDER BY\n aggregatedVoteCount DESC,\n ext_pe2020_dashboard_party_wise_vote_results.partyId;\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Top 10 parties", + "transparent": true, + "type": "bargauge" + }, + { + "cacheTimeout": null, + "datasource": null, + "gridPos": { + "h": 17, + "w": 6, + "x": 18, + "y": 3 + }, + "id": 44, + "links": [], + "options": { + "displayMode": "gradient", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "purple", + "value": null + } + ] + }, + "title": "$__cell_1" + }, + "limit": 20, + "overrides": [], + "values": true + }, + "orientation": "horizontal", + "showUnfilled": true + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n NOW() as \"time\", party.partyName AS \"name\", \n COALESCE(SUM(ext_pe2020_dashboard_party_wise_seat_allocation.seatCount), 0) AS aggregatedSeatCount\nFROM ext_pe2020_dashboard_party_wise_seat_allocation, party\nWHERE \n party.partyId = ext_pe2020_dashboard_party_wise_seat_allocation.partyId\n and ext_pe2020_dashboard_party_wise_seat_allocation.electionId = $rootElectionId\n and ext_pe2020_dashboard_party_wise_seat_allocation.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_party_wise_seat_allocation.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\nGROUP BY\n party.partyId\nORDER BY\n aggregatedSeatCount DESC, party.partyId\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Seat allocation per party ", + "transparent": true, + "type": "bargauge" + }, + { + "cacheTimeout": null, + "content": "", + "datasource": null, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 10 + }, + "id": 51, + "links": [], + "mode": "markdown", + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "text" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#37872D", + "#37872D", + "#37872D" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 2, + "y": 10 + }, + "id": 50, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT 0;", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "0,1,2", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "Electors", + "value": "0" + } + ], + "valueName": "first" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#37872D", + "#37872D", + "#37872D" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 6, + "y": 10 + }, + "id": 60, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT 0;", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "0,1,2", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "Votes", + "value": "0" + } + ], + "valueName": "first" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#37872D", + "#37872D", + "#37872D" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 10, + "y": 10 + }, + "id": 52, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT 0;", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "0,1,2", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "Valid Votes", + "value": "0" + } + ], + "valueName": "first" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#37872D", + "#37872D", + "#37872D" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 14, + "y": 10 + }, + "id": 57, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT 0;", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "0,1,2", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "Rejected Votes", + "value": "0" + } + ], + "valueName": "first" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#37872D", + "#37872D", + "#37872D" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 12 + }, + "id": 62, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT 0;", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "0,1,2", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "Postal", + "value": "0" + } + ], + "valueName": "first" + }, + { + "datasource": null, + "gridPos": { + "h": 8, + "w": 4, + "x": 2, + "y": 12 + }, + "id": 46, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "title": " " + }, + "overrides": [], + "values": false + }, + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal" + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT \n COALESCE(SUM(areaMap.registeredPostalVotersCount), 0) AS \"\",\n COALESCE(SUM(areaMap.registeredDisplacedVotersCount), 0) AS \"\",\n COALESCE(SUM(areaMap.registeredVotersCount), 0) AS \"\",\n COALESCE(SUM(areaMap.registeredPostalVotersCount + areaMap.registeredVotersCount + areaMap.registeredDisplacedVotersCount), 0) AS \"\"\nFROM\n ext_pe2020_dashboard_area_map as areaMap\nWHERE \n areaMap.electionId = $rootElectionId\n and areaMap.electoralDistrictId IN ($electoralDistrictIds)\n\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "stat" + }, + { + "datasource": null, + "gridPos": { + "h": 8, + "w": 4, + "x": 6, + "y": 12 + }, + "id": 56, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "title": " " + }, + "overrides": [], + "values": false + }, + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal" + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Postal\", ext_pe2020_dashboard_vote_results.voteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Displaced\", ext_pe2020_dashboard_vote_results.voteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"NonPostal\", ext_pe2020_dashboard_vote_results.voteCount, 0)), 0) AS \"\",\n COALESCE(SUM(ext_pe2020_dashboard_vote_results.voteCount), 0) AS \"\"\nFROM\n ext_pe2020_dashboard_vote_results\nWHERE \n ext_pe2020_dashboard_vote_results.electionId = $rootElectionId\n and ext_pe2020_dashboard_vote_results.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_vote_results.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "stat" + }, + { + "datasource": null, + "gridPos": { + "h": 8, + "w": 4, + "x": 10, + "y": 12 + }, + "id": 48, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "title": " " + }, + "overrides": [], + "values": false + }, + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal" + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Postal\", ext_pe2020_dashboard_vote_results.validVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Displaced\", ext_pe2020_dashboard_vote_results.validVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"NonPostal\", ext_pe2020_dashboard_vote_results.validVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(ext_pe2020_dashboard_vote_results.validVoteCount), 0) AS \"\"\nFROM\n ext_pe2020_dashboard_vote_results\nWHERE \n ext_pe2020_dashboard_vote_results.electionId = $rootElectionId\n and ext_pe2020_dashboard_vote_results.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_vote_results.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "stat" + }, + { + "datasource": null, + "gridPos": { + "h": 8, + "w": 4, + "x": 14, + "y": 12 + }, + "id": 59, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "title": " " + }, + "overrides": [], + "values": false + }, + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal" + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Postal\", ext_pe2020_dashboard_vote_results.rejectedVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Displaced\", ext_pe2020_dashboard_vote_results.rejectedVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"NonPostal\", ext_pe2020_dashboard_vote_results.rejectedVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(ext_pe2020_dashboard_vote_results.rejectedVoteCount), 0) AS \"\"\nFROM\n ext_pe2020_dashboard_vote_results\nWHERE \n ext_pe2020_dashboard_vote_results.electionId = $rootElectionId\n and ext_pe2020_dashboard_vote_results.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_vote_results.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "stat" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#37872D", + "#37872D", + "#37872D" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 14 + }, + "id": 54, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT 0;", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "0,1,2", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "Displaced", + "value": "0" + } + ], + "valueName": "first" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#37872D", + "#37872D", + "#37872D" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 16 + }, + "id": 61, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT 0;", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "0,1,2", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "Non Postal", + "value": "0" + } + ], + "valueName": "first" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#37872D", + "#37872D", + "#37872D" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 18 + }, + "id": 55, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT 0;", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "0,1,2", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "All", + "value": "0" + } + ], + "valueName": "first" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 2, + "w": 6, + "x": 9, + "y": 20 + }, + "id": 17, + "mode": "markdown", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n createdAt AS \"time\",\n statusReportId\nFROM dashboard_status_report\nWHERE\n $__timeFilter(createdAt)\nORDER BY createdAt", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "text" + } + ], + "refresh": "5m", + "schemaVersion": 22, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "tags": [], + "text": "307 - PE 2020 - All Island Test 2", + "value": "307" + }, + "datasource": "MySQL", + "definition": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PARLIAMENT_ELECTION_2020' and parentElectionId IS NULL;", + "hide": 0, + "includeAll": false, + "index": -1, + "label": "Election", + "multi": false, + "name": "rootElectionId", + "options": [], + "query": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PARLIAMENT_ELECTION_2020' and parentElectionId IS NULL;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "tags": [], + "text": "01 - Colombo", + "value": "98479" + }, + "datasource": "MySQL", + "definition": "SELECT \n areaName AS __text, areaId AS __value \nFROM area, election \nWHERE \n election.electionId = area.electionId and election.rootElectionId = $rootElectionId and areaType = 'ElectoralDistrict';", + "hide": 0, + "includeAll": false, + "index": -1, + "label": "Electoral District", + "multi": false, + "name": "electoralDistrictIds", + "options": [ + { + "selected": true, + "text": "01 - Colombo", + "value": "98479" + }, + { + "selected": false, + "text": "02 - Gampaha", + "value": "101115" + }, + { + "selected": false, + "text": "03 - Kalutara", + "value": "103795" + }, + { + "selected": false, + "text": "04 - Kandy", + "value": "105255" + }, + { + "selected": false, + "text": "05 - Matale", + "value": "107140" + }, + { + "selected": false, + "text": "06 - NuwaraEliya", + "value": "107862" + }, + { + "selected": false, + "text": "07 - Galle", + "value": "108949" + }, + { + "selected": false, + "text": "08 - Matara", + "value": "110520" + }, + { + "selected": false, + "text": "09 - Hambantota", + "value": "111576" + }, + { + "selected": false, + "text": "10 - Jaffna", + "value": "112490" + }, + { + "selected": false, + "text": "11 - Vanni", + "value": "113820" + }, + { + "selected": false, + "text": "12 - Batticaloa", + "value": "114578" + }, + { + "selected": false, + "text": "13 - Digamadulla", + "value": "115499" + }, + { + "selected": false, + "text": "14 - Trincomalee", + "value": "116606" + }, + { + "selected": false, + "text": "15 - Kurunegala", + "value": "117260" + }, + { + "selected": false, + "text": "16 - Puttalam", + "value": "119355" + }, + { + "selected": false, + "text": "17 - Anuradhapura", + "value": "120292" + }, + { + "selected": false, + "text": "18 - Polonnaruwa", + "value": "121664" + }, + { + "selected": false, + "text": "19 - Badulla", + "value": "122291" + }, + { + "selected": false, + "text": "20 - Monaragala", + "value": "123466" + }, + { + "selected": false, + "text": "21 - Ratnapura", + "value": "124296" + }, + { + "selected": false, + "text": "22 - Kegalle", + "value": "125692" + } + ], + "query": "SELECT \n areaName AS __text, areaId AS __value \nFROM area, election \nWHERE \n election.electionId = area.electionId and election.rootElectionId = $rootElectionId and areaType = 'ElectoralDistrict';", + "refresh": 0, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Parliament Election 2020 - Results - Electoral District", + "uid": "7W5oXmIMk", + "variables": { + "list": [] + }, + "version": 5 +} \ No newline at end of file diff --git a/results-tabulation-dashboard/provincial-council-election-2021/update-counting-dashboard-tables.sql b/results-tabulation-dashboard/provincial-council-election-2021/update-counting-dashboard-tables.sql new file mode 100644 index 00000000..2d1d8a70 --- /dev/null +++ b/results-tabulation-dashboard/provincial-council-election-2021/update-counting-dashboard-tables.sql @@ -0,0 +1,278 @@ +SET @election_template_name = "PARLIAMENT_ELECTION_2020"; + +INSERT INTO ext_pe2020_dashboard_increment (active) VALUES(0); + +SET @lastIncrementId = LAST_INSERT_ID(); + + +INSERT INTO ext_pe2020_dashboard_tally_sheet_status (incrementId, electionId, electoralDistrictId, pollingDivisionId, + countingCentreId, templateName, voteType, partyId, verifiedTallySheetCount, releasedTallySheetCount, + emptyTallySheetCount, savedTallySheetCount, totalTallySheetCount) +SELECT + @lastIncrementId, + election.rootElectionId as electionId, + areaMap.electoralDistrictId, + areaMap.pollingDivisionId, + areaMap.countingCentreId, + template.templateName, + election.voteType, + metaData.metaDataValue as "partyId", + COUNT(IF(workflowInstance.status IN ("Verified", "Ready to Certify", "Certified", "Release Notified", "Released"), + tallySheet.tallySheetId, NULL)) AS verifiedTallySheetCount, + COUNT(IF(workflowInstance.status = "Released", tallySheet.tallySheetId, NULL)) AS releasedTallySheetCount, + COUNT(IF(workflowInstance.status = "Empty", tallySheet.tallySheetId, NULL)) AS emptyTallySheetCount, + COUNT(IF(workflowInstance.status = "Saved", tallySheet.tallySheetId, NULL)) AS savedTallySheetCount, + COUNT(tallySheet.tallySheetId) AS totalTallySheetCount +FROM + ext_pe2020_dashboard_area_map AS areaMap, + election, template, workflowInstance, + tallySheet left join metaData + on metaData.metaId = tallySheet.metaId and metaData.metaDataKey = "partyId" +WHERE + tallySheet.areaId = areaMap.countingCentreId + and election.electionId = tallySheet.electionId + and election.electionTemplateName = @election_template_name + and template.templateId = tallySheet.templateId + and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId +GROUP BY + election.rootElectionId, + areaMap.electoralDistrictId, + areaMap.pollingDivisionId, + areaMap.countingCentreId, + template.templateName, + election.voteType, + metaData.metaDataValue; + + + +INSERT INTO ext_pe2020_dashboard_tally_sheet_status (incrementId, electionId, electoralDistrictId, pollingDivisionId, + templateName, voteType, partyId, verifiedTallySheetCount, releasedTallySheetCount, + emptyTallySheetCount, savedTallySheetCount, totalTallySheetCount) +SELECT + @lastIncrementId, + election.rootElectionId as electionId, + areaMap.electoralDistrictId, + areaMap.pollingDivisionId, + template.templateName, + election.voteType, + metaData.metaDataValue as "partyId", + COUNT(IF(workflowInstance.status IN ("Verified", "Ready to Certify", "Certified", "Release Notified", "Released"), + tallySheet.tallySheetId, NULL)) AS verifiedTallySheetCount, + COUNT(IF(workflowInstance.status = "Released", tallySheet.tallySheetId, NULL)) AS releasedTallySheetCount, + COUNT(IF(workflowInstance.status = "Empty", tallySheet.tallySheetId, NULL)) AS emptyTallySheetCount, + COUNT(IF(workflowInstance.status = "Saved", tallySheet.tallySheetId, NULL)) AS savedTallySheetCount, + COUNT(tallySheet.tallySheetId) AS totalTallySheetCount +FROM + (SELECT electoralDistrictId, pollingDivisionId FROM ext_pe2020_dashboard_area_map + WHERE voteTYpe = "NonPostal" GROUP BY electoralDistrictId, pollingDivisionId) AS areaMap, + election, template, workflowInstance, + tallySheet left join metaData + on metaData.metaId = tallySheet.metaId and metaData.metaDataKey = "partyId" +WHERE + tallySheet.areaId = areaMap.pollingDivisionId + and election.electionId = tallySheet.electionId + and election.electionTemplateName = @election_template_name + and template.templateId = tallySheet.templateId + and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId +GROUP BY + election.rootElectionId, + areaMap.electoralDistrictId, + areaMap.pollingDivisionId, + template.templateName, + election.voteType, + metaData.metaDataValue; + + + +INSERT INTO ext_pe2020_dashboard_tally_sheet_status (incrementId, electionId, + electoralDistrictId, templateName, voteType, partyId, verifiedTallySheetCount, releasedTallySheetCount, + emptyTallySheetCount, savedTallySheetCount, totalTallySheetCount) +SELECT + @lastIncrementId, + election.rootElectionId as electionId, + areaMap.electoralDistrictId, + template.templateName, + election.voteType, + metaData.metaDataValue as "partyId", + COUNT(IF(workflowInstance.status IN ("Verified", "Ready to Certify", "Certified", "Release Notified", "Released"), + tallySheet.tallySheetId, NULL)) AS verifiedTallySheetCount, + COUNT(IF(workflowInstance.status = "Released", tallySheet.tallySheetId, NULL)) AS releasedTallySheetCount, + COUNT(IF(workflowInstance.status = "Empty", tallySheet.tallySheetId, NULL)) AS emptyTallySheetCount, + COUNT(IF(workflowInstance.status = "Saved", tallySheet.tallySheetId, NULL)) AS savedTallySheetCount, + COUNT(tallySheet.tallySheetId) AS totalTallySheetCount +FROM + (SELECT electoralDistrictId FROM ext_pe2020_dashboard_area_map + WHERE voteTYpe = "NonPostal" GROUP BY electoralDistrictId) AS areaMap, + election, template, workflowInstance, + tallySheet left join metaData + on metaData.metaId = tallySheet.metaId and metaData.metaDataKey = "partyId" +WHERE + tallySheet.areaId = areaMap.electoralDistrictId + and election.electionId = tallySheet.electionId + and election.electionTemplateName = @election_template_name + and template.templateId = tallySheet.templateId + and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId +GROUP BY + election.rootElectionId, + areaMap.electoralDistrictId, + template.templateName, + election.voteType, + metaData.metaDataValue; + + + +INSERT INTO ext_pe2020_dashboard_party_wise_vote_results (incrementId, electionId, electoralDistrictId, + pollingDivisionId, countingCentreId, voteType, partyId, voteCount) +SELECT + @lastIncrementId, + countingCentreElection.rootElectionId AS electionId, + electoralDistrict.areaId AS electoralDistrictId, + pollingDivision.areaId AS pollingDivisionId, + countingCentre.areaId AS countingCentreId, + countingCentreElection.voteType, + party.partyId, + (SELECT COALESCE(SUM(tallySheetVersionRow.numValue)) + FROM tallySheet, template, templateRow, workflowInstance, tallySheetVersionRow + WHERE + template.templateId = tallySheet.templateId + and templateRow.templateid = template.templateId + and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId + and tallySheetVersionRow.tallySheetVersionId = tallySheet.latestVersionId + and tallySheetVersionRow.templateRowId = templateRow.templateRowId + and workflowInstance.status IN ("Verified") + and templateRow.templateRowType = "PARTY_WISE_VOTE" + and template.templateName = "PE-27" + and tallySheet.areaId = countingCentreId + and tallySheetVersionRow.partyId = party.partyId + ) AS voteCount +FROM ext_pe2020_dashboard_area_map AS areaMap, election_party AS electionParty, party, + area AS countingCentre, election AS countingCentreElection, area AS pollingDivision, area AS electoralDistrict +WHERE + countingCentre.areaId = areaMap.countingCentreId + and pollingDivision.areaId = areaMap.pollingDivisionId + and electoralDistrict.areaId = areaMap.electoralDistrictId + and countingCentreElection.electionId = countingCentre.electionId + and countingCentreElection.electionTemplateName = @election_template_name + and electionParty.electionId = countingCentreElection.electionId + and party.partyId = electionParty.partyId; + + + +INSERT INTO ext_pe2020_dashboard_vote_results (incrementId, electionId, electoralDistrictId, + pollingDivisionId, countingCentreId, voteType, validVoteCount, rejectedVoteCount, voteCount) +SELECT + @lastIncrementId, + countingCentreElection.rootElectionId AS electionId, + electoralDistrict.areaId AS electoralDistrictId, + pollingDivision.areaId AS pollingDivisionId, + countingCentre.areaId AS countingCentreId, + countingCentreElection.voteType, + COALESCE(SUM(voteCounts.validVoteCount), 0), + COALESCE(SUM(voteCounts.rejectedVoteCount), 0), + COALESCE(SUM(voteCounts.voteCount), 0) +FROM ext_pe2020_dashboard_area_map AS areaMap, + area AS countingCentre, election AS countingCentreElection, area AS pollingDivision, area AS electoralDistrict, + (SELECT + tallySheet.areaId AS countingCentreId, + SUM(IF(templateRow.templateRowType = "PARTY_WISE_VOTE",tallySheetVersionRow.numValue,0)) validVoteCount, + SUM(IF(templateRow.templateRowType = "REJECTED_VOTE",tallySheetVersionRow.numValue,0)) rejectedVoteCount, + SUM(tallySheetVersionRow.numValue) voteCount + FROM tallySheet, template, templateRow, workflowInstance, tallySheetVersionRow + WHERE + template.templateId = tallySheet.templateId + and templateRow.templateid = template.templateId + and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId + and tallySheetVersionRow.tallySheetVersionId = tallySheet.latestVersionId + and tallySheetVersionRow.templateRowId = templateRow.templateRowId + and workflowInstance.status IN ("Verified") + and templateRow.templateRowType IN ("PARTY_WISE_VOTE", "REJECTED_VOTE") + and template.templateName = "PE-27" + GROUP BY tallySheet.areaId + ) AS voteCounts +WHERE + countingCentre.areaId = areaMap.countingCentreId + and pollingDivision.areaId = areaMap.pollingDivisionId + and electoralDistrict.areaId = areaMap.electoralDistrictId + and countingCentreElection.electionId = countingCentre.electionId + and voteCounts.countingCentreId = countingCentre.areaId + and countingCentreElection.electionTemplateName = @election_template_name +GROUP BY + countingCentreElection.rootElectionId, + electoralDistrict.areaId, + pollingDivision.areaId, + countingCentre.areaId, + countingCentreElection.voteType; + + + +INSERT INTO ext_pe2020_dashboard_party_wise_seat_allocation (incrementId, electionId, electoralDistrictId, partyId, seatCount) +SELECT + @lastIncrementId, + electoralDistrictElection.rootElectionId AS electionId, + electoralDistrict.areaId AS electoralDistrictId, + party.partyId, + (SELECT COALESCE(SUM(tallySheetVersionRow.numValue), 0) + FROM tallySheet, template, templateRow, workflowInstance, tallySheetVersionRow + WHERE + template.templateId = tallySheet.templateId + and templateRow.templateid = template.templateId + and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId + and tallySheetVersionRow.tallySheetVersionId = tallySheet.latestVersionId + and tallySheetVersionRow.templateRowId = templateRow.templateRowId + and workflowInstance.status IN ("Verified", "Ready to Certify", "Certified", "Release Notified", "Released") + and templateRow.templateRowType = "TEMPLATE_ROW_TYPE_SEATS_ALLOCATED" + and template.templateName = "PE-R2" + and tallySheet.areaId = areaMap.electoralDistrictId + and tallySheetVersionRow.partyId = party.partyId + ) AS seatCount +FROM + (SELECT ext_pe2020_dashboard_area_map.electoralDistrictId + FROM ext_pe2020_dashboard_area_map GROUP BY ext_pe2020_dashboard_area_map.electoralDistrictId) AS areaMap, + area AS electoralDistrict, election AS electoralDistrictElection, election_party AS electionParty, party +WHERE + electoralDistrict.areaId = areaMap.electoralDistrictId + and electoralDistrictElection.electionId = electoralDistrict.electionId + and electoralDistrictElection.electionTemplateName = @election_template_name + and electionParty.electionId = electoralDistrictElection.electionId + and party.partyId = electionParty.partyId +GROUP BY electoralDistrictElection.electionId, electoralDistrict.areaId, party.partyId; + + + +INSERT INTO ext_pe2020_dashboard_party_wise_national_list_seat_allocation(incrementId, electionId, partyId, + nationalListSeatCount) +SELECT + @lastIncrementId, + election.electionId AS electionId, + party.partyId, + (SELECT COALESCE(SUM(tallySheetVersionRow.numValue), 0) + FROM tallySheet, template, templateRow, workflowInstance, tallySheetVersionRow + WHERE + template.templateId = tallySheet.templateId + and templateRow.templateid = template.templateId + and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId + and tallySheetVersionRow.tallySheetVersionId = tallySheet.latestVersionId + and tallySheetVersionRow.templateRowId = templateRow.templateRowId + and workflowInstance.status IN ("Verified", "Ready to Certify", "Certified", "Release Notified", "Released") + and templateRow.templateRowType = "TEMPLATE_ROW_TYPE_SEATS_ALLOCATED" + and template.templateName = "PE-AI-NL-1" + and tallySheet.electionId = election.electionId + and tallySheetVersionRow.partyId = party.partyId + ) AS nationalListSeatCount +FROM + election, election_party AS electionParty, party +WHERE + election.electionId = election.rootElectionId + and election.electionTemplateName = @election_template_name + and electionParty.electionId = election.electionId + and party.partyId = electionParty.partyId +GROUP BY election.electionId, party.partyId; + + + +UPDATE ext_pe2020_dashboard_increment SET active = 1 WHERE id = @lastIncrementId; +DELETE FROM ext_pe2020_dashboard_tally_sheet_status WHERE incrementId < @lastIncrementId; +DELETE FROM ext_pe2020_dashboard_party_wise_vote_results WHERE incrementId < @lastIncrementId; +DELETE FROM ext_pe2020_dashboard_vote_results WHERE incrementId < @lastIncrementId; +DELETE FROM ext_pe2020_dashboard_party_wise_seat_allocation WHERE incrementId < @lastIncrementId; +DELETE FROM ext_pe2020_dashboard_party_wise_national_list_seat_allocation WHERE incrementId < @lastIncrementId; From b14cc9e9384a34cacd5b462c3908aadc994d5d6b Mon Sep 17 00:00:00 2001 From: umayanga Date: Wed, 17 Feb 2021 13:52:59 +0530 Subject: [PATCH 04/15] rename files --- ...rovincial-election-2021-administrative-district-counting.json} | 0 ...provincial-election-2021-administrative-district-results.json} | 0 ...ing.json => provincial-election-2021-provincial-counting.json} | 0 ...ults.json => provincial-election-2021-provincial-results.json} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename results-tabulation-dashboard/provincial-council-election-2021/{parliament-election-2020-electoral-district-counting.json => provincial-election-2021-administrative-district-counting.json} (100%) rename results-tabulation-dashboard/provincial-council-election-2021/{parliament-election-2020-electoral-district-results.json => provincial-election-2021-administrative-district-results.json} (100%) rename results-tabulation-dashboard/provincial-council-election-2021/{parliament-election-2020-all-island-counting.json => provincial-election-2021-provincial-counting.json} (100%) rename results-tabulation-dashboard/provincial-council-election-2021/{parliament-election-2020-all-island-results.json => provincial-election-2021-provincial-results.json} (100%) diff --git a/results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-electoral-district-counting.json b/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-administrative-district-counting.json similarity index 100% rename from results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-electoral-district-counting.json rename to results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-administrative-district-counting.json diff --git a/results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-electoral-district-results.json b/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-administrative-district-results.json similarity index 100% rename from results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-electoral-district-results.json rename to results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-administrative-district-results.json diff --git a/results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-all-island-counting.json b/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-provincial-counting.json similarity index 100% rename from results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-all-island-counting.json rename to results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-provincial-counting.json diff --git a/results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-all-island-results.json b/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-provincial-results.json similarity index 100% rename from results-tabulation-dashboard/provincial-council-election-2021/parliament-election-2020-all-island-results.json rename to results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-provincial-results.json From e6dd4e1ca70a37a5a67dd0a4f891329aee375a8a Mon Sep 17 00:00:00 2001 From: umayanga Date: Wed, 17 Feb 2021 14:11:38 +0530 Subject: [PATCH 05/15] change queries --- .../create-dashboard-tables-and-views.sql | 96 ++++++------ .../drop-dashboard-tables-and-views.sql | 13 +- .../update-counting-dashboard-tables.sql | 140 ++++++++---------- 3 files changed, 118 insertions(+), 131 deletions(-) diff --git a/results-tabulation-dashboard/provincial-council-election-2021/create-dashboard-tables-and-views.sql b/results-tabulation-dashboard/provincial-council-election-2021/create-dashboard-tables-and-views.sql index e124c3da..e3488ede 100644 --- a/results-tabulation-dashboard/provincial-council-election-2021/create-dashboard-tables-and-views.sql +++ b/results-tabulation-dashboard/provincial-council-election-2021/create-dashboard-tables-and-views.sql @@ -1,14 +1,15 @@ -CREATE TABLE IF NOT EXISTS ext_pe2020_dashboard_increment ( +CREATE TABLE IF NOT EXISTS ext_pce2021_dashboard_increment ( id INT AUTO_INCREMENT NOT NULL, active INT, PRIMARY KEY(id) ) ENGINE=INNODB; -CREATE TABLE IF NOT EXISTS ext_pe2020_dashboard_tally_sheet_status ( +CREATE TABLE IF NOT EXISTS ext_pce2021_dashboard_tally_sheet_status ( id INT AUTO_INCREMENT, incrementId INT NOT NULL, electionId INT NOT NULL, - electoralDistrictId INT, + provinceId INT, + administrativeDistrictId INT, pollingDivisionId INT, countingCentreId INT, templateName VARCHAR(50) NOT NULL, @@ -22,11 +23,12 @@ CREATE TABLE IF NOT EXISTS ext_pe2020_dashboard_tally_sheet_status ( PRIMARY KEY(id) ) ENGINE=INNODB; -CREATE TABLE IF NOT EXISTS ext_pe2020_dashboard_party_wise_vote_results ( +CREATE TABLE IF NOT EXISTS ext_pce2021_dashboard_party_wise_vote_results ( id INT AUTO_INCREMENT, incrementId INT NOT NULL, electionId INT NOT NULL, - electoralDistrictId INT, + provinceId INT, + administrativeDistrictId INT, pollingDivisionId INT, countingCentreId INT, voteType VARCHAR(50) NOT NULL, @@ -35,11 +37,12 @@ CREATE TABLE IF NOT EXISTS ext_pe2020_dashboard_party_wise_vote_results ( PRIMARY KEY(id) ) ENGINE=INNODB; -CREATE TABLE IF NOT EXISTS ext_pe2020_dashboard_vote_results ( +CREATE TABLE IF NOT EXISTS ext_pce2021_dashboard_vote_results ( id INT AUTO_INCREMENT, incrementId INT NOT NULL, electionId INT NOT NULL, - electoralDistrictId INT, + provinceId INT, + administrativeDistrictId INT, pollingDivisionId INT, countingCentreId INT, voteType VARCHAR(50) NOT NULL, @@ -49,30 +52,23 @@ CREATE TABLE IF NOT EXISTS ext_pe2020_dashboard_vote_results ( PRIMARY KEY(id) ) ENGINE=INNODB; -CREATE TABLE IF NOT EXISTS ext_pe2020_dashboard_party_wise_seat_allocation ( +CREATE TABLE IF NOT EXISTS ext_pce2021_dashboard_party_wise_seat_allocation ( id INT AUTO_INCREMENT, incrementId INT NOT NULL, electionId INT NOT NULL, - electoralDistrictId INT, + administrativeDistrictId INT, + provinceId INT, partyId INT, seatCount INT, PRIMARY KEY(id) ) ENGINE=INNODB; -CREATE TABLE IF NOT EXISTS ext_pe2020_dashboard_party_wise_national_list_seat_allocation ( - id INT AUTO_INCREMENT, - incrementId INT NOT NULL, - electionId INT NOT NULL, - partyId INT, - nationalListSeatCount INT, - PRIMARY KEY(id) -) ENGINE=INNODB; - -CREATE TABLE IF NOT EXISTS ext_pe2020_dashboard_area_map ( +CREATE TABLE IF NOT EXISTS ext_pce2021_dashboard_area_map ( id INT AUTO_INCREMENT, electionId INT, countryId INT, - electoralDistrictId INT, + provinceId INT, + administrativeDistrictId INT, pollingDivisionId INT, countingCentreId INT, registeredVotersCount INT, @@ -82,14 +78,15 @@ CREATE TABLE IF NOT EXISTS ext_pe2020_dashboard_area_map ( PRIMARY KEY(id) ) ENGINE=INNODB; -DELETE FROM ext_pe2020_dashboard_area_map; +DELETE FROM ext_pce2021_dashboard_area_map; -INSERT INTO ext_pe2020_dashboard_area_map (electionId, countryId, electoralDistrictId, pollingDivisionId, +INSERT INTO ext_pce2021_dashboard_area_map (electionId, countryId, provinceId, administrativeDistrictId, pollingDivisionId, countingCentreId, voteType, registeredVotersCount, registeredPostalVotersCount, registeredDisplacedVotersCount) SELECT country.electionId, country.areaId as countryId, - electoralDistrict.areaId as electoralDistrictId, + province.areaId as provinceId, + administrativeDistrict.areaId as administrativeDistrictId, pollingDivision.areaId as pollingDivisionId, countingCentre.areaId as countingCentreId, "NonPostal" as voteType, @@ -97,11 +94,12 @@ INSERT INTO ext_pe2020_dashboard_area_map (electionId, countryId, electoralDistr COALESCE(SUM(pollingStation._registeredPostalVotersCount)) AS registeredPostalVotersCount, COALESCE(SUM(pollingStation._registeredDisplacedVotersCount)) AS registeredDisplacedVotersCount FROM - area country, area electoralDistrict, area pollingDivision, area pollingDistrict, area pollingStation, + area country area province, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation, area electionCommission, area districtCentre, area countingCentre, - area_area country_electoralDistrict, - area_area electoralDistrict_pollingDivision, + area_area country_province, + area_area province_administrativeDistrict, + area_area administrativeDistrict_pollingDivision, area_area pollingDivision_pollingDistrict, area_area pollingDistrict_pollingStation, @@ -109,11 +107,14 @@ INSERT INTO ext_pe2020_dashboard_area_map (electionId, countryId, electoralDistr area_area districtCentre_countingCentre, area_area countingCentre_pollingStation WHERE - country_electoralDistrict.parentAreaId = country.areaId - and country_electoralDistrict.childAreaId = electoralDistrict.areaId + country_province.parentAreaId = country.areaId + and country_province.childAreaId = province.areaId - and electoralDistrict_pollingDivision.parentAreaId = electoralDistrict.areaId - and electoralDistrict_pollingDivision.childAreaId = pollingDivision.areaId + and province_administrativeDistrict.parentAreaId = province.areaId + and province_administrativeDistrict.childAreaId = administrativeDistrict.areaId + + and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId + and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId @@ -130,40 +131,46 @@ INSERT INTO ext_pe2020_dashboard_area_map (electionId, countryId, electoralDistr and countingCentre_pollingStation.parentAreaId = countingCentre.areaId and countingCentre_pollingStation.childAreaId = pollingStation.areaId - and country.areaType = "Country" and electoralDistrict.areaType = "ElectoralDistrict" + and country.areaType = "Country" and administrativeDistrict.areaType = "administrativeDistrict" and pollingDivision.areaType = "PollingDivision" and pollingDistrict.areaType = "PollingDistrict" and pollingStation.areaType = "PollingStation" and countingCentre.areaType = "CountingCentre" and districtCentre.areaType = "DistrictCentre" and electionCommission.areaType = "ElectionCommission" GROUP BY country.areaId, - electoralDistrict.areaId, + province.areaId, + administrativeDistrict.areaId, pollingDivision.areaId, countingCentre.areaId; -INSERT INTO ext_pe2020_dashboard_area_map (electionId, countryId, electoralDistrictId, pollingDivisionId, +INSERT INTO ext_pce2021_dashboard_area_map (electionId, countryId, provinceId, administrativeDistrictId, pollingDivisionId, countingCentreId, voteType) SELECT country.electionId, country.areaId as countryId, - electoralDistrict.areaId as electoralDistrictId, - electoralDistrict.areaId as pollingDivisionId, + province.areaId as provinceId, + administrativeDistrict.areaId as administrativeDistrictId, + administrativeDistrict.areaId as pollingDivisionId, countingCentre.areaId as countingCentreId, "Postal" AS voteType FROM - area country, area electoralDistrict, + area country, area province, area administrativeDistrict, area electionCommission, area districtCentre, area countingCentre, - area_area country_electoralDistrict, - area_area electoralDistrict_countingCentre, + area_area country_province, + area_area province_administrativeDistrict, + area_area administrativeDistrict_countingCentre, area_area electionCommission_districtCentre, area_area districtCentre_countingCentre WHERE - country_electoralDistrict.parentAreaId = country.areaId - and country_electoralDistrict.childAreaId = electoralDistrict.areaId + country_province.parentAreaId = country.areaId + and country_province.childAreaId = province.areaId + + and province_administrativeDistrict.parentAreaId = province.areaId + and province_administrativeDistrict.childAreaId = administrativeDistrict.areaId - and electoralDistrict_countingCentre.parentAreaId = electoralDistrict.areaId - and electoralDistrict_countingCentre.childAreaId = countingCentre.areaId + and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId + and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId and electionCommission_districtCentre.parentAreaId = electionCommission.areaId and electionCommission_districtCentre.childAreaId = districtCentre.areaId @@ -171,10 +178,11 @@ INSERT INTO ext_pe2020_dashboard_area_map (electionId, countryId, electoralDistr and districtCentre_countingCentre.parentAreaId = districtCentre.areaId and districtCentre_countingCentre.childAreaId = countingCentre.areaId - and country.areaType = "Country" and electoralDistrict.areaType = "ElectoralDistrict" + and country.areaType = "Country" and province.areaType = "Province" and administrativeDistrict.areaType = "administrativeDistrict" and countingCentre.areaType = "CountingCentre" and districtCentre.areaType = "DistrictCentre" and electionCommission.areaType = "ElectionCommission" GROUP BY country.areaId, - electoralDistrict.areaId, + province.areaId, + administrativeDistrict.areaId, countingCentre.areaId; diff --git a/results-tabulation-dashboard/provincial-council-election-2021/drop-dashboard-tables-and-views.sql b/results-tabulation-dashboard/provincial-council-election-2021/drop-dashboard-tables-and-views.sql index 04717cd0..9e2eacaa 100644 --- a/results-tabulation-dashboard/provincial-council-election-2021/drop-dashboard-tables-and-views.sql +++ b/results-tabulation-dashboard/provincial-council-election-2021/drop-dashboard-tables-and-views.sql @@ -1,7 +1,6 @@ -DROP table ext_pe2020_dashboard_increment; -DROP table ext_pe2020_dashboard_tally_sheet_status; -DROP table ext_pe2020_dashboard_area_map; -DROP table ext_pe2020_dashboard_party_wise_vote_results; -DROP table ext_pe2020_dashboard_vote_results; -DROP table ext_pe2020_dashboard_party_wise_seat_allocation; -DROP table ext_pe2020_dashboard_party_wise_national_list_seat_allocation; \ No newline at end of file +DROP table ext_pce2021_dashboard_increment; +DROP table ext_pce2021_dashboard_tally_sheet_status; +DROP table ext_pce2021_dashboard_area_map; +DROP table ext_pce2021_dashboard_party_wise_vote_results; +DROP table ext_pce2021_dashboard_vote_results; +DROP table ext_pce2021_dashboard_party_wise_seat_allocation; \ No newline at end of file diff --git a/results-tabulation-dashboard/provincial-council-election-2021/update-counting-dashboard-tables.sql b/results-tabulation-dashboard/provincial-council-election-2021/update-counting-dashboard-tables.sql index 2d1d8a70..d4efcdd9 100644 --- a/results-tabulation-dashboard/provincial-council-election-2021/update-counting-dashboard-tables.sql +++ b/results-tabulation-dashboard/provincial-council-election-2021/update-counting-dashboard-tables.sql @@ -1,17 +1,18 @@ SET @election_template_name = "PARLIAMENT_ELECTION_2020"; -INSERT INTO ext_pe2020_dashboard_increment (active) VALUES(0); +INSERT INTO ext_pce2021_dashboard_increment (active) VALUES(0); SET @lastIncrementId = LAST_INSERT_ID(); -INSERT INTO ext_pe2020_dashboard_tally_sheet_status (incrementId, electionId, electoralDistrictId, pollingDivisionId, +INSERT INTO ext_pce2021_dashboard_tally_sheet_status (incrementId, electionId,provinceId, administrativeDistrictId, pollingDivisionId, countingCentreId, templateName, voteType, partyId, verifiedTallySheetCount, releasedTallySheetCount, emptyTallySheetCount, savedTallySheetCount, totalTallySheetCount) SELECT @lastIncrementId, election.rootElectionId as electionId, - areaMap.electoralDistrictId, + areaMap.provinceId, + areaMap.administrativeDistrictId, areaMap.pollingDivisionId, areaMap.countingCentreId, template.templateName, @@ -24,7 +25,7 @@ SELECT COUNT(IF(workflowInstance.status = "Saved", tallySheet.tallySheetId, NULL)) AS savedTallySheetCount, COUNT(tallySheet.tallySheetId) AS totalTallySheetCount FROM - ext_pe2020_dashboard_area_map AS areaMap, + ext_pce2021_dashboard_area_map AS areaMap, election, template, workflowInstance, tallySheet left join metaData on metaData.metaId = tallySheet.metaId and metaData.metaDataKey = "partyId" @@ -36,7 +37,8 @@ WHERE and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId GROUP BY election.rootElectionId, - areaMap.electoralDistrictId, + areaMap.provinceId, + areaMap.administrativeDistrictId, areaMap.pollingDivisionId, areaMap.countingCentreId, template.templateName, @@ -45,13 +47,14 @@ GROUP BY -INSERT INTO ext_pe2020_dashboard_tally_sheet_status (incrementId, electionId, electoralDistrictId, pollingDivisionId, +INSERT INTO ext_pce2021_dashboard_tally_sheet_status (incrementId, electionId, provinceId, administrativeDistrictId, pollingDivisionId, templateName, voteType, partyId, verifiedTallySheetCount, releasedTallySheetCount, emptyTallySheetCount, savedTallySheetCount, totalTallySheetCount) SELECT @lastIncrementId, election.rootElectionId as electionId, - areaMap.electoralDistrictId, + areaMap.provinceId, + areaMap.administrativeDistrictId, areaMap.pollingDivisionId, template.templateName, election.voteType, @@ -63,8 +66,8 @@ SELECT COUNT(IF(workflowInstance.status = "Saved", tallySheet.tallySheetId, NULL)) AS savedTallySheetCount, COUNT(tallySheet.tallySheetId) AS totalTallySheetCount FROM - (SELECT electoralDistrictId, pollingDivisionId FROM ext_pe2020_dashboard_area_map - WHERE voteTYpe = "NonPostal" GROUP BY electoralDistrictId, pollingDivisionId) AS areaMap, + (SELECT provinceId, administrativeDistrictId, pollingDivisionId FROM ext_pce2021_dashboard_area_map + WHERE voteTYpe = "NonPostal" GROUP BY provinceId, administrativeDistrictId, pollingDivisionId) AS areaMap, election, template, workflowInstance, tallySheet left join metaData on metaData.metaId = tallySheet.metaId and metaData.metaDataKey = "partyId" @@ -76,7 +79,8 @@ WHERE and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId GROUP BY election.rootElectionId, - areaMap.electoralDistrictId, + areaMap.provinceId, + areaMap.administrativeDistrictId, areaMap.pollingDivisionId, template.templateName, election.voteType, @@ -84,13 +88,14 @@ GROUP BY -INSERT INTO ext_pe2020_dashboard_tally_sheet_status (incrementId, electionId, - electoralDistrictId, templateName, voteType, partyId, verifiedTallySheetCount, releasedTallySheetCount, +INSERT INTO ext_pce2021_dashboard_tally_sheet_status (incrementId, electionId, provinceId, + administrativeDistrictId, templateName, voteType, partyId, verifiedTallySheetCount, releasedTallySheetCount, emptyTallySheetCount, savedTallySheetCount, totalTallySheetCount) SELECT @lastIncrementId, election.rootElectionId as electionId, - areaMap.electoralDistrictId, + areaMap.provinceId, + areaMap.administrativeDistrictId, template.templateName, election.voteType, metaData.metaDataValue as "partyId", @@ -101,32 +106,34 @@ SELECT COUNT(IF(workflowInstance.status = "Saved", tallySheet.tallySheetId, NULL)) AS savedTallySheetCount, COUNT(tallySheet.tallySheetId) AS totalTallySheetCount FROM - (SELECT electoralDistrictId FROM ext_pe2020_dashboard_area_map - WHERE voteTYpe = "NonPostal" GROUP BY electoralDistrictId) AS areaMap, + (SELECT provinceId, administrativeDistrictId FROM ext_pce2021_dashboard_area_map + WHERE voteTYpe = "NonPostal" GROUP BY provinceId, administrativeDistrictId) AS areaMap, election, template, workflowInstance, tallySheet left join metaData on metaData.metaId = tallySheet.metaId and metaData.metaDataKey = "partyId" WHERE - tallySheet.areaId = areaMap.electoralDistrictId + tallySheet.areaId = areaMap.administrativeDistrictId and election.electionId = tallySheet.electionId and election.electionTemplateName = @election_template_name and template.templateId = tallySheet.templateId and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId GROUP BY election.rootElectionId, - areaMap.electoralDistrictId, + areaMap.provinceId, + areaMap.administrativeDistrictId, template.templateName, election.voteType, metaData.metaDataValue; -INSERT INTO ext_pe2020_dashboard_party_wise_vote_results (incrementId, electionId, electoralDistrictId, +INSERT INTO ext_pce2021_dashboard_party_wise_vote_results (incrementId, electionId, provinceId, administrativeDistrictId, pollingDivisionId, countingCentreId, voteType, partyId, voteCount) SELECT @lastIncrementId, countingCentreElection.rootElectionId AS electionId, - electoralDistrict.areaId AS electoralDistrictId, + province.areaId AS provinceId, + administrativeDistrict.areaId AS administrativeDistrictId, pollingDivision.areaId AS pollingDivisionId, countingCentre.areaId AS countingCentreId, countingCentreElection.voteType, @@ -141,16 +148,17 @@ SELECT and tallySheetVersionRow.templateRowId = templateRow.templateRowId and workflowInstance.status IN ("Verified") and templateRow.templateRowType = "PARTY_WISE_VOTE" - and template.templateName = "PE-27" + and template.templateName = "PCE-35" and tallySheet.areaId = countingCentreId and tallySheetVersionRow.partyId = party.partyId ) AS voteCount -FROM ext_pe2020_dashboard_area_map AS areaMap, election_party AS electionParty, party, - area AS countingCentre, election AS countingCentreElection, area AS pollingDivision, area AS electoralDistrict +FROM ext_pce2021_dashboard_area_map AS areaMap, election_party AS electionParty, party, + area AS countingCentre, election AS countingCentreElection, area AS pollingDivision, area AS province, area AS administrativeDistrict WHERE countingCentre.areaId = areaMap.countingCentreId and pollingDivision.areaId = areaMap.pollingDivisionId - and electoralDistrict.areaId = areaMap.electoralDistrictId + and province.areaId = areaMap.provinceId + and administrativeDistrict.areaId = areaMap.administrativeDistrictId and countingCentreElection.electionId = countingCentre.electionId and countingCentreElection.electionTemplateName = @election_template_name and electionParty.electionId = countingCentreElection.electionId @@ -158,20 +166,21 @@ WHERE -INSERT INTO ext_pe2020_dashboard_vote_results (incrementId, electionId, electoralDistrictId, +INSERT INTO ext_pce2021_dashboard_vote_results (incrementId, electionId, provinceId, administrativeDistrictId, pollingDivisionId, countingCentreId, voteType, validVoteCount, rejectedVoteCount, voteCount) SELECT @lastIncrementId, countingCentreElection.rootElectionId AS electionId, - electoralDistrict.areaId AS electoralDistrictId, + province.areaId AS provinceId, + administrativeDistrict.areaId AS administrativeDistrictId, pollingDivision.areaId AS pollingDivisionId, countingCentre.areaId AS countingCentreId, countingCentreElection.voteType, COALESCE(SUM(voteCounts.validVoteCount), 0), COALESCE(SUM(voteCounts.rejectedVoteCount), 0), COALESCE(SUM(voteCounts.voteCount), 0) -FROM ext_pe2020_dashboard_area_map AS areaMap, - area AS countingCentre, election AS countingCentreElection, area AS pollingDivision, area AS electoralDistrict, +FROM ext_pce2021_dashboard_area_map AS areaMap, + area AS countingCentre, election AS countingCentreElection, area AS pollingDivision, area AS province, area AS administrativeDistrict, (SELECT tallySheet.areaId AS countingCentreId, SUM(IF(templateRow.templateRowType = "PARTY_WISE_VOTE",tallySheetVersionRow.numValue,0)) validVoteCount, @@ -186,30 +195,33 @@ FROM ext_pe2020_dashboard_area_map AS areaMap, and tallySheetVersionRow.templateRowId = templateRow.templateRowId and workflowInstance.status IN ("Verified") and templateRow.templateRowType IN ("PARTY_WISE_VOTE", "REJECTED_VOTE") - and template.templateName = "PE-27" + and template.templateName = "PCE-35" GROUP BY tallySheet.areaId ) AS voteCounts WHERE countingCentre.areaId = areaMap.countingCentreId and pollingDivision.areaId = areaMap.pollingDivisionId - and electoralDistrict.areaId = areaMap.electoralDistrictId + and province.areaId = areaMap.provinceId + and administrativeDistrict.areaId = areaMap.administrativeDistrictId and countingCentreElection.electionId = countingCentre.electionId and voteCounts.countingCentreId = countingCentre.areaId and countingCentreElection.electionTemplateName = @election_template_name GROUP BY countingCentreElection.rootElectionId, - electoralDistrict.areaId, + province.areaId, + administrativeDistrict.areaId, pollingDivision.areaId, countingCentre.areaId, countingCentreElection.voteType; -INSERT INTO ext_pe2020_dashboard_party_wise_seat_allocation (incrementId, electionId, electoralDistrictId, partyId, seatCount) +INSERT INTO ext_pce2021_dashboard_party_wise_seat_allocation (incrementId, electionId, provinceId, administrativeDistrictId, partyId, seatCount) SELECT @lastIncrementId, - electoralDistrictElection.rootElectionId AS electionId, - electoralDistrict.areaId AS electoralDistrictId, + administrativeDistrictElection.rootElectionId AS provinceElectionId, + administrativeDistrict.areaId AS administrativeDistrictId,provinceElection.rootElectionId AS electionId, + province.areaId AS provinceId, party.partyId, (SELECT COALESCE(SUM(tallySheetVersionRow.numValue), 0) FROM tallySheet, template, templateRow, workflowInstance, tallySheetVersionRow @@ -221,58 +233,26 @@ SELECT and tallySheetVersionRow.templateRowId = templateRow.templateRowId and workflowInstance.status IN ("Verified", "Ready to Certify", "Certified", "Release Notified", "Released") and templateRow.templateRowType = "TEMPLATE_ROW_TYPE_SEATS_ALLOCATED" - and template.templateName = "PE-R2" - and tallySheet.areaId = areaMap.electoralDistrictId + and template.templateName = "PCE-R2" + and tallySheet.areaId = areaMap.administrativeDistrictId and tallySheetVersionRow.partyId = party.partyId ) AS seatCount FROM - (SELECT ext_pe2020_dashboard_area_map.electoralDistrictId - FROM ext_pe2020_dashboard_area_map GROUP BY ext_pe2020_dashboard_area_map.electoralDistrictId) AS areaMap, - area AS electoralDistrict, election AS electoralDistrictElection, election_party AS electionParty, party + (SELECT ext_pce2021_dashboard_area_map.administrativeDistrictId,ext_pce2021_dashboard_area_map.provinceId + FROM ext_pce2021_dashboard_area_map GROUP BY ext_pce2021_dashboard_area_map.provinceId,ext_pce2021_dashboard_area_map.administrativeDistrictId) AS areaMap, + area AS administrativeDistrict, area AS province, election AS administrativeDistrictElection, election_party AS electionParty, party WHERE - electoralDistrict.areaId = areaMap.electoralDistrictId - and electoralDistrictElection.electionId = electoralDistrict.electionId - and electoralDistrictElection.electionTemplateName = @election_template_name - and electionParty.electionId = electoralDistrictElection.electionId + administrativeDistrict.areaId = areaMap.administrativeDistrictId + and administrativeDistrictElection.electionId = administrativeDistrict.electionId + and administrativeDistrictElection.electionTemplateName = @election_template_name + and electionParty.electionId = administrativeDistrictElection.electionId and party.partyId = electionParty.partyId -GROUP BY electoralDistrictElection.electionId, electoralDistrict.areaId, party.partyId; +GROUP BY administrativeDistrictElection.electionId, administrativeDistrict.areaId, party.partyId; -INSERT INTO ext_pe2020_dashboard_party_wise_national_list_seat_allocation(incrementId, electionId, partyId, - nationalListSeatCount) -SELECT - @lastIncrementId, - election.electionId AS electionId, - party.partyId, - (SELECT COALESCE(SUM(tallySheetVersionRow.numValue), 0) - FROM tallySheet, template, templateRow, workflowInstance, tallySheetVersionRow - WHERE - template.templateId = tallySheet.templateId - and templateRow.templateid = template.templateId - and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId - and tallySheetVersionRow.tallySheetVersionId = tallySheet.latestVersionId - and tallySheetVersionRow.templateRowId = templateRow.templateRowId - and workflowInstance.status IN ("Verified", "Ready to Certify", "Certified", "Release Notified", "Released") - and templateRow.templateRowType = "TEMPLATE_ROW_TYPE_SEATS_ALLOCATED" - and template.templateName = "PE-AI-NL-1" - and tallySheet.electionId = election.electionId - and tallySheetVersionRow.partyId = party.partyId - ) AS nationalListSeatCount -FROM - election, election_party AS electionParty, party -WHERE - election.electionId = election.rootElectionId - and election.electionTemplateName = @election_template_name - and electionParty.electionId = election.electionId - and party.partyId = electionParty.partyId -GROUP BY election.electionId, party.partyId; - - - -UPDATE ext_pe2020_dashboard_increment SET active = 1 WHERE id = @lastIncrementId; -DELETE FROM ext_pe2020_dashboard_tally_sheet_status WHERE incrementId < @lastIncrementId; -DELETE FROM ext_pe2020_dashboard_party_wise_vote_results WHERE incrementId < @lastIncrementId; -DELETE FROM ext_pe2020_dashboard_vote_results WHERE incrementId < @lastIncrementId; -DELETE FROM ext_pe2020_dashboard_party_wise_seat_allocation WHERE incrementId < @lastIncrementId; -DELETE FROM ext_pe2020_dashboard_party_wise_national_list_seat_allocation WHERE incrementId < @lastIncrementId; +UPDATE ext_pce2021_dashboard_increment SET active = 1 WHERE id = @lastIncrementId; +DELETE FROM ext_pce2021_dashboard_tally_sheet_status WHERE incrementId < @lastIncrementId; +DELETE FROM ext_pce2021_dashboard_party_wise_vote_results WHERE incrementId < @lastIncrementId; +DELETE FROM ext_pce2021_dashboard_vote_results WHERE incrementId < @lastIncrementId; +DELETE FROM ext_pce2021_dashboard_party_wise_seat_allocation WHERE incrementId < @lastIncrementId; From e12344e4378d2be7b10286561e822554ae58c2e7 Mon Sep 17 00:00:00 2001 From: umayanga Date: Mon, 8 Mar 2021 18:11:55 +0530 Subject: [PATCH 06/15] change provincial report labels --- .../extended-election/ProvincialCouncilElection2021/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/results-tabulation-ui/src/components/election/extended-election/ProvincialCouncilElection2021/index.js b/results-tabulation-ui/src/components/election/extended-election/ProvincialCouncilElection2021/index.js index 4aad374a..2bda42b1 100644 --- a/results-tabulation-ui/src/components/election/extended-election/ProvincialCouncilElection2021/index.js +++ b/results-tabulation-ui/src/components/election/extended-election/ProvincialCouncilElection2021/index.js @@ -144,8 +144,8 @@ export default class ExtendedElectionProvincialCouncilElection2021 extends Exten "Seat Allocation 1", "Bonus Seat Allocation 1", "Bonus Seat Allocation 2", - "Seat Allocation 2", - "Candidates List" + "Seat Allocation (Votes + Seats)", + "Members List" ]; return tallySheetCodes.map((tallySheetCode, tallySheetCodeIndex) => { From 65495c6bb06189a5da1f309e8f994bef52699b09 Mon Sep 17 00:00:00 2001 From: umayanga Date: Mon, 8 Mar 2021 21:37:10 +0530 Subject: [PATCH 07/15] remove minimum vote count limit --- .../ExtendedTallySheet/ExtendedTallySheet_PCE_R2.py | 8 +++----- .../__init__.py | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/results-tabulation-api/ext/ExtendedElection/ExtendedElectionProvincialCouncilElection2021/ExtendedTallySheet/ExtendedTallySheet_PCE_R2.py b/results-tabulation-api/ext/ExtendedElection/ExtendedElectionProvincialCouncilElection2021/ExtendedTallySheet/ExtendedTallySheet_PCE_R2.py index 9da0275b..bc27fab5 100644 --- a/results-tabulation-api/ext/ExtendedElection/ExtendedElectionProvincialCouncilElection2021/ExtendedTallySheet/ExtendedTallySheet_PCE_R2.py +++ b/results-tabulation-api/ext/ExtendedElection/ExtendedElectionProvincialCouncilElection2021/ExtendedTallySheet/ExtendedTallySheet_PCE_R2.py @@ -81,10 +81,9 @@ def get_post_save_request_content(self): election = self.tallySheetVersion.tallySheet.election tally_sheet_id = self.tallySheetVersion.tallySheetId - minimum_vote_count_percentage_required = election.meta.get_meta_data( - metaDataKey=META_DATA_KEY_ELECTION_NUMBER_OF_VALID_VOTE_PERCENTAGE_REQUIRED_FOR_SEAT_ALLOCATION) + minimum_vote_count_percentage_required = 0.00 if minimum_vote_count_percentage_required is not None: - minimum_vote_count_percentage_required = float(minimum_vote_count_percentage_required) + minimum_vote_count_percentage_required = float(0.00) number_of_members_to_be_elected = election.meta.get_meta_data( metaDataKey=META_DATA_KEY_ELECTION_NUMBER_OF_SEATS_ALLOCATED) @@ -246,8 +245,7 @@ def html(self, title="", total_registered_voters=None): election = self.tallySheetVersion.tallySheet.election tally_sheet_id = self.tallySheetVersion.tallySheetId - minimum_vote_count_percentage_required = float(election.meta.get_meta_data( - metaDataKey=META_DATA_KEY_ELECTION_NUMBER_OF_VALID_VOTE_PERCENTAGE_REQUIRED_FOR_SEAT_ALLOCATION)) + minimum_vote_count_percentage_required = float(0.00) minimum_valid_vote_count_required_per_party_to_be_qualified = total_valid_vote_count * minimum_vote_count_percentage_required diff --git a/results-tabulation-api/ext/ExtendedElection/ExtendedElectionProvincialCouncilElection2021/__init__.py b/results-tabulation-api/ext/ExtendedElection/ExtendedElectionProvincialCouncilElection2021/__init__.py index da6d8609..e55f23ea 100644 --- a/results-tabulation-api/ext/ExtendedElection/ExtendedElectionProvincialCouncilElection2021/__init__.py +++ b/results-tabulation-api/ext/ExtendedElection/ExtendedElectionProvincialCouncilElection2021/__init__.py @@ -985,7 +985,7 @@ def _get_district_centre_entry(row): ) administrative_district_election.meta.add_meta_data( metaDataKey=META_DATA_KEY_ELECTION_NUMBER_OF_VALID_VOTE_PERCENTAGE_REQUIRED_FOR_SEAT_ALLOCATION, - metaDataValue=0.05 + metaDataValue=0.00 ) # extract_csv_files() From eefea1921e04014553bdfcc80e6486e9706a7e98 Mon Sep 17 00:00:00 2001 From: umayanga Date: Mon, 8 Mar 2021 21:44:59 +0530 Subject: [PATCH 08/15] PCE-R/2 template update --- .../ProvincialCouncilElection2021/PCE-R2.html | 502 +++++++++--------- 1 file changed, 251 insertions(+), 251 deletions(-) diff --git a/results-tabulation-api/templates/ProvincialCouncilElection2021/PCE-R2.html b/results-tabulation-api/templates/ProvincialCouncilElection2021/PCE-R2.html index df05c05b..76c3cf7f 100644 --- a/results-tabulation-api/templates/ProvincialCouncilElection2021/PCE-R2.html +++ b/results-tabulation-api/templates/ProvincialCouncilElection2021/PCE-R2.html @@ -30,238 +30,238 @@

PCE/R2

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Calculating the number of MPs elected
- 1. Total number of valid votes counted - :- -
{{content.totalVoteCounts}}
-
- 2. 1/20th portion of the total valid votes - :- -
{{content.twentiethOfTotalVoteCounts}}
-
- 3. Total number of votes polled by all parties and independent groups - with less than 1/20 of the total valid votes - :- -
{{content.total_less_than_twentiethOfTotalVoteCounts}}
-
- 4. Calculating the relevant number of votes -
- To calculate the relevant number of votes, the total number of - votes obtained by all parties and independent groups with less - than 1/20 of the total valid votes (sum referred to in 3 above) - should be deducted from the total number of valid votes (sum referred - to in 1 above). -
- The deduction is indicated below. -
-
-
(I)
-
 
-
Total number of valid votes
-
-
= -
{{content.totalVoteCounts}}
-
-
-
(II)
-
 
-
Total number of votes polled by all parties and groups with - less than 1/20 of the total valid votes
-
-
= -
{{content.total_less_than_twentiethOfTotalVoteCounts}}
-
-
-
(III)
-
 
-
The number of votes resulting from such deduction (relevant - number of votes)
-
-
= -
{{content.total_votes_after_deduction}}
-
- 5. Calculating the resulting number -
-
-
I.
-
 
-
To get the answer, the relevant number of votes (sum referred to - in 4 (III) above) should be divided by the number of members to - be elected for the relevant administrative district reduced by one.
-
-
-
-
II.
-
 
-
The number of members to be elected for the administrative - district deducted by one
-
-
:- -
{{content.number_of_members_to_be_elected_minus_1}}
-
-
-
III.
-
 
-
The relevant number of votes (number refered to in 4(III) - above) shall be divided by the number of members to be elected - for that administrative district reduced by one (number referred to in - 5(II) above) (indicate in interger and fractions)
-
-
:- -
{{content.relevant_no_of_votes_div_by_no_of_members}}
-
- (If the number resulting from such division is an integer, that - integer, or if that number is an integer and fraction, the integer - immediately higher to that integer and fraction is deemed as the - “resulting number.”) -
- 6. Accordingly, the resulting number is - :- -
{{content.rounded_relevant_no_of_votes_div_by_no_of_members}}
-
-
-
7.
-
 
-
Details of the parties and independent groups entitled for the - number of {{content.number_of_members_to_be_elected_minus_1}} members - to be elected for the relevant administrative district - reduced by one (enter only the details of parties and groups entitled - for members to be retuned)
-
-
-
-
 
-
(N.B. :- The number of votes polled by each party / independent - group beginning with the party or group which polled the highest - number of votes (descending order) shall be indicated in the second - column against their names to be mentioned in the first column.)
-
-
+{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{##} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{##} +{# #} +{# #} +{# #} +{##} +{# #} +{# #} +{# #} +{# #} +{##} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{##} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{##} +{##} +{##} +{# #} +{# #} +{# #} +{##} +{# #} +{# #} +{# #} +{# #} +{##} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{##} +{##} +{##} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{##} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{#
Calculating the number of MPs elected
#} +{# 1. Total number of valid votes counted#} +{# :-#} +{#
{{content.totalVoteCounts}}
#} +{#
#} +{# 2. 1/20th portion of the total valid votes#} +{# :-#} +{#
{{content.twentiethOfTotalVoteCounts}}
#} +{#
#} +{# 3. Total number of votes polled by all parties and independent groups#} +{# with less than 1/20 of the total valid votes#} +{# :-#} +{#
{{content.total_less_than_twentiethOfTotalVoteCounts}}
#} +{#
#} +{# 4. Calculating the relevant number of votes#} +{#
#} +{# To calculate the relevant number of votes, the total number of#} +{# votes obtained by all parties and independent groups with less#} +{# than 1/20 of the total valid votes (sum referred to in 3 above)#} +{# should be deducted from the total number of valid votes (sum referred#} +{# to in 1 above).#} +{#
#} +{# The deduction is indicated below.#} +{#
#} +{#
#} +{#
(I)
#} +{#
 
#} +{#
Total number of valid votes
#} +{#
#} +{#
=#} +{#
{{content.totalVoteCounts}}
#} +{#
#} +{#
#} +{#
(II)
#} +{#
 
#} +{#
Total number of votes polled by all parties and groups with#} +{# less than 1/20 of the total valid votes
#} +{#
#} +{#
=#} +{#
{{content.total_less_than_twentiethOfTotalVoteCounts}}
#} +{#
#} +{#
#} +{#
(III)
#} +{#
 
#} +{#
The number of votes resulting from such deduction (relevant#} +{# number of votes)
#} +{#
#} +{#
=#} +{#
{{content.total_votes_after_deduction}}
#} +{#
#} +{# 5. Calculating the resulting number#} +{#
#} +{#
#} +{#
I.
#} +{#
 
#} +{#
To get the answer, the relevant number of votes (sum referred to#} +{# in 4 (III) above) should be divided by the number of members to#} +{# be elected for the relevant administrative district reduced by one.
#} +{#
#} +{#
#} +{#
#} +{#
II.
#} +{#
 
#} +{#
The number of members to be elected for the administrative#} +{# district deducted by one
#} +{#
#} +{#
:-#} +{#
{{content.number_of_members_to_be_elected_minus_1}}
#} +{#
#} +{#
#} +{#
III.
#} +{#
 
#} +{#
The relevant number of votes (number refered to in 4(III)#} +{# above) shall be divided by the number of members to be elected#} +{# for that administrative district reduced by one (number referred to in#} +{# 5(II) above) (indicate in interger and fractions)
#} +{#
#} +{#
:-#} +{#
{{content.relevant_no_of_votes_div_by_no_of_members}}
#} +{#
#} +{# (If the number resulting from such division is an integer, that#} +{# integer, or if that number is an integer and fraction, the integer#} +{# immediately higher to that integer and fraction is deemed as the#} +{# “resulting number.”)#} +{#
#} +{# 6. Accordingly, the resulting number is#} +{# :-#} +{#
{{content.rounded_relevant_no_of_votes_div_by_no_of_members}}
#} +{#
#} +{#
#} +{#
7.
#} +{#
 
#} +{#
Details of the parties and independent groups entitled for the#} +{# number of {{content.number_of_members_to_be_elected_minus_1}} members#} +{# to be elected for the relevant administrative district#} +{# reduced by one (enter only the details of parties and groups entitled#} +{# for members to be retuned)
#} +{#
#} +{#
#} +{#
#} +{#
 
#} +{#
(N.B. :- The number of votes polled by each party / independent#} +{# group beginning with the party or group which polled the highest#} +{# number of votes (descending order) shall be indicated in the second#} +{# column against their names to be mentioned in the first column.)
#} +{#
#} +{#
#} @@ -305,25 +305,25 @@

PCE/R2

- - - - - - - -
-
-
8.
-
 
-
The number of members equal to the whole number resulting from - the division by the resulting number of the votes polled by each - party/group should be indicated in the 3rd column, the number of - members elected on the basis of the highest of the remainder in the votes - if any, in the 5th column, and the total number - of members allotted to each party/group should be indicated in the 7th column.
-
-
+{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{# #} +{#
#} +{#
#} +{#
8.
#} +{#
 
#} +{#
The number of members equal to the whole number resulting from#} +{# the division by the resulting number of the votes polled by each#} +{# party/group should be indicated in the 3rd column, the number of#} +{# members elected on the basis of the highest of the remainder in the votes#} +{# if any, in the 5th column, and the total number#} +{# of members allotted to each party/group should be indicated in the 7th column.
#} +{#
#} +{#
#} From b3522ba418ef9f4ac351a9eac76b22895813d2e7 Mon Sep 17 00:00:00 2001 From: umayanga Date: Tue, 9 Mar 2021 11:21:03 +0530 Subject: [PATCH 09/15] seat count level to floor --- .../ExtendedTallySheet/ExtendedTallySheet_PCE_R2.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/results-tabulation-api/ext/ExtendedElection/ExtendedElectionProvincialCouncilElection2021/ExtendedTallySheet/ExtendedTallySheet_PCE_R2.py b/results-tabulation-api/ext/ExtendedElection/ExtendedElectionProvincialCouncilElection2021/ExtendedTallySheet/ExtendedTallySheet_PCE_R2.py index bc27fab5..90128294 100644 --- a/results-tabulation-api/ext/ExtendedElection/ExtendedElectionProvincialCouncilElection2021/ExtendedTallySheet/ExtendedTallySheet_PCE_R2.py +++ b/results-tabulation-api/ext/ExtendedElection/ExtendedElectionProvincialCouncilElection2021/ExtendedTallySheet/ExtendedTallySheet_PCE_R2.py @@ -165,15 +165,15 @@ def populate_seats_per_party(self, minimum_vote_count_percentage_required, numbe # df.at[index, 'bonusSeatsAllocated'] = 0 valid_vote_count_required_per_seat = total_valid_vote_count_of_qualified_parties / number_of_members_to_be_elected - valid_vote_count_required_per_seat_ceil = math.ceil(valid_vote_count_required_per_seat) + valid_vote_count_required_per_seat_floor = math.floor(valid_vote_count_required_per_seat) for index in df.index: num_value = df.at[index, 'numValue'] if df.at[index, 'qualifiedForSeatsAllocation']: - number_of_seats_qualified = math.floor(num_value / valid_vote_count_required_per_seat_ceil) + number_of_seats_qualified = math.floor(num_value / valid_vote_count_required_per_seat_floor) df.at[index, 'seatsAllocatedFromRound1'] = number_of_seats_qualified number_of_members_to_be_elected -= number_of_seats_qualified - df.at[index, 'validVotesRemainFromRound1'] = num_value % valid_vote_count_required_per_seat_ceil + df.at[index, 'validVotesRemainFromRound1'] = num_value % valid_vote_count_required_per_seat_floor else: df.at[index, 'seatsAllocatedFromRound1'] = 0 df.at[index, 'validVotesRemainFromRound1'] = 0 @@ -196,7 +196,7 @@ def populate_seats_per_party(self, minimum_vote_count_percentage_required, numbe df = df.sort_values(by=['numValue'], ascending=False) df["voteCountCeilPerSeat"] = pd.Series( - np.full(len(df.index), valid_vote_count_required_per_seat_ceil), + np.full(len(df.index), valid_vote_count_required_per_seat_floor), index=df.index) df["minimumVoteCountRequiredForSeatAllocation"] = pd.Series( np.full(len(df.index), _minimum_valid_vote_count_required_per_party_to_be_qualified), From edd984e580bde1243f12559b2a1eea1907930703 Mon Sep 17 00:00:00 2001 From: umayanga Date: Wed, 17 Mar 2021 15:36:59 +0530 Subject: [PATCH 10/15] update dashboard create --- .../create-dashboard-tables-and-views.sql | 2 +- .../update-counting-dashboard-tables.sql | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/results-tabulation-dashboard/provincial-council-election-2021/create-dashboard-tables-and-views.sql b/results-tabulation-dashboard/provincial-council-election-2021/create-dashboard-tables-and-views.sql index e3488ede..520d9398 100644 --- a/results-tabulation-dashboard/provincial-council-election-2021/create-dashboard-tables-and-views.sql +++ b/results-tabulation-dashboard/provincial-council-election-2021/create-dashboard-tables-and-views.sql @@ -94,7 +94,7 @@ INSERT INTO ext_pce2021_dashboard_area_map (electionId, countryId, provinceId, a COALESCE(SUM(pollingStation._registeredPostalVotersCount)) AS registeredPostalVotersCount, COALESCE(SUM(pollingStation._registeredDisplacedVotersCount)) AS registeredDisplacedVotersCount FROM - area country area province, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation, + area country, area province, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation, area electionCommission, area districtCentre, area countingCentre, area_area country_province, diff --git a/results-tabulation-dashboard/provincial-council-election-2021/update-counting-dashboard-tables.sql b/results-tabulation-dashboard/provincial-council-election-2021/update-counting-dashboard-tables.sql index d4efcdd9..b4be16fa 100644 --- a/results-tabulation-dashboard/provincial-council-election-2021/update-counting-dashboard-tables.sql +++ b/results-tabulation-dashboard/provincial-council-election-2021/update-counting-dashboard-tables.sql @@ -1,4 +1,4 @@ -SET @election_template_name = "PARLIAMENT_ELECTION_2020"; +SET @election_template_name = "PROVINCIAL_COUNCIL_ELECTION_2021"; INSERT INTO ext_pce2021_dashboard_increment (active) VALUES(0); @@ -220,7 +220,8 @@ INSERT INTO ext_pce2021_dashboard_party_wise_seat_allocation (incrementId, elect SELECT @lastIncrementId, administrativeDistrictElection.rootElectionId AS provinceElectionId, - administrativeDistrict.areaId AS administrativeDistrictId,provinceElection.rootElectionId AS electionId, + administrativeDistrict.areaId AS administrativeDistrictId, +-- provinceElection.rootElectionId AS electionId, province.areaId AS provinceId, party.partyId, (SELECT COALESCE(SUM(tallySheetVersionRow.numValue), 0) From cd0ae7fe75ec17478022931f2b19334a86ba1736 Mon Sep 17 00:00:00 2001 From: Kosala Gangabadage Date: Wed, 17 Mar 2021 15:56:28 +0530 Subject: [PATCH 11/15] Platformer GitHub Action Created --- ...r-b543d3c0-2b9f-4b3a-b87b-6d3bb0c64537.yml | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/platformer-b543d3c0-2b9f-4b3a-b87b-6d3bb0c64537.yml diff --git a/.github/workflows/platformer-b543d3c0-2b9f-4b3a-b87b-6d3bb0c64537.yml b/.github/workflows/platformer-b543d3c0-2b9f-4b3a-b87b-6d3bb0c64537.yml new file mode 100644 index 00000000..704f8515 --- /dev/null +++ b/.github/workflows/platformer-b543d3c0-2b9f-4b3a-b87b-6d3bb0c64537.yml @@ -0,0 +1,40 @@ +name: Platformer Generated dbu-dev-master-push Build +on: + push: + branches: + - master +jobs: + build: + runs-on: + - ubuntu-latest + env: + SERVICE_NAME: ghcr.io/eclk/results-tabulation + CONTAINER_REGISTRY: ghcr.io + steps: + - uses: actions/checkout@v2 + - name: Set Version + id: event-version + run: echo ::set-output + name=SOURCE_TAG::${GITHUB_REF#refs/heads/}-${{github.sha}} + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ env.CONTAINER_REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build the Docker image + run: docker build --tag + ${SERVICE_NAME}:${{steps.event-version.outputs.SOURCE_TAG }} --file + ./results-tabulation-dashboard/Dockerfile + ./results-tabulation-dashboard/ + - name: GitHub Image Push + run: docker push $SERVICE_NAME:${{steps.event-version.outputs.SOURCE_TAG }} + - name: Platformer Deploy + uses: platformer-com/build-deploy-action@v1 + with: + org-id: ${{secrets.ORG_ID_9CBA253F_B6ED_4CD0_B890_70A3810F0633}} + project-id: ${{secrets.PROJECT_ID_9CBA253F_B6ED_4CD0_B890_70A3810F0633}} + token: ${{secrets.AUTOGENERATED_CICD_9CBA253F_B6ED_4CD0_B890_70A3810F0633}} + image-name: ${{env.SERVICE_NAME}} + tag: ${{steps.event-version.outputs.SOURCE_TAG }} + container-id: b852a116-f1eb-4800-80fb-47ba926442eb From f619b38e655ab7f62c7c4e413fa6384e1acf6d36 Mon Sep 17 00:00:00 2001 From: umayanga Date: Wed, 17 Mar 2021 17:45:56 +0530 Subject: [PATCH 12/15] dashboard initial test --- ...2021-administrative-district-counting.json | 220 +-- ...-2021-administrative-district-results.json | 150 +- ...ial-election-2021-provincial-counting.json | 108 +- ...cial-election-2021-provincial-results.json | 110 +- ...ncial-election-2021-status-tallysheet.json | 1326 +++++++++++++++++ 5 files changed, 1480 insertions(+), 434 deletions(-) create mode 100644 results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-status-tallysheet.json diff --git a/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-administrative-district-counting.json b/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-administrative-district-counting.json index 4a7e6e83..dd6d62b4 100644 --- a/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-administrative-district-counting.json +++ b/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-administrative-district-counting.json @@ -15,8 +15,8 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 45, - "iteration": 1596623250599, + "id": 52, + "iteration": 1615981809649, "links": [], "panels": [ { @@ -62,7 +62,7 @@ "nullText": null, "postfix": "", "postfixFontSize": "50%", - "prefix": "ELECTORAL DISTRICT COUNTING DASHBOARD", + "prefix": "ADMINISTRATIVE DISTRICT COUNTING DASHBOARD", "prefixFontSize": "100%", "rangeMaps": [ { @@ -86,7 +86,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT GROUP_CONCAT(areaName) FROM area WHERE areaId IN ($electoralDistrictIds)", + "rawSql": "SELECT GROUP_CONCAT(areaName) FROM area WHERE areaId IN ($administrativeDistrictIds)", "refId": "A", "select": [ [ @@ -213,7 +213,7 @@ "valueMaps": [ { "op": "=", - "text": "PE-27", + "text": "PCE-35", "value": "null" } ], @@ -287,7 +287,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -395,7 +395,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -503,7 +503,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -598,7 +598,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -696,7 +696,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -804,7 +804,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -912,7 +912,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1113,7 +1113,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1221,7 +1221,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1329,7 +1329,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1423,7 +1423,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName IN (\"CE-201\", \"CE-201-PV\")\n) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName IN (\"CE-201\", \"CE-201-PV\")\n) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1521,7 +1521,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1629,7 +1629,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1737,7 +1737,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1894,7 +1894,7 @@ "valueMaps": [ { "op": "=", - "text": "PE-CE-RO-V1", + "text": "PCE-CE-RO-V1", "value": "null" } ], @@ -1968,7 +1968,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2076,7 +2076,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2184,7 +2184,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2278,7 +2278,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2425,7 +2425,7 @@ "valueMaps": [ { "op": "=", - "text": "PE-4", + "text": "PCE-PD-V", "value": "null" } ], @@ -2476,7 +2476,7 @@ "pluginVersion": "6.7.3", "postfix": "", "postfixFontSize": "50%", - "prefix": "Parties", + "prefix": "PD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -2500,7 +2500,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-4\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-PD-V\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2585,7 +2585,7 @@ "pluginVersion": "6.7.3", "postfix": "", "postfixFontSize": "50%", - "prefix": "PV Parties", + "prefix": "PV PD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -2609,7 +2609,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-4\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-PD-V\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2694,7 +2694,7 @@ "pluginVersion": "6.7.3", "postfix": "", "postfixFontSize": "50%", - "prefix": "DV Parties", + "prefix": "DV PD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -2718,7 +2718,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-4\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-PD-V\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2812,7 +2812,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-4\"\n) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-PD-V\"\n) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2959,7 +2959,7 @@ "valueMaps": [ { "op": "=", - "text": "PE-CE-RO-PR-1", + "text": "PCE-CE-RO-PR-1", "value": "null" } ], @@ -3034,7 +3034,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-1\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n\n\n\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-1\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n\n\n\n", "refId": "A", "select": [ [ @@ -3143,7 +3143,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -3252,7 +3252,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -3346,7 +3346,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-1\"\n) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-1\"\n) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -3493,7 +3493,7 @@ "valueMaps": [ { "op": "=", - "text": "PE-CE-RO-PR-2", + "text": "PCE-CE-RO-PR-2", "value": "null" } ], @@ -3568,7 +3568,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-2\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n\n\n\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-2\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n\n\n\n", "refId": "A", "select": [ [ @@ -3662,7 +3662,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-2\"\n) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-2\"\n) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -3809,7 +3809,7 @@ "valueMaps": [ { "op": "=", - "text": "PE-CE-RO-PR-2", + "text": "PCE-CE-RO-PR-2", "value": "null" } ], @@ -3884,7 +3884,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-3\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n\n\n\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-3\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n\n\n\n", "refId": "A", "select": [ [ @@ -3978,7 +3978,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-3\"\n) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-3\"\n) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -4018,11 +4018,11 @@ { "allValue": null, "current": { - "text": "307 - PE 2020 - All Island Test 2", - "value": "307" + "text": "406 - UVA Provincial Council Election 2021 - Test 1", + "value": "406" }, "datasource": "MySQL", - "definition": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PARLIAMENT_ELECTION_2020' and parentElectionId IS NULL;", + "definition": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PROVINCIAL_COUNCIL_ELECTION_2021' and parentElectionId IS NULL;", "hide": 0, "includeAll": false, "index": -1, @@ -4030,7 +4030,7 @@ "multi": false, "name": "rootElectionId", "options": [], - "query": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PARLIAMENT_ELECTION_2020' and parentElectionId IS NULL;", + "query": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PROVINCIAL_COUNCIL_ELECTION_2021' and parentElectionId IS NULL;", "refresh": 1, "regex": "", "skipUrlSync": false, @@ -4044,131 +4044,31 @@ { "allValue": null, "current": { - "tags": [], - "text": "13 - Digamadulla", - "value": "115499" + "selected": true, + "text": "19-Badulla", + "value": "67994" }, "datasource": "MySQL", - "definition": "SELECT \n areaName AS __text, areaId AS __value \nFROM area, election \nWHERE \n election.electionId = area.electionId and election.rootElectionId = $rootElectionId and areaType = 'ElectoralDistrict';", + "definition": "SELECT \n areaName AS __text, areaId AS __value \nFROM area, election \nWHERE \n election.electionId = area.electionId and election.rootElectionId = $rootElectionId and areaType = 'AdministrativeDistrict';", "hide": 0, "includeAll": false, "index": -1, "label": null, "multi": false, - "name": "electoralDistrictIds", + "name": "administrativeDistrictIds", "options": [ - { - "selected": false, - "text": "01 - Colombo", - "value": "98479" - }, - { - "selected": false, - "text": "02 - Gampaha", - "value": "101115" - }, - { - "selected": false, - "text": "03 - Kalutara", - "value": "103795" - }, - { - "selected": false, - "text": "04 - Kandy", - "value": "105255" - }, - { - "selected": false, - "text": "05 - Matale", - "value": "107140" - }, - { - "selected": false, - "text": "06 - NuwaraEliya", - "value": "107862" - }, - { - "selected": false, - "text": "07 - Galle", - "value": "108949" - }, - { - "selected": false, - "text": "08 - Matara", - "value": "110520" - }, - { - "selected": false, - "text": "09 - Hambantota", - "value": "111576" - }, - { - "selected": false, - "text": "10 - Jaffna", - "value": "112490" - }, { "selected": true, - "text": "11 - Vanni", - "value": "113820" - }, - { - "selected": false, - "text": "12 - Batticaloa", - "value": "114578" - }, - { - "selected": false, - "text": "13 - Digamadulla", - "value": "115499" - }, - { - "selected": false, - "text": "14 - Trincomalee", - "value": "116606" - }, - { - "selected": false, - "text": "15 - Kurunegala", - "value": "117260" - }, - { - "selected": false, - "text": "16 - Puttalam", - "value": "119355" - }, - { - "selected": false, - "text": "17 - Anuradhapura", - "value": "120292" - }, - { - "selected": false, - "text": "18 - Polonnaruwa", - "value": "121664" - }, - { - "selected": false, - "text": "19 - Badulla", - "value": "122291" - }, - { - "selected": false, - "text": "20 - Monaragala", - "value": "123466" - }, - { - "selected": false, - "text": "21 - Ratnapura", - "value": "124296" + "text": "19-Badulla", + "value": "67994" }, { "selected": false, - "text": "22 - Kegalle", - "value": "125692" + "text": "20-Moneragala", + "value": "69171" } ], - "query": "SELECT \n areaName AS __text, areaId AS __value \nFROM area, election \nWHERE \n election.electionId = area.electionId and election.rootElectionId = $rootElectionId and areaType = 'ElectoralDistrict';", + "query": "SELECT \n areaName AS __text, areaId AS __value \nFROM area, election \nWHERE \n election.electionId = area.electionId and election.rootElectionId = $rootElectionId and areaType = 'AdministrativeDistrict';", "refresh": 0, "regex": "", "skipUrlSync": false, @@ -4200,10 +4100,10 @@ ] }, "timezone": "", - "title": "Parliament Election 2020 - Counting - Electoral District", - "uid": "TUq9Vx7Mz", + "title": "Provincial Council Election 2021 - Counting - Administrative District", + "uid": "rRzC-iwMz", "variables": { "list": [] }, - "version": 6 + "version": 13 } \ No newline at end of file diff --git a/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-administrative-district-results.json b/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-administrative-district-results.json index 8f22fdde..e35da671 100644 --- a/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-administrative-district-results.json +++ b/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-administrative-district-results.json @@ -15,8 +15,8 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 46, - "iteration": 1596657503874, + "id": 54, + "iteration": 1615981784521, "links": [], "panels": [ { @@ -62,7 +62,7 @@ "nullText": null, "postfix": "", "postfixFontSize": "50%", - "prefix": "ELECTORAL DISTRICT RESULTS DASHBOARD", + "prefix": "ADMINISTRATIVE DISTRICT RESULTS DASHBOARD", "prefixFontSize": "70%", "rangeMaps": [ { @@ -86,7 +86,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT GROUP_CONCAT(area.areaName) FROM area WHERE areaId IN ($electoralDistrictIds)", + "rawSql": "SELECT GROUP_CONCAT(area.areaName) FROM area WHERE areaId IN ($administrativeDistrictIds)", "refId": "A", "select": [ [ @@ -170,7 +170,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n NOW() as \"time\", party.partyName as \"name\", COALESCE(SUM(ext_pe2020_dashboard_party_wise_vote_results.voteCount), 0) AS aggregatedVoteCount\nFROM\n ext_pe2020_dashboard_party_wise_vote_results, party\nWHERE \n party.partyId = ext_pe2020_dashboard_party_wise_vote_results.partyId\n and ext_pe2020_dashboard_party_wise_vote_results.electionId = $rootElectionId\n and ext_pe2020_dashboard_party_wise_vote_results.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_party_wise_vote_results.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\nGROUP BY\n ext_pe2020_dashboard_party_wise_vote_results.partyId\nORDER BY\n aggregatedVoteCount DESC,\n ext_pe2020_dashboard_party_wise_vote_results.partyId;\n\n", + "rawSql": "SELECT\n NOW() as \"time\", party.partyName as \"name\", COALESCE(SUM(ext_pce2021_dashboard_party_wise_vote_results.voteCount), 0) AS aggregatedVoteCount\nFROM\n ext_pce2021_dashboard_party_wise_vote_results, party\nWHERE \n party.partyId = ext_pce2021_dashboard_party_wise_vote_results.partyId\n and ext_pce2021_dashboard_party_wise_vote_results.electionId = $rootElectionId\n and ext_pce2021_dashboard_party_wise_vote_results.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_party_wise_vote_results.incrementId IN (\n SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\nGROUP BY\n ext_pce2021_dashboard_party_wise_vote_results.partyId\nORDER BY\n aggregatedVoteCount DESC,\n ext_pce2021_dashboard_party_wise_vote_results.partyId;\n\n", "refId": "A", "select": [ [ @@ -244,7 +244,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n NOW() as \"time\", party.partyName AS \"name\", \n COALESCE(SUM(ext_pe2020_dashboard_party_wise_seat_allocation.seatCount), 0) AS aggregatedSeatCount\nFROM ext_pe2020_dashboard_party_wise_seat_allocation, party\nWHERE \n party.partyId = ext_pe2020_dashboard_party_wise_seat_allocation.partyId\n and ext_pe2020_dashboard_party_wise_seat_allocation.electionId = $rootElectionId\n and ext_pe2020_dashboard_party_wise_seat_allocation.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_party_wise_seat_allocation.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\nGROUP BY\n party.partyId\nORDER BY\n aggregatedSeatCount DESC, party.partyId\n", + "rawSql": "SELECT\n NOW() as \"time\", party.partyName AS \"name\", \n COALESCE(SUM(ext_pce2021_dashboard_party_wise_seat_allocation.seatCount), 0) AS aggregatedSeatCount\nFROM ext_pce2021_dashboard_party_wise_seat_allocation, party\nWHERE \n party.partyId = ext_pce2021_dashboard_party_wise_seat_allocation.partyId\n and ext_pce2021_dashboard_party_wise_seat_allocation.electionId = $rootElectionId\n and ext_pce2021_dashboard_party_wise_seat_allocation.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_party_wise_seat_allocation.incrementId IN (\n SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\nGROUP BY\n party.partyId\nORDER BY\n aggregatedSeatCount DESC, party.partyId\n", "refId": "A", "select": [ [ @@ -906,7 +906,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT \n COALESCE(SUM(areaMap.registeredPostalVotersCount), 0) AS \"\",\n COALESCE(SUM(areaMap.registeredDisplacedVotersCount), 0) AS \"\",\n COALESCE(SUM(areaMap.registeredVotersCount), 0) AS \"\",\n COALESCE(SUM(areaMap.registeredPostalVotersCount + areaMap.registeredVotersCount + areaMap.registeredDisplacedVotersCount), 0) AS \"\"\nFROM\n ext_pe2020_dashboard_area_map as areaMap\nWHERE \n areaMap.electionId = $rootElectionId\n and areaMap.electoralDistrictId IN ($electoralDistrictIds)\n\n\n", + "rawSql": "SELECT \n COALESCE(SUM(areaMap.registeredPostalVotersCount), 0) AS \"\",\n COALESCE(SUM(areaMap.registeredDisplacedVotersCount), 0) AS \"\",\n COALESCE(SUM(areaMap.registeredVotersCount), 0) AS \"\",\n COALESCE(SUM(areaMap.registeredPostalVotersCount + areaMap.registeredVotersCount + areaMap.registeredDisplacedVotersCount), 0) AS \"\"\nFROM\n ext_pce2021_dashboard_area_map as areaMap\nWHERE \n areaMap.electionId = $rootElectionId\n and areaMap.administrativeDistrictId IN ($administrativeDistrictIds)\n\n\n", "refId": "A", "select": [ [ @@ -978,7 +978,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Postal\", ext_pe2020_dashboard_vote_results.voteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Displaced\", ext_pe2020_dashboard_vote_results.voteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"NonPostal\", ext_pe2020_dashboard_vote_results.voteCount, 0)), 0) AS \"\",\n COALESCE(SUM(ext_pe2020_dashboard_vote_results.voteCount), 0) AS \"\"\nFROM\n ext_pe2020_dashboard_vote_results\nWHERE \n ext_pe2020_dashboard_vote_results.electionId = $rootElectionId\n and ext_pe2020_dashboard_vote_results.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_vote_results.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n\n", + "rawSql": "SELECT\n COALESCE(SUM(IF(ext_pce2021_dashboard_vote_results.voteType = \"Postal\", ext_pce2021_dashboard_vote_results.voteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pce2021_dashboard_vote_results.voteType = \"Displaced\", ext_pce2021_dashboard_vote_results.voteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pce2021_dashboard_vote_results.voteType = \"NonPostal\", ext_pce2021_dashboard_vote_results.voteCount, 0)), 0) AS \"\",\n COALESCE(SUM(ext_pce2021_dashboard_vote_results.voteCount), 0) AS \"\"\nFROM\n ext_pce2021_dashboard_vote_results\nWHERE \n ext_pce2021_dashboard_vote_results.electionId = $rootElectionId\n and ext_pce2021_dashboard_vote_results.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_vote_results.incrementId IN (\n SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n\n", "refId": "A", "select": [ [ @@ -1050,7 +1050,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Postal\", ext_pe2020_dashboard_vote_results.validVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Displaced\", ext_pe2020_dashboard_vote_results.validVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"NonPostal\", ext_pe2020_dashboard_vote_results.validVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(ext_pe2020_dashboard_vote_results.validVoteCount), 0) AS \"\"\nFROM\n ext_pe2020_dashboard_vote_results\nWHERE \n ext_pe2020_dashboard_vote_results.electionId = $rootElectionId\n and ext_pe2020_dashboard_vote_results.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_vote_results.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n\n", + "rawSql": "SELECT\n COALESCE(SUM(IF(ext_pce2021_dashboard_vote_results.voteType = \"Postal\", ext_pce2021_dashboard_vote_results.validVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pce2021_dashboard_vote_results.voteType = \"Displaced\", ext_pce2021_dashboard_vote_results.validVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pce2021_dashboard_vote_results.voteType = \"NonPostal\", ext_pce2021_dashboard_vote_results.validVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(ext_pce2021_dashboard_vote_results.validVoteCount), 0) AS \"\"\nFROM\n ext_pce2021_dashboard_vote_results\nWHERE \n ext_pce2021_dashboard_vote_results.electionId = $rootElectionId\n and ext_pce2021_dashboard_vote_results.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_vote_results.incrementId IN (\n SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n\n", "refId": "A", "select": [ [ @@ -1122,7 +1122,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Postal\", ext_pe2020_dashboard_vote_results.rejectedVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Displaced\", ext_pe2020_dashboard_vote_results.rejectedVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"NonPostal\", ext_pe2020_dashboard_vote_results.rejectedVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(ext_pe2020_dashboard_vote_results.rejectedVoteCount), 0) AS \"\"\nFROM\n ext_pe2020_dashboard_vote_results\nWHERE \n ext_pe2020_dashboard_vote_results.electionId = $rootElectionId\n and ext_pe2020_dashboard_vote_results.electoralDistrictId IN ($electoralDistrictIds)\n and ext_pe2020_dashboard_vote_results.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n\n", + "rawSql": "SELECT\n COALESCE(SUM(IF(ext_pce2021_dashboard_vote_results.voteType = \"Postal\", ext_pce2021_dashboard_vote_results.rejectedVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pce2021_dashboard_vote_results.voteType = \"Displaced\", ext_pce2021_dashboard_vote_results.rejectedVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pce2021_dashboard_vote_results.voteType = \"NonPostal\", ext_pce2021_dashboard_vote_results.rejectedVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(ext_pce2021_dashboard_vote_results.rejectedVoteCount), 0) AS \"\"\nFROM\n ext_pce2021_dashboard_vote_results\nWHERE \n ext_pce2021_dashboard_vote_results.electionId = $rootElectionId\n and ext_pce2021_dashboard_vote_results.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_vote_results.incrementId IN (\n SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n\n", "refId": "A", "select": [ [ @@ -1533,12 +1533,11 @@ { "allValue": null, "current": { - "tags": [], - "text": "307 - PE 2020 - All Island Test 2", - "value": "307" + "text": "386 - Provincial Council Election 2021 - Test 1", + "value": "386" }, "datasource": "MySQL", - "definition": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PARLIAMENT_ELECTION_2020' and parentElectionId IS NULL;", + "definition": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PROVINCIAL_COUNCIL_ELECTION_2021' and parentElectionId IS NULL;", "hide": 0, "includeAll": false, "index": -1, @@ -1546,7 +1545,7 @@ "multi": false, "name": "rootElectionId", "options": [], - "query": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PARLIAMENT_ELECTION_2020' and parentElectionId IS NULL;", + "query": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PROVINCIAL_COUNCIL_ELECTION_2021' and parentElectionId IS NULL;", "refresh": 1, "regex": "", "skipUrlSync": false, @@ -1565,126 +1564,21 @@ "value": "98479" }, "datasource": "MySQL", - "definition": "SELECT \n areaName AS __text, areaId AS __value \nFROM area, election \nWHERE \n election.electionId = area.electionId and election.rootElectionId = $rootElectionId and areaType = 'ElectoralDistrict';", + "definition": "SELECT \n areaName AS __text, areaId AS __value \nFROM area, election \nWHERE \n election.electionId = area.electionId and election.rootElectionId = $rootElectionId and areaType = 'AdministrativeDistrict';", "hide": 0, "includeAll": false, "index": -1, - "label": "Electoral District", + "label": "Administrative District", "multi": false, - "name": "electoralDistrictIds", + "name": "administrativeDistrictIds", "options": [ { "selected": true, "text": "01 - Colombo", - "value": "98479" - }, - { - "selected": false, - "text": "02 - Gampaha", - "value": "101115" - }, - { - "selected": false, - "text": "03 - Kalutara", - "value": "103795" - }, - { - "selected": false, - "text": "04 - Kandy", - "value": "105255" - }, - { - "selected": false, - "text": "05 - Matale", - "value": "107140" - }, - { - "selected": false, - "text": "06 - NuwaraEliya", - "value": "107862" - }, - { - "selected": false, - "text": "07 - Galle", - "value": "108949" - }, - { - "selected": false, - "text": "08 - Matara", - "value": "110520" - }, - { - "selected": false, - "text": "09 - Hambantota", - "value": "111576" - }, - { - "selected": false, - "text": "10 - Jaffna", - "value": "112490" - }, - { - "selected": false, - "text": "11 - Vanni", - "value": "113820" - }, - { - "selected": false, - "text": "12 - Batticaloa", - "value": "114578" - }, - { - "selected": false, - "text": "13 - Digamadulla", - "value": "115499" - }, - { - "selected": false, - "text": "14 - Trincomalee", - "value": "116606" - }, - { - "selected": false, - "text": "15 - Kurunegala", - "value": "117260" - }, - { - "selected": false, - "text": "16 - Puttalam", - "value": "119355" - }, - { - "selected": false, - "text": "17 - Anuradhapura", - "value": "120292" - }, - { - "selected": false, - "text": "18 - Polonnaruwa", - "value": "121664" - }, - { - "selected": false, - "text": "19 - Badulla", - "value": "122291" - }, - { - "selected": false, - "text": "20 - Monaragala", - "value": "123466" - }, - { - "selected": false, - "text": "21 - Ratnapura", - "value": "124296" - }, - { - "selected": false, - "text": "22 - Kegalle", - "value": "125692" + "value": "65917" } ], - "query": "SELECT \n areaName AS __text, areaId AS __value \nFROM area, election \nWHERE \n election.electionId = area.electionId and election.rootElectionId = $rootElectionId and areaType = 'ElectoralDistrict';", + "query": "SELECT \n areaName AS __text, areaId AS __value \nFROM area, election \nWHERE \n election.electionId = area.electionId and election.rootElectionId = $rootElectionId and areaType = 'AdministrativeDistrict';", "refresh": 0, "regex": "", "skipUrlSync": false, @@ -1716,10 +1610,10 @@ ] }, "timezone": "", - "title": "Parliament Election 2020 - Results - Electoral District", - "uid": "7W5oXmIMk", + "title": "Provincial Council Election 2021 - Results - Administrative District", + "uid": "5ThAYmQGz", "variables": { "list": [] }, - "version": 5 + "version": 12 } \ No newline at end of file diff --git a/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-provincial-counting.json b/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-provincial-counting.json index 4d20251b..668bbe07 100644 --- a/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-provincial-counting.json +++ b/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-provincial-counting.json @@ -15,8 +15,8 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 44, - "iteration": 1596623404308, + "id": 55, + "iteration": 1615979626464, "links": [], "panels": [ { @@ -213,7 +213,7 @@ "valueMaps": [ { "op": "=", - "text": "PE-27", + "text": "PCE-35", "value": "null" } ], @@ -264,7 +264,7 @@ "pluginVersion": "6.7.3", "postfix": "", "postfixFontSize": "50%", - "prefix": "ED", + "prefix": "AD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -288,7 +288,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -396,7 +396,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n\n\n-- SELECT\n-- CONCAT(\n-- SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedTallySheetCount), \"/\", COUNT(*), \" - \",\n-- ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedTallySheetCount) * 100 / COUNT(*), 0), \"%\"\n-- ) AS \"\"\n-- FROM\n-- (SELECT\n-- SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedTallySheetCount\n-- FROM\n-- ext_pe2020_dashboard_tally_sheet_status\n-- WHERE\n-- ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n-- and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n-- and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n-- and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\n-- GROUP BY\n-- ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n\n\n-- SELECT\n-- CONCAT(\n-- SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedTallySheetCount), \"/\", COUNT(*), \" - \",\n-- ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedTallySheetCount) * 100 / COUNT(*), 0), \"%\"\n-- ) AS \"\"\n-- FROM\n-- (SELECT\n-- SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedTallySheetCount\n-- FROM\n-- ext_pce2021_dashboard_tally_sheet_status\n-- WHERE\n-- ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n-- and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n-- and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n-- and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\n-- GROUP BY\n-- ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -504,7 +504,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -612,7 +612,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -720,7 +720,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n\n\n-- SELECT\n-- CONCAT(\n-- SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedTallySheetCount), \"/\", COUNT(*), \" - \",\n-- ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedTallySheetCount) * 100 / COUNT(*), 0), \"%\"\n-- ) AS \"\"\n-- FROM\n-- (SELECT\n-- SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedTallySheetCount\n-- FROM\n-- ext_pe2020_dashboard_tally_sheet_status\n-- WHERE\n-- ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n-- and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n-- and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n-- and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\n-- GROUP BY\n-- ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n\n\n-- SELECT\n-- CONCAT(\n-- SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedTallySheetCount), \"/\", COUNT(*), \" - \",\n-- ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedTallySheetCount) * 100 / COUNT(*), 0), \"%\"\n-- ) AS \"\"\n-- FROM\n-- (SELECT\n-- SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedTallySheetCount\n-- FROM\n-- ext_pce2021_dashboard_tally_sheet_status\n-- WHERE\n-- ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n-- and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n-- and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n-- and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\n-- GROUP BY\n-- ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -828,7 +828,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n\n\n-- SELECT\n-- CONCAT(\n-- SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedTallySheetCount), \"/\", COUNT(*), \" - \",\n-- ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedTallySheetCount) * 100 / COUNT(*), 0), \"%\"\n-- ) AS \"\"\n-- FROM\n-- (SELECT\n-- SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedTallySheetCount\n-- FROM\n-- ext_pe2020_dashboard_tally_sheet_status\n-- WHERE\n-- ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n-- and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n-- and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n-- and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\n-- GROUP BY\n-- ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n\n\n-- SELECT\n-- CONCAT(\n-- SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedTallySheetCount), \"/\", COUNT(*), \" - \",\n-- ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedTallySheetCount) * 100 / COUNT(*), 0), \"%\"\n-- ) AS \"\"\n-- FROM\n-- (SELECT\n-- SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedTallySheetCount\n-- FROM\n-- ext_pce2021_dashboard_tally_sheet_status\n-- WHERE\n-- ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n-- and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n-- and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n-- and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\n-- GROUP BY\n-- ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -936,7 +936,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n\n\n-- SELECT\n-- CONCAT(\n-- SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedTallySheetCount), \"/\", COUNT(*), \" - \",\n-- ROUND(SUM(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedTallySheetCount) * 100 / COUNT(*), 0), \"%\"\n-- ) AS \"\"\n-- FROM\n-- (SELECT\n-- SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedTallySheetCount\n-- FROM\n-- ext_pe2020_dashboard_tally_sheet_status\n-- WHERE\n-- ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n-- and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n-- and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-27\"\n-- and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\n-- GROUP BY\n-- ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n\n\n-- SELECT\n-- CONCAT(\n-- SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedTallySheetCount), \"/\", COUNT(*), \" - \",\n-- ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedTallySheetCount) * 100 / COUNT(*), 0), \"%\"\n-- ) AS \"\"\n-- FROM\n-- (SELECT\n-- SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedTallySheetCount\n-- FROM\n-- ext_pce2021_dashboard_tally_sheet_status\n-- WHERE\n-- ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n-- and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n-- and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n-- and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\n-- GROUP BY\n-- ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1113,7 +1113,7 @@ "nullText": null, "postfix": "", "postfixFontSize": "50%", - "prefix": "ED", + "prefix": "AD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -1137,7 +1137,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1245,7 +1245,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1353,7 +1353,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1461,7 +1461,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1569,7 +1569,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1677,7 +1677,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1785,7 +1785,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.countingCentreId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1912,7 +1912,7 @@ "valueMaps": [ { "op": "=", - "text": "PE-CE-RO-V1", + "text": "PCE-CE-RO-V1", "value": "null" } ], @@ -1962,7 +1962,7 @@ "nullText": null, "postfix": "", "postfixFontSize": "50%", - "prefix": "ED", + "prefix": "AD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -1986,7 +1986,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2094,7 +2094,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2202,7 +2202,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2310,7 +2310,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2418,7 +2418,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId,\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId,\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2526,7 +2526,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId,\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId,\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2634,7 +2634,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V1\"\n and ext_pe2020_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId,\n ext_pe2020_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId,\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2761,7 +2761,7 @@ "valueMaps": [ { "op": "=", - "text": "PE-4", + "text": "PCE-4", "value": "null" } ], @@ -2836,7 +2836,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-4\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-4\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2980,7 +2980,7 @@ "valueMaps": [ { "op": "=", - "text": "PE-CE-RO-PR-1", + "text": "PCE-CE-RO-PR-1", "value": "null" } ], @@ -3055,7 +3055,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-1\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-1\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -3166,7 +3166,7 @@ "valueMaps": [ { "op": "=", - "text": "PE-CE-RO-V2", + "text": "PCE-CE-RO-V2", "value": "null" } ], @@ -3216,7 +3216,7 @@ "nullText": null, "postfix": "", "postfixFontSize": "50%", - "prefix": "ED", + "prefix": "AD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -3240,7 +3240,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V2\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V2\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -3348,7 +3348,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-V2\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V2\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -3491,7 +3491,7 @@ "valueMaps": [ { "op": "=", - "text": "PE-CE-RO-PR-2", + "text": "PCE-CE-RO-PR-2", "value": "null" } ], @@ -3566,7 +3566,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-2\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-2\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -3677,7 +3677,7 @@ "valueMaps": [ { "op": "=", - "text": "PE-R2", + "text": "PCE-R2", "value": "null" } ], @@ -3727,7 +3727,7 @@ "nullText": null, "postfix": "", "postfixFontSize": "50%", - "prefix": "ED", + "prefix": "AD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -3751,7 +3751,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-R2\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-R2\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -3859,7 +3859,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-R2\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-R2\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -4002,7 +4002,7 @@ "valueMaps": [ { "op": "=", - "text": "PE-CE-RO-PR-3", + "text": "PCE-CE-RO-PR-3", "value": "null" } ], @@ -4077,7 +4077,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-CE-RO-PR-3\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.partyId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-3\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -4188,7 +4188,7 @@ "valueMaps": [ { "op": "=", - "text": "PE-21", + "text": "PCE-21", "value": "null" } ], @@ -4238,7 +4238,7 @@ "nullText": null, "postfix": "", "postfixFontSize": "50%", - "prefix": "ED", + "prefix": "AD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -4262,7 +4262,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-21\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-21\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -4370,7 +4370,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pe2020_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pe2020_dashboard_tally_sheet_status\nWHERE\n ext_pe2020_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n and ext_pe2020_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pe2020_dashboard_tally_sheet_status.templateName = \"PE-21\"\nGROUP BY\n ext_pe2020_dashboard_tally_sheet_status.electoralDistrictId) AS ext_pe2020_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-21\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -4452,11 +4452,11 @@ { "allValue": null, "current": { - "text": "307 - PE 2020 - All Island Test 2", - "value": "307" + "text": "386 - Provincial Council Election 2021 - Test 1", + "value": "386" }, "datasource": "MySQL", - "definition": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PARLIAMENT_ELECTION_2020' and parentElectionId IS NULL;", + "definition": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PROVINCIAL_COUNCIL_ELECTION_2021' and parentElectionId IS NULL;", "hide": 0, "includeAll": false, "index": -1, @@ -4464,7 +4464,7 @@ "multi": false, "name": "rootElectionId", "options": [], - "query": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PARLIAMENT_ELECTION_2020' and parentElectionId IS NULL;", + "query": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PROVINCIAL_COUNCIL_ELECTION_2021' and parentElectionId IS NULL;", "refresh": 1, "regex": "", "skipUrlSync": false, @@ -4496,8 +4496,8 @@ ] }, "timezone": "", - "title": "Parliament Election 2020 - Counting - All Island", - "uid": "GXrbHAVMk", + "title": "Provincial Council Election 2021 - Counting - Provincial", + "uid": "GXrbHAVMkz", "variables": { "list": [] }, diff --git a/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-provincial-results.json b/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-provincial-results.json index b467a5ee..032d0d6f 100644 --- a/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-provincial-results.json +++ b/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-provincial-results.json @@ -15,8 +15,8 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 35, - "iteration": 1596658668941, + "id": 56, + "iteration": 1615980987350, "links": [], "panels": [ { @@ -170,7 +170,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n NOW() as \"time\", party.partyName AS \"name\", \n COALESCE(SUM(ext_pe2020_dashboard_party_wise_seat_allocation.seatCount), 0) AS aggregatedSeatCount\nFROM ext_pe2020_dashboard_party_wise_seat_allocation, party\nWHERE \n party.partyId = ext_pe2020_dashboard_party_wise_seat_allocation.partyId\n and ext_pe2020_dashboard_party_wise_seat_allocation.electionId = $rootElectionId\n and ext_pe2020_dashboard_party_wise_seat_allocation.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\nGROUP BY\n party.partyId\nORDER BY\n aggregatedSeatCount DESC, party.partyId\n", + "rawSql": "SELECT\n NOW() as \"time\", party.partyName AS \"name\", \n COALESCE(SUM(ext_pce2021_dashboard_party_wise_seat_allocation.seatCount), 0) AS aggregatedSeatCount\nFROM ext_pce2021_dashboard_party_wise_seat_allocation, party\nWHERE \n party.partyId = ext_pce2021_dashboard_party_wise_seat_allocation.partyId\n and ext_pce2021_dashboard_party_wise_seat_allocation.electionId = $rootElectionId\n and ext_pce2021_dashboard_party_wise_seat_allocation.incrementId IN (\n SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\nGROUP BY\n party.partyId\nORDER BY\n aggregatedSeatCount DESC, party.partyId\n", "refId": "A", "select": [ [ @@ -205,7 +205,7 @@ "datasource": null, "gridPos": { "h": 7, - "w": 12, + "w": 18, "x": 0, "y": 3 }, @@ -244,7 +244,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n NOW() as \"time\", party.partyName as \"name\", COALESCE(SUM(ext_pe2020_dashboard_party_wise_vote_results.voteCount), 0) AS aggregatedVoteCount\nFROM\n ext_pe2020_dashboard_party_wise_vote_results, party\nWHERE \n party.partyId = ext_pe2020_dashboard_party_wise_vote_results.partyId\n and ext_pe2020_dashboard_party_wise_vote_results.electionId = $rootElectionId\n and ext_pe2020_dashboard_party_wise_vote_results.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\nGROUP BY\n ext_pe2020_dashboard_party_wise_vote_results.partyId\nORDER BY\n aggregatedVoteCount DESC,\n ext_pe2020_dashboard_party_wise_vote_results.partyId;\n\n", + "rawSql": "SELECT\n NOW() as \"time\", party.partyName as \"name\", COALESCE(SUM(ext_pce2021_dashboard_party_wise_vote_results.voteCount), 0) AS aggregatedVoteCount\nFROM\n ext_pce2021_dashboard_party_wise_vote_results, party\nWHERE \n party.partyId = ext_pce2021_dashboard_party_wise_vote_results.partyId\n and ext_pce2021_dashboard_party_wise_vote_results.electionId = $rootElectionId\n and ext_pce2021_dashboard_party_wise_vote_results.incrementId IN (\n SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\nGROUP BY\n ext_pce2021_dashboard_party_wise_vote_results.partyId\nORDER BY\n aggregatedVoteCount DESC,\n ext_pce2021_dashboard_party_wise_vote_results.partyId;\n\n", "refId": "A", "select": [ [ @@ -274,80 +274,6 @@ "transparent": true, "type": "bargauge" }, - { - "cacheTimeout": null, - "datasource": null, - "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 3 - }, - "id": 44, - "links": [], - "options": { - "displayMode": "gradient", - "fieldOptions": { - "calcs": [ - "mean" - ], - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "title": "$__cell_1" - }, - "limit": 10, - "overrides": [], - "values": true - }, - "orientation": "horizontal", - "showUnfilled": true - }, - "pluginVersion": "6.7.3", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n NOW() as \"time\", party.partyName AS \"name\", \n COALESCE(SUM(ext_pe2020_dashboard_party_wise_national_list_seat_allocation.nationalListSeatCount), 0) AS aggregatedSeatCount\nFROM ext_pe2020_dashboard_party_wise_national_list_seat_allocation, party\nWHERE \n party.partyId = ext_pe2020_dashboard_party_wise_national_list_seat_allocation.partyId\n and ext_pe2020_dashboard_party_wise_national_list_seat_allocation.electionId = $rootElectionId\n and ext_pe2020_dashboard_party_wise_national_list_seat_allocation.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\nGROUP BY\n party.partyId\nORDER BY\n aggregatedSeatCount DESC, party.partyId\n", - "refId": "A", - "select": [ - [ - { - "params": [ - "statusReportId" - ], - "type": "column" - } - ] - ], - "table": "dashboard_status_report", - "timeColumn": "createdAt", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "National List", - "transparent": true, - "type": "bargauge" - }, { "cacheTimeout": null, "content": "", @@ -980,7 +906,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT \n COALESCE(SUM(areaMap.registeredPostalVotersCount), 0) AS \"\",\n COALESCE(SUM(areaMap.registeredDisplacedVotersCount), 0) AS \"\",\n COALESCE(SUM(areaMap.registeredVotersCount), 0) AS \"\",\n COALESCE(SUM(areaMap.registeredPostalVotersCount + areaMap.registeredVotersCount + areaMap.registeredDisplacedVotersCount), 0) AS \"\"\nFROM\n ext_pe2020_dashboard_area_map as areaMap\nWHERE \n areaMap.electionId = $rootElectionId\n\n\n", + "rawSql": "SELECT \n COALESCE(SUM(areaMap.registeredPostalVotersCount), 0) AS \"\",\n COALESCE(SUM(areaMap.registeredDisplacedVotersCount), 0) AS \"\",\n COALESCE(SUM(areaMap.registeredVotersCount), 0) AS \"\",\n COALESCE(SUM(areaMap.registeredPostalVotersCount + areaMap.registeredVotersCount + areaMap.registeredDisplacedVotersCount), 0) AS \"\"\nFROM\n ext_pce2021_dashboard_area_map as areaMap\nWHERE \n areaMap.electionId = $rootElectionId\n\n\n", "refId": "A", "select": [ [ @@ -1052,7 +978,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Postal\", ext_pe2020_dashboard_vote_results.voteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Displaced\", ext_pe2020_dashboard_vote_results.voteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"NonPostal\", ext_pe2020_dashboard_vote_results.voteCount, 0)), 0) AS \"\",\n COALESCE(SUM(ext_pe2020_dashboard_vote_results.voteCount), 0) AS \"\"\nFROM\n ext_pe2020_dashboard_vote_results\nWHERE \n ext_pe2020_dashboard_vote_results.electionId = $rootElectionId\n and ext_pe2020_dashboard_vote_results.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n\n", + "rawSql": "SELECT\n COALESCE(SUM(IF(ext_pce2021_dashboard_vote_results.voteType = \"Postal\", ext_pce2021_dashboard_vote_results.voteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pce2021_dashboard_vote_results.voteType = \"Displaced\", ext_pce2021_dashboard_vote_results.voteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pce2021_dashboard_vote_results.voteType = \"NonPostal\", ext_pce2021_dashboard_vote_results.voteCount, 0)), 0) AS \"\",\n COALESCE(SUM(ext_pce2021_dashboard_vote_results.voteCount), 0) AS \"\"\nFROM\n ext_pce2021_dashboard_vote_results\nWHERE \n ext_pce2021_dashboard_vote_results.electionId = $rootElectionId\n and ext_pce2021_dashboard_vote_results.incrementId IN (\n SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n\n", "refId": "A", "select": [ [ @@ -1124,7 +1050,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Postal\", ext_pe2020_dashboard_vote_results.validVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Displaced\", ext_pe2020_dashboard_vote_results.validVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"NonPostal\", ext_pe2020_dashboard_vote_results.validVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(ext_pe2020_dashboard_vote_results.validVoteCount), 0) AS \"\"\nFROM\n ext_pe2020_dashboard_vote_results\nWHERE \n ext_pe2020_dashboard_vote_results.electionId = $rootElectionId\n and ext_pe2020_dashboard_vote_results.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n\n", + "rawSql": "SELECT\n COALESCE(SUM(IF(ext_pce2021_dashboard_vote_results.voteType = \"Postal\", ext_pce2021_dashboard_vote_results.validVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pce2021_dashboard_vote_results.voteType = \"Displaced\", ext_pce2021_dashboard_vote_results.validVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pce2021_dashboard_vote_results.voteType = \"NonPostal\", ext_pce2021_dashboard_vote_results.validVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(ext_pce2021_dashboard_vote_results.validVoteCount), 0) AS \"\"\nFROM\n ext_pce2021_dashboard_vote_results\nWHERE \n ext_pce2021_dashboard_vote_results.electionId = $rootElectionId\n and ext_pce2021_dashboard_vote_results.incrementId IN (\n SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n\n", "refId": "A", "select": [ [ @@ -1196,7 +1122,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Postal\", ext_pe2020_dashboard_vote_results.rejectedVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"Displaced\", ext_pe2020_dashboard_vote_results.rejectedVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pe2020_dashboard_vote_results.voteType = \"NonPostal\", ext_pe2020_dashboard_vote_results.rejectedVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(ext_pe2020_dashboard_vote_results.rejectedVoteCount), 0) AS \"\"\nFROM\n ext_pe2020_dashboard_vote_results\nWHERE \n ext_pe2020_dashboard_vote_results.electionId = $rootElectionId\n and ext_pe2020_dashboard_vote_results.incrementId IN (\n SELECT MAX(ext_pe2020_dashboard_increment.id) from ext_pe2020_dashboard_increment WHERE ext_pe2020_dashboard_increment.active=1)\n\n", + "rawSql": "SELECT\n COALESCE(SUM(IF(ext_pce2021_dashboard_vote_results.voteType = \"Postal\", ext_pce2021_dashboard_vote_results.rejectedVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pce2021_dashboard_vote_results.voteType = \"Displaced\", ext_pce2021_dashboard_vote_results.rejectedVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(IF(ext_pce2021_dashboard_vote_results.voteType = \"NonPostal\", ext_pce2021_dashboard_vote_results.rejectedVoteCount, 0)), 0) AS \"\",\n COALESCE(SUM(ext_pce2021_dashboard_vote_results.rejectedVoteCount), 0) AS \"\"\nFROM\n ext_pce2021_dashboard_vote_results\nWHERE \n ext_pce2021_dashboard_vote_results.electionId = $rootElectionId\n and ext_pce2021_dashboard_vote_results.incrementId IN (\n SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n\n", "refId": "A", "select": [ [ @@ -1598,7 +1524,7 @@ "type": "text" } ], - "refresh": "5m", + "refresh": false, "schemaVersion": 22, "style": "dark", "tags": [], @@ -1607,12 +1533,12 @@ { "allValue": null, "current": { - "tags": [], - "text": "307 - PE 2020 - All Island Test 2", - "value": "307" + "selected": false, + "text": "406 - UVA Provincial Council Election 2021 - Test 1", + "value": "406" }, "datasource": "MySQL", - "definition": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PARLIAMENT_ELECTION_2020' and parentElectionId IS NULL;", + "definition": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PROVINCIAL_COUNCIL_ELECTION_2021' and parentElectionId IS NULL;", "hide": 0, "includeAll": false, "index": -1, @@ -1620,7 +1546,7 @@ "multi": false, "name": "rootElectionId", "options": [], - "query": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PARLIAMENT_ELECTION_2020' and parentElectionId IS NULL;", + "query": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PROVINCIAL_COUNCIL_ELECTION_2021' and parentElectionId IS NULL;", "refresh": 1, "regex": "", "skipUrlSync": false, @@ -1652,10 +1578,10 @@ ] }, "timezone": "", - "title": "Parliament Election 2020 - Results - All Island", - "uid": "YMS0mb7Gz", + "title": "Provincial Council Election 2021 - Results - Provincial", + "uid": "YMS0mb7GzF", "variables": { "list": [] }, - "version": 15 + "version": 5 } \ No newline at end of file diff --git a/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-status-tallysheet.json b/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-status-tallysheet.json new file mode 100644 index 00000000..964b1793 --- /dev/null +++ b/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-status-tallysheet.json @@ -0,0 +1,1326 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 47, + "iteration": 1615982929968, + "links": [], + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "MySQL", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 21, + "x": 0, + "y": 0 + }, + "id": 19, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "Administrative District", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT GROUP_CONCAT(areaName) FROM area WHERE areaId IN ($administrativeDistrictIds)", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "100%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "first" + }, + { + "columns": [], + "datasource": null, + "fontSize": "100%", + "gridPos": { + "h": 19, + "w": 3, + "x": 0, + "y": 2 + }, + "id": 4, + "pageSize": null, + "showHeader": true, + "sort": { + "col": null, + "desc": false + }, + "styles": [ + { + "alias": "Time", + "align": "left", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "link": false, + "pattern": "Time", + "preserveFormat": true, + "sanitize": true, + "type": "string" + }, + { + "alias": "", + "align": "left", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "preserveFormat": true, + "sanitize": true, + "thresholds": [], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT \n CONCAT(\n '
', tallySheetAreaLabel, '
', templateName, IF(voteType='Postal', ' (PV)', ''), '') \n AS \"\" \nFROM\n (\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countingCentreAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n CONCAT(countingCentreAreaMap.pollingDivisionName, \" / \", countingCentreAreaMap.countingCentreName) as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n areaMap.countingCentreId, areaMap.countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId,\n areaMap.countingCentreId\n ) as countingCentreAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countingCentreAreaMap.countingCentreId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, pollingDivisionAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n pollingDivisionAreaMap.pollingDivisionName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId\n ) as pollingDivisionAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = pollingDivisionAreaMap.pollingDivisionId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, administrativeDistrictAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n administrativeDistrictAreaMap.administrativeDistrictName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId\n ) as administrativeDistrictAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = administrativeDistrictAreaMap.administrativeDistrictId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countryAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n countryAreaMap.countryName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n NULL AS administrativeDistrictId, NULL AS administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId\n ) as countryAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countryAreaMap.countryId\n ) AS areaMappedTallySheet\nWHERE\n areaMappedTallySheet.rootElectionId = $rootElectionId\n and areaMappedTallySheet.administrativeDistrictId IN ($administrativeDistrictIds)\n and areaMappedTallySheet.status = 'Empty'\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TODO", + "transform": "table", + "type": "table" + }, + { + "columns": [], + "datasource": null, + "fontSize": "100%", + "gridPos": { + "h": 19, + "w": 3, + "x": 3, + "y": 2 + }, + "id": 5, + "pageSize": null, + "showHeader": true, + "sort": { + "col": null, + "desc": false + }, + "styles": [ + { + "alias": "Time", + "align": "left", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "link": false, + "pattern": "Time", + "preserveFormat": true, + "sanitize": true, + "type": "string" + }, + { + "alias": "", + "align": "left", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "preserveFormat": true, + "sanitize": true, + "thresholds": [], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT \n CONCAT(\n '
', tallySheetAreaLabel, '
', templateName, IF(voteType='Postal', ' (PV)', ''), '') \n AS \"\" \nFROM\n (\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countingCentreAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n CONCAT(countingCentreAreaMap.pollingDivisionName, \" / \", countingCentreAreaMap.countingCentreName) as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n areaMap.countingCentreId, areaMap.countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId,\n areaMap.countingCentreId\n ) as countingCentreAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countingCentreAreaMap.countingCentreId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, pollingDivisionAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n pollingDivisionAreaMap.pollingDivisionName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId\n ) as pollingDivisionAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = pollingDivisionAreaMap.pollingDivisionId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, administrativeDistrictAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n administrativeDistrictAreaMap.administrativeDistrictName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId\n ) as administrativeDistrictAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = administrativeDistrictAreaMap.administrativeDistrictId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countryAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n countryAreaMap.countryName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n NULL AS administrativeDistrictId, NULL AS administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId\n ) as countryAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countryAreaMap.countryId\n ) AS areaMappedTallySheet\nWHERE\n areaMappedTallySheet.rootElectionId = $rootElectionId\n and areaMappedTallySheet.administrativeDistrictId IN ($administrativeDistrictIds)\n and areaMappedTallySheet.status = 'Saved'\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "In Progress", + "transform": "table", + "type": "table" + }, + { + "columns": [], + "datasource": null, + "fontSize": "100%", + "gridPos": { + "h": 19, + "w": 3, + "x": 6, + "y": 2 + }, + "id": 6, + "pageSize": null, + "showHeader": true, + "sort": { + "col": null, + "desc": false + }, + "styles": [ + { + "alias": "Time", + "align": "left", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "link": false, + "pattern": "Time", + "preserveFormat": true, + "sanitize": true, + "type": "string" + }, + { + "alias": "", + "align": "left", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "preserveFormat": true, + "sanitize": true, + "thresholds": [], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT \n CONCAT(\n '
', tallySheetAreaLabel, '
', templateName, IF(voteType='Postal', ' (PV)', ''), '') \n AS \"\" \nFROM\n (\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countingCentreAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n CONCAT(countingCentreAreaMap.pollingDivisionName, \" / \", countingCentreAreaMap.countingCentreName) as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n areaMap.countingCentreId, areaMap.countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId,\n areaMap.countingCentreId\n ) as countingCentreAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countingCentreAreaMap.countingCentreId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, pollingDivisionAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n pollingDivisionAreaMap.pollingDivisionName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId\n ) as pollingDivisionAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = pollingDivisionAreaMap.pollingDivisionId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, administrativeDistrictAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n administrativeDistrictAreaMap.administrativeDistrictName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId\n ) as administrativeDistrictAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = administrativeDistrictAreaMap.administrativeDistrictId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countryAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n countryAreaMap.countryName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n NULL AS administrativeDistrictId, NULL AS administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId\n ) as countryAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countryAreaMap.countryId\n ) AS areaMappedTallySheet\nWHERE\n areaMappedTallySheet.rootElectionId = $rootElectionId\n and areaMappedTallySheet.administrativeDistrictId IN ($administrativeDistrictIds)\n and areaMappedTallySheet.status = 'Submitted'\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Submitted", + "transform": "table", + "type": "table" + }, + { + "columns": [], + "datasource": null, + "fontSize": "100%", + "gridPos": { + "h": 19, + "w": 3, + "x": 9, + "y": 2 + }, + "id": 7, + "pageSize": null, + "showHeader": true, + "sort": { + "col": null, + "desc": false + }, + "styles": [ + { + "alias": "Time", + "align": "left", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "link": false, + "pattern": "Time", + "preserveFormat": true, + "sanitize": true, + "type": "string" + }, + { + "alias": "", + "align": "left", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "preserveFormat": true, + "sanitize": true, + "thresholds": [], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT \n CONCAT(\n '
', tallySheetAreaLabel, '
', templateName, IF(voteType='Postal', ' (PV)', ''), '') \n AS \"\" \nFROM\n (\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countingCentreAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n CONCAT(countingCentreAreaMap.pollingDivisionName, \" / \", countingCentreAreaMap.countingCentreName) as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n areaMap.countingCentreId, areaMap.countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId,\n areaMap.countingCentreId\n ) as countingCentreAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countingCentreAreaMap.countingCentreId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, pollingDivisionAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n pollingDivisionAreaMap.pollingDivisionName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId\n ) as pollingDivisionAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = pollingDivisionAreaMap.pollingDivisionId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, administrativeDistrictAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n administrativeDistrictAreaMap.administrativeDistrictName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId\n ) as administrativeDistrictAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = administrativeDistrictAreaMap.administrativeDistrictId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countryAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n countryAreaMap.countryName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n NULL AS administrativeDistrictId, NULL AS administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId\n ) as countryAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countryAreaMap.countryId\n ) AS areaMappedTallySheet\nWHERE\n areaMappedTallySheet.rootElectionId = $rootElectionId\n and areaMappedTallySheet.administrativeDistrictId IN ($administrativeDistrictIds)\n and areaMappedTallySheet.status = 'Verified'\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Verified", + "transform": "table", + "type": "table" + }, + { + "columns": [], + "datasource": null, + "fontSize": "100%", + "gridPos": { + "h": 19, + "w": 3, + "x": 12, + "y": 2 + }, + "id": 8, + "pageSize": null, + "showHeader": true, + "sort": { + "col": null, + "desc": false + }, + "styles": [ + { + "alias": "Time", + "align": "left", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "link": false, + "pattern": "Time", + "preserveFormat": true, + "sanitize": true, + "type": "string" + }, + { + "alias": "", + "align": "left", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "preserveFormat": true, + "sanitize": true, + "thresholds": [], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT \n CONCAT(\n '
', tallySheetAreaLabel, '
', templateName, IF(voteType='Postal', ' (PV)', ''), '') \n AS \"\" \nFROM\n (\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countingCentreAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n CONCAT(countingCentreAreaMap.pollingDivisionName, \" / \", countingCentreAreaMap.countingCentreName) as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n areaMap.countingCentreId, areaMap.countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId,\n areaMap.countingCentreId\n ) as countingCentreAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countingCentreAreaMap.countingCentreId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, pollingDivisionAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n pollingDivisionAreaMap.pollingDivisionName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId\n ) as pollingDivisionAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = pollingDivisionAreaMap.pollingDivisionId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, administrativeDistrictAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n administrativeDistrictAreaMap.administrativeDistrictName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId\n ) as administrativeDistrictAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = administrativeDistrictAreaMap.administrativeDistrictId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countryAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n countryAreaMap.countryName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n NULL AS administrativeDistrictId, NULL AS administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId\n ) as countryAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countryAreaMap.countryId\n ) AS areaMappedTallySheet\nWHERE\n areaMappedTallySheet.rootElectionId = $rootElectionId\n and areaMappedTallySheet.administrativeDistrictId IN ($administrativeDistrictIds)\n and areaMappedTallySheet.status = 'Ready to Certify'\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Ready to Certify", + "transform": "table", + "type": "table" + }, + { + "columns": [], + "datasource": null, + "fontSize": "100%", + "gridPos": { + "h": 19, + "w": 3, + "x": 15, + "y": 2 + }, + "id": 9, + "pageSize": null, + "showHeader": true, + "sort": { + "col": null, + "desc": false + }, + "styles": [ + { + "alias": "Time", + "align": "left", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "link": false, + "pattern": "Time", + "preserveFormat": true, + "sanitize": true, + "type": "string" + }, + { + "alias": "", + "align": "left", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "preserveFormat": true, + "sanitize": true, + "thresholds": [], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT \n CONCAT(\n '
', tallySheetAreaLabel, '
', templateName, IF(voteType='Postal', ' (PV)', ''), '') \n AS \"\" \nFROM\n (\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countingCentreAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n CONCAT(countingCentreAreaMap.pollingDivisionName, \" / \", countingCentreAreaMap.countingCentreName) as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n areaMap.countingCentreId, areaMap.countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId,\n areaMap.countingCentreId\n ) as countingCentreAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countingCentreAreaMap.countingCentreId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, pollingDivisionAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n pollingDivisionAreaMap.pollingDivisionName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId\n ) as pollingDivisionAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = pollingDivisionAreaMap.pollingDivisionId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, administrativeDistrictAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n administrativeDistrictAreaMap.administrativeDistrictName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId\n ) as administrativeDistrictAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = administrativeDistrictAreaMap.administrativeDistrictId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countryAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n countryAreaMap.countryName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n NULL AS administrativeDistrictId, NULL AS administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId\n ) as countryAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countryAreaMap.countryId\n ) AS areaMappedTallySheet\nWHERE\n areaMappedTallySheet.rootElectionId = $rootElectionId\n and areaMappedTallySheet.administrativeDistrictId IN ($administrativeDistrictIds)\n and areaMappedTallySheet.status = 'Certified'\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Certified", + "transform": "table", + "type": "table" + }, + { + "columns": [], + "datasource": null, + "fontSize": "100%", + "gridPos": { + "h": 19, + "w": 3, + "x": 18, + "y": 2 + }, + "id": 10, + "pageSize": null, + "showHeader": true, + "sort": { + "col": null, + "desc": false + }, + "styles": [ + { + "alias": "Time", + "align": "left", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "link": false, + "pattern": "Time", + "preserveFormat": true, + "sanitize": true, + "type": "string" + }, + { + "alias": "", + "align": "left", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "preserveFormat": true, + "sanitize": true, + "thresholds": [], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT \n CONCAT(\n '
', tallySheetAreaLabel, '
', templateName, IF(voteType='Postal', ' (PV)', ''), '') \n AS \"\" \nFROM\n (\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countingCentreAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n CONCAT(countingCentreAreaMap.pollingDivisionName, \" / \", countingCentreAreaMap.countingCentreName) as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n areaMap.countingCentreId, areaMap.countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId,\n areaMap.countingCentreId\n ) as countingCentreAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countingCentreAreaMap.countingCentreId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, pollingDivisionAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n pollingDivisionAreaMap.pollingDivisionName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId\n ) as pollingDivisionAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = pollingDivisionAreaMap.pollingDivisionId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, administrativeDistrictAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n administrativeDistrictAreaMap.administrativeDistrictName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId\n ) as administrativeDistrictAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = administrativeDistrictAreaMap.administrativeDistrictId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countryAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n countryAreaMap.countryName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n NULL AS administrativeDistrictId, NULL AS administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId\n ) as countryAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countryAreaMap.countryId\n ) AS areaMappedTallySheet\nWHERE\n areaMappedTallySheet.rootElectionId = $rootElectionId\n and areaMappedTallySheet.administrativeDistrictId IN ($administrativeDistrictIds)\n and areaMappedTallySheet.status = 'Released'\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Released", + "transform": "table", + "type": "table" + }, + { + "cacheTimeout": null, + "datasource": null, + "gridPos": { + "h": 2, + "w": 3, + "x": 0, + "y": 21 + }, + "id": 11, + "links": [], + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [], + "values": false + }, + "graphMode": "area", + "justifyMode": "center", + "orientation": "horizontal" + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT \n COUNT(tallySheetId)\nFROM\n (\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countingCentreAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n CONCAT(countingCentreAreaMap.pollingDivisionName, \" / \", countingCentreAreaMap.countingCentreName) as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n areaMap.countingCentreId, areaMap.countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId,\n areaMap.countingCentreId\n ) as countingCentreAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countingCentreAreaMap.countingCentreId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, pollingDivisionAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n pollingDivisionAreaMap.pollingDivisionName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId\n ) as pollingDivisionAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = pollingDivisionAreaMap.pollingDivisionId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, administrativeDistrictAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n administrativeDistrictAreaMap.administrativeDistrictName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId\n ) as administrativeDistrictAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = administrativeDistrictAreaMap.administrativeDistrictId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countryAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n countryAreaMap.countryName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n NULL AS administrativeDistrictId, NULL AS administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId\n ) as countryAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countryAreaMap.countryId\n ) AS areaMappedTallySheet\nWHERE\n areaMappedTallySheet.rootElectionId = $rootElectionId\n and areaMappedTallySheet.administrativeDistrictId IN ($administrativeDistrictIds)\n and areaMappedTallySheet.status = 'Empty'\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "stat" + }, + { + "datasource": null, + "gridPos": { + "h": 2, + "w": 3, + "x": 3, + "y": 21 + }, + "id": 12, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [], + "values": false + }, + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto" + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT \n COUNT(tallySheetId)\nFROM\n (\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countingCentreAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n CONCAT(countingCentreAreaMap.pollingDivisionName, \" / \", countingCentreAreaMap.countingCentreName) as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n areaMap.countingCentreId, areaMap.countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId,\n areaMap.countingCentreId\n ) as countingCentreAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countingCentreAreaMap.countingCentreId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, pollingDivisionAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n pollingDivisionAreaMap.pollingDivisionName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId\n ) as pollingDivisionAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = pollingDivisionAreaMap.pollingDivisionId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, administrativeDistrictAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n administrativeDistrictAreaMap.administrativeDistrictName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId\n ) as administrativeDistrictAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = administrativeDistrictAreaMap.administrativeDistrictId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countryAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n countryAreaMap.countryName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n NULL AS administrativeDistrictId, NULL AS administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId\n ) as countryAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countryAreaMap.countryId\n ) AS areaMappedTallySheet\nWHERE\n areaMappedTallySheet.rootElectionId = $rootElectionId\n and areaMappedTallySheet.administrativeDistrictId IN ($administrativeDistrictIds)\n and areaMappedTallySheet.status = 'Saved'\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "stat" + }, + { + "datasource": null, + "gridPos": { + "h": 2, + "w": 3, + "x": 6, + "y": 21 + }, + "id": 13, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [], + "values": false + }, + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto" + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT \n COUNT(tallySheetId)\nFROM\n (\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countingCentreAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n CONCAT(countingCentreAreaMap.pollingDivisionName, \" / \", countingCentreAreaMap.countingCentreName) as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n areaMap.countingCentreId, areaMap.countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId,\n areaMap.countingCentreId\n ) as countingCentreAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countingCentreAreaMap.countingCentreId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, pollingDivisionAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n pollingDivisionAreaMap.pollingDivisionName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId\n ) as pollingDivisionAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = pollingDivisionAreaMap.pollingDivisionId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, administrativeDistrictAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n administrativeDistrictAreaMap.administrativeDistrictName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId\n ) as administrativeDistrictAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = administrativeDistrictAreaMap.administrativeDistrictId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countryAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n countryAreaMap.countryName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n NULL AS administrativeDistrictId, NULL AS administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId\n ) as countryAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countryAreaMap.countryId\n ) AS areaMappedTallySheet\nWHERE\n areaMappedTallySheet.rootElectionId = $rootElectionId\n and areaMappedTallySheet.administrativeDistrictId IN ($administrativeDistrictIds)\n and areaMappedTallySheet.status = 'Submitted'\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "stat" + }, + { + "datasource": null, + "gridPos": { + "h": 2, + "w": 3, + "x": 9, + "y": 21 + }, + "id": 14, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [], + "values": false + }, + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto" + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT \n COUNT(tallySheetId)\nFROM\n (\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countingCentreAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n CONCAT(countingCentreAreaMap.pollingDivisionName, \" / \", countingCentreAreaMap.countingCentreName) as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n areaMap.countingCentreId, areaMap.countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId,\n areaMap.countingCentreId\n ) as countingCentreAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countingCentreAreaMap.countingCentreId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, pollingDivisionAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n pollingDivisionAreaMap.pollingDivisionName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId\n ) as pollingDivisionAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = pollingDivisionAreaMap.pollingDivisionId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, administrativeDistrictAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n administrativeDistrictAreaMap.administrativeDistrictName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId\n ) as administrativeDistrictAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = administrativeDistrictAreaMap.administrativeDistrictId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countryAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n countryAreaMap.countryName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n NULL AS administrativeDistrictId, NULL AS administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId\n ) as countryAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countryAreaMap.countryId\n ) AS areaMappedTallySheet\nWHERE\n areaMappedTallySheet.rootElectionId = $rootElectionId\n and areaMappedTallySheet.administrativeDistrictId IN ($administrativeDistrictIds)\n and areaMappedTallySheet.status = 'Verified'\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "stat" + }, + { + "datasource": null, + "gridPos": { + "h": 2, + "w": 3, + "x": 12, + "y": 21 + }, + "id": 15, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [], + "values": false + }, + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto" + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT \n COUNT(tallySheetId)\nFROM\n (\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countingCentreAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n CONCAT(countingCentreAreaMap.pollingDivisionName, \" / \", countingCentreAreaMap.countingCentreName) as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n areaMap.countingCentreId, areaMap.countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId,\n areaMap.countingCentreId\n ) as countingCentreAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countingCentreAreaMap.countingCentreId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, pollingDivisionAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n pollingDivisionAreaMap.pollingDivisionName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId\n ) as pollingDivisionAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = pollingDivisionAreaMap.pollingDivisionId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, administrativeDistrictAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n administrativeDistrictAreaMap.administrativeDistrictName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId\n ) as administrativeDistrictAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = administrativeDistrictAreaMap.administrativeDistrictId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countryAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n countryAreaMap.countryName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n NULL AS administrativeDistrictId, NULL AS administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId\n ) as countryAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countryAreaMap.countryId\n ) AS areaMappedTallySheet\nWHERE\n areaMappedTallySheet.rootElectionId = $rootElectionId\n and areaMappedTallySheet.administrativeDistrictId IN ($administrativeDistrictIds)\n and areaMappedTallySheet.status = 'Ready to Certify'\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "stat" + }, + { + "datasource": null, + "gridPos": { + "h": 2, + "w": 3, + "x": 15, + "y": 21 + }, + "id": 16, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [], + "values": false + }, + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto" + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT \n COUNT(tallySheetId)\nFROM\n (\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countingCentreAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n CONCAT(countingCentreAreaMap.pollingDivisionName, \" / \", countingCentreAreaMap.countingCentreName) as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n areaMap.countingCentreId, areaMap.countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId,\n areaMap.countingCentreId\n ) as countingCentreAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countingCentreAreaMap.countingCentreId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, pollingDivisionAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n pollingDivisionAreaMap.pollingDivisionName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId\n ) as pollingDivisionAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = pollingDivisionAreaMap.pollingDivisionId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, administrativeDistrictAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n administrativeDistrictAreaMap.administrativeDistrictName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId\n ) as administrativeDistrictAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = administrativeDistrictAreaMap.administrativeDistrictId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countryAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n countryAreaMap.countryName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n NULL AS administrativeDistrictId, NULL AS administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId\n ) as countryAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countryAreaMap.countryId\n ) AS areaMappedTallySheet\nWHERE\n areaMappedTallySheet.rootElectionId = $rootElectionId\n and areaMappedTallySheet.administrativeDistrictId IN ($administrativeDistrictIds)\n and areaMappedTallySheet.status = 'Certified'\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "stat" + }, + { + "datasource": null, + "gridPos": { + "h": 2, + "w": 3, + "x": 18, + "y": 21 + }, + "id": 17, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [], + "values": false + }, + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto" + }, + "pluginVersion": "6.7.3", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT \n COUNT(tallySheetId)\nFROM\n (\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countingCentreAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n CONCAT(countingCentreAreaMap.pollingDivisionName, \" / \", countingCentreAreaMap.countingCentreName) as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n areaMap.countingCentreId, areaMap.countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId,\n areaMap.countingCentreId\n ) as countingCentreAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countingCentreAreaMap.countingCentreId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, pollingDivisionAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n pollingDivisionAreaMap.pollingDivisionName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n areaMap.pollingDivisionId, areaMap.pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId,\n areaMap.pollingDivisionId\n ) as pollingDivisionAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = pollingDivisionAreaMap.pollingDivisionId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, administrativeDistrictAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n administrativeDistrictAreaMap.administrativeDistrictName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n areaMap.administrativeDistrictId, areaMap.administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId,\n areaMap.administrativeDistrictId\n ) as administrativeDistrictAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = administrativeDistrictAreaMap.administrativeDistrictId\n\n UNION ALL\n\n SELECT\n tallySheet.tallySheetId, workflowInstance.status, template.templateName, countryAreaMap.*,\n election.electionId, election.voteType, election.rootElectionId,\n countryAreaMap.countryName as tallySheetAreaLabel\n FROM\n submission, tallySheet, template, workflowInstance, election,\n (\n SELECT\n areaMap.countryId, areaMap.countryName,\n NULL AS administrativeDistrictId, NULL AS administrativeDistrictName,\n NULL AS pollingDivisionId, NULL AS pollingDivisionName,\n NULL AS countingCentreId, NULL AS countingCentreName\n FROM\n (SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n pollingDivision.areaId as pollingDivisionId, pollingDivision.areaName as pollingDivisionName,\n pollingDistrict.areaId as pollingDistrictId, pollingDistrict.areaName as pollingDistrictName,\n pollingStation.areaId as pollingStationId, pollingStation.areaName as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"NonPostal\" as voteType\n FROM\n area country, area administrativeDistrict, area pollingDivision, area pollingDistrict, area pollingStation,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_pollingDivision,\n area_area pollingDivision_pollingDistrict,\n area_area pollingDistrict_pollingStation,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre,\n area_area countingCentre_pollingStation\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_pollingDivision.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_pollingDivision.childAreaId = pollingDivision.areaId\n \n and pollingDivision_pollingDistrict.parentAreaId = pollingDivision.areaId\n and pollingDivision_pollingDistrict.childAreaId = pollingDistrict.areaId\n \n and pollingDistrict_pollingStation.parentAreaId = pollingDistrict.areaId\n and pollingDistrict_pollingStation.childAreaId = pollingStation.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and countingCentre_pollingStation.parentAreaId = countingCentre.areaId\n and countingCentre_pollingStation.childAreaId = pollingStation.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and pollingDivision.areaType = \"PollingDivision\" and pollingDistrict.areaType = \"PollingDistrict\"\n and pollingStation.areaType = \"PollingStation\" and countingCentre.areaType = \"CountingCentre\"\n and districtCentre.areaType = \"DistrictCentre\" and electionCommission.areaType = \"ElectionCommission\"\n UNION SELECT\n country.areaId as countryId, country.areaName as countryName,\n administrativeDistrict.areaId as administrativeDistrictId, administrativeDistrict.areaName as administrativeDistrictName,\n NULL as pollingDivisionId, \"Postal\" as pollingDivisionName,\n NULL as pollingDistrictId, NULL as pollingDistrictName,\n NULL as pollingStationId, NULL as pollingStationName,\n electionCommission.areaId as electionCommissionId, electionCommission.areaName as electionCommissionName,\n districtCentre.areaId as districtCentreId, districtCentre.areaName as districtCentreName,\n countingCentre.areaId as countingCentreId, countingCentre.areaName as countingCentreName,\n \"Postal\" AS voteType\n FROM\n area country, area administrativeDistrict,\n area electionCommission, area districtCentre, area countingCentre,\n \n area_area country_administrativeDistrict,\n area_area administrativeDistrict_countingCentre,\n \n area_area electionCommission_districtCentre,\n area_area districtCentre_countingCentre\n WHERE\n country_administrativeDistrict.parentAreaId = country.areaId\n and country_administrativeDistrict.childAreaId = administrativeDistrict.areaId\n \n and administrativeDistrict_countingCentre.parentAreaId = administrativeDistrict.areaId\n and administrativeDistrict_countingCentre.childAreaId = countingCentre.areaId\n \n and electionCommission_districtCentre.parentAreaId = electionCommission.areaId\n and electionCommission_districtCentre.childAreaId = districtCentre.areaId\n \n and districtCentre_countingCentre.parentAreaId = districtCentre.areaId\n and districtCentre_countingCentre.childAreaId = countingCentre.areaId\n \n and country.areaType = \"Country\" and administrativeDistrict.areaType = \"AdministrativeDistrict\"\n and countingCentre.areaType = \"CountingCentre\" and districtCentre.areaType = \"DistrictCentre\"\n and electionCommission.areaType = \"ElectionCommission\"\n ) AS areaMap\n GROUP BY\n areaMap.countryId\n ) as countryAreaMap\n WHERE\n tallySheet.tallySheetId = submission.submissionId\n and election.electionId = submission.electionId\n and template.templateId = tallySheet.templateId\n and workflowInstance.workflowInstanceId = tallySheet.workflowInstanceId\n and submission.areaId = countryAreaMap.countryId\n ) AS areaMappedTallySheet\nWHERE\n areaMappedTallySheet.rootElectionId = $rootElectionId\n and areaMappedTallySheet.administrativeDistrictId IN ($administrativeDistrictIds)\n and areaMappedTallySheet.status = 'Released'\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "stat" + } + ], + "refresh": "5m", + "schemaVersion": 22, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "text": "314 - Parliament Election 2020", + "value": "314" + }, + "datasource": "MySQL", + "definition": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PARLIAMENT_ELECTION_2020' and parentElectionId IS NULL;", + "hide": 0, + "includeAll": false, + "index": -1, + "label": "Election", + "multi": false, + "name": "rootElectionId", + "options": [], + "query": "SELECT CONCAT(electionId, ' - ', electionName) as __text, electionId as __value from election WHERE electionTemplateName = 'PARLIAMENT_ELECTION_2020' and parentElectionId IS NULL;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "01-Colombo", + "value": "36926" + }, + "datasource": "MySQL", + "definition": "SELECT \n areaName AS __text, areaId AS __value \nFROM area, election \nWHERE \n election.electionId = area.electionId and election.rootElectionId = $rootElectionId and areaType = 'AdministrativeDistrict';", + "hide": 0, + "includeAll": false, + "index": -1, + "label": "Administrative District", + "multi": false, + "name": "administrativeDistrictIds", + "options": [], + "query": "SELECT \n areaName AS __text, areaId AS __value \nFROM area, election \nWHERE \n election.electionId = area.electionId and election.rootElectionId = $rootElectionId and areaType = 'AdministrativeDistrict';", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Provincial Council Election 2021 - Tally Sheet Status", + "uid": "JB6-W36Zaz", + "variables": { + "list": [] + }, + "version": 1 +} \ No newline at end of file From 6e6fcfae63c67d6c335f04aeeb2384fcce480786 Mon Sep 17 00:00:00 2001 From: umayanga Date: Wed, 17 Mar 2021 18:27:51 +0530 Subject: [PATCH 13/15] updating dashboards --- ...2021-administrative-district-counting.json | 1953 ++++++++++------- ...ial-election-2021-provincial-counting.json | 2 +- 2 files changed, 1189 insertions(+), 766 deletions(-) diff --git a/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-administrative-district-counting.json b/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-administrative-district-counting.json index dd6d62b4..0993d85c 100644 --- a/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-administrative-district-counting.json +++ b/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-administrative-district-counting.json @@ -15,8 +15,8 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 52, - "iteration": 1615981809649, + "id": 55, + "iteration": 1615984216492, "links": [], "panels": [ { @@ -62,7 +62,7 @@ "nullText": null, "postfix": "", "postfixFontSize": "50%", - "prefix": "ADMINISTRATIVE DISTRICT COUNTING DASHBOARD", + "prefix": "PROVINCIAL COUNTING DASHBOARD - ", "prefixFontSize": "100%", "rangeMaps": [ { @@ -86,7 +86,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT GROUP_CONCAT(areaName) FROM area WHERE areaId IN ($administrativeDistrictIds)", + "rawSql": "SELECT GROUP_CONCAT(areaName) FROM area WHERE areaId IN ($provinceIds)", "refId": "A", "select": [ [ @@ -166,7 +166,7 @@ "x": 0, "y": 4 }, - "id": 13, + "id": 79, "interval": null, "links": [], "mappingType": 1, @@ -186,7 +186,7 @@ "postfix": "", "postfixFontSize": "50%", "prefix": "", - "prefixFontSize": "70%", + "prefixFontSize": "30%", "rangeMaps": [ { "from": "null", @@ -244,7 +244,7 @@ "x": 4, "y": 4 }, - "id": 18, + "id": 38, "interval": null, "links": [], "mappingType": 1, @@ -261,9 +261,10 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "pluginVersion": "6.7.3", "postfix": "", "postfixFontSize": "50%", - "prefix": "PD", + "prefix": "AD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -274,9 +275,9 @@ ], "sparkline": { "fillColor": "#FADE2A", - "full": false, + "full": true, "lineColor": "rgb(31, 120, 193)", - "show": false, + "show": true, "ymax": null, "ymin": null }, @@ -287,7 +288,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.provinceId IN ($provinceIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -352,7 +353,7 @@ "x": 9, "y": 4 }, - "id": 92, + "id": 18, "interval": null, "links": [], "mappingType": 1, @@ -371,7 +372,7 @@ "nullText": null, "postfix": "", "postfixFontSize": "50%", - "prefix": "PV PD", + "prefix": "PD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -395,7 +396,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.provinceId IN ($provinceIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n\n\n-- SELECT\n-- CONCAT(\n-- SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedTallySheetCount), \"/\", COUNT(*), \" - \",\n-- ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedTallySheetCount) * 100 / COUNT(*), 0), \"%\"\n-- ) AS \"\"\n-- FROM\n-- (SELECT\n-- SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedTallySheetCount\n-- FROM\n-- ext_pce2021_dashboard_tally_sheet_status\n-- WHERE\n-- ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n-- and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n-- and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n-- and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\n-- GROUP BY\n-- ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -460,7 +461,7 @@ "x": 14, "y": 4 }, - "id": 93, + "id": 8, "interval": null, "links": [], "mappingType": 1, @@ -479,7 +480,7 @@ "nullText": null, "postfix": "", "postfixFontSize": "50%", - "prefix": "DV PD", + "prefix": "PV PD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -503,7 +504,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.provinceId IN ($provinceIds)\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -544,61 +545,74 @@ "valueName": "current" }, { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, "gridPos": { "h": 1, "w": 5, "x": 19, "y": 4 }, - "id": 98, - "options": { - "displayMode": "lcd", - "fieldOptions": { - "calcs": [ - "mean" - ], - "defaults": { - "links": [], - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "orange", - "value": 20 - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "green", - "value": 80 - } - ] - } - }, - "overrides": [], - "values": false + "id": 107, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 }, - "orientation": "horizontal", - "showUnfilled": true + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "DV PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null }, - "pluginVersion": "6.7.3", + "tableColumn": "", "targets": [ { "format": "table", "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -622,11 +636,21 @@ ] } ], + "thresholds": "", "timeFrom": null, "timeShift": null, "title": "", "transparent": true, - "type": "bargauge" + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" }, { "cacheTimeout": null, @@ -650,10 +674,10 @@ "gridPos": { "h": 1, "w": 5, - "x": 4, + "x": 9, "y": 5 }, - "id": 8, + "id": 109, "interval": null, "links": [], "mappingType": 1, @@ -696,7 +720,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.provinceId IN ($provinceIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n\n\n-- SELECT\n-- CONCAT(\n-- SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedTallySheetCount), \"/\", COUNT(*), \" - \",\n-- ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedTallySheetCount) * 100 / COUNT(*), 0), \"%\"\n-- ) AS \"\"\n-- FROM\n-- (SELECT\n-- SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedTallySheetCount\n-- FROM\n-- ext_pce2021_dashboard_tally_sheet_status\n-- WHERE\n-- ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n-- and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n-- and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n-- and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\n-- GROUP BY\n-- ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -758,10 +782,10 @@ "gridPos": { "h": 1, "w": 5, - "x": 9, + "x": 14, "y": 5 }, - "id": 28, + "id": 110, "interval": null, "links": [], "mappingType": 1, @@ -804,7 +828,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n\n\n-- SELECT\n-- CONCAT(\n-- SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedTallySheetCount), \"/\", COUNT(*), \" - \",\n-- ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedTallySheetCount) * 100 / COUNT(*), 0), \"%\"\n-- ) AS \"\"\n-- FROM\n-- (SELECT\n-- SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedTallySheetCount\n-- FROM\n-- ext_pce2021_dashboard_tally_sheet_status\n-- WHERE\n-- ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n-- and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n-- and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n-- and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\n-- GROUP BY\n-- ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -866,10 +890,10 @@ "gridPos": { "h": 1, "w": 5, - "x": 14, + "x": 19, "y": 5 }, - "id": 53, + "id": 111, "interval": null, "links": [], "mappingType": 1, @@ -912,7 +936,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n\n\n-- SELECT\n-- CONCAT(\n-- SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedTallySheetCount), \"/\", COUNT(*), \" - \",\n-- ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedTallySheetCount) * 100 / COUNT(*), 0), \"%\"\n-- ) AS \"\"\n-- FROM\n-- (SELECT\n-- SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedTallySheetCount\n-- FROM\n-- ext_pce2021_dashboard_tally_sheet_status\n-- WHERE\n-- ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n-- and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n-- and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n-- and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\n-- GROUP BY\n-- ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -992,7 +1016,7 @@ "x": 0, "y": 7 }, - "id": 14, + "id": 80, "interval": null, "links": [], "mappingType": 1, @@ -1012,7 +1036,7 @@ "postfix": "", "postfixFontSize": "50%", "prefix": "", - "prefixFontSize": "50%", + "prefixFontSize": "30%", "rangeMaps": [ { "from": "null", @@ -1043,7 +1067,7 @@ "value": "null" } ], - "valueName": "avg" + "valueName": "current" }, { "cacheTimeout": null, @@ -1070,7 +1094,7 @@ "x": 4, "y": 7 }, - "id": 19, + "id": 39, "interval": null, "links": [], "mappingType": 1, @@ -1089,7 +1113,7 @@ "nullText": null, "postfix": "", "postfixFontSize": "50%", - "prefix": "PD", + "prefix": "AD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -1113,7 +1137,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1178,7 +1202,7 @@ "x": 9, "y": 7 }, - "id": 94, + "id": 19, "interval": null, "links": [], "mappingType": 1, @@ -1221,7 +1245,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1286,7 +1310,7 @@ "x": 14, "y": 7 }, - "id": 95, + "id": 9, "interval": null, "links": [], "mappingType": 1, @@ -1305,7 +1329,7 @@ "nullText": null, "postfix": "", "postfixFontSize": "50%", - "prefix": "PD", + "prefix": "PV PD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -1329,7 +1353,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1370,60 +1394,74 @@ "valueName": "current" }, { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, "gridPos": { "h": 1, "w": 5, "x": 19, "y": 7 }, - "id": 99, - "options": { - "displayMode": "lcd", - "fieldOptions": { - "calcs": [ - "mean" - ], - "defaults": { - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "orange", - "value": 20 - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "green", - "value": 80 - } - ] - } - }, - "overrides": [], - "values": false + "id": 108, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 }, - "orientation": "horizontal", - "showUnfilled": true + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "DV PD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null }, - "pluginVersion": "6.7.3", + "tableColumn": "", "targets": [ { "format": "table", "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName IN (\"CE-201\", \"CE-201-PV\")\n) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1447,11 +1485,21 @@ ] } ], + "thresholds": "", "timeFrom": null, "timeShift": null, "title": "", "transparent": true, - "type": "bargauge" + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" }, { "cacheTimeout": null, @@ -1475,10 +1523,10 @@ "gridPos": { "h": 1, "w": 5, - "x": 4, + "x": 9, "y": 8 }, - "id": 9, + "id": 112, "interval": null, "links": [], "mappingType": 1, @@ -1521,7 +1569,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1583,10 +1631,10 @@ "gridPos": { "h": 1, "w": 5, - "x": 9, + "x": 14, "y": 8 }, - "id": 30, + "id": 113, "interval": null, "links": [], "mappingType": 1, @@ -1629,7 +1677,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1691,10 +1739,10 @@ "gridPos": { "h": 1, "w": 5, - "x": 14, + "x": 19, "y": 8 }, - "id": 48, + "id": 114, "interval": null, "links": [], "mappingType": 1, @@ -1737,7 +1785,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-35\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"CE-201-PV\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.countingCentreId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -1817,7 +1865,7 @@ "x": 0, "y": 10 }, - "id": 79, + "id": 81, "interval": null, "links": [], "mappingType": 1, @@ -1837,7 +1885,7 @@ "postfix": "", "postfixFontSize": "50%", "prefix": "", - "prefixFontSize": "50%", + "prefixFontSize": "30%", "rangeMaps": [ { "from": "null", @@ -1854,36 +1902,6 @@ "ymin": null }, "tableColumn": "", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n createdAt AS \"time\",\n statusReportId\nFROM dashboard_status_report\nWHERE\n $__timeFilter(createdAt)\nORDER BY createdAt", - "refId": "A", - "select": [ - [ - { - "params": [ - "statusReportId" - ], - "type": "column" - } - ] - ], - "table": "dashboard_status_report", - "timeColumn": "createdAt", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], "thresholds": "", "timeFrom": null, "timeShift": null, @@ -1898,7 +1916,7 @@ "value": "null" } ], - "valueName": "avg" + "valueName": "current" }, { "cacheTimeout": null, @@ -1925,7 +1943,7 @@ "x": 4, "y": 10 }, - "id": 80, + "id": 85, "interval": null, "links": [], "mappingType": 1, @@ -1944,7 +1962,7 @@ "nullText": null, "postfix": "", "postfixFontSize": "50%", - "prefix": "PD", + "prefix": "AD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -1968,7 +1986,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2033,7 +2051,7 @@ "x": 9, "y": 10 }, - "id": 81, + "id": 84, "interval": null, "links": [], "mappingType": 1, @@ -2052,7 +2070,7 @@ "nullText": null, "postfix": "", "postfixFontSize": "50%", - "prefix": "PV PD", + "prefix": "PD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -2076,7 +2094,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2141,7 +2159,7 @@ "x": 14, "y": 10 }, - "id": 82, + "id": 86, "interval": null, "links": [], "mappingType": 1, @@ -2160,7 +2178,7 @@ "nullText": null, "postfix": "", "postfixFontSize": "50%", - "prefix": "DV PD", + "prefix": "PV PD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -2184,7 +2202,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2225,137 +2243,38 @@ "valueName": "current" }, { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, "gridPos": { "h": 1, "w": 5, "x": 19, "y": 10 }, - "id": 100, - "options": { - "displayMode": "lcd", - "fieldOptions": { - "calcs": [ - "mean" - ], - "defaults": { - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "orange", - "value": 20 - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "green", - "value": 80 - } - ] - } - }, - "overrides": [], - "values": false - }, - "orientation": "horizontal", - "showUnfilled": true - }, - "pluginVersion": "6.7.3", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", - "refId": "A", - "select": [ - [ - { - "params": [ - "statusReportId" - ], - "type": "column" - } - ] - ], - "table": "dashboard_status_report", - "timeColumn": "createdAt", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "transparent": true, - "type": "bargauge" - }, - { - "content": "", - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 11 - }, - "id": 78, - "mode": "markdown", - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "text" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": null, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 1, - "w": 4, - "x": 0, - "y": 12 - }, - "id": 77, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 + "id": 115, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 }, { "name": "range to text", @@ -2367,7 +2286,7 @@ "nullText": null, "postfix": "", "postfixFontSize": "50%", - "prefix": "", + "prefix": "PV PD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -2377,7 +2296,7 @@ } ], "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", + "fillColor": "#FADE2A", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false, @@ -2387,11 +2306,11 @@ "tableColumn": "", "targets": [ { - "format": "time_series", + "format": "table", "group": [], "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n createdAt AS \"time\",\n statusReportId\nFROM dashboard_status_report\nWHERE\n $__timeFilter(createdAt)\nORDER BY createdAt", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2421,15 +2340,15 @@ "title": "", "transparent": true, "type": "singlestat", - "valueFontSize": "70%", + "valueFontSize": "50%", "valueMaps": [ { "op": "=", - "text": "PCE-PD-V", + "text": "N/A", "value": "null" } ], - "valueName": "avg" + "valueName": "current" }, { "cacheTimeout": null, @@ -2453,10 +2372,10 @@ "gridPos": { "h": 1, "w": 5, - "x": 4, - "y": 12 + "x": 9, + "y": 11 }, - "id": 21, + "id": 93, "interval": null, "links": [], "mappingType": 1, @@ -2473,10 +2392,9 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "pluginVersion": "6.7.3", "postfix": "", "postfixFontSize": "50%", - "prefix": "PD", + "prefix": "RELEASED", "prefixFontSize": "50%", "rangeMaps": [ { @@ -2500,7 +2418,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-PD-V\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"NonPostal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId,\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2562,10 +2480,10 @@ "gridPos": { "h": 1, "w": 5, - "x": 9, - "y": 12 + "x": 14, + "y": 11 }, - "id": 34, + "id": 116, "interval": null, "links": [], "mappingType": 1, @@ -2582,10 +2500,9 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "pluginVersion": "6.7.3", "postfix": "", "postfixFontSize": "50%", - "prefix": "PV PD", + "prefix": "RELEASED", "prefixFontSize": "50%", "rangeMaps": [ { @@ -2609,7 +2526,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-PD-V\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId,\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2671,10 +2588,10 @@ "gridPos": { "h": 1, "w": 5, - "x": 14, - "y": 12 + "x": 19, + "y": 11 }, - "id": 66, + "id": 117, "interval": null, "links": [], "mappingType": 1, @@ -2691,10 +2608,9 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "pluginVersion": "6.7.3", "postfix": "", "postfixFontSize": "50%", - "prefix": "DV PD", + "prefix": "RELEASED", "prefixFontSize": "50%", "rangeMaps": [ { @@ -2718,7 +2634,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-PD-V\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId,\n ext_pce2021_dashboard_tally_sheet_status.pollingDivisionId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -2758,90 +2674,6 @@ ], "valueName": "current" }, - { - "datasource": null, - "gridPos": { - "h": 1, - "w": 5, - "x": 19, - "y": 12 - }, - "id": 101, - "options": { - "displayMode": "lcd", - "fieldOptions": { - "calcs": [ - "mean" - ], - "defaults": { - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "orange", - "value": 20 - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "green", - "value": 80 - } - ] - } - }, - "overrides": [], - "values": false - }, - "orientation": "horizontal", - "showUnfilled": true - }, - "pluginVersion": "6.7.3", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-PD-V\"\n) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", - "refId": "A", - "select": [ - [ - { - "params": [ - "statusReportId" - ], - "type": "column" - } - ] - ], - "table": "dashboard_status_report", - "timeColumn": "createdAt", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "transparent": true, - "type": "bargauge" - }, { "content": "", "datasource": null, @@ -2849,9 +2681,9 @@ "h": 1, "w": 24, "x": 0, - "y": 13 + "y": 12 }, - "id": 76, + "id": 75, "mode": "markdown", "timeFrom": null, "timeShift": null, @@ -2880,9 +2712,9 @@ "h": 1, "w": 4, "x": 0, - "y": 14 + "y": 13 }, - "id": 83, + "id": 15, "interval": null, "links": [], "mappingType": 1, @@ -2902,7 +2734,7 @@ "postfix": "", "postfixFontSize": "50%", "prefix": "", - "prefixFontSize": "50%", + "prefixFontSize": "30%", "rangeMaps": [ { "from": "null", @@ -2919,36 +2751,6 @@ "ymin": null }, "tableColumn": "", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n createdAt AS \"time\",\n statusReportId\nFROM dashboard_status_report\nWHERE\n $__timeFilter(createdAt)\nORDER BY createdAt", - "refId": "A", - "select": [ - [ - { - "params": [ - "statusReportId" - ], - "type": "column" - } - ] - ], - "table": "dashboard_status_report", - "timeColumn": "createdAt", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], "thresholds": "", "timeFrom": null, "timeShift": null, @@ -2959,11 +2761,11 @@ "valueMaps": [ { "op": "=", - "text": "PCE-CE-RO-PR-1", + "text": "PCE-4", "value": "null" } ], - "valueName": "avg" + "valueName": "current" }, { "cacheTimeout": null, @@ -2988,9 +2790,9 @@ "h": 1, "w": 5, "x": 4, - "y": 14 + "y": 13 }, - "id": 84, + "id": 66, "interval": null, "links": [], "mappingType": 1, @@ -3010,7 +2812,7 @@ "pluginVersion": "6.7.3", "postfix": "", "postfixFontSize": "50%", - "prefix": "Parties", + "prefix": "parties", "prefixFontSize": "50%", "rangeMaps": [ { @@ -3034,7 +2836,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-1\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n\n\n\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-4\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -3074,15 +2876,47 @@ ], "valueName": "current" }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 2, + "w": 14, + "x": 10, + "y": 13 + }, + "id": 106, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "text" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 9, + "x": 0, + "y": 14 + }, + "id": 83, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, { "cacheTimeout": null, "colorBackground": false, - "colorPrefix": false, - "colorValue": true, + "colorValue": false, "colors": [ - "#73BF69", - "#73BF69", - "#73BF69" + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" ], "datasource": null, "format": "none", @@ -3095,11 +2929,11 @@ }, "gridPos": { "h": 1, - "w": 5, - "x": 9, - "y": 14 + "w": 4, + "x": 0, + "y": 15 }, - "id": 85, + "id": 97, "interval": null, "links": [], "mappingType": 1, @@ -3116,11 +2950,10 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "pluginVersion": "6.7.3", "postfix": "", "postfixFontSize": "50%", - "prefix": "PV Parties", - "prefixFontSize": "50%", + "prefix": "", + "prefixFontSize": "30%", "rangeMaps": [ { "from": "null", @@ -3129,7 +2962,7 @@ } ], "sparkline": { - "fillColor": "#FADE2A", + "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false, @@ -3137,20 +2970,610 @@ "ymin": null }, "tableColumn": "", - "targets": [ + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Postal\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", - "refId": "A", - "select": [ - [ - { - "params": [ - "statusReportId" - ], + "op": "=", + "text": "PCE-CE-RO-PR-1", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 4, + "y": 15 + }, + "id": 98, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "parties", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-1\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 10, + "y": 15 + }, + "id": 88, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "30%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "PCE-CE-RO-V2", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 14, + "y": 15 + }, + "id": 82, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "AD", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V2\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 19, + "y": 15 + }, + "id": 95, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "RELEASED", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-V2\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], + "type": "column" + } + ] + ], + "table": "dashboard_status_report", + "timeColumn": "createdAt", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 9, + "x": 0, + "y": 16 + }, + "id": 76, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 14, + "x": 10, + "y": 16 + }, + "id": 103, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 0, + "y": 17 + }, + "id": 99, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "30%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "PCE-CE-RO-PR-2", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 5, + "x": 4, + "y": 17 + }, + "id": 101, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.3", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "parties", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-2\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "statusReportId" + ], "type": "column" } ] @@ -3183,6 +3606,83 @@ ], "valueName": "current" }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 1, + "w": 4, + "x": 10, + "y": 17 + }, + "id": 78, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "30%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "70%", + "valueMaps": [ + { + "op": "=", + "text": "PCE-R2", + "value": "null" + } + ], + "valueName": "current" + }, { "cacheTimeout": null, "colorBackground": false, @@ -3206,9 +3706,9 @@ "h": 1, "w": 5, "x": 14, - "y": 14 + "y": 17 }, - "id": 86, + "id": 92, "interval": null, "links": [], "mappingType": 1, @@ -3225,10 +3725,9 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "pluginVersion": "6.7.3", "postfix": "", "postfixFontSize": "50%", - "prefix": "DV Parties", + "prefix": "AD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -3252,7 +3751,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-1\"\n and ext_pce2021_dashboard_tally_sheet_status.voteType = \"Displaced\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-R2\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -3293,60 +3792,74 @@ "valueName": "current" }, { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, "gridPos": { "h": 1, "w": 5, "x": 19, - "y": 14 + "y": 17 }, - "id": 102, - "options": { - "displayMode": "lcd", - "fieldOptions": { - "calcs": [ - "mean" - ], - "defaults": { - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "orange", - "value": 20 - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "green", - "value": 80 - } - ] - } - }, - "overrides": [], - "values": false + "id": 96, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 }, - "orientation": "horizontal", - "showUnfilled": true + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "RELEASED", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null }, - "pluginVersion": "6.7.3", + "tableColumn": "", "targets": [ { "format": "table", "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-1\"\n) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-R2\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -3370,22 +3883,48 @@ ] } ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 9, + "x": 0, + "y": 18 + }, + "id": 90, + "mode": "markdown", "timeFrom": null, "timeShift": null, "title": "", - "transparent": true, - "type": "bargauge" + "type": "text" }, { "content": "", "datasource": null, "gridPos": { "h": 1, - "w": 24, - "x": 0, - "y": 15 + "w": 14, + "x": 10, + "y": 18 }, - "id": 75, + "id": 104, "mode": "markdown", "timeFrom": null, "timeShift": null, @@ -3414,9 +3953,9 @@ "h": 1, "w": 4, "x": 0, - "y": 16 + "y": 19 }, - "id": 87, + "id": 100, "interval": null, "links": [], "mappingType": 1, @@ -3436,7 +3975,7 @@ "postfix": "", "postfixFontSize": "50%", "prefix": "", - "prefixFontSize": "50%", + "prefixFontSize": "30%", "rangeMaps": [ { "from": "null", @@ -3453,36 +3992,6 @@ "ymin": null }, "tableColumn": "", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n createdAt AS \"time\",\n statusReportId\nFROM dashboard_status_report\nWHERE\n $__timeFilter(createdAt)\nORDER BY createdAt", - "refId": "A", - "select": [ - [ - { - "params": [ - "statusReportId" - ], - "type": "column" - } - ] - ], - "table": "dashboard_status_report", - "timeColumn": "createdAt", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], "thresholds": "", "timeFrom": null, "timeShift": null, @@ -3493,11 +4002,11 @@ "valueMaps": [ { "op": "=", - "text": "PCE-CE-RO-PR-2", + "text": "PCE-CE-RO-PR-3", "value": "null" } ], - "valueName": "avg" + "valueName": "current" }, { "cacheTimeout": null, @@ -3522,9 +4031,9 @@ "h": 1, "w": 5, "x": 4, - "y": 16 + "y": 19 }, - "id": 88, + "id": 102, "interval": null, "links": [], "mappingType": 1, @@ -3544,7 +4053,7 @@ "pluginVersion": "6.7.3", "postfix": "", "postfixFontSize": "50%", - "prefix": "Parties", + "prefix": "parties", "prefixFontSize": "50%", "rangeMaps": [ { @@ -3568,7 +4077,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-2\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n\n\n\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-3\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -3608,106 +4117,6 @@ ], "valueName": "current" }, - { - "datasource": null, - "gridPos": { - "h": 1, - "w": 5, - "x": 19, - "y": 16 - }, - "id": 103, - "options": { - "displayMode": "lcd", - "fieldOptions": { - "calcs": [ - "mean" - ], - "defaults": { - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "orange", - "value": 20 - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "green", - "value": 80 - } - ] - } - }, - "overrides": [], - "values": false - }, - "orientation": "horizontal", - "showUnfilled": true - }, - "pluginVersion": "6.7.3", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-2\"\n) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", - "refId": "A", - "select": [ - [ - { - "params": [ - "statusReportId" - ], - "type": "column" - } - ] - ], - "table": "dashboard_status_report", - "timeColumn": "createdAt", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "", - "transparent": true, - "type": "bargauge" - }, - { - "content": "", - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 17 - }, - "id": 89, - "mode": "markdown", - "timeFrom": null, - "timeShift": null, - "title": "", - "type": "text" - }, { "cacheTimeout": null, "colorBackground": false, @@ -3729,10 +4138,10 @@ "gridPos": { "h": 1, "w": 4, - "x": 0, - "y": 18 + "x": 10, + "y": 19 }, - "id": 90, + "id": 87, "interval": null, "links": [], "mappingType": 1, @@ -3752,7 +4161,7 @@ "postfix": "", "postfixFontSize": "50%", "prefix": "", - "prefixFontSize": "50%", + "prefixFontSize": "30%", "rangeMaps": [ { "from": "null", @@ -3769,36 +4178,6 @@ "ymin": null }, "tableColumn": "", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": false, - "rawSql": "SELECT\n createdAt AS \"time\",\n statusReportId\nFROM dashboard_status_report\nWHERE\n $__timeFilter(createdAt)\nORDER BY createdAt", - "refId": "A", - "select": [ - [ - { - "params": [ - "statusReportId" - ], - "type": "column" - } - ] - ], - "table": "dashboard_status_report", - "timeColumn": "createdAt", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], "thresholds": "", "timeFrom": null, "timeShift": null, @@ -3809,11 +4188,11 @@ "valueMaps": [ { "op": "=", - "text": "PCE-CE-RO-PR-2", + "text": "PCE-21", "value": "null" } ], - "valueName": "avg" + "valueName": "current" }, { "cacheTimeout": null, @@ -3837,8 +4216,8 @@ "gridPos": { "h": 1, "w": 5, - "x": 4, - "y": 18 + "x": 14, + "y": 19 }, "id": 91, "interval": null, @@ -3857,10 +4236,9 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "pluginVersion": "6.7.3", "postfix": "", "postfixFontSize": "50%", - "prefix": "Parties", + "prefix": "AD", "prefixFontSize": "50%", "rangeMaps": [ { @@ -3884,7 +4262,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-3\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.partyId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n\n\n\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-21\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -3925,60 +4303,74 @@ "valueName": "current" }, { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": true, + "colors": [ + "#73BF69", + "#73BF69", + "#73BF69" + ], "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, "gridPos": { "h": 1, "w": 5, "x": 19, - "y": 18 + "y": 19 }, - "id": 104, - "options": { - "displayMode": "lcd", - "fieldOptions": { - "calcs": [ - "mean" - ], - "defaults": { - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "orange", - "value": 20 - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "green", - "value": 80 - } - ] - } - }, - "overrides": [], - "values": false + "id": 94, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 }, - "orientation": "horizontal", - "showUnfilled": true + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "RELEASED", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "#FADE2A", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null }, - "pluginVersion": "6.7.3", + "tableColumn": "", "targets": [ { "format": "table", "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n ROUND(SUM(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections) * 100 / SUM(totalSections), 0) AS value\nFROM\n(SELECT\n SUM(IF(verifiedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId IN ($administrativeDistrictIds)\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-CE-RO-PR-3\"\n) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", + "rawSql": "SELECT\n CONCAT(\n SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)), \"/\", COUNT(*), \" - \",\n ROUND(SUM(IF(ext_pce2021_dashboard_tally_sheet_status_aggregated.completedSections = totalSections, 1, 0)) * 100 / COUNT(*), 0), \"%\"\n ) AS \"\"\nFROM\n(SELECT\n SUM(IF(releasedTallySheetCount = totalTallySheetCount, 1, 0)) AS completedSections, COUNT(*) AS totalSections\nFROM\n ext_pce2021_dashboard_tally_sheet_status\nWHERE\n ext_pce2021_dashboard_tally_sheet_status.incrementId IN (SELECT MAX(ext_pce2021_dashboard_increment.id) from ext_pce2021_dashboard_increment WHERE ext_pce2021_dashboard_increment.active=1)\n and ext_pce2021_dashboard_tally_sheet_status.electionId = $rootElectionId\n and ext_pce2021_dashboard_tally_sheet_status.templateName = \"PCE-21\"\nGROUP BY\n ext_pce2021_dashboard_tally_sheet_status.administrativeDistrictId) AS ext_pce2021_dashboard_tally_sheet_status_aggregated\n", "refId": "A", "select": [ [ @@ -4002,11 +4394,53 @@ ] } ], + "thresholds": "", "timeFrom": null, "timeShift": null, "title": "", "transparent": true, - "type": "bargauge" + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 9, + "x": 0, + "y": 20 + }, + "id": 89, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" + }, + { + "content": "", + "datasource": null, + "gridPos": { + "h": 1, + "w": 14, + "x": 10, + "y": 20 + }, + "id": 105, + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "text" } ], "refresh": "5m", @@ -4018,6 +4452,7 @@ { "allValue": null, "current": { + "tags": [], "text": "406 - UVA Provincial Council Election 2021 - Test 1", "value": "406" }, @@ -4044,32 +4479,20 @@ { "allValue": null, "current": { - "selected": true, - "text": "19-Badulla", - "value": "67994" + "text": "Uva", + "value": "67993" }, "datasource": "MySQL", - "definition": "SELECT \n areaName AS __text, areaId AS __value \nFROM area, election \nWHERE \n election.electionId = area.electionId and election.rootElectionId = $rootElectionId and areaType = 'AdministrativeDistrict';", + "definition": "SELECT \n areaName AS __text, areaId AS __value \nFROM area, election \nWHERE \n election.electionId = area.electionId and election.rootElectionId = $rootElectionId and areaType = 'Province';", "hide": 0, "includeAll": false, "index": -1, - "label": null, + "label": "Province", "multi": false, - "name": "administrativeDistrictIds", - "options": [ - { - "selected": true, - "text": "19-Badulla", - "value": "67994" - }, - { - "selected": false, - "text": "20-Moneragala", - "value": "69171" - } - ], - "query": "SELECT \n areaName AS __text, areaId AS __value \nFROM area, election \nWHERE \n election.electionId = area.electionId and election.rootElectionId = $rootElectionId and areaType = 'AdministrativeDistrict';", - "refresh": 0, + "name": "provinceIds", + "options": [], + "query": "SELECT \n areaName AS __text, areaId AS __value \nFROM area, election \nWHERE \n election.electionId = area.electionId and election.rootElectionId = $rootElectionId and areaType = 'Province';", + "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 1, @@ -4100,10 +4523,10 @@ ] }, "timezone": "", - "title": "Provincial Council Election 2021 - Counting - Administrative District", - "uid": "rRzC-iwMz", + "title": "Provincial Council Election 2021 - Counting - Provincial", + "uid": "GXrbHAVMkz", "variables": { "list": [] }, - "version": 13 + "version": 20 } \ No newline at end of file diff --git a/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-provincial-counting.json b/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-provincial-counting.json index 668bbe07..7fbd596f 100644 --- a/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-provincial-counting.json +++ b/results-tabulation-dashboard/provincial-council-election-2021/provincial-election-2021-provincial-counting.json @@ -62,7 +62,7 @@ "nullText": null, "postfix": "", "postfixFontSize": "50%", - "prefix": "ALL ISLAND COUNTING DASHBOARD", + "prefix": "PROVINCIAL COUNTING DASHBOARD - ", "prefixFontSize": "100%", "rangeMaps": [ { From b545320f85ee7962f5d48e0b32157f7e1e25d863 Mon Sep 17 00:00:00 2001 From: Kosala Gangabadage Date: Mon, 22 Mar 2021 12:47:07 +0530 Subject: [PATCH 14/15] Platformer Workflow updated --- .../platformer-b543d3c0-2b9f-4b3a-b87b-6d3bb0c64537.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/platformer-b543d3c0-2b9f-4b3a-b87b-6d3bb0c64537.yml b/.github/workflows/platformer-b543d3c0-2b9f-4b3a-b87b-6d3bb0c64537.yml index 704f8515..857c6324 100644 --- a/.github/workflows/platformer-b543d3c0-2b9f-4b3a-b87b-6d3bb0c64537.yml +++ b/.github/workflows/platformer-b543d3c0-2b9f-4b3a-b87b-6d3bb0c64537.yml @@ -24,11 +24,11 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build the Docker image run: docker build --tag - ${SERVICE_NAME}:${{steps.event-version.outputs.SOURCE_TAG }} --file + ${SERVICE_NAME}:update-${{steps.event-version.outputs.SOURCE_TAG }} --file ./results-tabulation-dashboard/Dockerfile ./results-tabulation-dashboard/ - name: GitHub Image Push - run: docker push $SERVICE_NAME:${{steps.event-version.outputs.SOURCE_TAG }} + run: docker push $SERVICE_NAME:update-${{steps.event-version.outputs.SOURCE_TAG }} - name: Platformer Deploy uses: platformer-com/build-deploy-action@v1 with: @@ -36,5 +36,5 @@ jobs: project-id: ${{secrets.PROJECT_ID_9CBA253F_B6ED_4CD0_B890_70A3810F0633}} token: ${{secrets.AUTOGENERATED_CICD_9CBA253F_B6ED_4CD0_B890_70A3810F0633}} image-name: ${{env.SERVICE_NAME}} - tag: ${{steps.event-version.outputs.SOURCE_TAG }} + tag: update-${{steps.event-version.outputs.SOURCE_TAG }} container-id: b852a116-f1eb-4800-80fb-47ba926442eb From 94c1e832c84c3358d0e227fd784e50c52320c922 Mon Sep 17 00:00:00 2001 From: umayanga Date: Mon, 29 Mar 2021 16:26:09 +0530 Subject: [PATCH 15/15] fix claim typo --- results-tabulation-api/constants/AUTH_CONSTANTS.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/results-tabulation-api/constants/AUTH_CONSTANTS.py b/results-tabulation-api/constants/AUTH_CONSTANTS.py index 584f3476..0b828c9d 100644 --- a/results-tabulation-api/constants/AUTH_CONSTANTS.py +++ b/results-tabulation-api/constants/AUTH_CONSTANTS.py @@ -12,7 +12,7 @@ ADMINISTRATIVE_DISTRICT_REPORT_VIEWER_ROLE = "adm_dis_rep_view" ADMINISTRATIVE_DISTRICT_REPORT_VERIFIER_ROLE = "adm_dis_rep_verf" PROVINCIAL_REPORT_VIEWER_ROLE = "prov_rep_view" -PROVINCIAL_REPORT_VERIFIER_ROLE = "prov_dis_rep_verf" +PROVINCIAL_REPORT_VERIFIER_ROLE = "prov_rep_verf" NATIONAL_REPORT_VIEWER_ROLE = "nat_dis_rep_view" NATIONAL_REPORT_VERIFIER_ROLE = "nat_dis_rep_verf" EC_LEADERSHIP_ROLE = "ec_leadership"