@c8y/ng1-modules 1018.467.0 → 1018.474.0

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.
@@ -1,121 +1,146 @@
1
1
  <div data-ng-controller="alarmMappingCtrl as vm">
2
2
  <c8y-breadcrumbs-set>
3
3
  <c8y-breadcrumbs-item
4
- label="{{ 'Alarm mapping' | translate }}"
5
4
  icon="c8y-business-rules"
5
+ label="{{ 'Alarm mapping' | translate }}"
6
6
  ></c8y-breadcrumbs-item>
7
7
  <c8y-breadcrumbs-item
8
- label="{{ 'Business rules' | translate }}"
9
8
  icon="c8y-business-rules"
9
+ label="{{ 'Business rules' | translate }}"
10
10
  ></c8y-breadcrumbs-item>
11
11
  </c8y-breadcrumbs-set>
12
12
 
13
13
  <c8y-ui-action-bar-set>
14
- <li class="navbar-form" action-bar-position="left">
14
+ <li
15
+ class="navbar-form"
16
+ action-bar-position="left"
17
+ >
15
18
  <div class="input-group input-group-search">
16
19
  <input
17
- type="search"
18
20
  class="form-control"
19
21
  placeholder="{{ 'Filter' | translate }}…"
22
+ type="search"
20
23
  ng-model="vm.searchString"
21
24
  />
22
25
  <span class="input-group-addon">
23
- <i c8y-icon="search" ng-if="vm.searchString.length === 0 || !vm.searchString"></i>
24
26
  <i
25
- c8y-icon="times"
27
+ c8y-icon="search"
28
+ ng-if="vm.searchString.length === 0 || !vm.searchString"
29
+ ></i>
30
+ <i
26
31
  class="text-muted"
32
+ c8y-icon="times"
27
33
  ng-if="vm.searchString.length > 0"
28
34
  ng-click="vm.searchString = ''"
29
35
  ></i>
30
36
  </span>
31
- <span class="sr-only" translate>Filter</span>
37
+ <span
38
+ class="sr-only"
39
+ translate
40
+ >
41
+ Filter
42
+ </span>
32
43
  </div>
33
44
  </li>
34
45
 
35
46
  <li>
36
- <div class="dropdown" uib-dropdown auto-close="outsideClick" is-open="status.isOpen">
47
+ <div
48
+ class="dropdown"
49
+ uib-dropdown
50
+ auto-close="outsideClick"
51
+ is-open="status.isOpen"
52
+ >
37
53
  <button
38
54
  class="dropdown-toggle c8y-dropdown"
39
- type="button"
40
55
  title="{{ 'Add alarm mapping' | translate }}"
41
- uib-dropdown-toggle
42
56
  aria-haspopup="true"
57
+ type="button"
58
+ uib-dropdown-toggle
43
59
  >
44
60
  <span>
45
61
  <i c8y-icon="plus-circle"></i>
46
62
  {{ 'Add mapping' | translate }}
47
63
  </span>
48
64
  </button>
49
- <ul class="dropdown-menu dropdown-menu-right" uib-dropdown-menu>
65
+ <ul
66
+ class="dropdown-menu dropdown-menu-right"
67
+ uib-dropdown-menu
68
+ >
50
69
  <li class="dropdown-form">
51
- <form name="newOptionForm" novalidate>
70
+ <form
71
+ name="newOptionForm"
72
+ novalidate
73
+ >
52
74
  <p class="legend form-block m-t-8 m-b-16 hidden-sm hidden-md hidden-lg">
53
75
  {{ 'Add mapping' | translate }}
54
76
  </p>
55
77
  <div class="form-group">
56
78
  <label
57
- for="newAlarmType"
58
79
  class="text-truncate"
59
80
  title="{{ 'Alarm type to match' | translate }}"
81
+ for="newAlarmType"
60
82
  >
61
83
  {{ 'Alarm type to match' | translate }}
62
84
  </label>
63
85
  <input
