Browse Source

UI: Outdoor Environment: UV Index widgets.

pull/9473/head
Igor Kulikov 3 years ago
parent
commit
af7afe1023
  1. 8
      application/src/main/data/json/system/widget_bundles/outdoor_environment.json
  2. 28
      application/src/main/data/json/system/widget_types/horizontal_uv_index_card.json
  3. 28
      application/src/main/data/json/system/widget_types/horizontal_uv_index_card_with_background.json
  4. 31
      application/src/main/data/json/system/widget_types/simple_uv_index_chart_card.json
  5. 31
      application/src/main/data/json/system/widget_types/simple_uv_index_chart_card_with_background.json
  6. 28
      application/src/main/data/json/system/widget_types/uv_index_card.json
  7. 28
      application/src/main/data/json/system/widget_types/uv_index_card_with_background.json
  8. 31
      application/src/main/data/json/system/widget_types/uv_index_chart_card.json
  9. 31
      application/src/main/data/json/system/widget_types/uv_index_chart_card_with_background.json

8
application/src/main/data/json/system/widget_bundles/outdoor_environment.json

@ -61,6 +61,12 @@
"solar_radiation_chart_card",
"solar_radiation_chart_card_with_background",
"simple_solar_radiation_chart_card",
"simple_solar_radiation_chart_card_with_background"
"simple_solar_radiation_chart_card_with_background",
"uv_index_card",
"uv_index_card_with_background",
"horizontal_uv_index_card",
"horizontal_uv_index_card_with_background",
"uv_index_chart_card",
"uv_index_chart_card_with_background"
]
}

28
application/src/main/data/json/system/widget_types/horizontal_uv_index_card.json

@ -0,0 +1,28 @@
{
"fqn": "horizontal_uv_index_card",
"name": "Horizontal UV Index card",
"deprecated": false,
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAACgCAMAAAB+IdObAAAArlBMVEUAAADg4ODf39/g4ODg4ODg4ODf39/g4ODg4ODf39/////39/eAwyzg4ODCwsKQkJD6+vrn5+fz8/O2trbt7e3b29vV1dXOzs50dHSQy0bx8fHP6K88PDzv9+XHx8e7u7v3+/Lj4+PU1NTH5aPA4Zatra1YWFjY7L2enp7IyMiqqqqCgoKYzlMhISHf8Mqv2Xun1m5mZmZKSkqIxzmo1m6g0mDn9Ne43YgvLy/H5aK3Tah+AAAACnRSTlMAvxDv36eQgG8gyT+wCQAAAqtJREFUeNrt2OtuokAAhmFqtYevODDAgFIExPOhtrXHvf8b20HcqNntYv9QNN9jgs44MXkRBTWIiIiIiIiIiIiIiIiIiIiIiIiIiIiI6Nsa162LU3fTMIzbpufcnTqv2TBaIc6Ad2Vc2jgHl0YbZ6HNkJphSN0wpG7OPiRdDnBSvgrpmY84EIZAP+xDb4vRVhyjFo4O6VjoP4QPIeIoH42wZVmo3uppUh7S6w4BpB+T/PFycBCC8RSLzibEt6xFiGlHzyc6a+r3F6jG6uPFNO/LQ9LublXXHB6GJGNE8SYkjpLONIn8Z8uP/HESrztTVGJimseFoPc2QToZDnrA0y8choSfcYQiZAxLyzfROLLQ+UQ17t8GaWnI7vAytSH2LBbwI30XWXsh0+diE6K/XseoTHnIriM3wE5f7/c5ED/090LC/M0In8dRv2PFa5SoPmRoFl5S7AnxD2GxKVF9SLrsdld4M7fe8dTt1vDMeGzIq7m1OtmQvw6tejo2JN1+2IeoqW98/da648iQ3usE0CfEd+B116Js/OEdvEB7f0rmo8xDiUpCegeXKANsCQeQgWNnypl6gIR02vkwUE4mnblnZx7gBAJ2JuRmKbJMzyoUqg9Jl0Noj5NN1H6I7WezQPnO3AZcuFK0hfJnKpOurW9eYgOOgJ6VgK/0c0Eg5EyiRMWX8TrEcX3hBa49RxESwBWOUjN/roejIChCEjuQsPXSQMoggVIoUXVIIjxXCF/ona8ANxhJVyiZJGqWzO2k7QuBTYgvRnnITMi5G+jlDkr88E9dGzLAfzlqplDu5/98sL2y15b4Wo1C6oUhdcOQumFI3bSNS5wD+9K48nAGvJbRaHp3p87xmreG0bi5OHWt64ZBRERERERERERERERERERERERERERERN/1G1Juby0y7njrAAAAAElFTkSuQmCC",
"description": "Displays a latest UV index 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 defaultDataKeysFunction: function() {\n return [{ name: 'uv', label: 'UV Index', 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\":\"UV Index\",\"color\":\"#2196f3\",\"settings\":{},\"_hash\":0.2392660816082064,\"funcBody\":\"var value = prevValue + Math.ceil(Math.random() * 4 - 2);\\nif (value < 0) {\\n\\tvalue = 0;\\n} else if (value > 14) {\\n\\tvalue = 14;\\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\":\"light_mode\",\"iconColor\":{\"type\":\"range\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"rangeList\":[{\"from\":0,\"to\":2,\"color\":\"#80C32C\"},{\"from\":2,\"to\":5,\"color\":\"#FFA600\"},{\"from\":5,\"to\":7,\"color\":\"#F36900\"},{\"from\":7,\"to\":10,\"color\":\"#F04022\"},{\"from\":10,\"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\":2,\"color\":\"#80C32C\"},{\"from\":2,\"to\":5,\"color\":\"#FFA600\"},{\"from\":5,\"to\":7,\"color\":\"#F36900\"},{\"from\":7,\"to\":10,\"color\":\"#F04022\"},{\"from\":10,\"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 UV Index card\",\"dropShadow\":true,\"enableFullscreen\":false,\"titleStyle\":{\"fontSize\":\"16px\",\"fontWeight\":400},\"units\":null,\"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": [
"weather",
"environment",
"uv"
]
}

