31 changed files with 252 additions and 164 deletions
File diff suppressed because one or more lines are too long
@ -0,0 +1,26 @@ |
|||||
|
{ |
||||
|
"fqn": "iot_svg", |
||||
|
"name": "IoT SVG", |
||||
|
"deprecated": false, |
||||
|
"image": null, |
||||
|
"description": "IoT SVG", |
||||
|
"descriptor": { |
||||
|
"type": "rpc", |
||||
|
"sizeX": 3.5, |
||||
|
"sizeY": 3.5, |
||||
|
"resources": [], |
||||
|
"templateHtml": "<tb-iot-svg-widget\n [ctx]='ctx'\n [widgetTitlePanel]=\"widgetTitlePanel\">\n</tb-iot-svg-widget>", |
||||
|
"templateCss": "", |
||||
|
"controllerScript": "self.onInit = function() {\n self.ctx.$scope.actionWidget.onInit();\n}\n\nself.typeParameters = function() {\n return {\n previewWidth: '280px',\n previewHeight: '280px',\n embedTitlePanel: true,\n displayRpcMessageToast: false\n };\n};\n\nself.onDestroy = function() {\n}\n", |
||||
|
"settingsSchema": "", |
||||
|
"dataKeySettingsSchema": "{}\n", |
||||
|
"settingsDirective": "", |
||||
|
"hasBasicMode": true, |
||||
|
"basicModeDirective": "tb-iot-svg-basic-config", |
||||
|
"defaultConfig": "{\"showTitle\":true,\"backgroundColor\":\"#ffffff\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"padding\":\"0px\",\"settings\":{},\"title\":\"IoT SVG\",\"dropShadow\":true,\"enableFullscreen\":false,\"widgetStyle\":{},\"actions\":{},\"widgetCss\":\"\",\"noDataDisplayMessage\":\"\",\"titleFont\":{\"size\":16,\"sizeUnit\":\"px\",\"family\":\"Roboto\",\"weight\":\"500\",\"style\":null,\"lineHeight\":\"1.6\"},\"showTitleIcon\":false,\"titleTooltip\":\"\",\"titleStyle\":{\"fontSize\":\"16px\",\"fontWeight\":400},\"pageSize\":1024,\"titleIcon\":\"mdi:lightbulb-outline\",\"iconColor\":\"rgba(0, 0, 0, 0.87)\",\"iconSize\":\"24px\",\"configMode\":\"basic\",\"targetDevice\":null,\"titleColor\":null,\"borderRadius\":null}" |
||||
|
}, |
||||
|
"tags": [ |
||||
|
"svg", |
||||
|
"scada" |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,33 @@ |
|||||
|
///
|
||||
|
/// Copyright © 2016-2024 The Thingsboard Authors
|
||||
|
///
|
||||
|
/// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
/// you may not use this file except in compliance with the License.
|
||||
|
/// You may obtain a copy of the License at
|
||||
|
///
|
||||
|
/// http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
///
|
||||
|
/// Unless required by applicable law or agreed to in writing, software
|
||||
|
/// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
/// See the License for the specific language governing permissions and
|
||||
|
/// limitations under the License.
|
||||
|
///
|
||||
|
|
||||
|
import { Pipe, PipeTransform } from '@angular/core'; |
||||
|
import { UtilsService } from '@core/services/utils.service'; |
||||
|
|
||||
|
@Pipe({ |
||||
|
name: 'customTranslate' |
||||
|
}) |
||||
|
export class CustomTranslatePipe implements PipeTransform { |
||||
|
|
||||
|
constructor(private utils: UtilsService) { } |
||||
|
|
||||
|
transform(translationValue: string, defaultValue?: string): string { |
||||
|
if (!defaultValue) { |
||||
|
defaultValue = translationValue; |
||||
|
} |
||||
|
return this.utils.customTranslation(translationValue, defaultValue); |
||||
|
} |
||||
|
} |
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 18 KiB |
Loading…
Reference in new issue