64
- id="newAlarmType"
65
- type="text"
66
86
  class="form-control"
67
- ng-model="vm.newOption.key"
87
+ id="newAlarmType"
68
88
  placeholder="{{ 'e.g.' | translate }} c8y_Alarm"
89
+ type="text"
69
90
  required
91
+ ng-model="vm.newOption.key"
70
92
  />
71
93
  </div>
72
94
  <div class="form-group">
73
95
  <label
74
- for="newAlarmDescription"
75
96
  class="text-truncate"
76
97
  title="{{ 'New description' | translate }}"
98
+ for="newAlarmDescription"
77
99
  >
78
100
  {{ 'New description' | translate }}
79
101
  </label>
80
102
  <input
103
+ class="form-control"
81
104
  id="newAlarmDescription"
105
+ placeholder="{{ 'e.g. map alarm to warning' | translate }}"
82
106
  type="text"
83
- class="form-control"
84
107
  ng-model="vm.newOption.description"
85
- placeholder="{{ 'e.g. map alarm to warning' | translate }}"
86
108
  />
87
109
  </div>
88
110
  <div class="form-group">
89
- <label class="test-truncate" title="{{ 'New severity' | translate }}">
111
+ <label
112
+ class="test-truncate"
113
+ title="{{ 'New severity' | translate }}"
114
+ >
90
115
  {{ 'New severity' | translate }}
91
116
  </label>
92
117
  <label
93
- for="newSeverityValue{{ $index }}"
118
+ class="c8y-radio input-sm"
94
119
  title="{{ severity.label | translate }}"
120
+ for="newSeverityValue{{ $index }}"
95
121
  ng-repeat="severity in vm.severities.values()"
96
- class="c8y-radio input-sm"
97
122
  >
98
123
  <input
124
+ ng-class="{ active: vm.newOption.severity === severity.value }"
99
125
  id="newSeverityValue{{ $index }}"
100
- type="radio"
101
126
  name="c8y-group"
127
+ type="radio"
102
128
  value="{{ severity.value }}"
103
129
  ng-model="vm.newOption.severity"
104
- ng-class="{ active: vm.newOption.severity === severity.value }"
105
130
  />
106
131
  <span></span>
107
132
  <i
108
- c8y-icon="{{ severity.icon }}"
109
133
  ng-class="severity.class"
110
134
  class="m-r-4 m-l-4 text-16 stroked-icon"
135
+ c8y-icon="{{ severity.icon }}"
111
136
  ></i>
112
137
  <span ng-bind="severity.label | translate"></span>
113
138
  </label>
114
139
  </div>
115
140
  <button
116
141
  class="btn btn-primary"
117
- type="submit"
118
142
  title="{{ 'Add alarm mapping' | translate }}"
143
+ type="submit"
119
144
  ng-click="save(vm.newOption)"
120
145
  ng-disabled="newOptionForm.$invalid"
121
146
  >
@@ -134,10 +159,10 @@
134
159
 
135
160
  <!-- empty state -->
136
161
  <c8y-ui-empty-state
137
- ng-if="options.length === 0 && !loading"
138
162
  [icon]="'alarm'"
139
163
  [title]="'No alarm mappings to display.' | translate"
140
164
  [subtitle]="'Click the button on the action bar to add your first alarm mapping.' | translate"
165
+ ng-if="options.length === 0 && !loading"
141
166
  >
142
167
  <p c8y-guide-docs>
143
168
  <small translate>
@@ -150,10 +175,13 @@
150
175
 
151
176
  <div
152
177
  class="c8y-list__group m-b-24"
153
- ng-class="{ 'dd-low': (options | filter: vm.filter).length < 10 }"
178
+ ng-class="{ 'dd-low': (options | filter : vm.filter).length < 10 }"
154
179
  ng-if="!loading"
155
180
  >
156
- <div class="page-sticky-header c8y-list__item hidden-xs" ng-if="options.length > 0">
181
+ <div
182
+ class="page-sticky-header c8y-list__item hidden-xs"
183
+ ng-if="options.length > 0"
184
+ >
157
185
  <div class="c8y-list__item__block">
