Browse Source

UI: Indoor Environment: Illuminance widgets.

pull/9524/head
Igor Kulikov 3 years ago
parent
commit
5c58241a12
  1. 12
      application/src/main/data/json/system/widget_bundles/indoor_environment.json
  2. 28
      application/src/main/data/json/system/widget_types/indoor_horizontal_illuminance_card.json
  3. 28
      application/src/main/data/json/system/widget_types/indoor_horizontal_illuminance_card_with_background.json
  4. 28
      application/src/main/data/json/system/widget_types/indoor_illuminance_card.json
  5. 28
      application/src/main/data/json/system/widget_types/indoor_illuminance_card_with_background.json
  6. 31
      application/src/main/data/json/system/widget_types/indoor_illuminance_chart_card.json
  7. 31
      application/src/main/data/json/system/widget_types/indoor_illuminance_chart_card_with_background.json
  8. 29
      application/src/main/data/json/system/widget_types/indoor_illuminance_progress_bar.json
  9. 29
      application/src/main/data/json/system/widget_types/indoor_illuminance_progress_bar_with_background.json
  10. 31
      application/src/main/data/json/system/widget_types/indoor_simple_illuminance_chart_card.json
  11. 31
      application/src/main/data/json/system/widget_types/indoor_simple_illuminance_chart_card_with_background.json

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

@ -35,6 +35,16 @@
"indoor_co2_chart_card",
"indoor_co2_chart_card_with_background",
"indoor_simple_co2_chart_card",
"indoor_simple_co2_chart_card_with_background"
"indoor_simple_co2_chart_card_with_background",
"indoor_illuminance_card",
"indoor_illuminance_card_with_background",
"indoor_horizontal_illuminance_card",
"indoor_horizontal_illuminance_card_with_background",
"indoor_illuminance_chart_card",
"indoor_illuminance_chart_card_with_background",
"indoor_simple_illuminance_chart_card",
"indoor_simple_illuminance_chart_card_with_background",
"indoor_illuminance_progress_bar",
"indoor_illuminance_progress_bar_with_background"
]
}

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

@ -0,0 +1,28 @@
{
"fqn": "indoor_horizontal_illuminance_card",
"name": "Indoor horizontal illuminance card",
"deprecated": false,
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAACgCAMAAAB+IdObAAAAmVBMVEUAAADg4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giYupPXaVIvkcTEkmp3yaLIyHYGIbhvA15ehrHoT/365D5U6LGam6e+GmoQ/pJokLC2TyMVW4a43z6D7jm6NHpH+Mt0yzwF9dPUn+8CtO42hF/lqTjeBz6as5WC/dRhYyqHZnP3OrCKk1xDcdD1kGBTyRzfOwpTHB9OuRko9FnF2P8j1aEtBFD2oYhbcOQtrmjkO59fBna7zzcx9fTj/fzDwOd3mP/1nUfeh0iIiIiIiIiIiIiIiIiIiIiIiIiIiIiOtUvJ7/Ykm8IwzsAAAAASUVORK5CYII=",
"description": "Displays a latest indoor illuminance 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: 'illuminance', label: 'Illuminance', 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\":\"Illuminance\",\"color\":\"#2196f3\",\"settings\":{},\"_hash\":0.2392660816082064,\"funcBody\":\"var value = prevValue + Math.random() * 400 - 200;\\nvar multiplier = Math.pow(10, 2 || 0);\\nvar value = Math.round(value * multiplier) / multiplier;\\nif (value < 0) {\\n\\tvalue = 0;\\n} else if (value > 1000) {\\n\\tvalue = 1000;\\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:lightbulb-on\",\"iconColor\":{\"type\":\"range\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"rangeList\":[{\"from\":null,\"to\":100,\"color\":\"rgba(0, 0, 0, 0.76)\"},{\"from\":100,\"to\":300,\"color\":\"#FFA600\"},{\"from\":300,\"to\":500,\"color\":\"#F36900\"},{\"from\":500,\"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\":null,\"to\":100,\"color\":\"rgba(0, 0, 0, 0.76)\"},{\"from\":100,\"to\":300,\"color\":\"#FFA600\"},{\"from\":300,\"to\":500,\"color\":\"#F36900\"},{\"from\":500,\"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 horizontal illuminance card\",\"dropShadow\":true,\"enableFullscreen\":false,\"titleStyle\":{\"fontSize\":\"16px\",\"fontWeight\":400},\"units\":\"lx\",\"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",
"illuminance",
"indoor"
]
}

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

