Commit 746d17185c5d53c4dbae3388a39009c05058ee0e

Authored by deaflynx
1 parent fa5d716d

Edge widget message warning

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