158
186
  <div class="c8y-list__item__icon">
159
187
  <i class="p-l-24"></i>
@@ -192,8 +220,8 @@
192
220
  </span>
193
221
  <button
194
222
  class="btn-clean"
195
- type="button"
196
223
  title="{{ option.key }}"
224
+ type="button"
197
225
  ng-click="isDetailExpanded = !isDetailExpanded"
198
226
  >
199
227
  {{ option.key }}
@@ -220,23 +248,26 @@
220
248
  </span>
221
249
  <div class="list-item-icon">
222
250
  <i
223
- c8y-icon="{{ icon(option.severity) }}"
224
251
  class="status stroked-icon"
225
252
  ng-class="iconClass(option.severity) | lowercase"
253
+ c8y-icon="{{ icon(option.severity) }}"
226
254
  ></i>
227
255
  </div>
228
- <span class="text-lowercase" title="{{ option.severity | translate }}">
256
+ <span
257
+ class="text-lowercase"
258
+ title="{{ option.severity | translate }}"
259
+ >
229
260
  {{ option.severity | translate }}
230
261
  </span>
231
262
  </div>
232
263
  <div class="col-2 text-right showOnHover hidden-xs">
233
264
  <button
234
265
  class="btn btn-dot btn-dot--danger d-inline-block"
235
- type="button"
236
266
  aria-label="{{ 'Delete' | translate }}"
237
267
  uib-tooltip="{{ 'Delete' | translate }}"
238
268
  tooltip-trigger="'mouseenter'"
239
269
  tooltip-popup-delay="500"
270
+ type="button"
240
271
  ng-click="onClickDelete(option)"
241
272
  >
242
273
  <i c8y-icon="minus-circle"></i>
@@ -247,8 +278,8 @@
247
278
  <div class="c8y-list__item__actions">
248
279
  <button
249
280
  class="collapse-btn"
250
- type="button"
251
281
  title="{{ 'Expand' | translate }}"
282
+ type="button"
252
283
  ng-click="isDetailExpanded = !isDetailExpanded"
253
284
  >
254
285
  <i c8y-icon="chevron-down"></i>
@@ -262,62 +293,68 @@
262
293
  data-ng-init="optionToEdit = getOptionCopy(option)"
263
294
  >
264
295
  <div class="c8y-list__item__collapse--container">
265
- <form name="optionForm" novalidate>
296
+ <form
297
+ name="optionForm"
298
+ novalidate
299
+ >
266
300
  <div class="row">
267
301
  <div class="form-group col-md-3">
268
302
  <label
269
- for="alarmType{{ $index }}"
270
303
  class="text-truncate"
271
304
  title="{{ 'Alarm type to match' | translate }}"
305
+ for="alarmType{{ $index }}"
272
306
  >
273
307
  {{ 'Alarm type to match' | translate }}
274
308
  </label>
275
309
  <input
310
+ class="form-control"
276
311
  id="alarmType{{ $index }}"
277
312
  type="text"
278
- class="form-control"
279
- ng-model="optionToEdit.key"
280
313
  disabled
314
+ ng-model="optionToEdit.key"
281
315
  />
282
316
  </div>
283
317
  <div class="form-group col-md-3">
284
318
  <label
285
- for="alarmDescription{{ $index }}"
286
319
  class="text-truncate"
287
320
  title="{{ 'New description' | translate }}"
321
+ for="alarmDescription{{ $index }}"
288
322
  >
289
323
  {{ 'New description' | translate }}
290
324
  </label>
291
325
  <input
326
+ class="form-control"
292
327
  id="alarmDescription{{ $index }}"
293
328
  type="text"
294
- class="form-control"
295
329
  ng-model="optionToEdit.description"
296
330
  />
297
331
  </div>
298
332
  <div class="form-group col-md-6">
