Browse Source

UI: Indoor Environment: PM2.5 widgets.

pull/9515/head
Igor Kulikov 3 years ago
parent
commit
884f151345
  1. 10
      application/src/main/data/json/system/widget_bundles/indoor_environment.json
  2. 31
      application/src/main/data/json/system/widget_types/indoor_horizontal_pm2_5_card.json
  3. 31
      application/src/main/data/json/system/widget_types/indoor_horizontal_pm2_5_card_with_background.json
  4. 31
      application/src/main/data/json/system/widget_types/indoor_pm2_5_card.json
  5. 31
      application/src/main/data/json/system/widget_types/indoor_pm2_5_card_with_background.json
  6. 34
      application/src/main/data/json/system/widget_types/indoor_pm2_5_chart_card.json
  7. 34
      application/src/main/data/json/system/widget_types/indoor_pm2_5_chart_card_with_background.json
  8. 34
      application/src/main/data/json/system/widget_types/indoor_simple_pm2_5_chart_card.json
  9. 34
      application/src/main/data/json/system/widget_types/indoor_simple_pm2_5_chart_card_with_background.json

10
application/src/main/data/json/system/widget_bundles/indoor_environment.json

@ -53,6 +53,14 @@
"noise_level_chart_card", "noise_level_chart_card",
"noise_level_chart_card_with_background", "noise_level_chart_card_with_background",
"simple_noise_level_chart_card", "simple_noise_level_chart_card",
"simple_noise_level_chart_card_with_background" "simple_noise_level_chart_card_with_background",
"indoor_pm2_5_card",
"indoor_pm2_5_card_with_background",
"indoor_horizontal_pm2_5_card",
"indoor_horizontal_pm2_5_card_with_background",
"indoor_pm2_5_chart_card",
"indoor_pm2_5_chart_card_with_background",
"indoor_simple_pm2_5_chart_card",
"indoor_simple_pm2_5_chart_card_with_background"
] ]
} }

31
application/src/main/data/json/system/widget_types/indoor_horizontal_pm2_5_card.json

@ -0,0 +1,31 @@
{
"fqn": "indoor_horizontal_pm2_5_card",
"name": "Indoor horizontal PM2.5 card",
"deprecated": false,
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAACgCAMAAAB+IdObAAAAq1BMVEUAAADf39/f39/g4ODg4ODf39/////k5OSAwyzg4ODf8Mrv9+Wg0mHQ6bCQy0b3+/Lz8/POzs6/4ZXIyMiv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ORB/c6MpBwyxCoVERthHyOW1ESd+JlSOfzFzu2c50yLhIfclWWNiRpdZLI5hYRtuD2iH9Z9+zIPdGadIf/flWAP/XjL0XcGiVF5FYkzsuiFbWS2M7d5p0khgvJ3Ip08r47MCoKbBuCleqbQmBE7/WNVdnB6z4nX+DsGiLOAHsNybK6gxG2FjardVQznQd8q3u8GHJoGHJoGHJoTijk4gQ+ZgeiC/uFgRP4oD2zXxg4+3A+vDx25+9P6Us1RERERERERERERERERERERERERERERP/JL+y8/ulGq8beAAAAAElFTkSuQmCC",
"description": "Displays a latest indoor fine particulate matter (PM2.5) telemetry data in a horizontal layout.",
"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 };\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\":\"PM2.5\",\"color\":\"#2196f3\",\"settings\":{},\"_hash\":0.2392660816082064,\"funcBody\":\"var value = prevValue + Math.random() * 40 - 20;\\nvar multiplier = Math.pow(10, 2 || 0);\\nvar value = Math.round(value * multiplier) / multiplier;\\nif (value < 0) {\\n\\tvalue = 0;\\n} else if (value > 150) {\\n\\tvalue = 150;\\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\":\"mdi:broom\",\"iconColor\":{\"type\":\"range\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"rangeList\":[{\"from\":0,\"to\":35,\"color\":\"#80C32C\"},{\"from\":35,\"to\":75,\"color\":\"#FFA600\"},{\"from\":75,\"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)\",\"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';\",\"rangeList\":[{\"from\":0,\"to\":35,\"color\":\"#80C32C\"},{\"from\":35,\"to\":75,\"color\":\"#FFA600\"},{\"from\":75,\"to\":null,\"color\":\"#D81838\"}]},\"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\":\"Horizontal temperature card\",\"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",
"indoor",
"pm2.5",
"particulate",
"matter",
"air"
]
}

31
application/src/main/data/json/system/widget_types/indoor_horizontal_pm2_5_card_with_background.json

File diff suppressed because one or more lines are too long

31
application/src/main/data/json/system/widget_types/indoor_pm2_5_card.json