File diff suppressed because one or more lines are too long

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

@ -0,0 +1,28 @@
{
"fqn": "indoor_illuminance_card",
"name": "Indoor illuminance card",
"deprecated": false,
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAACgCAMAAAB+IdObAAAApVBMVEXg4ODf39/g4OAAAADg4ODf39/////zaQDg4OD5tID+7N/7x6AhISGrq6v0fCDz8/P82b/3oWDIyMj+9u/0chCQkJA9PT3CwsL5+fnu7u67u7u2traenp7j4+NYWFj2jkDOzs770K/V1dX0eyD6vZDa2trn5+f1hTCwsLD82r/3oV/2j0B0dHSCgoL4q3CkpKRKSkr9488vLy/9/f1mZmb3l0/94s8xiLM3AAAABnRSTlPvIL8Ar7DvmsykAAAGkElEQVR42uzWYYubMBzHcbs7fqk2NreogQaToi0b6xlIbd//a1vibaXe9NZtTNI7v/A3aB590IDRw+JTtLz3HhcP0SLanHDnnZhjPDK8gzbus7r79+E7RdES76LlDAmsGRJaMyS0ZkhozZDQmiGhNUNC6yNBVvEe4XcD5JmsEX4fAZL9AslwHVOASSEbDMQVpm0cEq8TdD2tKnQl6xhXFRQQjV8GshaTNg6pCPGSS95BSHUrRDFM2jgEB0K2r84KOWAQUuu6G11oYWo3gDFIz6WwEiiF0ApcF8KWgNu2NdytezgNBIddAmT7bU7y7QpAsjtgGMIp74YKWVDrhkNrt2G4FeB+0UhpI3XLmNDy3DLVPZwIggw4rslL66OT4HeQAoyWUDR9gcAPU6puhIMoP5LWYE1tWqXc3UQQ58jJpQq4AQKH6EOUbrW4QFIKX0N99VQQf7wv5cnfQUonKK4gCixlpoVvKsiBXPd5FMKo4c04pJSi/Qlh7ZmbVnF65oWeDJL3IHmGXqUA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58zm4vfgYD/OX+/YKsaIAGnIg4SO6Z4BoSKGp/2pGqAgMfxwkHQ/2DtHUv6LIja8x0w06uALMU+A0kbwIBLeMSvNE6A0GWP96wB0uOmg0CK3FoKEzo+CYLZgXevAAIGuyYQEnM8nAZxHkGCqgGyYCZzEGln4s+BYISZXgMEzetdSy7HrQDiuyP5/Ms6QmPLuxogsRM0i18HAF/LWSSCQIdKjYGUTWNiruf3IOZ5vwogdxEETZiXHHEl6+mt3kkgtDGL+58aOdKT0m5zK8APoOOzFnLTmPfkkYPQdOghYSJVfGfns1Y4DqKI9mjfQU30W5AFLzu/83wMxPmnTZdwVaPqQC/5IIKUy1PhHT4Ggv135mGtP65qGqutjV0hlUEMlsqea/wECHkiJXF2iEoEKQVLtzXuYyBKe3KsVZFLVLs4GYS+JSD2VBHky2xKFIPG8eMTMN6H32uHm3pRMJtGpWz+X+gh5mitBCLLrbcVxC8FQL3R//h95AK5QFrXBdKaLpDWdIF8t3cHNwCDUAxD86GtuHFmju6/G2sY5LeBlQFCYwiNITSG0BhCYwiNITSG0BhCYwiNITSG0BhCYwiNITSG0BhCYwjNRSG54yB4pK3vAvNNZR6/yb9S6fWM06VV3yFIWRKWDOOkAAAAAElFTkSuQmCC",
"description": "Displays a latest indoor illuminance 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: 'illuminance', label: 'Illuminance', 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\":\"Illuminance\",\"color\":\"#2196f3\",\"settings\":{},\"_hash\":0.2392660816082064,\"funcBody\":\"var value = prevValue + Math.random() * 400 - 200;\\nvar multiplier = Math.pow(10, 2 || 0);\\nvar value = Math.round(value * multiplier) / multiplier;\\nif (value < 0) {\\n\\tvalue = 0;\\n} else if (value > 1000) {\\n\\tvalue = 1000;\\n}\\nreturn value;\\n\",\"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:lightbulb-on\",\"iconColor\":{\"type\":\"range\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"rangeList\":[{\"from\":null,\"to\":100,\"color\":\"rgba(0, 0, 0, 0.76)\"},{\"from\":100,\"to\":300,\"color\":\"#FFA600\"},{\"from\":300,\"to\":500,\"color\":\"#F36900\"},{\"from\":500,\"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\":{\"family\":\"Roboto\",\"size\":52,\"sizeUnit\":\"px\",\"style\":\"normal\",\"weight\":\"500\"},\"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\":null,\"to\":100,\"color\":\"rgba(0, 0, 0, 0.76)\"},{\"from\":100,\"to\":300,\"color\":\"#FFA600\"},{\"from\":300,\"to\":500,\"color\":\"#F36900\"},{\"from\":500,\"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\":\"Illuminance card\",\"dropShadow\":true,\"enableFullscreen\":false,\"titleStyle\":{\"fontSize\":\"16px\",\"fontWeight\":400},\"units\":\"lx\",\"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",
"illuminance",
"indoor"
]
}