299
- <label class="text-truncate" title="{{ 'New severity' | translate }}">
333
+ <label
334
+ class="text-truncate"
335
+ title="{{ 'New severity' | translate }}"
336
+ >
300
337
  {{ 'New severity' | translate }}
301
338
  </label>
302
339
  <div class="d-flex-sm flex-wrap">
303
340
  <label
304
- title="{{ severity.label | translate }}"
305
- ng-repeat="severity in severities.values()"
306
341
  class="c8y-radio input-sm"
307
342
  ng-class="{ 'p-r-16': !$last }"
343
+ title="{{ severity.label | translate }}"
344
+ ng-repeat="severity in severities.values()"
308
345
  >
309
346
  <input
310
- type="radio"
347
+ ng-class="{ active: optionToEdit.severity === severity.value }"
311
348
  name="c8y-group"
349
+ type="radio"
312
350
  value="{{ severity.value }}"
313
351
  ng-model="optionToEdit.severity"
314
- ng-class="{ active: optionToEdit.severity === severity.value }"
315
352
  />
316
353
  <span></span>
317
354
  <i
318
- c8y-icon="{{ severity.icon }}"
319
355
  ng-class="severity.class"
320
356
  class="text-16 m-r-4 m-l-4 stroked-icon"
357
+ c8y-icon="{{ severity.icon }}"
321
358
  ></i>
322
359
  <span
323
360
  title="{{ severity.label | translate }}"
@@ -329,8 +366,8 @@
329
366
  </div>
330
367
  <button
331
368
  class="btn btn-danger visible-xs-inline-block"
332
- type="button"
333
369
  title="{{ 'Delete' | translate }}"
370
+ type="button"
334
371
  ng-click="onClickDelete(option)"
335
372
  >
336
373
  <i c8y-icon="delete"></i>
@@ -339,8 +376,8 @@
339
376
  <span></span>
340
377
  <button
341
378
  class="btn btn-primary"
342
- type="submit"
343
379
  title="{{ 'Save' | translate }}"
380
+ type="submit"
344
381
  ng-click="save(optionToEdit)"
345
382
  ng-disabled="optionForm.$invalid || optionForm.$pristine"
346
383
  >
@@ -354,10 +391,10 @@
354
391
 
355
392
  <!-- no results empty state -->
356
393
  <c8y-ui-empty-state
357
- ng-if="filtered.length === 0 && vm.searchString.length > 0"
358
394
  [icon]="'search'"
359
395
  [title]="'No results to display.' | translate"
360
396
  [subtitle]="'Refine your search terms or check your spelling.' | translate"
397
+ ng-if="filtered.length === 0 && vm.searchString.length > 0"
361
398
  ></c8y-ui-empty-state>
362
399
  </div>
363
400
  </div>
@@ -1,10 +1,13 @@
1
1
  <div>
2
2
  <c8y-ui-action-bar-set>
3
- <li action-bar-position="right" ng-show="!vm.isPlatformApplicationBasePath() && vm.isAdmin()">
3
+ <li
4
+ action-bar-position="right"
5
+ ng-show="!vm.isPlatformApplicationBasePath() && vm.isAdmin()"
6
+ >
4
7
  <button
8
+ class="btn btn-link"
5
9
  title="{{ 'Add application' | translate }}"
6
10
  type="button"
7
- class="btn btn-link"
8
11
  ng-click="vm.addWithWizard()"
9
12
  >
10
13
  <i c8y-icon="plus-circle"></i>
@@ -12,7 +15,10 @@
12
15
  </button>
13
16
  </li>
14
17
  <c8y-refresh-btn></c8y-refresh-btn>
15
- <li class="navbar-form hidden-xs" action-bar-position="left">
18
+ <li
19
+ class="navbar-form hidden-xs"
20
+ action-bar-position="left"
21
+ >
16
22
  <c8y-list-display-control
17
23
  list-length="vm.applications.length"
18
24
  on-list-class-change="vm.listClass = listClass"
@@ -22,16 +28,19 @@
22
28
 
