Browse Source

UI: Fixed show edge details panel

pull/8341/head
Vladyslav_Prykhodko 4 years ago
parent
commit
5541cdb007
  1. 65
      ui-ngx/src/app/modules/home/pages/edge/edge.component.html
  2. 10
      ui-ngx/src/assets/locale/locale.constant-en_US.json

65
ui-ngx/src/app/modules/home/pages/edge/edge.component.html

@ -40,49 +40,48 @@
[fxShow]="!isEdit && (edgeScope === 'customer' || edgeScope === 'tenant') && isAssignedToCustomer(entity)">
{{ (entity?.customerIsPublic ? 'edge.make-private' : 'edge.unassign-from-customer') | translate }}
</button>
<button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openEdgeAssets')"
[fxShow]="!isEdit && edgeScope !== 'customer'">
{{'edge.manage-assets' | translate }}
</button>
<button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openEdgeDevices')"
[fxShow]="!isEdit && edgeScope !== 'customer'">
{{'edge.manage-devices' | translate }}
</button>
<button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openEdgeEntityViews')"
[fxShow]="!isEdit && edgeScope !== 'customer'">
{{'edge.manage-entity-views' | translate }}
</button>
<button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openEdgeDashboards')"
[fxShow]="!isEdit && edgeScope !== 'customer'">
{{'edge.manage-dashboards' | translate }}
</button>
<button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openEdgeRuleChains')"
[fxShow]="!isEdit && edgeScope === 'tenant'">
{{'edge.manage-rulechains' | translate }}
</button>
<button mat-raised-button color="primary" fxFlex.xs
[disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'delete')"
[fxShow]="!hideDelete() && !isEdit">
{{'edge.delete' | translate }}
</button>
<div fxLayout="row wrap" fxLayout.xs="column">
<button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openEdgeAssets')"
[fxShow]="!isEdit && edgeScope !== 'customer'">
{{'edge.edge-assets' | translate }}
</button>
<button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openEdgeDevices')"
[fxShow]="!isEdit && edgeScope !== 'customer'">
{{'edge.edge-devices' | translate }}
</button>
<button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openEdgeEntityViews')"
[fxShow]="!isEdit && edgeScope !== 'customer'">
{{'edge.edge-entity-views' | translate }}
</button>
<button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openEdgeDashboards')"
[fxShow]="!isEdit && edgeScope !== 'customer'">
{{'edge.edge-dashboards' | translate }}
</button>
<button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openEdgeRuleChains')"
[fxShow]="!isEdit && edgeScope === 'tenant'">
{{'edge.edge-rulechains' | translate }}
</button>
</div>
<div fxLayout="row wrap" fxLayout.xs="column">
<button mat-raised-button
ngxClipboard
(cbOnSuccess)="onEdgeIdCopied($event)"
[cbContent]="entity?.id?.id"
[disabled]="(isLoading$ | async)"
[fxShow]="!isEdit">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>edge.copy-id</span>
@ -91,6 +90,7 @@
ngxClipboard
(cbOnSuccess)="onEdgeInfoCopied('key')"
[cbContent]="entity?.routingKey"
[disabled]="(isLoading$ | async)"
[fxShow]="!isEdit && edgeScope !== 'customer_user'">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>edge.copy-edge-key</span>
@ -99,6 +99,7 @@
ngxClipboard
(cbOnSuccess)="onEdgeInfoCopied('secret')"
[cbContent]="entity?.secret"
[disabled]="(isLoading$ | async)"
[fxShow]="!isEdit && edgeScope !== 'customer_user'">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>edge.copy-edge-secret</span>

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

@ -1820,11 +1820,11 @@
"edge-secret": "Edge secret",
"copy-edge-secret": "Copy Edge secret",
"edge-secret-copied-message": "Edge secret has been copied to clipboard",
"edge-assets": "Edge assets",
"edge-devices": "Edge devices",
"edge-entity-views": "Edge entity views",
"edge-dashboards": "Edge dashboards",
"edge-rulechains": "Edge rule chains",
"manage-assets": "Manage assets",
"manage-devices": "Manage devices",
"manage-entity-views": "Manage entity views",
"manage-dashboards": "Manage dashboards",
"manage-rulechains": "Manage rule chains",
"assets": "Edge assets",
"devices": "Edge devices",
"entity-views": "Edge entity views",

Loading…
Cancel
Save