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