@ -0,0 +1,31 @@
{
"fqn": "indoor_pm2_5_card",
"name": "Indoor PM2.5 card",
"deprecated": false,
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAACgCAMAAAB+IdObAAAAn1BMVEXg4ODf39/g4ODg4OAAAAD////g4OCAwyzv9+WQy0ag0mC/4ZWv2Xvz8/MhISGqqqrf8Mq2trbCwsL5+fnu7u73+/LQ6bCenp7Ozs6IxzlYWFjIyMiYzlPj4+Pa2trn5+fV1dW8vLywsLC43Yh0dHTH5aPX7L2srKykpKSQkJA9PT3P6LCn1m6CgoLn9NcvLy9LS0vn9NjY7L1mZmarq6sAoDYiAAAABXRSTlPvIL+vAC9A4IoAAAXySURBVHja7M+5EQAwCAMwE56Ojv1nzRqGszYQwh5qO7eAYXK9hsE7D5iHyhNwJVKKkFGEjSJsFGGjCBtF2CjCRhE2n/w6Wm0QBsMwfPQRa5tgS8U1aVZLHaIQItj7v7b9RmatYsZgZJa9J4kGIQ8hB/5TSITV9iPIbjOWcK01dyPHMHDFh2UKnv4OsmMsxqNCUFKjFA0AGmT/rhotK3gKDxkcm+gJorWqJcp+v43opgpGcHTJ1p2Yp2AQv4MgAIzojsIAuZASd5ooxyJYBX+BIH7HACksQSrLUchC9q9ruKwV1msJB/E7CCJlIyqC5PaK+i4dJBN7uEyVVyu6I2l8YuePaOZwkKrKFAiijbwK7iB3kj2iB0/hIGkEbBl1co4ZBJSDKCELdJB82Hpe8LVA0u1p8yXpHB4IaqE6iLZNWZY5sgzctsrQiqcwkCRm1CA5Y5ap4drXGllDsJamXRlaA+RS0MxTGIhjjCUJ1t0SZMMmkh3W3RLkxiaSGOtuCZKwZ8nLngjiieRV7wgSNpKs+D/kWwhuvyDhRyx2CQVJzyNJjHn7yZfvmPV2gOt4GQEO/XdZKAiiT3bsXcWRGIjCcHSEB6aoLVWxEjToFiwK5v2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vFlHbOBAB5htQQhAkA/lLojXSns80rwCoLj8huCN77YgWOvSA2H5R5q22WsJIG4MQmvlCkJE30BCALzKRLxc20jzb/aIW2GnEqGJmE4Spb18RVmern35QsFm4Y3vot1/DlpAGt3LTmBmUIqtfkAQBXmb5xc7q+h4IIvXPX3fzh4PZBIarGhr4wFAnFL3qZVwWuvUYBwA5B2dICfIUXSC7E0nyN50gvxq706KAAZiIAaO9/Avv/DHGhqKS81ACERjCI0hNIbQGEJjCI0hNIbQGEJjCI0hNIbQGEJjCI0hNIbQGEJjCE0nd4TOGrCevvfZqQyYT7+pnNr9d1l1Ptzuw4oYi6aJAAAAAElFTkSuQmCC",
"description": "Displays a latest indoor fine particulate matter (PM2.5) telemetry data in a box layout.",
"descriptor": {
"type": "latest",
"sizeX": 3,
"sizeY": 3,
"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 previewWidth: '250px',\n previewHeight: '250px',\n embedTitlePanel: true,\n defaultDataKeysFunction: function() {\n return [{ name: 'pm2.5', label: 'PM2.5', 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\":\"PM2.5\",\"color\":\"#2196f3\",\"settings\":{},\"_hash\":0.2392660816082064,\"funcBody\":\"var value = prevValue + Math.random() * 40 - 20;\\nvar multiplier = Math.pow(10, 2 || 0);\\nvar value = Math.round(value * multiplier) / multiplier;\\nif (value < 0) {\\n\\tvalue = 0;\\n} else if (value > 150) {\\n\\tvalue = 150;\\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\":\"square\",\"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\":\"mdi:broom\",\"iconColor\":{\"type\":\"range\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"rangeList\":[{\"from\":0,\"to\":35,\"color\":\"#80C32C\"},{\"from\":35,\"to\":75,\"color\":\"#FFA600\"},{\"from\":75,\"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\":32,\"sizeUnit\":\"px\",\"family\":\"Roboto\",\"weight\":\"500\",\"style\":\"normal\"},\"valueColor\":{\"type\":\"range\",\"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';\",\"rangeList\":[{\"from\":0,\"to\":35,\"color\":\"#80C32C\"},{\"from\":35,\"to\":75,\"color\":\"#FFA600\"},{\"from\":75,\"to\":null,\"color\":\"#D81838\"}]},\"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\":\"Indoor PM2.5 card\",\"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",
"indoor",
"pm2.5",
"matter",
"air",
"particulate"
]
}