23
29
  <c8y-help src="/users-guide/administration/#applications"></c8y-help>
24
30
 
25
- <div class="c8y-empty-state text-center m-t-40" ng-show="vm.applications.length == 0">
31
+ <div
32
+ class="c8y-empty-state text-center m-t-40"
33
+ ng-show="vm.applications.length == 0"
34
+ >
26
35
  <h1 class="c8y-icon c8y-icon-modules c8y-icon-duocolor"></h1>
27
36
  <h3 translate>No applications found.</h3>
28
37
  <div ng-if="!vm.isPlatformApplicationBasePath() && vm.isAdmin()">
29
38
  <p translate>Start by adding your first application.</p>
30
39
  <p>
31
40
  <button
41
+ class="btn btn-primary"
32
42
  title="{{ 'Add application' | translate }}"
33
43
  type="button"
34
- class="btn btn-primary"
35
44
  ng-click="vm.addWithWizard()"
36
45
  translate
37
46
  >
@@ -48,8 +57,14 @@
48
57
  </div>
49
58
  </div>
50
59
 
51
- <div class="card-group" ng-class="vm.listClass">
52
- <div class="page-sticky-header hidden-xs d-flex" ng-if="vm.applications.length > 0">
60
+ <div
61
+ class="card-group"
62
+ ng-class="vm.listClass"
63
+ >
64
+ <div
65
+ class="page-sticky-header hidden-xs d-flex"
66
+ ng-if="vm.applications.length > 0"
67
+ >
53
68
  <div class="card-block card-column-30">
54
69
  <div class="card-appicon p-l-32"></div>
55
70
  {{ 'Application' | translate }}
@@ -67,8 +82,8 @@
67
82
  ng-if="vm.applications.length > 0 && !vm.isPlatformApplicationBasePath() && vm.isAdmin()"
68
83
  >
69
84
  <button
70
- title="{{ 'Add application' | translate }}"
71
85
  class="card add-card card-hidden-list"
86
+ title="{{ 'Add application' | translate }}"
72
87
  ng-click="vm.addWithWizard()"
73
88
  >
74
89
  <i c8y-icon="plus-circle"></i>
@@ -76,33 +91,59 @@
76
91
  <translate>Add application</translate>
77
92
  </button>
78
93
  </div>
79
- <div ng-repeat="app in vm.applications" class="col-xs-12 col-sm-4 col-md-3">
80
- <div class="card" ng-click="vm.detail(app)">
94
+ <div
95
+ class="col-xs-12 col-sm-4 col-md-3"
96
+ ng-repeat="app in vm.applications"
97
+ >
98
+ <div
99
+ class="card"
100
+ ng-click="vm.detail(app)"
101
+ >
81
102
  <div class="card-block text-center card-column-30">
82
103
  <div class="card-appicon">
83
104
  <c8y-app-icon app="app"></c8y-app-icon>
84
105
  </div>
85
106
  <span
107
+ class="e2e-appCardName text-medium"
86
108
  title="{{ app | humanizeAppName }}"
87
109
  ng-bind="app | humanizeAppName"
88
- class="e2e-appCardName text-medium"
89
110
  ></span>
90
111
  </div>
91
112
  <div class="card-block p-t-0 p-b-0 no-min-height text-center card-column-70">
92
113
  <span class="card-column-30 card-hidden-grid">
93
- <i c8y-icon="{{ vm.iconType(app) }}" title="{{ app.type }}" class="text-muted"></i>
114
+ <i
115
+ class="text-muted"
116
+ c8y-icon="{{ vm.iconType(app) }}"
117
+ title="{{ app.type }}"
118
+ ></i>
94
119
  <span class="small">{{ app.type }}</span>
95
120
  </span>
96
121
  <span class="card-column-30 card-hidden-grid">
97
- <small class="text-muted" ng-bind="vm.path(app)"></small>
122
+ <small
123
+ class="text-muted"
124
+ ng-bind="vm.path(app)"
125
+ ></small>
98
126
  </span>