28
application/src/main/data/json/system/widget_types/horizontal_uv_index_card_with_background.json

File diff suppressed because one or more lines are too long

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

@ -0,0 +1,31 @@
{
"fqn": "simple_uv_index_chart_card",
"name": "Simple UV Index chart card",
"deprecated": false,
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAACgCAMAAAB+IdObAAAAXVBMVEUAAADg4ODf39/g4ODg4OD////g4OAhISHj4+PHx8c8PDysrKzx8fFYWFh0dHSQkJAvLy+Awyzf8MrV1dW6urqCgoJKSkqdnZ2enp5mZmbv7++43Yj3+/KIxzmg0mFA+mXkAAAABXRSTlMA7yC/r1EOHTEAAAOxSURBVHja7dztVtpAEIBhQIeZ2dkvyRdo2/u/zG6wNJSQhlAbNzjvOUKC/PBxd5McQVaapmmapmmapmmapmmapmmapmlfrs3Terv0njfJsX6FxWfXm9WzhQfo9Wm1hYdo/SiQrUIySyG5pZDcUkhuKSS3FJJbXwDSFLCkhiFO4Kxyn25EbOB0XwRKt5RuuwgZ5m4cUgYAIaCDhV9509ocRHfaAUbOHkK1tcwgHi4hISab8SdISSzUbsuRxVIClOlLZlKNTy0yiB2jgzBKKzhBjKlNolXo6rQX0CWjYCFIMNZMkBpT+z4EnG+3f0M8EAqlZxbIdEQSOGcqGGsOSIkOsM0XGC8hIVrjO0gAQGEskocZ6+PAEEYL480wImTfR0TS1iXEYkC6gBTvkCKRmC0Izrbwx6dWYRCd7fblOG2k1WANFxAbK2iQ2zsbgExI4rHmgdDBUskgoXuoQsQKUg3KJQQkqZGP+nYJWYp7GGsWiPj380h9NiaWLAxm6feknL/xM/uSGoYEhiX1Ba5+F5ZCckshuaWQ3MoBYqmwy4dQMJgynpYNCRFdI9IcEMOSIR69hWOUNpcLqc6HIaBfKkRax7lkv0wIGQN/5CItEuKRLmTRLRFCWF2ZawuEGGOvrH5eHCSgQC+bdAuDUPRwJcZqYRAfaeDUUuYL4X0IJcF5zeCydpE+C2JZuBj+boh4zMn54ckNzzn3ORBx+LfLVzbo2tEoGoOnp9gKawtDNbj/BAjV6JqSWA5o5BoTDXfHKTzsuRQfsbIw3AGL2SEUI3ek/rQv4vmvnrzBVKwYuiYdg6dDdm/fdzddLVG357HsOQxdricmGIv718GFiPBkyLe3Hy8vL7vJV0t1tH3nPYU/5h61k7Et+nIaJClughCG/tns3x2t5LTibFmZViBERelNa5kA+f62290C8Zc/aIUy3TF0sIvO+xrTXVN0D3eWm6YWwC0Q7q/uswXPJhL8Q1w5Yw6BLXT1LCMQuA3iDPSq0OyLdlo7NAQfXmexHwcRFOhXOjwWg4X/GH3giBgDV6MyhHzewjEOEczqRca7IWQM5NS9EDKRIKfuhEiMmb3B7h6IDQZdXuNxD8SGiC6/1+CnQviAOTJ6kJHYYQx5/pfcBIgNJlvGFEiT5dK4A3LImdFCPv/FUIUoJOcUklsKyS2F5JZCckshuaWQ3Nqu1vAQbVdPD/DRQQD2ebVZ5/r3hAm9rtuPc3reLr3102alaZqmaZqmaZqmaZqmaZqmaZr21foJlfySPp88UEgAAAAASUVORK5CYII=",
"description": "Displays historical UV index values as a simplified chart. Optionally may display the corresponding latest UV index 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: 'uv', label: 'UV Index', type: 'timeseries', color: 'rgba(0, 0, 0, 0.87)'}\n ];\n },\n defaultLatestDataKeysFunction: function(configComponent) {\n return [{ name: 'uv', 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\":\"UV Index\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"settings\":{},\"_hash\":0.8587686344902596,\"funcBody\":\"var value = prevValue + Math.ceil(Math.random() * 4 - 2);\\nif (value < 0) {\\n\\tvalue = 0;\\n} else if (value > 14) {\\n\\tvalue = 14;\\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.ceil(Math.random() * 4 - 2);\\nif (value < 0) {\\n\\tvalue = 0;\\n} else if (value > 14) {\\n\\tvalue = 14;\\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\":2,\"color\":\"#80C32C\"},{\"from\":2,\"to\":5,\"color\":\"#FFA600\"},{\"from\":5,\"to\":7,\"color\":\"#F36900\"},{\"from\":7,\"to\":10,\"color\":\"#F04022\"},{\"from\":10,\"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\":\"UV Index\",\"dropShadow\":true,\"enableFullscreen\":false,\"titleStyle\":null,\"mobileHeight\":null,\"configMode\":\"basic\",\"actions\":{},\"showTitleIcon\":true,\"titleIcon\":\"light_mode\",\"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\":null,\"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": [
"weather",
"environment",
"uv"
]
}

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

