UI: added ozone level widget (O3) to air quality bundle

This commit is contained in:
Dmitriymush 2023-12-07 14:00:36 +02:00
parent d39fff85ef
commit 6b128f3db6
9 changed files with 317 additions and 1 deletions

View File

@ -74,6 +74,14 @@
"individual_allergy_index_iai_chart_card",
"individual_allergy_index_iai_chart_card_with_background",
"simple_individual_allergy_index_iai_chart_card",
"simple_individual_allergy_index_iai_chart_card_with_background2"
"simple_individual_allergy_index_iai_chart_card_with_background2",
"ozone_o3_card",
"ozone_o3_card_with_background",
"horizontal_ozone_o3_card",
"horizontal_ozone_o3_card_with_background",
"ozone_o3_chart_card_with_background",
"ozone_o3_chart_card_with_background2",
"simple_ozone_o3_chart_card",
"simple_ozone_o3_chart_card_with_background"
]
}

View File

@ -0,0 +1,37 @@
{
"fqn": "horizontal_ozone_o3_card",
"name": "Horizontal ozone (O3) card",
"deprecated": false,
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAACgCAYAAABJ/yOpAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAnnSURBVHgB7d1PbBTXHcDxZ5RwKQK7UpMDSOAcQkBpC+kBeqhCVYFaCTVEnMqlwIkTfw7cQBDBiUsCJ07YudBLUSFCagWqSumh+JDgigiaSsVGhUMTKbbByYFIdva7sz/veOOdXa8HWMffj7RZMzsz6515v/f7vTezTkqSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEl63nr4z8jIyLqenp6Byo+bKo/eJC1tl6enp4/09/eP9tSC4/aqVat6V65cmZYtW5akpWpqaipNTk6msbGx8UqQbH6pEhzv9/X1VYNDWupIEMRCJVB6JyYmBkgXu1asWJEk1dUSxqZqPWVZJc1Wi4leI0MqYIBIBQwQqYABIhUwQKQCBohUwACRChggUgEDRCpggEgFDBCpgAEiFTBApAIvpTJ9M57Sfz9M6YsbKY0Np/TVaLa8b1NK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dI7jXzbXOxuyRf6rBkyMFI0XWO+jXPFOQHF+mK36JjfeyE+wcCtHZBDWZ73J0fr6nE/Oa+ybdRqv8oeY1NkyOHsKmGle2lHjtq2OR4m4m3dhX5ii9yJ1cpL+vDnLJOAAFc1YRXC8eWJewVF9y9xMUydiLLHQ7bvm6n10TnEPFp1W3C0b1xXaRaah4UdZ1OxeJqZ347yxPgFJhmgs5WJKeBF/taGc74Nwn1H+niB6xh/+NAuaZigHmN9WeejBaazzud07n0EIqCjHGNu0Ks0ic8S6ZDLen06TMjr+3SqLdanyvg9CQHAAoqzi+x7NcCB/PpDdT6NycWwXOv/fzoA+7peiPIz1WRYXj195O3uOq+yLMDhCeV+5rc5D783qRm5C/Hq0fsBiio8b8OKGPS1eMUiP28wJlhiT0PHF1xdKulj3IpX7nXREoOj7i1KMaoEAickAOr03Di3a6dxmyvtOupamCJBFXEY1U94YREvX9zAw8vy7WFIBA0QqYIBIBQwQqYABIhUwQKQCBohUwACRChggUgEDRCpggEgFCJDxqampJKkuYoIAGX7y5EmSVDc5OZmmp6evLKv8Z994BX+IwEyipY4Y4P8eMDY2xh9OOFz9kxIjIyPrenp6+PPdfg9WSx2BMUzi6O/vH02SJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEl67r4FVyMO7/vFO0gAAAAASUVORK5CYII=",
"description": "A beneficial layer in the upper atmosphere, but harmful when present near ground level. Results mainly from vehicle exhaust and industrial emissions.",
"descriptor": {
"type": "latest",
"sizeX": 5,
"sizeY": 1,
"resources": [],
"templateHtml": "<tb-value-card-widget \n [ctx]=\"ctx\"\n [widgetTitlePanel]=\"widgetTitlePanel\">\n</tb-value-card-widget>",
"templateCss": "",
"controllerScript": "self.onInit = function() {\n self.ctx.$scope.valueCardWidget.onInit();\n};\n\nself.onDataUpdated = function() {\n self.ctx.$scope.valueCardWidget.onDataUpdated();\n};\n\nself.typeParameters = function() {\n return {\n maxDatasources: 1,\n maxDataKeys: 1,\n singleEntity: true,\n horizontal: true,\n previewWidth: '420px',\n previewHeight: '90px',\n embedTitlePanel: true,\n defaultDataKeysFunction: function() {\n return [{ name: 'ozone', label: 'Ozone', type: 'timeseries' }];\n }\n };\n};\n\nself.onDestroy = function() {\n};\n",
"settingsSchema": "",
"dataKeySettingsSchema": "",
"settingsDirective": "tb-value-card-widget-settings",
"hasBasicMode": true,
"basicModeDirective": "tb-value-card-basic-config",
"defaultConfig": "{\"datasources\":[{\"type\":\"function\",\"name\":\"function\",\"dataKeys\":[{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"Ozone\",\"color\":\"#2196f3\",\"settings\":{},\"_hash\":0.2392660816082064,\"funcBody\":\"var value = prevValue + Math.random() * 100 - 50;\\nvar multiplier = Math.pow(10, 2 || 0);\\nvar value = Math.round(value * multiplier) / multiplier;\\nif (value < 0) {\\n\\tvalue = 0;\\n} else if (value > 250) {\\n\\tvalue = 250;\\n}\\nreturn value;\",\"aggregationType\":null,\"units\":null,\"decimals\":null,\"usePostProcessing\":null,\"postFuncBody\":null}],\"alarmFilterConfig\":{\"statusList\":[\"ACTIVE\"]}}],\"timewindow\":{\"realtime\":{\"timewindowMs\":60000}},\"showTitle\":false,\"backgroundColor\":\"rgba(0, 0, 0, 0)\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"padding\":\"0px\",\"settings\":{\"labelPosition\":\"top\",\"layout\":\"horizontal\",\"showLabel\":true,\"labelFont\":{\"family\":\"Roboto\",\"size\":16,\"sizeUnit\":\"px\",\"style\":\"normal\",\"weight\":\"500\"},\"labelColor\":{\"type\":\"constant\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"colorFunction\":\"var temperature = value;\\nif (typeof temperature !== undefined) {\\n var percent = (temperature + 60)/120 * 100;\\n return tinycolor.mix('blue', 'red', percent).toHexString();\\n}\\nreturn 'blue';\"},\"showIcon\":true,\"iconSize\":40,\"iconSizeUnit\":\"px\",\"icon\":\"public\",\"iconColor\":{\"type\":\"range\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"rangeList\":[{\"from\":0,\"to\":50,\"color\":\"#3FA71A\"},{\"from\":50,\"to\":100,\"color\":\"#80C32C\"},{\"from\":100,\"to\":130,\"color\":\"#FFA600\"},{\"from\":130,\"to\":240,\"color\":\"#F36900\"},{\"from\":240,\"to\":null,\"color\":\"#D81838\"}],\"colorFunction\":\"var temperature = value;\\nif (typeof temperature !== undefined) {\\n var percent = (temperature + 60)/120 * 100;\\n return tinycolor.mix('blue', 'red', percent).toHexString();\\n}\\nreturn 'blue';\"},\"valueFont\":{\"size\":36,\"sizeUnit\":\"px\",\"family\":\"Roboto\",\"weight\":\"500\",\"style\":\"normal\"},\"valueColor\":{\"type\":\"range\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"rangeList\":[{\"from\":0,\"to\":50,\"color\":\"#3FA71A\"},{\"from\":50,\"to\":100,\"color\":\"#80C32C\"},{\"from\":100,\"to\":130,\"color\":\"#FFA600\"},{\"from\":130,\"to\":240,\"color\":\"#F36900\"},{\"from\":240,\"to\":null,\"color\":\"#D81838\"}],\"colorFunction\":\"var temperature = value;\\nif (typeof temperature !== undefined) {\\n var percent = (temperature + 60)/120 * 100;\\n return tinycolor.mix('blue', 'red', percent).toHexString();\\n}\\nreturn 'blue';\"},\"showDate\":true,\"dateFormat\":{\"format\":null,\"lastUpdateAgo\":true,\"custom\":false},\"dateFont\":{\"family\":\"Roboto\",\"size\":12,\"sizeUnit\":\"px\",\"style\":\"normal\",\"weight\":\"500\"},\"dateColor\":{\"type\":\"constant\",\"color\":\"rgba(0, 0, 0, 0.38)\",\"colorFunction\":\"var temperature = value;\\nif (typeof temperature !== undefined) {\\n var percent = (temperature + 60)/120 * 100;\\n return tinycolor.mix('blue', 'red', percent).toHexString();\\n}\\nreturn 'blue';\"},\"background\":{\"type\":\"color\",\"color\":\"#fff\",\"overlay\":{\"enabled\":false,\"color\":\"rgba(255,255,255,0.72)\",\"blur\":3}},\"autoScale\":true},\"title\":\"Ozone\",\"dropShadow\":true,\"enableFullscreen\":false,\"titleStyle\":{\"fontSize\":\"16px\",\"fontWeight\":400},\"units\":\"µg/m³\",\"decimals\":0,\"useDashboardTimewindow\":true,\"showLegend\":false,\"widgetStyle\":{},\"actions\":{},\"configMode\":\"basic\",\"displayTimewindow\":true,\"margin\":\"0px\",\"borderRadius\":\"0px\",\"widgetCss\":\"\",\"pageSize\":1024,\"noDataDisplayMessage\":\"\",\"showTitleIcon\":false,\"titleTooltip\":\"\",\"titleFont\":{\"size\":12,\"sizeUnit\":\"px\",\"family\":null,\"weight\":null,\"style\":null,\"lineHeight\":\"1.6\"},\"titleIcon\":\"\",\"iconColor\":\"rgba(0, 0, 0, 0.87)\",\"iconSize\":\"14px\",\"timewindowStyle\":{\"showIcon\":true,\"iconSize\":\"14px\",\"icon\":\"query_builder\",\"iconPosition\":\"left\",\"font\":{\"size\":12,\"sizeUnit\":\"px\",\"family\":null,\"weight\":null,\"style\":null,\"lineHeight\":\"1\"},\"color\":null}}"
},
"externalId": null,
"tags": [
"environment",
"particulate",
"matter",
"air",
"coarse particulates",
"coarse particles",
"inhalable particles",
"larger particulates",
"dust",
"airborne coarse particles",
"O3",
"ozone"
]
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long