31
application/src/main/data/json/system/widget_types/indoor_pm2_5_card_with_background.json

File diff suppressed because one or more lines are too long

34
application/src/main/data/json/system/widget_types/indoor_pm2_5_chart_card.json

File diff suppressed because one or more lines are too long

34
application/src/main/data/json/system/widget_types/indoor_pm2_5_chart_card_with_background.json

File diff suppressed because one or more lines are too long

34
application/src/main/data/json/system/widget_types/indoor_simple_pm2_5_chart_card.json

@ -0,0 +1,34 @@
{
"fqn": "indoor_simple_pm2_5_chart_card",
"name": "Indoor simple PM2.5 chart card",
"deprecated": false,
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAACgCAMAAAB+IdObAAAAflBMVEUAAADf39/g4ODf39/f39/g4OD////k5OSAwyzg4OAhISHv9+WQy0Z0dHSQkJA8PDzP6a/f8MpYWFjy8vLA4ZWv2Xug0mD3+/OIxzkvLy+enp6srKzHx8fV1dWCgoJKSkrn9NjH5aO6urq43Yio1m5mZmaYzlPX7L25ubmQyka17GyFAAAABnRSTlMAIL9AEN/GQiaNAAAEqElEQVR42uzPuQ2AMBAAsMtD0NUp2H9TxAaUSWRv4AAAAAAAAPivl831+LSa9+byahEln7G9mS3qHAeYNXIcIUUWI7IakZfduletGIbBMLx9gg9kgTTZzg8EAr3/K2ycdjgH2iFLcFq/YDAIDc+m3hqQ3hqQ3hqQ3hqQ3vonkFrx3aaqywxUnXGkGpDFVXCW2hTXuhNS84zvElPauUHpACZSYGtdc6CVvV9IxKsDiQDcoZYD0EzZOKO9Fidc7SZISKE3xxtkd6jnAuSFgqPKwJFQNQUudQtkdpokOl4hKSkL1JOj2nRCxBJa87qU7LjWHZBCnpI3iLtWQD04HT9Kc+jrTuBSd0Ain5LyBsGZOlwpDRLriq/mDag9QlDYJPEz5IOOBlnzNk2CMmFiETdc6h4IlEfySjOcLTtirfgwEWsVWAKS0QUXuwWCRCqe1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jKW5c/AGXkg1QqrJPsudyAYlO8fdUq3/t1QzOo3CAAAAAAAAnhxh9Pec6lVI3gAAAABJRU5ErkJggg==",
"description": "Displays historical indoor fine particulate matter (PM2.5) values as a simplified chart. Optionally may display the corresponding latest indoor PM2.5 value.",
"descriptor": {
"type": "timeseries",
"sizeX": 4.5,
"sizeY": 2,
"resources": [],
"templateHtml": "<tb-value-chart-card-widget \n [ctx]=\"ctx\"\n [widgetTitlePanel]=\"widgetTitlePanel\">\n</tb-value-chart-card-widget>\n",
"templateCss": ".legend {\n font-size: 13px;\n line-height: 10px;\n}\n\n.legend table { \n border-spacing: 0px;\n border-collapse: separate;\n}\n\n.mouse-events .flot-overlay {\n cursor: crosshair; \n}\n\n",
"controllerScript": "self.onInit = function() {\n self.ctx.$scope.valueChartCardWidget.onInit();\n};\n\nself.onDataUpdated = function() {\n self.ctx.$scope.valueChartCardWidget.onDataUpdated();\n};\n\nself.onLatestDataUpdated = function() {\n self.ctx.$scope.valueChartCardWidget.onLatestDataUpdated();\n}\n\nself.onEditModeChanged = function() {\n self.ctx.$scope.valueChartCardWidget.onEditModeChanged();\n}\n\nself.onDestroy = function() {\n self.ctx.$scope.valueChartCardWidget.onDestroy();\n}\n\nself.typeParameters = function() {\n return {\n maxDatasources: 1,\n maxDataKeys: 1,\n singleEntity: true,\n previewWidth: '300px',\n previewHeight: '150px',\n embedTitlePanel: true,\n hasAdditionalLatestDataKeys: true,\n defaultDataKeysFunction: function() {\n return [\n { name: 'pm2.5', label: 'PM2.5', type: 'timeseries', color: 'rgba(0, 0, 0, 0.87)'}\n ];\n },\n defaultLatestDataKeysFunction: function(configComponent) {\n return [{ name: 'pm2.5', label: 'Latest', type: 'timeseries'}];\n }\n };\n}\n",
"settingsSchema": "{}",
"dataKeySettingsSchema": "{}",
"latestDataKeySettingsSchema": "{}",
"settingsDirective": "tb-value-chart-card-widget-settings",
"dataKeySettingsDirective": "",
"latestDataKeySettingsDirective": "",
"hasBasicMode": true,
"basicModeDirective": "tb-value-chart-card-basic-config",
"defaultConfig": "{\"datasources\":[{\"type\":\"function\",\"name\":\"\",\"dataKeys\":[{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"PM2.5\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"settings\":{},\"_hash\":0.8587686344902596,\"funcBody\":\"var value = prevValue + Math.random() * 40 - 20;\\nvar multiplier = Math.pow(10, 2 || 0);\\nvar value = Math.round(value * multiplier) / multiplier;\\nif (value < 0) {\\n\\tvalue = 0;\\n} else if (value > 150) {\\n\\tvalue = 150;\\n}\\nreturn value;\",\"aggregationType\":null,\"units\":null,\"decimals\":null,\"usePostProcessing\":null,\"postFuncBody\":null}],\"alarmFilterConfig\":{\"statusList\":[\"ACTIVE\"]},\"latestDataKeys\":[{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"Latest\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"settings\":{},\"_hash\":0.8587686344902596,\"funcBody\":\"var value = prevValue + Math.random() * 40 - 20;\\nvar multiplier = Math.pow(10, 2 || 0);\\nvar value = Math.round(value * multiplier) / multiplier;\\nif (value < 0) {\\n\\tvalue = 0;\\n} else if (value > 150) {\\n\\tvalue = 150;\\n}\\nreturn value;\",\"aggregationType\":null,\"units\":null,\"decimals\":null,\"usePostProcessing\":null,\"postFuncBody\":null}]}],\"showTitle\":true,\"backgroundColor\":\"rgba(0, 0, 0, 0)\",\"color\":null,\"padding\":\"0\",\"settings\":{\"layout\":\"left\",\"autoScale\":true,\"showValue\":true,\"valueFont\":{\"family\":\"Roboto\",\"size\":28,\"sizeUnit\":\"px\",\"style\":\"normal\",\"weight\":\"500\",\"lineHeight\":\"32px\"},\"valueColor\":{\"type\":\"range\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"rangeList\":[{\"from\":0,\"to\":35,\"color\":\"#80C32C\"},{\"from\":35,\"to\":75,\"color\":\"#FFA600\"},{\"from\":75,\"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';\"},\"background\":{\"type\":\"color\",\"color\":\"#fff\",\"overlay\":{\"enabled\":false,\"color\":\"rgba(255,255,255,0.72)\",\"blur\":3}}},\"title\":\"PM2.5\",\"dropShadow\":true,\"enableFullscreen\":false,\"titleStyle\":null,\"mobileHeight\":null,\"configMode\":\"basic\",\"actions\":{},\"showTitleIcon\":true,\"titleIcon\":\"mdi:broom\",\"iconColor\":\"rgba(0, 0, 0, 0.87)\",\"titleFont\":{\"size\":16,\"sizeUnit\":\"px\",\"family\":\"Roboto\",\"weight\":\"500\",\"style\":\"normal\",\"lineHeight\":\"24px\"},\"iconSize\":\"18px\",\"titleTooltip\":\"\",\"widgetStyle\":{},\"widgetCss\":\"\",\"pageSize\":1024,\"noDataDisplayMessage\":\"\",\"useDashboardTimewindow\":true,\"decimals\":0,\"titleColor\":\"rgba(0, 0, 0, 0.87)\",\"borderRadius\":null,\"units\":\"µg/m³\",\"displayTimewindow\":true,\"timewindow\":{\"hideInterval\":false,\"hideLastInterval\":false,\"hideQuickInterval\":false,\"hideAggregation\":false,\"hideAggInterval\":false,\"hideTimezone\":false,\"selectedTab\":1,\"history\":{\"historyType\":2,\"timewindowMs\":60000,\"interval\":43200000,\"fixedTimewindow\":{\"startTimeMs\":1697382151041,\"endTimeMs\":1697468551041},\"quickInterval\":\"CURRENT_MONTH_SO_FAR\"},\"aggregation\":{\"type\":\"AVG\",\"limit\":25000}},\"timewindowStyle\":{\"showIcon\":false,\"iconSize\":\"24px\",\"icon\":\"query_builder\",\"iconPosition\":\"left\",\"font\":{\"size\":12,\"sizeUnit\":\"px\",\"family\":\"Roboto\",\"weight\":\"400\",\"style\":\"normal\",\"lineHeight\":\"16px\"},\"color\":\"rgba(0, 0, 0, 0.38)\",\"displayTypePrefix\":true}}"
},
"externalId": null,
"tags": [
"environment",
"indoor",
"pm2.5",
"particulate",
"matter",
"air"
]
}

34
application/src/main/data/json/system/widget_types/indoor_simple_pm2_5_chart_card_with_background.json

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save