@c8y/ng1-modules 1018.481.0 → 1018.482.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICES +2393 -453
- package/core/cumulocity.json +1 -0
- package/core/ui/directives/keyShortcut.js +1 -0
- package/core/ui/properties/propertiesLibrary.service.js +1 -1
- package/core/ui/views/auditList.html +39 -17
- package/core/ui/views/editRetentionRuleModal.html +17 -8
- package/enterpriseEdition/customBranding/brandingConfigurationForm.html +2 -0
- package/kpi/views/linearGauge.html +6 -4
- package/measurements/measurements2/chart.controller.js +1 -1
- package/package.json +1 -1
- package/roles/detail/roleDetailGlobal.html +2 -0
- package/tenants/views/detail.html +178 -74
- package/users/userListView/userListView.html +2 -0
- package/devicemanagement-location/controllers/location.js +0 -1
- package/devicemanagement-location/cumulocity.json +0 -24
- package/devicemanagement-location/img/location-widget-pr.png +0 -0
- package/devicemanagement-location/index.js +0 -1
- package/devicemanagement-location/style.css +0 -8
- package/devicemanagement-location/views/component.html +0 -11
- package/devicemanagement-location/views/index.html +0 -163
|
@@ -1,38 +1,50 @@
|
|
|
1
1
|
<c8y-breadcrumbs-set>
|
|
2
2
|
<c8y-breadcrumbs-item
|
|
3
|
+
icon="c8y-sub-tenants"
|
|
3
4
|
path="#tenants"
|
|
4
5
|
label="{{ 'Subtenants' | translate }}"
|
|
5
|
-
icon="c8y-sub-tenants"
|
|
6
6
|
></c8y-breadcrumbs-item>
|
|
7
7
|
<c8y-breadcrumbs-item
|
|
8
|
-
label="{{ 'Tenants' | translate }}"
|
|
9
8
|
icon="c8y-sub-tenants"
|
|
9
|
+
label="{{ 'Tenants' | translate }}"
|
|
10
10
|
></c8y-breadcrumbs-item>
|
|
11
11
|
</c8y-breadcrumbs-set>
|
|
12
12
|
|
|
13
|
-
<form
|
|
13
|
+
<form
|
|
14
|
+
name="tenantForm"
|
|
15
|
+
autocomplete="off"
|
|
16
|
+
novalidate
|
|
17
|
+
>
|
|
14
18
|
<div class="card content-fullpage d-grid grid__col--8-4--md">
|
|
15
19
|
<div class="inner-scroll bg-level-0">
|
|
16
20
|
<div class="card-header separator large-padding sticky-top">
|
|
17
|
-
<div
|
|
21
|
+
<div
|
|
22
|
+
class="card-title"
|
|
23
|
+
translate
|
|
24
|
+
>
|
|
25
|
+
Identification
|
|
26
|
+
</div>
|
|
18
27
|
</div>
|
|
19
28
|
<div class="card-block large-padding">
|
|
20
|
-
<div
|
|
29
|
+
<div
|
|
30
|
+
class="form-group"
|
|
31
|
+
ng-if="!isNew || ((!isNew || !host) && !isEnterpriseEditionTenant)"
|
|
32
|
+
>
|
|
21
33
|
<label translate>ID</label>
|
|
22
34
|
<input
|
|
23
|
-
type="text"
|
|
24
35
|
class="form-control"
|
|
25
|
-
ng-model="tenant.id"
|
|
26
|
-
name="id"
|
|
27
36
|
placeholder="{{ 'e.g. my-tenant`used in URL`' | translate }}"
|
|
37
|
+
name="id"
|
|
38
|
+
type="text"
|
|
28
39
|
required
|
|
40
|
+
ng-model="tenant.id"
|
|
29
41
|
ng-pattern="validation.tenantId.pattern"
|
|
30
42
|
ng-maxlength="32"
|
|
31
43
|
ng-disabled="!isNew"
|
|
32
44
|
/>
|
|
33
45
|
<span
|
|
34
|
-
ng-if="isNew && !(tenantForm.id.$touched && tenantForm.id.$invalid)"
|
|
35
46
|
class="help-block"
|
|
47
|
+
ng-if="isNew && !(tenantForm.id.$touched && tenantForm.id.$invalid)"
|
|
36
48
|
>
|
|
37
49
|
{{ tenantIdDomainHelpText | translate }}
|
|
38
50
|
</span>
|
|
@@ -43,16 +55,19 @@
|
|
|
43
55
|
</c8y-error-feedback>
|
|
44
56
|
</div>
|
|
45
57
|
|
|
46
|
-
<div
|
|
58
|
+
<div
|
|
59
|
+
class="form-group"
|
|
60
|
+
ng-if="isNew && host"
|
|
61
|
+
>
|
|
47
62
|
<label translate>Domain/URL</label>
|
|
48
63
|
<div class="input-group">
|
|
49
64
|
<input
|
|
50
|
-
type="text"
|
|
51
65
|
class="form-control"
|
|
52
|
-
ng-model="tenant.id"
|
|
53
|
-
name="id"
|
|
54
66
|
placeholder="{{ 'e.g. my-tenant`used in URL`' | translate }}"
|
|
67
|
+
name="id"
|
|
68
|
+
type="text"
|
|
55
69
|
required
|
|
70
|
+
ng-model="tenant.id"
|
|
56
71
|
ng-pattern="validation.tenantId.pattern"
|
|
57
72
|
ng-maxlength="32"
|
|
58
73
|
/>
|
|
@@ -60,7 +75,10 @@
|
|
|
60
75
|
{{ host }}
|
|
61
76
|
</span>
|
|
62
77
|
</div>
|
|
63
|
-
<span
|
|
78
|
+
<span
|
|
79
|
+
class="help-block"
|
|
80
|
+
ng-if="!(tenantForm.id.$touched && tenantForm.id.$invalid)"
|
|
81
|
+
>
|
|
64
82
|
{{ tenantIdDomainHelpText | translate }}
|
|
65
83
|
</span>
|
|
66
84
|
<c8y-error-feedback field="tenantForm.id">
|
|
@@ -70,22 +88,25 @@
|
|
|
70
88
|
</c8y-error-feedback>
|
|
71
89
|
</div>
|
|
72
90
|
|
|
73
|
-
<div
|
|
91
|
+
<div
|
|
92
|
+
class="form-group"
|
|
93
|
+
ng-if="!isNew || !host"
|
|
94
|
+
>
|
|
74
95
|
<label translate>Domain/URL</label>
|
|
75
96
|
<input
|
|
76
|
-
type="text"
|
|
77
97
|
class="form-control"
|
|
78
|
-
ng-model="tenant.domain"
|
|
79
|
-
name="domain"
|
|
80
98
|
placeholder="{{ 'e.g. my-tenant.example.com' | translate }}"
|
|
99
|
+
name="domain"
|
|
100
|
+
type="text"
|
|
81
101
|
required
|
|
102
|
+
ng-model="tenant.domain"
|
|
82
103
|
ng-pattern="validation.domain.pattern"
|
|
83
104
|
ng-maxlength="256"
|
|
84
105
|
ng-disabled="!isNew"
|
|
85
106
|
/>
|
|
86
107
|
<span
|
|
87
|
-
ng-if="isNew && !(tenantForm.id.$touched && tenantForm.id.$invalid)"
|
|
88
108
|
class="help-block"
|
|
109
|
+
ng-if="isNew && !(tenantForm.id.$touched && tenantForm.id.$invalid)"
|
|
89
110
|
>
|
|
90
111
|
{{ tenantIdDomainHelpText | translate }}
|
|
91
112
|
</span>
|
|
@@ -99,25 +120,30 @@
|
|
|
99
120
|
<div class="form-group">
|
|
100
121
|
<label translate>Name</label>
|
|
101
122
|
<input
|
|
102
|
-
type="text"
|
|
103
123
|
class="form-control"
|
|
104
|
-
ng-model="tenant.company"
|
|
105
|
-
name="company"
|
|
106
124
|
placeholder="{{ 'e.g. Company A' | translate }}"
|
|
125
|
+
name="company"
|
|
126
|
+
type="text"
|
|
107
127
|
required
|
|
128
|
+
ng-model="tenant.company"
|
|
108
129
|
ng-maxlength="256"
|
|
109
130
|
/>
|
|
110
131
|
<c8y-error-feedback field="tenantForm.company"></c8y-error-feedback>
|
|
111
132
|
</div>
|
|
112
133
|
|
|
113
134
|
<div class="form-group">
|
|
114
|
-
<label
|
|
135
|
+
<label
|
|
136
|
+
for="contactName"
|
|
137
|
+
translate
|
|
138
|
+
>
|
|
139
|
+
Contact name
|
|
140
|
+
</label>
|
|
115
141
|
<input
|
|
116
|
-
type="text"
|
|
117
142
|
class="form-control"
|
|
118
|
-
ng-model="tenant.contactName"
|
|
119
|
-
name="contactName"
|
|
120
143
|
id="contactName"
|
|
144
|
+
name="contactName"
|
|
145
|
+
type="text"
|
|
146
|
+
ng-model="tenant.contactName"
|
|
121
147
|
ng-maxlength="30"
|
|
122
148
|
/>
|
|
123
149
|
<c8y-error-feedback field="tenantForm.contactName"></c8y-error-feedback>
|
|
@@ -126,13 +152,13 @@
|
|
|
126
152
|
<div class="form-group">
|
|
127
153
|
<label translate>Contact phone</label>
|
|
128
154
|
<input
|
|
129
|
-
type="text"
|
|
130
155
|
class="form-control"
|
|
156
|
+
placeholder="{{ 'e.g. +49 9 876 543 210`LOCALIZE`' | translate }}"
|
|
157
|
+
name="contactPhone"
|
|
158
|
+
type="text"
|
|
131
159
|
c8y-autocomplete="off"
|
|
132
160
|
c8y-phone-number
|
|
133
161
|
ng-model="tenant.contactPhone"
|
|
134
|
-
placeholder="{{ 'e.g. +49 9 876 543 210`LOCALIZE`' | translate }}"
|
|
135
|
-
name="contactPhone"
|
|
136
162
|
ng-required="true"
|
|
137
163
|
ng-maxlength="20"
|
|
138
164
|
/>
|
|
@@ -142,13 +168,13 @@
|
|
|
142
168
|
<div class="form-group">
|
|
143
169
|
<label><span translate>Administrator's email</span></label>
|
|
144
170
|
<input
|
|
145
|
-
type="email"
|
|
146
171
|
class="form-control"
|
|
172
|
+
placeholder="{{ 'e.g. joe.doe@example.com`LOCALIZE`' | translate }}"
|
|
147
173
|
name="adminEmail"
|
|
174
|
+
type="email"
|
|
148
175
|
ng-model="tenant.adminEmail"
|
|
149
176
|
ng-maxlength="256"
|
|
150
177
|
c8y-autocomplete="off"
|
|
151
|
-
placeholder="{{ 'e.g. joe.doe@example.com`LOCALIZE`' | translate }}"
|
|
152
178
|
ng-required="true"
|
|
153
179
|
ng-disabled="!isNew && !tenant.adminName"
|
|
154
180
|
/>
|
|
@@ -158,12 +184,12 @@
|
|
|
158
184
|
<div class="form-group">
|
|
159
185
|
<label><span translate>Administrator's username</span></label>
|
|
160
186
|
<input
|
|
161
|
-
type="text"
|
|
162
187
|
class="form-control"
|
|
188
|
+
placeholder="{{ 'e.g. joe`LOCALIZE`' | translate }}"
|
|
163
189
|
name="adminName"
|
|
190
|
+
type="text"
|
|
164
191
|
ng-model="tenant.adminName"
|
|
165
192
|
ng-maxlength="256"
|
|
166
|
-
placeholder="{{ 'e.g. joe`LOCALIZE`' | translate }}"
|
|
167
193
|
ng-required="true"
|
|
168
194
|
ng-disabled="!isNew"
|
|
169
195
|
ng-pattern="validation.user.pattern"
|
|
@@ -176,12 +202,18 @@
|
|
|
176
202
|
</c8y-error-feedback>
|
|
177
203
|
</div>
|
|
178
204
|
|
|
179
|
-
<div
|
|
180
|
-
|
|
205
|
+
<div
|
|
206
|
+
class="form-group"
|
|
207
|
+
ng-if="isNew"
|
|
208
|
+
>
|
|
209
|
+
<label
|
|
210
|
+
class="c8y-checkbox"
|
|
211
|
+
title="{{ 'Send password reset link as email' | translate }}"
|
|
212
|
+
>
|
|
181
213
|
<input
|
|
214
|
+
name="sendPasswordResetEmail"
|
|
182
215
|
type="checkbox"
|
|
183
216
|
ng-model="tenant.sendPasswordResetEmail"
|
|
184
|
-
name="sendPasswordResetEmail"
|
|
185
217
|
ng-click="tenant.adminPass = null; $parent.confirmPassword = null;"
|
|
186
218
|
/>
|
|
187
219
|
<span></span>
|
|
@@ -190,33 +222,45 @@
|
|
|
190
222
|
</div>
|
|
191
223
|
|
|
192
224
|
<div ng-if="!tenant.sendPasswordResetEmail">
|
|
193
|
-
<div
|
|
225
|
+
<div
|
|
226
|
+
class="form-group"
|
|
227
|
+
ng-if="!isNew"
|
|
228
|
+
>
|
|
194
229
|
<button
|
|
195
|
-
type="button"
|
|
196
230
|
class="btn btn-default change-password-btn"
|
|
231
|
+
type="button"
|
|
197
232
|
ng-click="resetPassword()"
|
|
198
233
|
>
|
|
199
|
-
<div
|
|
234
|
+
<div
|
|
235
|
+
title="{{ 'Change password' | translate }}"
|
|
236
|
+
ng-if="!changePassword"
|
|
237
|
+
>
|
|
200
238
|
{{ 'Change password' | translate }}
|
|
201
239
|
</div>
|
|
202
|
-
<div
|
|
240
|
+
<div
|
|
241
|
+
title="{{ 'Cancel password change' | translate }}"
|
|
242
|
+
ng-if="changePassword"
|
|
243
|
+
>
|
|
203
244
|
{{ 'Cancel password change' | translate }}
|
|
204
245
|
</div>
|
|
205
246
|
</button>
|
|
206
247
|
</div>
|
|
207
248
|
|
|
208
|
-
<div
|
|
249
|
+
<div
|
|
250
|
+
class="row content-flex-50"
|
|
251
|
+
ng-if="isNew || changePassword"
|
|
252
|
+
>
|
|
209
253
|
<div class="col-7">
|
|
210
254
|
<div class="form-group">
|
|
211
255
|
<label><span translate>Administrator's password</span></label>
|
|
212
256
|
<input
|
|
213
|
-
type="password"
|
|
214
257
|
class="form-control"
|
|
258
|
+
name="adminPass"
|
|
259
|
+
type="password"
|
|
260
|
+
required
|
|
215
261
|
ng-model="tenant.adminPass"
|
|
216
262
|
ng-change="changePasswordConfirm()"
|
|
217
|
-
name="adminPass"
|
|
218
263
|
ng-pattern="validation.password.pattern"
|
|
219
|
-
required
|
|
220
264
|
ng-disabled="!isNew && !tenant.adminName"
|
|
221
265
|
c8y-autocomplete="off"
|
|
222
266
|
/>
|
|
@@ -224,26 +268,37 @@
|
|
|
224
268
|
<span ng-message="pattern">
|
|
225
269
|
{{ validation.password.message | translate }}
|
|
226
270
|
</span>
|
|
227
|
-
<span
|
|
271
|
+
<span
|
|
272
|
+
ng-message="password-strength"
|
|
273
|
+
translate
|
|
274
|
+
>
|
|
228
275
|
Password not good enough, password must be stronger (green).
|
|
229
276
|
</span>
|
|
230
277
|
</c8y-error-feedback>
|
|
231
278
|
</div>
|
|
232
279
|
|
|
233
|
-
<div
|
|
280
|
+
<div
|
|
281
|
+
class="form-group"
|
|
282
|
+
ng-if="shouldDisplayConfirmPassword()"
|
|
283
|
+
>
|
|
234
284
|
<label translate>Confirm password</label>
|
|
235
285
|
<input
|
|
236
|
-
ng-init="$parent.confirmPassword = ''"
|
|
237
|
-
type="password"
|
|
238
|
-
name="confirmPassword"
|
|
239
286
|
class="form-control"
|
|
240
|
-
|
|
287
|
+
name="confirmPassword"
|
|
288
|
+
type="password"
|
|
241
289
|
required
|
|
290
|
+
ng-init="$parent.confirmPassword = ''"
|
|
291
|
+
ng-model="$parent.confirmPassword"
|
|
242
292
|
ng-change="changePasswordConfirm()"
|
|
243
293
|
c8y-autocomplete="off"
|
|
244
294
|
/>
|
|
245
295
|
<c8y-error-feedback field="tenantForm.confirmPassword">
|
|
246
|
-
<span
|
|
296
|
+
<span
|
|
297
|
+
ng-message="password-mismatch"
|
|
298
|
+
translate
|
|
299
|
+
>
|
|
300
|
+
Passwords do not match.
|
|
301
|
+
</span>
|
|
247
302
|
</c8y-error-feedback>
|
|
248
303
|
</div>
|
|
249
304
|
</div>
|
|
@@ -253,7 +308,10 @@
|
|
|
253
308
|
user="passwordStrengthUser"
|
|
254
309
|
password="tenant.adminPass"
|
|
255
310
|
></div>
|
|
256
|
-
<div
|
|
311
|
+
<div
|
|
312
|
+
class="m-t-32"
|
|
313
|
+
ng-if="passwordStrengthEnforced"
|
|
314
|
+
>
|
|
257
315
|
<c8y-password-strength-checklist
|
|
258
316
|
password="tenantForm.adminPass.$viewValue"
|
|
259
317
|
></c8y-password-strength-checklist>
|
|
@@ -262,13 +320,16 @@
|
|
|
262
320
|
</div>
|
|
263
321
|
</div>
|
|
264
322
|
|
|
265
|
-
<div
|
|
323
|
+
<div
|
|
324
|
+
class="form-group"
|
|
325
|
+
ng-if="storageLimitation.storageLimitFeatureEnabled"
|
|
326
|
+
>
|
|
266
327
|
<div class="checkbox">
|
|
267
328
|
<label title="{{ 'Limit storage per device' | translate }}">
|
|
268
329
|
<input
|
|
330
|
+
name="storageLimitPerDeviceEnabled"
|
|
269
331
|
type="checkbox"
|
|
270
332
|
ng-model="storageLimitation.storageLimitPerDeviceEnabled"
|
|
271
|
-
name="storageLimitPerDeviceEnabled"
|
|
272
333
|
/>
|
|
273
334
|
<span></span>
|
|
274
335
|
<span>{{ 'Limit storage per device' | translate }}</span>
|
|
@@ -283,27 +344,35 @@
|
|
|
283
344
|
storageLimitation.storageLimitPerDeviceEnabled
|
|
284
345
|
"
|
|
285
346
|
>
|
|
286
|
-
<label
|
|
347
|
+
<label
|
|
348
|
+
class="m-r-8"
|
|
349
|
+
translate
|
|
350
|
+
>
|
|
351
|
+
Storage limit per device (MB)
|
|
352
|
+
</label>
|
|
287
353
|
<input
|
|
354
|
+
class="form-control"
|
|
288
355
|
style="max-width: 300px"
|
|
356
|
+
placeholder="{{ 'e.g.' | translate }} 256"
|
|
357
|
+
name="storageLimitPerDevice"
|
|
289
358
|
type="number"
|
|
290
|
-
|
|
359
|
+
required
|
|
291
360
|
ng-model="tenant.storageLimitPerDevice"
|
|
292
|
-
name="storageLimitPerDevice"
|
|
293
361
|
min="1"
|
|
294
362
|
max="{{ maxStorageLimitPerDevice }}"
|
|
295
|
-
placeholder="{{ 'e.g.' | translate }} 256"
|
|
296
|
-
required
|
|
297
363
|
/>
|
|
298
364
|
<c8y-error-feedback field="tenantForm.storageLimitPerDevice"></c8y-error-feedback>
|
|
299
365
|
</div>
|
|
300
366
|
|
|
301
|
-
<div
|
|
367
|
+
<div
|
|
368
|
+
class="form-group"
|
|
369
|
+
ng-if="selectTenantPolicy"
|
|
370
|
+
>
|
|
302
371
|
<label translate>Tenant policy</label>
|
|
303
372
|
<div class="c8y-select-wrapper">
|
|
304
373
|
<select
|
|
305
|
-
title="{{ 'Tenant policy' | translate }}"
|
|
306
374
|
class="form-control"
|
|
375
|
+
title="{{ 'Tenant policy' | translate }}"
|
|
307
376
|
name="tenantPolicyId"
|
|
308
377
|
ng-model="tenant.tenantPolicyId"
|
|
309
378
|
ng-options="policy.id as policy.name for policy in tenantPolicies"
|
|
@@ -312,16 +381,29 @@
|
|
|
312
381
|
</div>
|
|
313
382
|
</div>
|
|
314
383
|
|
|
315
|
-
<div
|
|
316
|
-
|
|
317
|
-
|
|
384
|
+
<div
|
|
385
|
+
class="form-group"
|
|
386
|
+
ng-if="shouldShowSubtenantCheckbox()"
|
|
387
|
+
>
|
|
388
|
+
<label
|
|
389
|
+
class="c8y-checkbox"
|
|
390
|
+
title="{{ 'Allow creation of subtenants' | translate }}"
|
|
391
|
+
>
|
|
392
|
+
<input
|
|
393
|
+
name="allowCreateTenants"
|
|
394
|
+
type="checkbox"
|
|
395
|
+
ng-model="tenant.allowCreateTenants"
|
|
396
|
+
/>
|
|
318
397
|
<span></span>
|
|
319
398
|
<span>{{ 'Allow creation of subtenants' | translate }}</span>
|
|
320
399
|
</label>
|
|
321
400
|
</div>
|
|
322
401
|
</div>
|
|
323
402
|
</div>
|
|
324
|
-
<div
|
|
403
|
+
<div
|
|
404
|
+
class="inner-scroll bg-level-1"
|
|
405
|
+
ng-if="!isNew"
|
|
406
|
+
>
|
|
325
407
|
<div class="card-header separator sticky-top large-padding">
|
|
326
408
|
<div class="card-title fit-w">
|
|
327
409
|
<i
|
|
@@ -331,12 +413,12 @@
|
|
|
331
413
|
{{ 'Support user access' | translate }}
|
|
332
414
|
</div>
|
|
333
415
|
<a
|
|
416
|
+
class="btn btn-default btn-xs"
|
|
417
|
+
title="{{ 'Log in' | translate }}"
|
|
334
418
|
target="_blank"
|
|
335
419
|
rel="noopener noreferrer"
|
|
336
|
-
class="btn btn-default btn-xs"
|
|
337
420
|
ng-if="tenant.supportUser.enabled && supportUser && isTopTenant"
|
|
338
421
|
ng-href="//{{ tenant.domain }}/apps/administration/?user={{ supportUser }}"
|
|
339
|
-
title="{{ 'Log in' | translate }}"
|
|
340
422
|
>
|
|
341
423
|
<i c8y-icon="external-link"></i>
|
|
342
424
|
{{ 'Log in' | translate }}
|
|
@@ -347,12 +429,24 @@
|
|
|
347
429
|
<label>{{ 'Status' | translate }}</label>
|
|
348
430
|
<div>
|
|
349
431
|
<p class="form-control-static">
|
|
350
|
-
<span
|
|
351
|
-
|
|
432
|
+
<span
|
|
433
|
+
title="{{ 'Disabled' | translate }}"
|
|
434
|
+
ng-if="!tenant.supportUser.enabled"
|
|
435
|
+
>
|
|
436
|
+
<i
|
|
437
|
+
class="text-danger"
|
|
438
|
+
c8y-icon="ban"
|
|
439
|
+
></i>
|
|
352
440
|
{{ 'Disabled' | translate }}
|
|
353
441
|
</span>
|
|
354
|
-
<span
|
|
355
|
-
|
|
442
|
+
<span
|
|
443
|
+
title="{{ 'Enabled' | translate }}"
|
|
444
|
+
ng-if="tenant.supportUser.enabled"
|
|
445
|
+
>
|
|
446
|
+
<i
|
|
447
|
+
class="text-success"
|
|
448
|
+
c8y-icon="check-circle"
|
|
449
|
+
></i>
|
|
356
450
|
{{ 'Enabled' | translate }}
|
|
357
451
|
</span>
|
|
358
452
|
</p>
|
|
@@ -377,7 +471,10 @@
|
|
|
377
471
|
</span>
|
|
378
472
|
</p>
|
|
379
473
|
</div>
|
|
380
|
-
<div
|
|
474
|
+
<div
|
|
475
|
+
class="form-group"
|
|
476
|
+
ng-if="tenant.supportUser.enabled"
|
|
477
|
+
>
|
|
381
478
|
<label>{{ 'Expiry date' | translate }}</label>
|
|
382
479
|
<div>
|
|
383
480
|
<p class="form-control-static">
|
|
@@ -391,12 +488,19 @@
|
|
|
391
488
|
</div>
|
|
392
489
|
</div>
|
|
393
490
|
<div class="card-footer separator large-padding grid__col--fullspan">
|
|
394
|
-
<button
|
|
491
|
+
<button
|
|
492
|
+
class="btn btn-default"
|
|
493
|
+
title="{{ 'Cancel' | translate }}"
|
|
494
|
+
type="button"
|
|
495
|
+
ng-click="cancel()"
|
|
496
|
+
c8y-key-shortcut="Escape"
|
|
497
|
+
>
|
|
395
498
|
{{ 'Cancel' | translate }}
|
|
396
499
|
</button>
|
|
397
500
|
<button
|
|
398
|
-
title="{{ 'Save' | translate }}"
|
|
399
501
|
class="btn btn-primary save-tenant-prop"
|
|
502
|
+
title="{{ 'Save' | translate }}"
|
|
503
|
+
type="submit"
|
|
400
504
|
ng-click="save(tenant, tenantForm)"
|
|
401
505
|
ng-show="tenant"
|
|
402
506
|
ng-disabled="tenantForm.$invalid || !tenantForm.$dirty || saveInProgress"
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
type="button"
|
|
48
48
|
class="btn btn-default"
|
|
49
49
|
ng-click="vm.applyFilters()"
|
|
50
|
+
c8y-key-shortcut="Enter"
|
|
50
51
|
>
|
|
51
52
|
<i c8y-icon="filter"></i>
|
|
52
53
|
<span class="hidden-sm" translate>Apply`filters`</span>
|
|
@@ -57,6 +58,7 @@
|
|
|
57
58
|
class="m-l-0 btn btn-default"
|
|
58
59
|
ng-click="vm.clearFilters()"
|
|
59
60
|
ng-show="vm.isAnyFilterSelected()"
|
|
61
|
+
c8y-key-shortcut="Escape"
|
|
60
62
|
>
|
|
61
63
|
<i c8y-icon="times"></i>
|
|
62
64
|
<span class="hidden-sm" translate>Clear`filters`</span>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";!function(){function e(t,n,e,a,i,o,l,c,d){var r,s,u="c8y_Position",g="com_nsn_startups_vendme_fragments_GPSCoordinates",f={},m={icon:{type:"div",className:"normal-marker-icon",iconSize:[25,41],iconAnchor:[12.5,41]},focus:!0,draggable:!0};function v(e){d.getMap("locationId").then(function(e){setTimeout(function(){e.invalidateSize(!0)},500)}),r=e,t.location=A(e)||{};var n,e=t.location;b(t.location),s=_.clone(e),(n=e).lat&&n.lng&&$(e)}function b(e){var n=_.get(e,"lat"),t=_.get(e,"lng"),a=_.get(e,"alt");_.set(e,"lat",_.toNumber(n)),_.set(e,"lng",_.toNumber(t)),_.isUndefined(a)||_.set(e,"alt",_.toNumber(a))}function h(e){var e=e&&e.latLng;e&&($(e={lat:Number(e.lat),lng:Number(e.lng),zoom:17}),C(e),D(e))}function p(){var e;i.detailCached(((e=_.get(t,"child.config.device"))&&(m.draggable=!1),_.get(e,"id",n.deviceId))).then(function(e){return _.cloneDeep(e.data)}).then(v)}function $(e){_.assign(m,{lat:parseFloat(e.lat),lng:parseFloat(e.lng)}),D(f.main=m)}function C(e){_.assign(t.location,{lat:parseFloat(e.lat),lng:(e=parseFloat(e.lng),(e%=360)<-180?360+e:180<e?e-360:e)})}function y(e){return i.isVendme(e)?g:u}function A(e){return e[y(e)]}function D(e){e=e||m;_.assign(t.center,e)}_.assign(t,{settings:{},markers:f,mapDefaults:{scrollWheelZoom:!1},centerMap:D,center:{lat:0,lng:0,zoom:11},pattern:{latitude:/^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?)$/,longitude:/^[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$/,altitude:/^[-+]?(0|([1-9]\d*))(\.\d+)?$/},events:{markers:{enable:["dragend"]}},gotoAddress:function(e){a.geoCode(e).then(function(e){e=_.get(e,"data.results[0].locations[0]");return e||l.warning(c("Address could not be found.")),e||null}).then(h)},cancel:function(){t.noeditable=!t.noeditable,_.isEqual(t.location,s)||(t.location=_.clone(s))},save:function(){t.noeditable=!t.noeditable;var e={id:r.id},n=_.clone(A(r));delete n.address,e[y(r)]=n,b(e[y(r)]),i.save(e).then(function(){l.success(c("Location saved."))}).then(p)},realtimeChannel:"/managedobjects/".concat(void 0!==n.deviceId?n.deviceId:"*"),invalid:angular.bind(e,e.invalid,t),id:t.$id}),t.$on("leafletDirectiveMarker.locationId.dragend",function(e,n){C(n.model)}),t.$watch("child.config.device",p),o.addListener(t.$id,t.realtimeChannel,"".concat(t.$id,"-subscribed"),function(){p()}),o.addListener(t.$id,t.realtimeChannel,"CREATE",function(e,n){v(n)}),o.addListener(t.$id,t.realtimeChannel,"UPDATE",function(e,n){v(n)}),p()}e.$inject=["$scope","$routeParams","c8yBase","c8yGeo","c8yDevices","c8yRealtime","c8yAlert","gettext","leafletData"],angular.module("c8y.parts.location").controller("locationCtrl",e)}();
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Asset location",
|
|
3
|
-
"ngModules": [
|
|
4
|
-
"c8y.parts.location"
|
|
5
|
-
],
|
|
6
|
-
"category": "Device",
|
|
7
|
-
"icon": "home",
|
|
8
|
-
"color": "#F03F0F",
|
|
9
|
-
"description": "Define the location of an asset using a map and map-matching. This plugin contributes a new view.",
|
|
10
|
-
"css": [
|
|
11
|
-
"style.css"
|
|
12
|
-
],
|
|
13
|
-
"js": [
|
|
14
|
-
"index.js",
|
|
15
|
-
"controllers/location.js"
|
|
16
|
-
],
|
|
17
|
-
"folderName": "location",
|
|
18
|
-
"appsInclude": [
|
|
19
|
-
"devicemanagement"
|
|
20
|
-
],
|
|
21
|
-
"copy": [
|
|
22
|
-
"img/*"
|
|
23
|
-
]
|
|
24
|
-
}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";!function(){function e(e,i,t,n){var o={lat:51.2433101,lng:6.7303924};function c(e){e=e.data;return _.has(e,"c8y_Position")||_.has(e,"com_nsn_startups_vendme_fragments_GPSCoordinates")}e.when("/device/:deviceId",{name:n("Location"),templateUrl:":::PLUGIN_PATH:::/views/index.html",icon:"location-arrow",showIf:["$routeParams","c8yDevices",function(e,i){e=e.deviceId;return i.detailCached(e).then(c)}]}),i.addUrlAction({path:"/device/:deviceId/*",text:n("Add location"),icon:"location-arrow",actionBar:!0,priority:1e3,showIf:["$routeParams","c8yDevices",function(e,i){e=e.deviceId;return i.detailCached(e).then(function(e){return!c(e)})}],showIfPermissions:{adminMOs:[":deviceId"]},action:["$routeParams","$location","c8yDevices",function(e,i,t){var e=e.deviceId,n="/device/".concat(e,"/location");t.save({id:e,c8y_Position:_.cloneDeep(o)}).then(function(){i.path(n)})}]}),t.add({name:n("Location"),description:n("Displays a map with device position marker"),templateUrl:":::PLUGIN_PATH:::/views/component.html",previewImage:":::PLUGIN_PATH:::/img/location-widget-pr.png",options:{noNewWidgets:!0}})}e.$inject=["c8yViewsProvider","c8yActionsProvider","c8yComponentsProvider","gettext"],angular.module("c8y.parts.location",[]).config(e)}();
|