28
application/src/main/data/json/system/widget_types/indoor_illuminance_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_illuminance_chart_card.json

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

29
application/src/main/data/json/system/widget_types/indoor_illuminance_progress_bar.json

@ -0,0 +1,29 @@
{
"fqn": "indoor_illuminance_progress_bar",
"name": "Indoor illuminance progress bar",
"deprecated": false,
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAACgCAMAAAB+IdObAAAAqFBMVEXg4ODf39/g4ODg4OAAAAD////g4ODzaQD19fUhISHk5OT+7N/0fCBYWFirq6uQkJA9PT3x8fHv7++6urp0dHQvLy/Hx8eGhob82r/+9u+Xl5f7x6Cenp75tICBgYH3oWD0chD2jj/6xqD39/f948/Ly8vV1dX6vZCOjo74qm/70LBKSkr1hC/CwsL3oV/c3NyxsbF1dXX3l0/2j0CgoKD149ZmZmb94s+rdVHIAAAABXRSTlPvIL+vAC9A4IoAAARhSURBVHja7NjdauMwEIZhZ9uvYeRY0tSSSUGbpc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x7UZMnJ/fXZQe76I9Nxbedwdubzx1HqxTkhqnZDv9u5YxUEgCMCwJvmDWAg3WyxMYSPKNqIB3//ZzgSEqw72rtiJmR+22G4+WNhyrOUQa/0CmZMGijXMHSCqKsco+2Vr8iESBV0oVBPXCHQzo7LEQXpBJ9Y1HzJtEALFkghEoemZV+hGHiApHzJ2BiCP1wnhCZEIEh1SrONp0TO/IPTQpnyI9A3bRJkOiC5MyqIQ2+dl7PIhhJiUQh2QNuouYE0pQKua5A8QhoHyyc9R5LN/9vfKIdZyiLUcYi2HWMsh1nKItRxiLYdYyyHWcoi1TgSpOEX36nKC1dPwda3qysoGp38kO+NWX+/vXnWpb99gbrYRFl0QWwAAAABJRU5ErkJggg==",
"description": "Displays indoor illuminance reading as a horizontal progress bar. Allows to configure value range, bar colors, and other settings.",
"descriptor": {
"type": "latest",
"sizeX": 3,
"sizeY": 2,
"resources": [],
"templateHtml": "<tb-progress-bar-widget \n [ctx]=\"ctx\"\n [widgetTitlePanel]=\"widgetTitlePanel\">\n</tb-progress-bar-widget>",
"templateCss": "",
"controllerScript": "self.onInit = function() {\n self.ctx.$scope.progressBarWidget.onInit();\n};\n\nself.onDataUpdated = function() {\n self.ctx.$scope.progressBarWidget.onDataUpdated();\n};\n\nself.typeParameters = function() {\n return {\n maxDatasources: 1,\n maxDataKeys: 1,\n singleEntity: true,\n previewWidth: '280px',\n previewHeight: '180px',\n embedTitlePanel: true,\n defaultDataKeysFunction: function() {\n return [{ name: 'illuminance', label: 'Illuminance', type: 'timeseries' }];\n }\n };\n};\n\n\nself.onDestroy = function() {\n};\n",
"settingsSchema": "",
"dataKeySettingsSchema": "",
"settingsDirective": "tb-progress-bar-widget-settings",
"hasBasicMode": true,
"basicModeDirective": "tb-progress-bar-basic-config",
"defaultConfig": "{\"datasources\":[{\"type\":\"function\",\"name\":\"function\",\"dataKeys\":[{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"Illuminance\",\"color\":\"#2196f3\",\"settings\":{},\"_hash\":0.2392660816082064,\"funcBody\":\"var value = prevValue + Math.random() * 400 - 200;\\nvar multiplier = Math.pow(10, 2 || 0);\\nvar value = Math.round(value * multiplier) / multiplier;\\nif (value < 0) {\\n\\tvalue = 0;\\n} else if (value > 1000) {\\n\\tvalue = 1000;\\n}\\nreturn value;\\n\",\"aggregationType\":null,\"units\":null,\"decimals\":null,\"usePostProcessing\":null,\"postFuncBody\":null}],\"alarmFilterConfig\":{\"statusList\":[\"ACTIVE\"]}}],\"timewindow\":{\"realtime\":{\"timewindowMs\":60000}},\"showTitle\":true,\"backgroundColor\":\"rgba(0, 0, 0, 0)\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"padding\":\"0px\",\"settings\":{\"layout\":\"default\",\"autoScale\":true,\"showValue\":true,\"valueFont\":{\"family\":\"Roboto\",\"size\":24,\"sizeUnit\":\"px\",\"style\":\"normal\",\"weight\":\"500\",\"lineHeight\":\"32px\"},\"valueColor\":{\"type\":\"range\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"rangeList\":[{\"from\":null,\"to\":100,\"color\":\"rgba(0, 0, 0, 0.76)\"},{\"from\":100,\"to\":300,\"color\":\"#FFA600\"},{\"from\":300,\"to\":500,\"color\":\"#F36900\"},{\"from\":500,\"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';\"},\"tickMin\":0,\"tickMax\":1000,\"showTicks\":true,\"ticksFont\":{\"family\":\"Roboto\",\"size\":11,\"sizeUnit\":\"px\",\"style\":\"normal\",\"weight\":\"400\",\"lineHeight\":\"16px\"},\"ticksColor\":\"rgba(0,0,0,0.54)\",\"background\":{\"type\":\"color\",\"color\":\"#fff\",\"overlay\":{\"enabled\":false,\"color\":\"rgba(255,255,255,0.72)\",\"blur\":3}},\"barColor\":{\"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\":null,\"to\":100,\"color\":\"rgba(0, 0, 0, 0.76)\"},{\"from\":100,\"to\":300,\"color\":\"#FFA600\"},{\"from\":300,\"to\":500,\"color\":\"#F36900\"},{\"from\":500,\"to\":null,\"color\":\"#D81838\"}]},\"barBackground\":\"rgba(0, 0, 0, 0.04)\"},\"title\":\"Illuminance\",\"dropShadow\":true,\"enableFullscreen\":false,\"titleStyle\":{\"fontSize\":\"16px\",\"fontWeight\":400},\"units\":\"lx\",\"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\":16,\"sizeUnit\":\"px\",\"family\":\"Roboto\",\"weight\":\"500\",\"style\":\"normal\",\"lineHeight\":\"24px\"},\"titleIcon\":\"mdi:lightbulb-on\",\"iconColor\":\"rgba(0, 0, 0, 0.87)\",\"iconSize\":\"18px\",\"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},\"titleColor\":\"rgba(0, 0, 0, 0.87)\"}"
},
"externalId": null,
"tags": [
"progress",
"environment",
"illuminance",
"indoor"
]
}