File diff suppressed because one or more lines are too long

28
application/src/main/data/json/system/widget_types/uv_index_card.json

@ -0,0 +1,28 @@
{
"fqn": "uv_index_card",
"name": "UV Index card",
"deprecated": false,
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAACgCAMAAAB+IdObAAAAnFBMVEXg4ODf39/g4ODg4OAAAAD////g4OCAwywhISGqqqr5+fm/4ZXj4+Oenp7P6a/Ozs62trbz8/PCwsJ0dHSkpKRYWFg9PT3n5+fv9+Xx8fH3+/LIyMisrKyQy0ag0mDu7u7f8Mra2trV1dWwsLCv2XsvLy+8vLyQkJCIxznn9NiYzlOCgoJKSkrH5aOrq6tmZmbX7L3H5aK43Yio1m6jslkrAAAABXRSTlPvIL+vAC9A4IoAAARXSURBVHja7M9JEQAwCAPAUA4PvPDvsjYCk3WwCHuo7dwChsn1GgbvPGAeKk/AlUgpQkYRNoqwUYSNImwUYaMIG0XYfGbraMVRGAyg8NUhPzTKQogYHaUUs9rqtLPM+7/bpo6zinVKb1ZyQDExNx8RyQuQvKsKou8FSKrUkej7z5C3Kz8UEUTLG5AZJz1wGu+YjGXW8qSdIIcDY0fV5dzLm3QLgvVALzpSyFGpZnoqvhyVUsUWJJEShoEJ4szvm23BtdYMAVLerHG0LZiEud0gRaXUgUUXpS5sQZy0YXD9hmjJkluwGd8asWFoksxSStmKZm43CHk1bUlRTJBLsQnBZiSiZ8jbeImBwd5nwlvHLfMti/aDkH8UcG46paomD8O0YBvyS/RgWUHG19Zi5Z7GiWfZLpC5d/VVdWadlgSQHpw3cl1DnCQj5DboELQ+TCzaF5Kq77qcdTY76X4U9N67NQQ76DKzXCWhTMJM23vH3K6QvFL/qlmnBxGfECrF8AA5ZeKthfa+KqhxvmduV0iqFh15yGmepd20yvHYLpDzZ13XZ/hcQv7Aex2K8wS5DWlUqIF6CTnARYVSYuyHHblUVXUOoPWOhPk6J8YC5IWfbyj2s/xzSNHNjoqou0Ne25I4v6hXIRwmRvdB3P1lzwxWG4ZhMHxShgzGkhGkNFATu5htp63v/3CTGxGWlhV6yJpDfoJi2X+IvhhD4jwCObZVcTg1jMvB0iflHPwptrH/ePu9TI2Dvf2eF+OJboru4U4h2lj65cvTLWlcH8Q4lpWfbvLe20O30OMC6xpCnMZGsi61CYaWGIgZrbnSF+Ln0WZkJjvegQTEAB1SZfFV8xj0YCkyAAtihKFgTqIpIfYAkwWCFFSQdiUBowo6DW4FEDifp7K/3t4N6PQN9yCcBOoA2fUIM4h3LKy9Q3QNE0ZqR0cziDKVBjImkJRr82AHFF6wi2IgsVYPiXCABUgrlUYIUQ10BQmCOIM4b2skY5Q+hnaxZ7W/DISVwkNOLGkGqdcZ8VyVKSaB/gqSSd3zjIjNCHbazKSe1hWH14AgosNSvMtYCJy0MjpfREFIk4QFo0MiUW9wFSXPIBlJxmmJSaeeorBYiNcE+Xi898stOG7BgUX2YB2zwVlqssTOiTM15+Z24xXkGbmCJe2/FXaQbWoH2Zp2kK1pB9madpAf9udYAAAAAGCQv/U0dpRBNyI3IjciNyI3IjciNyI3IjciNyK1d/c4CMNAEIWdH2cLS9TEElZKUkRCcP+7YTpSpptdvVdM/51grrbt+ZxLyL08rORz/iD1aGbmHrK1p5l7yP7+KQJAilkkSPtEgLSj5pt7yKvUvgEgPSBA/gICBAgQIECA9IAAAQIECBAgTgOiFhC1gKgFRC0gagFRC4haQNQCohYQtYCoBUQtIGoBUQuIWkDUAqIWELWAqAVELSBqAVFrSSmHaEljiMvmdUpDCiBZO2MepsV7aRzmL/oPrqtS4mUjAAAAAElFTkSuQmCC",
"description": "Displays a latest UV index 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: 'uv', label: 'UV Index', 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\":\"UV Index\",\"color\":\"#2196f3\",\"settings\":{},\"_hash\":0.2392660816082064,\"funcBody\":\"var value = prevValue + Math.ceil(Math.random() * 4 - 2);\\nif (value < 0) {\\n\\tvalue = 0;\\n} else if (value > 14) {\\n\\tvalue = 14;\\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\":{\"size\":16,\"sizeUnit\":\"px\",\"family\":\"Roboto\",\"weight\":\"500\",\"style\":\"normal\"},\"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\":\"light_mode\",\"iconColor\":{\"type\":\"range\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"rangeList\":[{\"from\":0,\"to\":2,\"color\":\"#80C32C\"},{\"from\":2,\"to\":5,\"color\":\"#FFA600\"},{\"from\":5,\"to\":7,\"color\":\"#F36900\"},{\"from\":7,\"to\":10,\"color\":\"#F04022\"},{\"from\":10,\"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\":52,\"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\":2,\"color\":\"#80C32C\"},{\"from\":2,\"to\":5,\"color\":\"#FFA600\"},{\"from\":5,\"to\":7,\"color\":\"#F36900\"},{\"from\":7,\"to\":10,\"color\":\"#F04022\"},{\"from\":10,\"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\":\"UV Index card\",\"dropShadow\":true,\"enableFullscreen\":false,\"titleStyle\":{\"fontSize\":\"16px\",\"fontWeight\":400},\"units\":null,\"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": [
"weather",
"environment",
"uv"
]
}

28
application/src/main/data/json/system/widget_types/uv_index_card_with_background.json

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

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

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