Browse Source

Merge pull request #70 from deaflynx/develop/3.3-edge

Fix fetch rule nodes for EDGE/CORE rule chains scope
pull/3811/head
VoBa 6 years ago
committed by GitHub
parent
commit
0ddfdee12a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      ui-ngx/src/app/modules/home/pages/customer/customer.component.html
  2. 3
      ui-ngx/src/app/modules/home/pages/customer/customers-table-config.resolver.ts
  3. 2
      ui-ngx/src/app/modules/home/pages/dashboard/dashboards-table-config.resolver.ts
  4. 2
      ui-ngx/src/app/modules/home/pages/edge/edges-table-config.resolver.ts
  5. 5
      ui-ngx/src/assets/locale/locale.constant-en_US.json

6
ui-ngx/src/app/modules/home/pages/customer/customer.component.html

@ -40,6 +40,12 @@
[fxShow]="!isEdit">
{{'customer.manage-dashboards' | translate }}
</button>
<button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'manageEdges')"
[fxShow]="!isEdit">
{{'customer.manage-edges' | translate }}
</button>
<button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'delete')"

3
ui-ngx/src/app/modules/home/pages/customer/customers-table-config.resolver.ts

@ -179,6 +179,9 @@ export class CustomersTableConfigResolver implements Resolve<EntityTableConfig<C
case 'manageDashboards':
this.manageCustomerDashboards(action.event, action.entity);
return true;
case 'manageEdges':
this.manageCustomerEdges(action.event, action.entity);
return true;
}
return false;
}

2
ui-ngx/src/app/modules/home/pages/dashboard/dashboards-table-config.resolver.ts

@ -300,7 +300,7 @@ export class DashboardsTableConfigResolver implements Resolve<EntityTableConfig<
if (dashboardScope === 'edge') {
actions.push(
{
name: this.translate.instant('dashboard.unassign-dashboards-from-edge'),
name: this.translate.instant('dashboard.unassign-dashboards'),
icon: 'portable_wifi_off',
isEnabled: true,
onAction: ($event, entities) => this.unassignDashboardsFromEdge($event, entities)

2
ui-ngx/src/app/modules/home/pages/edge/edges-table-config.resolver.ts

@ -167,7 +167,7 @@ export class EdgesTableConfigResolver implements Resolve<EntityTableConfig<EdgeI
}
if (edgeScope === 'customer') {
this.config.entitiesFetchFunction = pageLink =>
this.edgeService.getCustomerEdgeInfos(this.customerId, pageLink);
this.edgeService.getCustomerEdgeInfos(this.customerId, pageLink, this.config.componentsData.edgeType);
this.config.deleteEntity = id => this.edgeService.unassignEdgeFromCustomer(id.id);
}
}

5
ui-ngx/src/assets/locale/locale.constant-en_US.json

@ -414,7 +414,8 @@
"unassign-asset-from-edge-text": "After the confirmation the asset will be unassigned and won't be accessible by the edge.",
"unassign-assets-from-edge-action-title": "Unassign { count, plural, 1 {1 asset} other {# assets} } from edge",
"unassign-assets-from-edge-title": "Are you sure you want to unassign { count, plural, 1 {1 asset} other {# assets} }?",
"unassign-assets-from-edge-text": "After the confirmation all selected assets will be unassigned and won't be accessible by the edge."
"unassign-assets-from-edge-text": "After the confirmation all selected assets will be unassigned and won't be accessible by the edge.",
"selected-assets": "{ count, plural, 1 {1 asset} other {# assets} } selected"
},
"attribute": {
"attributes": "Attributes",
@ -2048,7 +2049,7 @@
"edge-rulechain": "Edge Rule chain",
"core-rulechains": "Core Rule chains",
"unassign-rulechain-from-edge-text": "After the confirmation the rulechain will be unassigned and won't be accessible by the edge.",
"unassign-rulechains-from-edge-title": "Unassign { count, plural, 1 {1 rulechain} other {# rulechains} } from edge",
"unassign-rulechains-from-edge-title": "Are you sure you want to unassign { count, plural, 1 {1 rulechain} other {# rulechains} }?",
"unassign-rulechains-from-edge-text": "After the confirmation all selected rulechains will be unassigned and won't be accessible by the edge.",
"assign-rulechain-to-edge-title": "Assign Rule Chain(s) To Edge",
"assign-rulechain-to-edge-text": "Please select the rulechains to assign to the edge",

Loading…
Cancel
Save