29
application/src/main/data/json/system/widget_types/indoor_illuminance_progress_bar_with_background.json

File diff suppressed because one or more lines are too long

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

@ -0,0 +1,31 @@
{
"fqn": "indoor_simple_illuminance_chart_card",
"name": "Indoor simple illuminance chart card",
"deprecated": false,
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAACgCAMAAAB+IdObAAAApVBMVEUAAADg4ODf39/g4ODg4OD////g4ODzaQAhISHj4+NYWFg8PDx0dHSsrKzHx8eQkJDx8fH5tID+7N/0fCD3oWAvLy/+9u+6urr7x5+CgoJKSkrw8PDV1dX0chBlZWX2jkD2j0AWFhb3l0/82r+enp6dnZ3948/0cxChoaH6vZAICAj4q3AlJSX3oV9DQ0Pf39/Q0ND4qm/1hTD7z6+goKCSkpJCQkJ25ZykAAAABXRSTlMA7yC/r1EOHTEAAASuSURBVHja7M85AcAgEAAwjm9mx7/PVgYciYMUAAAAAACA59QW83a9/o/Y43oraulrJLBbmSOFyBKZIocROc3Hbt2stg4DYRhefWFGo7+NMLKMwZCCMSHt4pxz/5d2lLgUipUsHbnVi2E0ePVgG9wgtdUgtdUgtdUgtfULILHDkSpDEoDrn3WuDQ4gA6WxbTzj9ZUh17jevBh8ZugJpIZnV4acXIqX65withBrgc7my5oB1nDehnzdNuQ9o9iw6TzgjWHc1iJ0FwhwmYimvyhAtMJtqNALqV6Ch7h1s3BBi4IlUUEBEhSd0VEv4rFpH8g8UW5KTyB5BA2m7g4Z4ekMZ9ER20x6IxhiaIFoeDLYtANkXjq9Qj7G5RkkC5jMHaIBchi0yAoxhCjIeeqVIodNO0DSe3J3yJLS+xbSP4aI9vYbxLOnaK1lFNrj1UqX7Jhi6RuJgVnKEJ8t7guShx8VVM/evQyC00TTiBKEhUJfhmQFKbKfkNsmDBYi9ToIwrI4lGOPR3kubFxk7AU5zTOO1EPIxz+FI/UL/n4PVoPUVoPUVoPUVoPUVoPUVpUQZv8DIFYFIhLNx4Z4RSEa8zYSuSNDWMj59TSSOzBE0/B1jtQdFvKfHbPrVRQGwvDV5G2hfLVSkYga/MrJybnY3f//3xapdOthGzHmEEh4EuOMV/M4dKYasZOTBXk6V5EgJIeYnWYqwln0zWumIoJxemxJNBsRvo5TO3pzQY8EwUxE4oA1dLsvYdve4Y+nJ7KN4/6QCs9xLFjIzYMk6DthMDGRNMkZY7ngj2e7TO9bUESngJWc+qrrHxLRl6O2yYdSAz1KFkTx2nz3ll2XcZE3lklKfcqcvytyBFbUkMFgkmsT1ZIMGTB0HEXm8cpLskTuTOLcd2cJ+Zsi6l77ZydiYnVoXvo1kdhem9Zs7ZQ48PYltm1XT0HI8mDDXxTJuibUWMkbmkgCGdEFyF4TEbkNy8CzNLxwwZr6GwlWimQTmCE3XERCVUbkgMyeCUC3n+wdkVaRdPvmIRQ2PLPECYbBo10QiDM3SRIalYEiCoUyIhUKulPjt6m/ckQOqHQbSvKwdreBaMtIN6yk1/Gp+EWypuS7CLCq1f7DaUUBaKcjFTKSwC/ysQvJIWEsDxnbpERvqJTDROQV8i4iYVDaFZGdiGmQ/ILS/qugeMyjjTin9BZpOkykRkadSK0yecmAzCeiFa5AQT4itqUfxS9SQJERsRxQ+UToaAacB89lfAwR2SgURVFhX1z+uUE6Io/jtwKKgT8yLGOIFLBkpKW2Iiuo3tQyb6g0efCs5jFELquWCmr1pyv+C7B7pH7YI+3EqvDpOZVilIb494g9I0ezza+3RAOf7SeFK7KHukVH+g/b0rv3xhUxvbgqQMm2chOTI1K0Xgp76pOwMCYPo4tQpgDspY2rlXZEpEJtGvfRb8eTtTeKiIuUuhc/JR3Wjsn/Gx+HT9oxE5Hn7ZiJyO5pO2Yi8oxFZBGZC4vI1FhEpsYiMjUWkamxiPxt584JAIZhAAbazjN3L3+epZE6dwxEQKcRcpoduVrYMRqsg9Z6ZlQ2mAe9WRE199/lqAAAAAAAALjNB+/brAXegFpbAAAAAElFTkSuQmCC",
"description": "Displays historical indoor illuminance values as a simplified chart. Optionally may display the corresponding latest indoor illuminance 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: 'illuminance', label: 'Illuminance', type: 'timeseries', color: 'rgba(0, 0, 0, 0.87)'}\n ];\n },\n defaultLatestDataKeysFunction: function(configComponent) {\n return [{ name: 'illuminance', 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\":\"Illuminance\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"settings\":{},\"_hash\":0.8587686344902596,\"funcBody\":\"var value = prevValue + Math.random() * 400 - 200;\\nvar multiplier = Math.pow(10, 2 || 0);\\nvar value = Math.round(value * multiplier) / multiplier;\\nif (value < 0) {\\n\\tvalue = 0;\\n} else if (value > 1000) {\\n\\tvalue = 1000;\\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() * 400 - 200;\\nvar multiplier = Math.pow(10, 2 || 0);\\nvar value = Math.round(value * multiplier) / multiplier;\\nif (value < 0) {\\n\\tvalue = 0;\\n} else if (value > 1000) {\\n\\tvalue = 1000;\\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\":null,\"to\":100,\"color\":\"rgba(0, 0, 0, 0.76)\"},{\"from\":100,\"to\":300,\"color\":\"#FFA600\"},{\"from\":300,\"to\":500,\"color\":\"#F36900\"},{\"from\":500,\"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\":\"Illuminance\",\"dropShadow\":true,\"enableFullscreen\":false,\"titleStyle\":null,\"mobileHeight\":null,\"configMode\":\"basic\",\"actions\":{},\"showTitleIcon\":true,\"titleIcon\":\"mdi:lightbulb-on\",\"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\":\"lx\",\"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",
"illuminance",
"indoor"
]
}

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

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