Commit 4b94ffe5b5dd874af64649108ed01c236d0ebcbf
1 parent
e6b156df
Show edge info for Tenant in edgeScope === 'customer'
Showing
2 changed files
with
17 additions
and
15 deletions
@@ -44,31 +44,31 @@ | @@ -44,31 +44,31 @@ | ||
44 | <button mat-raised-button color="primary" | 44 | <button mat-raised-button color="primary" |
45 | [disabled]="(isLoading$ | async)" | 45 | [disabled]="(isLoading$ | async)" |
46 | (click)="onEntityAction($event, 'openEdgeAssets')" | 46 | (click)="onEntityAction($event, 'openEdgeAssets')" |
47 | - [fxShow]="!isEdit && (edgeScope === 'tenant' || edgeScope === 'customer_user')"> | 47 | + [fxShow]="!isEdit"> |
48 | {{'edge.manage-edge-assets' | translate }} | 48 | {{'edge.manage-edge-assets' | translate }} |
49 | </button> | 49 | </button> |
50 | <button mat-raised-button color="primary" | 50 | <button mat-raised-button color="primary" |
51 | [disabled]="(isLoading$ | async)" | 51 | [disabled]="(isLoading$ | async)" |
52 | (click)="onEntityAction($event, 'openEdgeDevices')" | 52 | (click)="onEntityAction($event, 'openEdgeDevices')" |
53 | - [fxShow]="!isEdit && (edgeScope === 'tenant' || edgeScope === 'customer_user')"> | 53 | + [fxShow]="!isEdit"> |
54 | {{'edge.manage-edge-devices' | translate }} | 54 | {{'edge.manage-edge-devices' | translate }} |
55 | </button> | 55 | </button> |
56 | <button mat-raised-button color="primary" | 56 | <button mat-raised-button color="primary" |
57 | [disabled]="(isLoading$ | async)" | 57 | [disabled]="(isLoading$ | async)" |
58 | (click)="onEntityAction($event, 'openEdgeEntityViews')" | 58 | (click)="onEntityAction($event, 'openEdgeEntityViews')" |
59 | - [fxShow]="!isEdit && (edgeScope === 'tenant' || edgeScope === 'customer_user')"> | 59 | + [fxShow]="!isEdit"> |
60 | {{'edge.manage-edge-entity-views' | translate }} | 60 | {{'edge.manage-edge-entity-views' | translate }} |
61 | </button> | 61 | </button> |
62 | <button mat-raised-button color="primary" | 62 | <button mat-raised-button color="primary" |
63 | [disabled]="(isLoading$ | async)" | 63 | [disabled]="(isLoading$ | async)" |
64 | (click)="onEntityAction($event, 'openEdgeDashboards')" | 64 | (click)="onEntityAction($event, 'openEdgeDashboards')" |
65 | - [fxShow]="!isEdit && (edgeScope === 'tenant' || edgeScope === 'customer_user')"> | 65 | + [fxShow]="!isEdit"> |
66 | {{'edge.manage-edge-dashboards' | translate }} | 66 | {{'edge.manage-edge-dashboards' | translate }} |
67 | </button> | 67 | </button> |
68 | <button mat-raised-button color="primary" | 68 | <button mat-raised-button color="primary" |
69 | [disabled]="(isLoading$ | async)" | 69 | [disabled]="(isLoading$ | async)" |
70 | (click)="onEntityAction($event, 'openEdgeRuleChains')" | 70 | (click)="onEntityAction($event, 'openEdgeRuleChains')" |
71 | - [fxShow]="!isEdit && edgeScope === 'tenant'"> | 71 | + [fxShow]="!isEdit && (edgeScope === 'tenant' || edgeScope === 'customer')"> |
72 | {{'edge.manage-edge-rulechains' | translate }} | 72 | {{'edge.manage-edge-rulechains' | translate }} |
73 | </button> | 73 | </button> |
74 | </div> | 74 | </div> |
@@ -85,7 +85,7 @@ | @@ -85,7 +85,7 @@ | ||
85 | ngxClipboard | 85 | ngxClipboard |
86 | (cbOnSuccess)="onEdgeInfoCopied('key')" | 86 | (cbOnSuccess)="onEdgeInfoCopied('key')" |
87 | [cbContent]="entity?.routingKey" | 87 | [cbContent]="entity?.routingKey" |
88 | - [fxShow]="!isEdit && edgeScope === 'tenant'"> | 88 | + [fxShow]="!isEdit && (edgeScope === 'tenant' || edgeScope === 'customer')"> |
89 | <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> | 89 | <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> |
90 | <span translate>edge.copy-edge-key</span> | 90 | <span translate>edge.copy-edge-key</span> |
91 | </button> | 91 | </button> |
@@ -93,7 +93,7 @@ | @@ -93,7 +93,7 @@ | ||
93 | ngxClipboard | 93 | ngxClipboard |
94 | (cbOnSuccess)="onEdgeInfoCopied('secret')" | 94 | (cbOnSuccess)="onEdgeInfoCopied('secret')" |
95 | [cbContent]="entity?.secret" | 95 | [cbContent]="entity?.secret" |
96 | - [fxShow]="!isEdit && edgeScope === 'tenant'"> | 96 | + [fxShow]="!isEdit && (edgeScope === 'tenant' || edgeScope === 'customer')"> |
97 | <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> | 97 | <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> |
98 | <span translate>edge.copy-edge-secret</span> | 98 | <span translate>edge.copy-edge-secret</span> |
99 | </button> | 99 | </button> |
@@ -101,7 +101,7 @@ | @@ -101,7 +101,7 @@ | ||
101 | ngxClipboard | 101 | ngxClipboard |
102 | [disabled]="(isLoading$ | async)" | 102 | [disabled]="(isLoading$ | async)" |
103 | (click)="onEntityAction($event, 'syncEdge')" | 103 | (click)="onEntityAction($event, 'syncEdge')" |
104 | - [fxShow]="!isEdit && edgeScope === 'tenant'"> | 104 | + [fxShow]="!isEdit && (edgeScope === 'tenant' || edgeScope === 'customer')"> |
105 | <mat-icon svgIcon="mdi:sync"></mat-icon> | 105 | <mat-icon svgIcon="mdi:sync"></mat-icon> |
106 | <span translate>edge.sync</span> | 106 | <span translate>edge.sync</span> |
107 | </button> | 107 | </button> |
@@ -111,12 +111,12 @@ | @@ -111,12 +111,12 @@ | ||
111 | <mat-form-field class="mat-block" | 111 | <mat-form-field class="mat-block" |
112 | [fxShow]="!isEdit && isAssignedToCustomer(entity) | 112 | [fxShow]="!isEdit && isAssignedToCustomer(entity) |
113 | && !entity?.customerIsPublic && edgeScope === 'tenant'"> | 113 | && !entity?.customerIsPublic && edgeScope === 'tenant'"> |
114 | - <mat-label translate>edge.assigned-to-customer</mat-label> | 114 | + <mat-label translate>edge.assignedToCustomer</mat-label> |
115 | <input matInput disabled [ngModel]="entity?.customerTitle"> | 115 | <input matInput disabled [ngModel]="entity?.customerTitle"> |
116 | </mat-form-field> | 116 | </mat-form-field> |
117 | <div class="tb-small" style="padding-bottom: 10px; padding-left: 2px;" | 117 | <div class="tb-small" style="padding-bottom: 10px; padding-left: 2px;" |
118 | - [fxShow]="!isEdit && entity?.customerIsPublic && (edgeScope === 'customer' || edgeScope === 'tenant')"> | ||
119 | - {{ 'edge.public' | translate }} | 118 | + [fxShow]="!isEdit && entity?.customerIsPublic && edgeScope === 'tenant'"> |
119 | + {{ 'edge.edge-public' | translate }} | ||
120 | </div> | 120 | </div> |
121 | <form [formGroup]="entityForm"> | 121 | <form [formGroup]="entityForm"> |
122 | <fieldset [disabled]="(isLoading$ | async) || !isEdit"> | 122 | <fieldset [disabled]="(isLoading$ | async) || !isEdit"> |
@@ -132,7 +132,7 @@ | @@ -132,7 +132,7 @@ | ||
132 | [required]="true" | 132 | [required]="true" |
133 | [entityType]="entityType.EDGE"> | 133 | [entityType]="entityType.EDGE"> |
134 | </tb-entity-subtype-autocomplete> | 134 | </tb-entity-subtype-autocomplete> |
135 | - <div [fxShow]="edgeScope === 'tenant'"> | 135 | + <div [fxShow]="(edgeScope === 'tenant' || edgeScope === 'customer')"> |
136 | <div class="tb-hint" [innerHTML]="'edge.edge-license-key-hint' | translate"></div> | 136 | <div class="tb-hint" [innerHTML]="'edge.edge-license-key-hint' | translate"></div> |
137 | <mat-form-field class="mat-block"> | 137 | <mat-form-field class="mat-block"> |
138 | <mat-label translate>edge.edge-license-key</mat-label> | 138 | <mat-label translate>edge.edge-license-key</mat-label> |
@@ -142,7 +142,7 @@ | @@ -142,7 +142,7 @@ | ||
142 | </mat-error> | 142 | </mat-error> |
143 | </mat-form-field> | 143 | </mat-form-field> |
144 | </div> | 144 | </div> |
145 | - <div [fxShow]="edgeScope === 'tenant'"> | 145 | + <div [fxShow]="(edgeScope === 'tenant' || edgeScope === 'customer')"> |
146 | <div translate class="tb-hint">edge.cloud-endpoint-hint</div> | 146 | <div translate class="tb-hint">edge.cloud-endpoint-hint</div> |
147 | <mat-form-field class="mat-block"> | 147 | <mat-form-field class="mat-block"> |
148 | <mat-label translate>edge.cloud-endpoint</mat-label> | 148 | <mat-label translate>edge.cloud-endpoint</mat-label> |
@@ -153,7 +153,7 @@ | @@ -153,7 +153,7 @@ | ||
153 | </mat-form-field> | 153 | </mat-form-field> |
154 | </div> | 154 | </div> |
155 | </fieldset> | 155 | </fieldset> |
156 | - <div fxLayout="row" [fxShow]="edgeScope === 'tenant'"> | 156 | + <div fxLayout="row" [fxShow]="(edgeScope === 'tenant' || edgeScope === 'customer')"> |
157 | <mat-form-field class="mat-block" fxFlex> | 157 | <mat-form-field class="mat-block" fxFlex> |
158 | <mat-label translate>edge.edge-key</mat-label> | 158 | <mat-label translate>edge.edge-key</mat-label> |
159 | <input matInput formControlName="routingKey"> | 159 | <input matInput formControlName="routingKey"> |
@@ -164,7 +164,7 @@ | @@ -164,7 +164,7 @@ | ||
164 | <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> | 164 | <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> |
165 | </button> | 165 | </button> |
166 | </div> | 166 | </div> |
167 | - <div fxLayout="row" [fxShow]="edgeScope === 'tenant'"> | 167 | + <div fxLayout="row" [fxShow]="(edgeScope === 'tenant' || edgeScope === 'customer')"> |
168 | <mat-form-field class="mat-block" fxFlex> | 168 | <mat-form-field class="mat-block" fxFlex> |
169 | <mat-label translate>edge.edge-secret</mat-label> | 169 | <mat-label translate>edge.edge-secret</mat-label> |
170 | <input matInput formControlName="secret"> | 170 | <input matInput formControlName="secret"> |
@@ -1234,6 +1234,8 @@ | @@ -1234,6 +1234,8 @@ | ||
1234 | "assign-to-customer-text": "Please select the customer to assign the edge(s)", | 1234 | "assign-to-customer-text": "Please select the customer to assign the edge(s)", |
1235 | "assign-edge-to-customer": "Assign Edge(s) To Customer", | 1235 | "assign-edge-to-customer": "Assign Edge(s) To Customer", |
1236 | "assign-edge-to-customer-text": "Please select the edges to assign to the customer", | 1236 | "assign-edge-to-customer-text": "Please select the edges to assign to the customer", |
1237 | + "assignedToCustomer": "Assigned to customer", | ||
1238 | + "edge-public": "Edge is public", | ||
1237 | "assigned-to-customer": "Assigned to: {{customerTitle}}", | 1239 | "assigned-to-customer": "Assigned to: {{customerTitle}}", |
1238 | "unassign-from-customer": "Unassign from customer", | 1240 | "unassign-from-customer": "Unassign from customer", |
1239 | "assign-edges-text": "Assign { count, plural, 1 {1 edge} other {# edges} } to customer", | 1241 | "assign-edges-text": "Assign { count, plural, 1 {1 edge} other {# edges} } to customer", |