Commit 746d17185c5d53c4dbae3388a39009c05058ee0e

Authored by deaflynx
1 parent fa5d716d

Edge widget message warning

... ... @@ -20,6 +20,9 @@
20 20 <div *ngIf="customerTitle" fxLayout="row">
21 21 <span class="mat-subheader">{{ customerTitle }}</span>
22 22 </div>
  23 + <div *ngIf="!isDatasourceEdgeType" fxLayout="row">
  24 + <span class="mat-subheader" translate>edge.widget-datasource-error</span>
  25 + </div>
23 26 <div fxFlex class="tb-entities-nav-tree-panel">
24 27 <tb-nav-tree
25 28 [loadNodes]="loadNodes"
... ...
... ... @@ -54,6 +54,7 @@ export class EdgesOverviewWidgetComponent extends PageComponent implements OnIni
54 54
55 55 public toastTargetId = 'edges-overview-' + this.utils.guid();
56 56 public customerTitle: string = null;
  57 + public isDatasourceEdgeType: boolean = true;
57 58
58 59 private widgetConfig: WidgetConfig;
59 60 private subscription: IWidgetSubscription;
... ... @@ -91,7 +92,7 @@ export class EdgesOverviewWidgetComponent extends PageComponent implements OnIni
91 92 } else if (datasource.type === DatasourceType.function) {
92 93 cb(this.loadNodesForEdge(datasource.entityId, datasource.entity));
93 94 } else {
94   - this.ctx.showErrorToast(this.translateService.instant('edge.widget-datasource-error'));
  95 + this.isDatasourceEdgeType = false;
95 96 cb([]);
96 97 }
97 98 }
... ...
... ... @@ -1288,7 +1288,7 @@
1288 1288 "sync-process-started-successfully": "Sync process started successfully!",
1289 1289 "missing-related-rule-chains-title": "Edge has missing related rule chain(s)",
1290 1290 "missing-related-rule-chains-text": "Assigned to edge rule chain(s) use rule nodes that forward message(s) to rule chain(s) that are not assigned to this edge. <br><br> List of missing rule chain(s): <br> {{missingRuleChains}}",
1291   - "widget-datasource-error": "This widget supports only EDGE entity"
  1291 + "widget-datasource-error": "This widget supports only EDGE entity datasource"
1292 1292 },
1293 1293 "edge-event": {
1294 1294 "type-dashboard": "Dashboard",
... ...