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

This commit is contained in:
Volodymyr Babak 2020-12-21 19:18:16 +02:00
commit c89849c38d
5 changed files with 15 additions and 4 deletions

View File

@ -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')"

View File

@ -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;
}

View File

@ -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)

View File

@ -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') {

View File

@ -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",