Commit c89849c38d0e892adf21b70ac3582416c9323c21

Authored by Volodymyr Babak
2 parents e761f53d 0ddfdee1

Merge branch 'develop/3.3-edge' of github.com:volodymyr-babak/thingsboard into develop/3.3-edge

... ... @@ -42,6 +42,12 @@
42 42 </button>
43 43 <button mat-raised-button color="primary"
44 44 [disabled]="(isLoading$ | async)"
  45 + (click)="onEntityAction($event, 'manageEdges')"
  46 + [fxShow]="!isEdit">
  47 + {{'customer.manage-edges' | translate }}
  48 + </button>
  49 + <button mat-raised-button color="primary"
  50 + [disabled]="(isLoading$ | async)"
45 51 (click)="onEntityAction($event, 'delete')"
46 52 [fxShow]="!hideDelete() && !isEdit && !isPublic">
47 53 {{'customer.delete' | translate }}
... ...
... ... @@ -179,6 +179,9 @@ export class CustomersTableConfigResolver implements Resolve<EntityTableConfig<C
179 179 case 'manageDashboards':
180 180 this.manageCustomerDashboards(action.event, action.entity);
181 181 return true;
  182 + case 'manageEdges':
  183 + this.manageCustomerEdges(action.event, action.entity);
  184 + return true;
182 185 }
183 186 return false;
184 187 }
... ...
... ... @@ -300,7 +300,7 @@ export class DashboardsTableConfigResolver implements Resolve<EntityTableConfig<
300 300 if (dashboardScope === 'edge') {
301 301 actions.push(
302 302 {
303   - name: this.translate.instant('dashboard.unassign-dashboards-from-edge'),
  303 + name: this.translate.instant('dashboard.unassign-dashboards'),
304 304 icon: 'assignment_return',
305 305 isEnabled: true,
306 306 onAction: ($event, entities) => this.unassignDashboardsFromEdge($event, entities)
... ...
... ... @@ -167,7 +167,7 @@ export class EdgesTableConfigResolver implements Resolve<EntityTableConfig<EdgeI
167 167 }
168 168 if (edgeScope === 'customer') {
169 169 this.config.entitiesFetchFunction = pageLink =>
170   - this.edgeService.getCustomerEdgeInfos(this.customerId, pageLink);
  170 + this.edgeService.getCustomerEdgeInfos(this.customerId, pageLink, this.config.componentsData.edgeType);
171 171 this.config.deleteEntity = id => this.edgeService.unassignEdgeFromCustomer(id.id);
172 172 }
173 173 if (edgeScope === 'customer_user') {
... ...
... ... @@ -413,7 +413,8 @@
413 413 "unassign-asset-from-edge-title": "Are you sure you want to unassign the asset '{{assetName}}'?",
414 414 "unassign-asset-from-edge-text": "After the confirmation the asset will be unassigned and won't be accessible by the edge.",
415 415 "unassign-assets-from-edge-title": "Are you sure you want to unassign { count, plural, 1 {1 asset} other {# assets} }?",
416   - "unassign-assets-from-edge-text": "After the confirmation all selected assets will be unassigned and won't be accessible by the edge."
  416 + "unassign-assets-from-edge-text": "After the confirmation all selected assets will be unassigned and won't be accessible by the edge.",
  417 + "selected-assets": "{ count, plural, 1 {1 asset} other {# assets} } selected"
417 418 },
418 419 "attribute": {
419 420 "attributes": "Attributes",
... ... @@ -781,6 +782,7 @@
781 782 "select-state": "Select target state",
782 783 "state-controller": "State controller",
783 784 "unassign-dashboard-from-edge-text": "After the confirmation the dashboard will be unassigned and won't be accessible by the edge.",
  785 + "unassign-dashboards-from-edge-title": "Are you sure you want to unassign { count, plural, 1 {1 dashboard} other {# dashboards} }?",
784 786 "unassign-dashboards-from-edge-text": "After the confirmation all selected dashboards will be unassigned and won't be accessible by the edge.",
785 787 "assign-dashboard-to-edge": "Assign Dashboard(s) To Edge",
786 788 "assign-dashboard-to-edge-text": "Please select the dashboards to assign to the edge"
... ... @@ -2036,7 +2038,7 @@
2036 2038 "assign-new-rulechain": "Assign new rulechain",
2037 2039 "edge-rulechain": "Edge Rule chain",
2038 2040 "unassign-rulechain-from-edge-text": "After the confirmation the rulechain will be unassigned and won't be accessible by the edge.",
2039   - "unassign-rulechains-from-edge-title": "Unassign { count, plural, 1 {1 rulechain} other {# rulechains} } from edge",
  2041 + "unassign-rulechains-from-edge-title": "Are you sure you want to unassign { count, plural, 1 {1 rulechain} other {# rulechains} }?",
2040 2042 "unassign-rulechains-from-edge-text": "After the confirmation all selected rulechains will be unassigned and won't be accessible by the edge.",
2041 2043 "assign-rulechain-to-edge-title": "Assign Rule Chain(s) To Edge",
2042 2044 "assign-rulechain-to-edge-text": "Please select the rulechains to assign to the edge",
... ...