Browse Source

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

pull/3811/head
Volodymyr Babak 6 years ago
parent
commit
c89849c38d
  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. 6
      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: 'assignment_return',
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);
}
if (edgeScope === 'customer_user') {

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

@ -413,7 +413,8 @@
"unassign-asset-from-edge-title": "Are you sure you want to unassign the asset '{{assetName}}'?",
"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-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",
@ -781,6 +782,7 @@
"select-state": "Select target state",
"state-controller": "State controller",
"unassign-dashboard-from-edge-text": "After the confirmation the dashboard will be unassigned and won't be accessible by the edge.",
"unassign-dashboards-from-edge-title": "Are you sure you want to unassign { count, plural, 1 {1 dashboard} other {# dashboards} }?",
"unassign-dashboards-from-edge-text": "After the confirmation all selected dashboards will be unassigned and won't be accessible by the edge.",
"assign-dashboard-to-edge": "Assign Dashboard(s) To Edge",
"assign-dashboard-to-edge-text": "Please select the dashboards to assign to the edge"
@ -2036,7 +2038,7 @@
"assign-new-rulechain": "Assign new rulechain",
"edge-rulechain": "Edge Rule chain",
"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