99
127
  <div class="card-hidden-list p-b-16">
100
- <p class="text-truncate" title="{{ vm.path(app) }}">
101
- <i c8y-icon="{{ vm.iconType(app) }}" title="{{ app.type }}" class="text-muted"></i>
102
- <small class="text-muted" ng-bind="vm.path(app)"></small>
128
+ <p
129
+ class="text-truncate"
130
+ title="{{ vm.path(app) }}"
131
+ >
132
+ <i
133
+ class="text-muted"
134
+ c8y-icon="{{ vm.iconType(app) }}"
135
+ title="{{ app.type }}"
136
+ ></i>
137
+ <small
138
+ class="text-muted"
139
+ ng-bind="vm.path(app)"
140
+ ></small>
103
141
  </p>
104
142
  </div>
105
- <em class="small card-column-40" ng-if="app.description">
143
+ <em
144
+ class="small card-column-40"
145
+ ng-if="app.description"
146
+ >
106
147
  {{ app.description | translate }}
107
148
  </em>
108
149
  <div class="m-b-16 card-hidden-list"></div>
@@ -115,23 +156,40 @@
115
156
  ng-if="!vm.isPlatformApplicationBasePath()"
116
157
  >
117
158
  <button
118
- type="button"
119
- title="{{ 'Settings' | translate }}"
120
159
  class="dropdown-toggle c8y-dropdown"
160
+ title="{{ 'Settings' | translate }}"
161
+ type="button"
121
162
  uib-dropdown-toggle
122
163
  >
123
164
  <i c8y-icon="ellipsis-v"></i>
124
165
  </button>
125
- <ul class="dropdown-menu dropdown-menu-right" uib-dropdown-menu>
166
+ <ul
167
+ class="dropdown-menu dropdown-menu-right"
168
+ uib-dropdown-menu
169
+ >
126
170
  <li>
127
- <a title="{{ 'Edit' | translate }}" href="" ng-click="vm.detail(app)">
128
- <i c8y-icon="edit" class="m-r-4"></i>
171
+ <a
172
+ title="{{ 'Edit' | translate }}"
173
+ href=""
174
+ ng-click="vm.detail(app)"
175
+ >
176
+ <i
177
+ class="m-r-4"
178
+ c8y-icon="edit"
179
+ ></i>
129
180
  {{ 'Edit' | translate }}
130
181
  </a>
131
182
  </li>
132
183
  <li ng-if="!vm.isCurrentApp(app)">
133
- <a title="{{ 'Delete' | translate }}" href="" ng-click="vm.onClickDelete(app)">
134
- <i c8y-icon="delete" class="m-r-4"></i>
184
+ <a
185
+ title="{{ 'Delete' | translate }}"
186
+ href=""
187
+ ng-click="vm.onClickDelete(app)"
188
+ >
189
+ <i
190
+ class="m-r-4"
191
+ c8y-icon="delete"
192
+ ></i>
135
193
  {{ 'Delete' | translate }}
136
194
  </a>
137
195
  </li>
@@ -140,16 +198,16 @@
140
198
  </div>
141
199
  <div class="card-column-20 d-flex">
142
200
  <div
143
- ng-if="vm.canOpenInBrowser(app).result"
144
201
  class="text-center card-block flex-item-center no-min-height p-t-0 p-b-0"
202
+ ng-if="vm.canOpenInBrowser(app).result"
145
203
  ng-click="$event.stopPropagation()"
146
204
  >
147
205
  <a
148
- title="{{ 'Open' | translate }}"
149
206
  class="btn btn-xs btn-default"
207
+ title="{{ 'Open' | translate }}"
208
+ target="_blank"
150
209
  ng-if="vm.canOpenInBrowser(app).result"
151
210
  ng-href="{{ vm.getHref(app) }}"
152
- target="_blank"
153
211
  rel="noopener noreferrer"
154
212
  >
155
213
  <i c8y-icon="external-link"></i>