Commit 4b5ade990e119307ff2ec55f36b3c3f472b9e840

Authored by Artem Babak
1 parent 2ba04f86

Added Manage edge for customers and filter by type

@@ -42,6 +42,12 @@ @@ -42,6 +42,12 @@
42 </button> 42 </button>
43 <button mat-raised-button color="primary" 43 <button mat-raised-button color="primary"
44 [disabled]="(isLoading$ | async)" 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 (click)="onEntityAction($event, 'delete')" 51 (click)="onEntityAction($event, 'delete')"
46 [fxShow]="!hideDelete() && !isEdit && !isPublic"> 52 [fxShow]="!hideDelete() && !isEdit && !isPublic">
47 {{'customer.delete' | translate }} 53 {{'customer.delete' | translate }}
@@ -179,6 +179,9 @@ export class CustomersTableConfigResolver implements Resolve<EntityTableConfig<C @@ -179,6 +179,9 @@ export class CustomersTableConfigResolver implements Resolve<EntityTableConfig<C
179 case 'manageDashboards': 179 case 'manageDashboards':
180 this.manageCustomerDashboards(action.event, action.entity); 180 this.manageCustomerDashboards(action.event, action.entity);
181 return true; 181 return true;
  182 + case 'manageEdges':
  183 + this.manageCustomerEdges(action.event, action.entity);
  184 + return true;
182 } 185 }
183 return false; 186 return false;
184 } 187 }
@@ -300,7 +300,7 @@ export class DashboardsTableConfigResolver implements Resolve<EntityTableConfig< @@ -300,7 +300,7 @@ export class DashboardsTableConfigResolver implements Resolve<EntityTableConfig<
300 if (dashboardScope === 'edge') { 300 if (dashboardScope === 'edge') {
301 actions.push( 301 actions.push(
302 { 302 {
303 - name: this.translate.instant('dashboard.unassign-dashboards-from-edge'), 303 + name: this.translate.instant('dashboard.unassign-dashboards'),
304 icon: 'portable_wifi_off', 304 icon: 'portable_wifi_off',
305 isEnabled: true, 305 isEnabled: true,
306 onAction: ($event, entities) => this.unassignDashboardsFromEdge($event, entities) 306 onAction: ($event, entities) => this.unassignDashboardsFromEdge($event, entities)
@@ -167,7 +167,7 @@ export class EdgesTableConfigResolver implements Resolve<EntityTableConfig<EdgeI @@ -167,7 +167,7 @@ export class EdgesTableConfigResolver implements Resolve<EntityTableConfig<EdgeI
167 } 167 }
168 if (edgeScope === 'customer') { 168 if (edgeScope === 'customer') {
169 this.config.entitiesFetchFunction = pageLink => 169 this.config.entitiesFetchFunction = pageLink =>
170 - this.edgeService.getCustomerEdgeInfos(this.customerId, pageLink); 170 + this.edgeService.getCustomerEdgeInfos(this.customerId, pageLink, this.config.componentsData.edgeType);
171 this.config.deleteEntity = id => this.edgeService.unassignEdgeFromCustomer(id.id); 171 this.config.deleteEntity = id => this.edgeService.unassignEdgeFromCustomer(id.id);
172 } 172 }
173 } 173 }