@c8y/ng1-modules 1018.207.0 → 1018.209.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.
- package/administration-homeAdministration/home-administration.component.js +1 -1
- package/administration-homeAdministration/home-administration.template.html +19 -15
- package/core/core/services/measurements.js +1 -1
- package/core/cumulocity.json +0 -2
- package/core/ui/directives/auditList.js +1 -1
- package/core/ui/services/util.js +1 -1
- package/package.json +1 -1
- package/smartRules/controllers/list.js +1 -1
- package/smartRules/list/smartRulesList.component.js +1 -1
- package/smartRules/list/smartRulesList.html +86 -38
- package/smartRules/services/smartRules.js +1 -1
- package/smartRules/views/list.html +99 -46
- package/administration-eventProcessing/cumulocity.json +0 -23
- package/administration-eventProcessing/details/eventProcessingRuleAlarms.component.js +0 -1
- package/administration-eventProcessing/details/eventProcessingRuleAlarms.html +0 -8
- package/administration-eventProcessing/details/eventProcessingRuleDetails.component.js +0 -1
- package/administration-eventProcessing/details/eventProcessingRuleDetails.html +0 -206
- package/administration-eventProcessing/details/eventProcessingRuleMetrics.component.js +0 -1
- package/administration-eventProcessing/details/eventProcessingRuleMetrics.html +0 -21
- package/administration-eventProcessing/details/eventProcessingRuleNotifications.component.js +0 -1
- package/administration-eventProcessing/details/eventProcessingRuleNotifications.html +0 -57
- package/administration-eventProcessing/details/eventProcessingRuleTitle.component.js +0 -1
- package/administration-eventProcessing/details/eventProcessingRuleTitle.html +0 -40
- package/administration-eventProcessing/details/eventProcessingRulesExamples.component.js +0 -1
- package/administration-eventProcessing/details/eventProcessingRulesExamples.html +0 -82
- package/administration-eventProcessing/index.js +0 -1
- package/administration-eventProcessing/list/eventProcessingRulesList.component.js +0 -1
- package/administration-eventProcessing/list/eventProcessingRulesList.html +0 -175
- package/administration-eventProcessing/services/eventProcessing.js +0 -1
- package/core/core/services/cepModule.js +0 -1
- package/core/core/services/cepModuleExamples.js +0 -1
- package/notifications/cumulocity.json +0 -11
- package/notifications/index.js +0 -1
|
@@ -2,16 +2,19 @@
|
|
|
2
2
|
<div ng-if="canSeeSection()">
|
|
3
3
|
<c8y-breadcrumbs-set>
|
|
4
4
|
<c8y-breadcrumbs-item
|
|
5
|
-
label="{{ 'Global smart rules' | translate }}"
|
|
6
5
|
icon="c8y-smart-rules"
|
|
6
|
+
label="{{ 'Global smart rules' | translate }}"
|
|
7
7
|
></c8y-breadcrumbs-item>
|
|
8
8
|
<c8y-breadcrumbs-item
|
|
9
|
-
label="{{ 'Configuration' | translate }}"
|
|
10
9
|
icon="c8y-tools"
|
|
10
|
+
label="{{ 'Configuration' | translate }}"
|
|
11
11
|
></c8y-breadcrumbs-item>
|
|
12
12
|
</c8y-breadcrumbs-set>
|
|
13
13
|
<c8y-ui-action-bar-set>
|
|
14
|
-
<li
|
|
14
|
+
<li
|
|
15
|
+
class="navbar-form hidden-xs"
|
|
16
|
+
action-bar-position="left"
|
|
17
|
+
>
|
|
15
18
|
<c8y-list-display-control
|
|
16
19
|
list-length="rules.length"
|
|
17
20
|
on-list-class-change="vm.listClass = listClass"
|
|
@@ -21,8 +24,8 @@
|
|
|
21
24
|
<c8y-if-allowed cfg="smartRulesSvc.permissionsCfgs.create">
|
|
22
25
|
<button
|
|
23
26
|
class="btn btn-link"
|
|
24
|
-
type="button"
|
|
25
27
|
title="{{ 'Add smart rule' | translate }}"
|
|
28
|
+
type="button"
|
|
26
29
|
ng-click="add()"
|
|
27
30
|
>
|
|
28
31
|
<i c8y-icon="plus-circle"></i>
|
|
@@ -34,8 +37,8 @@
|
|
|
34
37
|
<c8y-if-allowed any-app="['devicemanagement']">
|
|
35
38
|
<a
|
|
36
39
|
class="btn btn-link"
|
|
37
|
-
type="button"
|
|
38
40
|
title="{{ 'Open in Device management' | translate }}"
|
|
41
|
+
type="button"
|
|
39
42
|
target="_blank"
|
|
40
43
|
rel="noopener noreferrer"
|
|
41
44
|
ng-href="{{ getLinkToDM() }}"
|
|
@@ -57,21 +60,26 @@
|
|
|
57
60
|
</div>
|
|
58
61
|
|
|
59
62
|
<div ng-if="!loadingStatus.inProgress && loadingStatus.done && loadingStatus.error">
|
|
60
|
-
<div
|
|
63
|
+
<div
|
|
64
|
+
class="alert alert-warning"
|
|
65
|
+
translate
|
|
66
|
+
>
|
|
67
|
+
Could not load smart rules list.
|
|
68
|
+
</div>
|
|
61
69
|
</div>
|
|
62
70
|
|
|
63
71
|
<div ng-if="!loadingStatus.inProgress && loadingStatus.done && !loadingStatus.error">
|
|
64
72
|
<!-- empty state -->
|
|
65
73
|
<c8y-ui-empty-state
|
|
66
|
-
ng-if="rules.length === 0"
|
|
67
74
|
[icon]="'c8y-smart-rules'"
|
|
68
75
|
[title]="'No smart rules to display.' | translate"
|
|
69
76
|
[subtitle]="'Click below to add your first smart rule.' | translate"
|
|
77
|
+
ng-if="rules.length === 0"
|
|
70
78
|
>
|
|
71
79
|
<button
|
|
72
80
|
class="btn btn-primary"
|
|
73
|
-
type="button"
|
|
74
81
|
title="{{ 'Add smart rule' | translate }}"
|
|
82
|
+
type="button"
|
|
75
83
|
ng-click="add()"
|
|
76
84
|
>
|
|
77
85
|
{{ 'Add smart rule' | translate }}
|
|
@@ -85,18 +93,44 @@
|
|
|
85
93
|
</p>
|
|
86
94
|
</c8y-ui-empty-state>
|
|
87
95
|
|
|
88
|
-
<div
|
|
89
|
-
|
|
96
|
+
<div
|
|
97
|
+
class="smart-rules-list"
|
|
98
|
+
ng-if="rules.length > 0"
|
|
99
|
+
>
|
|
100
|
+
<div
|
|
101
|
+
class="card-group"
|
|
102
|
+
ng-class="vm.listClass"
|
|
103
|
+
>
|
|
90
104
|
<div class="smart-rules-list-head page-sticky-header p-t-8">
|
|
91
|
-
<label
|
|
92
|
-
|
|
105
|
+
<label
|
|
106
|
+
class="smart-rule-group text-center p-t-4"
|
|
107
|
+
translate
|
|
108
|
+
>
|
|
109
|
+
Status
|
|
110
|
+
</label>
|
|
111
|
+
<label
|
|
112
|
+
class="smart-rule-children p-t-4"
|
|
113
|
+
ng-if="children.length > 0"
|
|
114
|
+
translate
|
|
115
|
+
>
|
|
93
116
|
Children
|
|
94
117
|
</label>
|
|
95
|
-
<label
|
|
118
|
+
<label
|
|
119
|
+
class="smart-rule-description p-t-4"
|
|
120
|
+
translate
|
|
121
|
+
>
|
|
122
|
+
Smart rule
|
|
123
|
+
</label>
|
|
96
124
|
</div>
|
|
97
125
|
|
|
98
|
-
<div
|
|
99
|
-
|
|
126
|
+
<div
|
|
127
|
+
class="col-xs-12 col-sm-6 col-md-4"
|
|
128
|
+
ng-repeat="rule in rules | orderBy:'name'"
|
|
129
|
+
>
|
|
130
|
+
<div
|
|
131
|
+
class="card-flip-container"
|
|
132
|
+
ng-class="{ flipping: isFlipped }"
|
|
133
|
+
>
|
|
100
134
|
<div
|
|
101
135
|
class="card-flip smart-rule-list-card"
|
|
102
136
|
ng-class="{ flipped: isFlipped, active: isOpen[rule.id] }"
|
|
@@ -105,13 +139,13 @@
|
|
|
105
139
|
<div
|
|
106
140
|
class="card-actions collapsible"
|
|
107
141
|
ng-class="{ expanded: isOpen[rule.id] }"
|
|
108
|
-
ng-show="canAddRules() || canModify(rule)
|
|
142
|
+
ng-show="canAddRules() || canModify(rule)"
|
|
109
143
|
>
|
|
110
144
|
<button
|
|
111
145
|
class="btn btn-link btn-collapse"
|
|
112
|
-
type="button"
|
|
113
|
-
title="{{ 'Details' | translate }}"
|
|
114
146
|
ng-class="{ active: isOpen[rule.id] }"
|
|
147
|
+
title="{{ 'Details' | translate }}"
|
|
148
|
+
type="button"
|
|
115
149
|
ng-click="isOpen[rule.id] = !isOpen[rule.id]"
|
|
116
150
|
>
|
|
117
151
|
<i c8y-icon="chevron-down"></i>
|
|
@@ -124,19 +158,23 @@
|
|
|
124
158
|
>
|
|
125
159
|
<button
|
|
126
160
|
class="dropdown-toggle c8y-dropdown"
|
|
127
|
-
type="button"
|
|
128
161
|
title="{{ 'Actions' | translate }}"
|
|
129
|
-
data-toggle="dropdown"
|
|
130
162
|
aria-haspopup="true"
|
|
163
|
+
type="button"
|
|
164
|
+
data-toggle="dropdown"
|
|
131
165
|
uib-dropdown-toggle
|
|
132
166
|
>
|
|
133
167
|
<i c8y-icon="ellipsis-v"></i>
|
|
134
168
|
</button>
|
|
135
|
-
<ul
|
|
169
|
+
<ul
|
|
170
|
+
class="dropdown-menu dropdown-menu-right"
|
|
171
|
+
role="list"
|
|
172
|
+
uib-dropdown-menu
|
|
173
|
+
>
|
|
136
174
|
<li ng-if="canModify(rule)">
|
|
137
175
|
<button
|
|
138
|
-
type="button"
|
|
139
176
|
title="{{ 'Edit smart rule' | translate }}"
|
|
177
|
+
type="button"
|
|
140
178
|
ng-click="edit(rule)"
|
|
141
179
|
>
|
|
142
180
|
<i c8y-icon="pencil"></i>
|
|
@@ -145,8 +183,8 @@
|
|
|
145
183
|
</li>
|
|
146
184
|
<li ng-if="canAddRules(rule)">
|
|
147
185
|
<button
|
|
148
|
-
type="button"
|
|
149
186
|
title="{{ 'Duplicate smart rule' | translate }}"
|
|
187
|
+
type="button"
|
|
150
188
|
ng-click="clone(rule)"
|
|
151
189
|
>
|
|
152
190
|
<i c8y-icon="copy"></i>
|
|
@@ -155,25 +193,14 @@
|
|
|
155
193
|
</li>
|
|
156
194
|
<li ng-if="canModify(rule)">
|
|
157
195
|
<button
|
|
158
|
-
type="button"
|
|
159
196
|
title="{{ 'Delete smart rule' | translate }}"
|
|
197
|
+
type="button"
|
|
160
198
|
ng-click="remove(rule)"
|
|
161
199
|
>
|
|
162
200
|
<i c8y-icon="delete"></i>
|
|
163
201
|
{{ 'Delete' | translate }}
|
|
164
202
|
</button>
|
|
165
203
|
</li>
|
|
166
|
-
<li class="divider" role="separator" ng-if="canInspect()"></li>
|
|
167
|
-
<li ng-if="canInspect()">
|
|
168
|
-
<a
|
|
169
|
-
ng-href="/apps/administration#/eventprocessing/{{ rule.cepModuleId }}"
|
|
170
|
-
title="{{ 'Inspect smart rule' | translate }}"
|
|
171
|
-
type="button"
|
|
172
|
-
>
|
|
173
|
-
<i c8y-icon="c8y-smart-rules c8y-icon-mono"></i>
|
|
174
|
-
{{ 'Inspect' | translate }}
|
|
175
|
-
</a>
|
|
176
|
-
</li>
|
|
177
204
|
</ul>
|
|
178
205
|
</div>
|
|
179
206
|
</div>
|
|
@@ -210,8 +237,8 @@
|
|
|
210
237
|
|
|
211
238
|
<button
|
|
212
239
|
class="btn c8y-btn-checkbox m-r-0"
|
|
213
|
-
type="button"
|
|
214
240
|
ng-class="{ active: hasSource(rule) }"
|
|
241
|
+
type="button"
|
|
215
242
|
ng-click="toggleRuleActivationForContextMO(rule)"
|
|
216
243
|
>
|
|
217
244
|
<i
|
|
@@ -220,8 +247,18 @@
|
|
|
220
247
|
'dlt-c8y-icon-ban text-danger': !hasSource(rule)
|
|
221
248
|
}"
|
|
222
249
|
></i>
|
|
223
|
-
<span
|
|
224
|
-
|
|
250
|
+
<span
|
|
251
|
+
translate
|
|
252
|
+
ng-if="hasSource(rule)"
|
|
253
|
+
>
|
|
254
|
+
Active`rule`
|
|
255
|
+
</span>
|
|
256
|
+
<span
|
|
257
|
+
translate
|
|
258
|
+
ng-if="!hasSource(rule)"
|
|
259
|
+
>
|
|
260
|
+
Inactive`rule`
|
|
261
|
+
</span>
|
|
225
262
|
</button>
|
|
226
263
|
</div>
|
|
227
264
|
|
|
@@ -231,14 +268,17 @@
|
|
|
231
268
|
>
|
|
232
269
|
<div class="list-icon">
|
|
233
270
|
<i
|
|
271
|
+
ng-class="statusClass(rule)"
|
|
234
272
|
c8y-icon="{{ statusIcon(rule) }}"
|
|
235
273
|
uib-tooltip="{{ status(rule) | translate }}"
|
|
236
274
|
tooltip-popup-delay="500"
|
|
237
275
|
tooltip-append-to-body="true"
|
|
238
|
-
ng-class="statusClass(rule)"
|
|
239
276
|
></i>
|
|
240
277
|
</div>
|
|
241
|
-
<div
|
|
278
|
+
<div
|
|
279
|
+
class="card-icon"
|
|
280
|
+
ng-class="statusClass(rule)"
|
|
281
|
+
>
|
|
242
282
|
<i c8y-icon="{{ statusIcon(rule) }}"></i>
|
|
243
283
|
<span class="text-default">
|
|
244
284
|
{{ status(rule) | translate }}
|
|
@@ -246,7 +286,10 @@
|
|
|
246
286
|
</div>
|
|
247
287
|
</div>
|
|
248
288
|
|
|
249
|
-
<div
|
|
289
|
+
<div
|
|
290
|
+
class="smart-rule-children"
|
|
291
|
+
ng-if="children.length > 0"
|
|
292
|
+
>
|
|
250
293
|
<label translate>Children</label>
|
|
251
294
|
<c8y-child-assets-selector
|
|
252
295
|
ng-if="::canApplyOnChildren(rule)"
|
|
@@ -286,8 +329,8 @@
|
|
|
286
329
|
<div class="card-actions-group separator">
|
|
287
330
|
<button
|
|
288
331
|
class="btn-flip"
|
|
289
|
-
type="button"
|
|
290
332
|
title="{{ 'Details' | translate }}"
|
|
333
|
+
type="button"
|
|
291
334
|
ng-click="isFlipped = !isFlipped"
|
|
292
335
|
>
|
|
293
336
|
<i c8y-icon="reply"></i>
|
|
@@ -295,7 +338,10 @@
|
|
|
295
338
|
</button>
|
|
296
339
|
</div>
|
|
297
340
|
</div>
|
|
298
|
-
<div
|
|
341
|
+
<div
|
|
342
|
+
class="card card-back"
|
|
343
|
+
uib-collapse="!isOpen[rule.id]"
|
|
344
|
+
>
|
|
299
345
|
<div class="card-header-actions">
|
|
300
346
|
<div class="smart-list-icon-label">
|
|
301
347
|
<span class="dot">
|
|
@@ -328,11 +374,18 @@
|
|
|
328
374
|
</dl>
|
|
329
375
|
</div>
|
|
330
376
|
|
|
331
|
-
<div
|
|
377
|
+
<div
|
|
378
|
+
class="col-sm-9"
|
|
379
|
+
ng-if="isOpen[rule.id] || isFlipped"
|
|
380
|
+
>
|
|
332
381
|
<div class="legend form-block">
|
|
333
382
|
{{ 'History of changes' | translate }}
|
|
334
383
|
</div>
|
|
335
|
-
<div
|
|
384
|
+
<div
|
|
385
|
+
class="m-b-16"
|
|
386
|
+
c8y-audit-list
|
|
387
|
+
filter="{source: rule.id}"
|
|
388
|
+
></div>
|
|
336
389
|
</div>
|
|
337
390
|
</div>
|
|
338
391
|
</div>
|
|
@@ -340,8 +393,8 @@
|
|
|
340
393
|
<div class="card-actions-group separator">
|
|
341
394
|
<button
|
|
342
395
|
class="btn-flip"
|
|
343
|
-
type="button"
|
|
344
396
|
title="{{ 'Back' | translate }}"
|
|
397
|
+
type="button"
|
|
345
398
|
ng-click="isFlipped = !isFlipped"
|
|
346
399
|
>
|
|
347
400
|
<i c8y-icon="reply"></i>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Administrator Event processing",
|
|
3
|
-
"ngModules": [
|
|
4
|
-
"c8y.eventProcessing"
|
|
5
|
-
],
|
|
6
|
-
"category": "Administration",
|
|
7
|
-
"description": "Administrators can define and update realtime event processing rules. Adds items to the navigator and allows create, deletion and update of rules. Rule execution can be debugged.",
|
|
8
|
-
"js": [
|
|
9
|
-
"index.js",
|
|
10
|
-
"list/eventProcessingRulesList.component.js",
|
|
11
|
-
"details/eventProcessingRuleDetails.component.js",
|
|
12
|
-
"details/eventProcessingRuleTitle.component.js",
|
|
13
|
-
"details/eventProcessingRuleAlarms.component.js",
|
|
14
|
-
"details/eventProcessingRuleNotifications.component.js",
|
|
15
|
-
"details/eventProcessingRuleMetrics.component.js",
|
|
16
|
-
"details/eventProcessingRulesExamples.component.js",
|
|
17
|
-
"services/eventProcessing.js"
|
|
18
|
-
],
|
|
19
|
-
"folderName": "eventProcessing",
|
|
20
|
-
"appsInclude": [
|
|
21
|
-
"administration"
|
|
22
|
-
]
|
|
23
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";!function(){function e(n){var t=this;_.assign(t,{$onChanges:function(e){e.rule&&t.rule&&n.getAlarmListFilters(t.rule).then(function(e){t.alarmListFilters=e})}})}e.$inject=["eventProcessingSvc"],angular.module("c8y.eventProcessing").component("c8yEventProcessingRuleAlarms",{bindings:{rule:"<"},templateUrl:":::PLUGIN_PATH:::/details/eventProcessingRuleAlarms.html",controller:e,controllerAs:"vm"})}();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";!function(){function e(n,t,e,o,i,s,l,c,a,r,u){var d,g,m,f=this,h=e.moduleId,p={left:{"grid__col--fullspan":!1,hidden:!1},right:{"grid__col--fullspan":!1,hidden:!1}},v={mode:"sql",useWrapMode:!0,showGutter:!0,onLoad:function(e){(g=e).$blockScrolling=1/0}};function E(){h?i.detail(h).then(D):D({name:u.getString("newmodule`KEEP_ORIGINAL`"),status:"DEPLOYED",isNew:!0})}function D(e){(f.module=e).isNew||(f.loadedName=f.module.name),f.moduleDeployed="DEPLOYED"===f.module.status,d=_.cloneDeep(e),m||(m=n.$on("$locationChangeStart",$))}function w(e){var n=f.module.body;n=n?"".concat(n,"\n\n"):"",f.module.body=n+e.value}function P(){f.moduleForm.aceEditor.$setDirty()}function y(e){var n=_.get(e,"data",e),t=_.get(n,"message",""),o=_.get(t.match(/\[((\s|\S)+)\]/),1);if(o){var i=g.find(o,{wrap:!0,preventScroll:!0}),s=t.match(/at line (\d+) column (\d+)/),l=_.toNumber(_.get(s,1,1))-1,a=_.toNumber(_.get(s,2,0)),r={row:_.get(i,"start.row",0)+l,column:_.get(i,"start.column",0)+a};g&&(g.gotoLine(r.row+1,r.column,!0),function(e,n,t,o){var i=g.session.getAnnotations();i.push({row:e,column:n,text:t,type:o||"error"}),g.session.setAnnotations(i)}(r.row,r.column,u.getString(t),"error"))}else c.danger(u.getString(t),n)}function S(e){h?E():t.path("eventprocessing/".concat(e.id))}function $(e,n){var t;return d.id&&!_.isEqual(d,f.module)&&(e.preventDefault(),t=s({title:r("Discard changes"),body:r("You are about to leave this page and discard the changes made. Do you want to proceed?"),status:"warning",labels:{ok:r("Discard")}}).then(function(){d=_.cloneDeep(f.module),o.location.href=n})),t}_.assign(f,{panelClasses:p,aceEditorStyles:{height:"100%",width:"100%","min-height":"50vh"},aceEditorOptions:v,isSmartRuleModule:i.isSmartRuleModule,$onInit:function(){a.redirectToRootIfPluginDisabled().then(E),a.getPermissions().then(function(e){return _.assign(f,{permissions:e})})},onModuleDeployedChanged:function(e){f.module.status=e?"DEPLOYED":"NOT_DEPLOYED"},expand:function(e){_.forEach(p,function(e){e["grid__col--fullspan"]=!1,e.hidden=!0}),p[e]["grid__col--fullspan"]=!0,p[e].hidden=!1},collapse:function(){_.forEach(p,function(e){e["grid__col--fullspan"]=!1,e.hidden=!1})},isExpanded:function(e){return!0===p[e]["grid__col--fullspan"]},browseExamples:function(){return l.open({component:"c8yEventProcessingRulesExamples",size:"lg"}).result.then(w).then(P)},save:function(e,n){g.session.clearAnnotations(),i.save(e,{silentError:!0}).then(S).then(function(){c.success(u.getString('Module "{{name}}" saved.',e)),n.$setPristine(),f.loadedName=f.module.name}).catch(y)},cancel:function(){t.path("eventprocessing")}})}e.$inject=["$scope","$location","$routeParams","$window","c8yCepModule","c8yModal","$uibModal","c8yAlert","eventProcessingSvc","gettext","gettextCatalog"],angular.module("c8y.eventProcessing").component("c8yEventProcessingRuleDetails",{templateUrl:":::PLUGIN_PATH:::/details/eventProcessingRuleDetails.html",controller:e,controllerAs:"vm"})}();
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
<c8y-ui-title-set title="vm.module.name"></c8y-ui-title-set>
|
|
2
|
-
|
|
3
|
-
<c8y-breadcrumbs-set>
|
|
4
|
-
<c8y-breadcrumbs-item
|
|
5
|
-
path="#eventprocessing"
|
|
6
|
-
label="{{ 'Event processing' | translate }}"
|
|
7
|
-
icon="c8y-event-processing"
|
|
8
|
-
></c8y-breadcrumbs-item>
|
|
9
|
-
</c8y-breadcrumbs-set>
|
|
10
|
-
|
|
11
|
-
<form name="vm.moduleForm" novalidate>
|
|
12
|
-
<div class="card content-fullpage d-col d-flex">
|
|
13
|
-
<div class="card-block bg-level-1 p-t-24 p-b-24 large-padding flex-no-shrink">
|
|
14
|
-
<div class="content-flex-70">
|
|
15
|
-
<div class="text-center">
|
|
16
|
-
<i class="c8y-icon c8y-icon-event-processing c8y-icon-duocolor icon-48"></i>
|
|
17
|
-
</div>
|
|
18
|
-
<div class="flex-grow col-10">
|
|
19
|
-
<div class="content-flex-80">
|
|
20
|
-
<div class="col-9">
|
|
21
|
-
<div class="form-group form-group-lg m-b-0">
|
|
22
|
-
<label class="sr-only">{{ 'Rule name' | translate }}</label>
|
|
23
|
-
<label class="editable" ng-class="{ updated: vm.loadedName !== vm.module.name }">
|
|
24
|
-
<input
|
|
25
|
-
class="form-control"
|
|
26
|
-
ng-model="vm.module.name"
|
|
27
|
-
ng-disabled="!vm.permissions.canAdmin"
|
|
28
|
-
required
|
|
29
|
-
type="text"
|
|
30
|
-
style="max-width: calc( {{ vm.module.name.length || 10 }}ch + 14px );"
|
|
31
|
-
placeholder="{{ 'e.g. myModule01' | translate }}"
|
|
32
|
-
/>
|
|
33
|
-
</label>
|
|
34
|
-
</div>
|
|
35
|
-
<div class="d-flex a-i-center p-t-8">
|
|
36
|
-
<label translate class="m-r-4 m-b-0">Status</label>
|
|
37
|
-
<button
|
|
38
|
-
type="button"
|
|
39
|
-
class="btn btn-default m-b-0"
|
|
40
|
-
ng-model="vm.moduleDeployed"
|
|
41
|
-
ng-disabled="!vm.permissions.canAdmin || vm.isSmartRuleModule(vm.module)"
|
|
42
|
-
ng-change="vm.onModuleDeployedChanged(vm.moduleDeployed)"
|
|
43
|
-
uib-btn-checkbox
|
|
44
|
-
style="min-width: 148px"
|
|
45
|
-
>
|
|
46
|
-
<span title="{{ 'Deployed' | translate }}" ng-if="vm.moduleDeployed">
|
|
47
|
-
<i c8y-icon="check-circle" class="text-success"></i>
|
|
48
|
-
<translate>Deployed</translate>
|
|
49
|
-
</span>
|
|
50
|
-
<span title="{{ 'Not deployed' | translate }}" ng-if="!vm.moduleDeployed">
|
|
51
|
-
<i c8y-icon="ban" class="text-warning"></i>
|
|
52
|
-
<translate>Not deployed</translate>
|
|
53
|
-
</span>
|
|
54
|
-
</button>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
<div class="flex-grow">
|
|
58
|
-
<p class="m-b-8">
|
|
59
|
-
<i c8y-icon="info-circle-o" class="text-info m-r-8"></i>
|
|
60
|
-
<span class="text-label-small">
|
|
61
|
-
{{ 'Rule info' | translate }}
|
|
62
|
-
</span>
|
|
63
|
-
</p>
|
|
64
|
-
<ul class="list-unstyled small">
|
|
65
|
-
<li class="p-t-4 p-b-4 d-flex separator-top-bottom text-nowrap">
|
|
66
|
-
<label class="small m-b-0 m-r-8">{{ 'Last modified' | translate }}</label>
|
|
67
|
-
<span class="m-l-auto">{{ vm.module.lastModified | absoluteDate }}</span>
|
|
68
|
-
</li>
|
|
69
|
-
</ul>
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
|
|
76
|
-
<div class="flex-grow separator-top">
|
|
77
|
-
<div class="d-grid grid__col--6-6--md fit-h">
|
|
78
|
-
<div ng-class="vm.panelClasses.left" class="d-flex d-col">
|
|
79
|
-
<div class="card-header separator p-relative">
|
|
80
|
-
<div class="card-actions">
|
|
81
|
-
<button
|
|
82
|
-
title="{{ 'Examples' | translate }}…"
|
|
83
|
-
type="button"
|
|
84
|
-
class="btn btn-link"
|
|
85
|
-
ng-click="vm.browseExamples()"
|
|
86
|
-
ng-disabled="!vm.permissions.canAdmin || vm.isSmartRuleModule(vm.module)"
|
|
87
|
-
>
|
|
88
|
-
<i c8y-icon="code"></i>
|
|
89
|
-
{{ 'Examples' | translate }}…
|
|
90
|
-
</button>
|
|
91
|
-
<button
|
|
92
|
-
type="button"
|
|
93
|
-
class="btn btn-link hidden-xs hidden-sm"
|
|
94
|
-
ng-click="vm.expand('left')"
|
|
95
|
-
ng-if="!vm.isExpanded('left')"
|
|
96
|
-
title="{{ 'Expand' | translate }}"
|
|
97
|
-
>
|
|
98
|
-
<i c8y-icon="expand" class="text-muted"></i>
|
|
99
|
-
</button>
|
|
100
|
-
<button
|
|
101
|
-
type="button"
|
|
102
|
-
class="btn btn-link hidden-xs hidden-sm"
|
|
103
|
-
ng-click="vm.collapse()"
|
|
104
|
-
ng-if="vm.isExpanded('left')"
|
|
105
|
-
title="{{ 'Collapse' | translate }}"
|
|
106
|
-
>
|
|
107
|
-
<i c8y-icon="compress" class="text-muted"></i>
|
|
108
|
-
</button>
|
|
109
|
-
</div>
|
|
110
|
-
<div class="card-title">
|
|
111
|
-
{{ 'Source code' | translate }}
|
|
112
|
-
</div>
|
|
113
|
-
</div>
|
|
114
|
-
<div
|
|
115
|
-
name="aceEditor"
|
|
116
|
-
ui-ace="vm.aceEditorOptions"
|
|
117
|
-
ng-model="vm.module.body"
|
|
118
|
-
ng-style="vm.aceEditorStyles"
|
|
119
|
-
class="form-control"
|
|
120
|
-
ng-readonly="!vm.permissions.canAdmin || vm.isSmartRuleModule(vm.module)"
|
|
121
|
-
required
|
|
122
|
-
></div>
|
|
123
|
-
</div>
|
|
124
|
-
|
|
125
|
-
<div ng-class="vm.panelClasses.right" class="d-flex d-col" ng-if="vm.module.id">
|
|
126
|
-
<div class="card-header separator p-relative">
|
|
127
|
-
<div class="card-title">{{ 'Debugging and monitoring' | translate }}</div>
|
|
128
|
-
<div class="card-actions">
|
|
129
|
-
<button
|
|
130
|
-
type="button"
|
|
131
|
-
class="btn btn-link hidden-xs hidden-sm"
|
|
132
|
-
ng-click="vm.expand('right')"
|
|
133
|
-
ng-if="!vm.isExpanded('right')"
|
|
134
|
-
title="{{ 'Expand' | translate }}"
|
|
135
|
-
>
|
|
136
|
-
<i c8y-icon="expand" class="text-muted"></i>
|
|
137
|
-
</button>
|
|
138
|
-
<button
|
|
139
|
-
type="button"
|
|
140
|
-
class="btn btn-link hidden-xs hidden-sm"
|
|
141
|
-
title="{{ 'Collapse' | translate }}"
|
|
142
|
-
ng-click="vm.collapse()"
|
|
143
|
-
ng-if="vm.isExpanded('right')"
|
|
144
|
-
>
|
|
145
|
-
<i c8y-icon="compress" class="text-muted"></i>
|
|
146
|
-
</button>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
|
|
150
|
-
<uib-tabset justified="true" class="card-tabs-wrapper">
|
|
151
|
-
<uib-tab classes="one two three">
|
|
152
|
-
<uib-tab-heading>
|
|
153
|
-
<i c8y-icon="bell"></i>
|
|
154
|
-
<span translate>Alarms</span>
|
|
155
|
-
</uib-tab-heading>
|
|
156
|
-
<div class="card-block">
|
|
157
|
-
<c8y-event-processing-rule-alarms
|
|
158
|
-
rule="vm.module"
|
|
159
|
-
></c8y-event-processing-rule-alarms>
|
|
160
|
-
</div>
|
|
161
|
-
</uib-tab>
|
|
162
|
-
<uib-tab>
|
|
163
|
-
<uib-tab-heading>
|
|
164
|
-
<i c8y-icon="rss"></i>
|
|
165
|
-
<span translate>Notifications</span>
|
|
166
|
-
</uib-tab-heading>
|
|
167
|
-
<c8y-event-processing-rule-notifications
|
|
168
|
-
rule="vm.module"
|
|
169
|
-
class="d-contents"
|
|
170
|
-
></c8y-event-processing-rule-notifications>
|
|
171
|
-
</uib-tab>
|
|
172
|
-
<uib-tab>
|
|
173
|
-
<uib-tab-heading>
|
|
174
|
-
<i c8y-icon="line-chart"></i>
|
|
175
|
-
<span translate>Metrics</span>
|
|
176
|
-
</uib-tab-heading>
|
|
177
|
-
<c8y-event-processing-rule-metrics
|
|
178
|
-
rule="vm.module"
|
|
179
|
-
></c8y-event-processing-rule-metrics>
|
|
180
|
-
</uib-tab>
|
|
181
|
-
</uib-tabset>
|
|
182
|
-
</div>
|
|
183
|
-
</div>
|
|
184
|
-
</div>
|
|
185
|
-
|
|
186
|
-
<div class="card-footer separator col-fullspan">
|
|
187
|
-
<button
|
|
188
|
-
type="button"
|
|
189
|
-
class="btn-default btn"
|
|
190
|
-
title="{{ 'Cancel' | translate }}"
|
|
191
|
-
ng-click="vm.cancel()"
|
|
192
|
-
>
|
|
193
|
-
{{ 'Cancel' | translate }}
|
|
194
|
-
</button>
|
|
195
|
-
<button
|
|
196
|
-
title="{{ 'Save' | translate }}"
|
|
197
|
-
type="submit"
|
|
198
|
-
class="btn btn-primary"
|
|
199
|
-
ng-click="vm.save(vm.module, vm.moduleForm)"
|
|
200
|
-
ng-disabled="!vm.permissions.canAdmin || vm.isSmartRuleModule(vm.module) || vm.moduleForm.$invalid || vm.moduleForm.$pristine"
|
|
201
|
-
>
|
|
202
|
-
{{ 'Save' | translate }}
|
|
203
|
-
</button>
|
|
204
|
-
</div>
|
|
205
|
-
</div>
|
|
206
|
-
</form>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";!function(){function e(n){var t=this;_.assign(t,{$onChanges:function(e){e.rule&&t.rule&&n.getModuleMetrics(t.rule).then(function(e){t.metrics=e})}})}e.$inject=["eventProcessingSvc"],angular.module("c8y.eventProcessing").component("c8yEventProcessingRuleMetrics",{bindings:{rule:"<"},templateUrl:":::PLUGIN_PATH:::/details/eventProcessingRuleMetrics.html",controller:e,controllerAs:"vm"})}();
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<div class="card-block" ng-if="vm.metrics.length === 0 || !vm.metrics">
|
|
2
|
-
<div class="card c8y-empty-state text-left">
|
|
3
|
-
<h1 c8y-icon="line-chart"></h1>
|
|
4
|
-
<p><strong translate>No metrics available</strong></p>
|
|
5
|
-
</div>
|
|
6
|
-
</div>
|
|
7
|
-
<div class="card-block">
|
|
8
|
-
<div ng-if="vm.metrics.length > 0">
|
|
9
|
-
<div ng-repeat="metric in vm.metrics">
|
|
10
|
-
<div class="legend form-block center" ng-bind="metric.statement | humanize"></div>
|
|
11
|
-
<c8y-measurements-fragment-chart
|
|
12
|
-
fragment="metric.fragment"
|
|
13
|
-
device="metric.deviceId"
|
|
14
|
-
date-to="metric.dateTo"
|
|
15
|
-
date-from="metric.dateFrom"
|
|
16
|
-
realtime="true"
|
|
17
|
-
>
|
|
18
|
-
</c8y-measurements-fragment-chart>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
package/administration-eventProcessing/details/eventProcessingRuleNotifications.component.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";!function(){function n(t,n){var s=this,e={connected:{text:n("Connected"),cls:"label-success"},pending:{text:n("Pending"),cls:"label-warning"},notdeployed:{text:n("Not deployed"),cls:"label-danger"}},c=null,o=[];function i(n){s.status=n}function r(n){if(!(c=n).connected)var e=n.$on("connected",function(){i("connected"),e()});i(n.connected?"connected":"pending"),n.$on("message",u)}function u(n,e){e.id=parseInt(e.id,10),s.msgs.push(e)}function l(){c&&c.unsubscribe()}function a(n){return e[n]||{}}function d(n){return o.indexOf(n)}function f(n){return-1<d(n)}_.assign(s,{$onChanges:function(n){n.rule&&s.rule&&function(n){if(l(),"DEPLOYED"===n.status){t.configure("debug");var e="/".concat(n.name,"/*");t.subscribe(e).then(r)}else i("notdeployed")}(s.rule)},$onDestroy:l,getStatementName:function(n){var e=_.get(n,"channel");return _.last(e.split("/"))},statusText:function(n){return a(n).text},statusClass:function(n){return a(n).cls},clearAll:function(){s.msgs.length=0},toggle:function(n){f(n)?o.splice(d(n),1):o.push(n)},isOpen:f,isError:function(n){return n.data&&n.data.message&&-1!==n.data.message.indexOf("ReferenceError")}}),s.msgs=[]}n.$inject=["c8yNotifications","gettext"],angular.module("c8y.eventProcessing").component("c8yEventProcessingRuleNotifications",{bindings:{rule:"<"},templateUrl:":::PLUGIN_PATH:::/details/eventProcessingRuleNotifications.html",controller:n,controllerAs:"vm"})}();
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
<div class="sticky-top card-block bg-component" ng-if="vm.msgs.length > 0">
|
|
2
|
-
<div class="input-group">
|
|
3
|
-
<span class="input-group-addon">
|
|
4
|
-
<i c8y-icon="filter"></i>
|
|
5
|
-
</span>
|
|
6
|
-
<input
|
|
7
|
-
type="search"
|
|
8
|
-
class="form-control"
|
|
9
|
-
placeholder="{{'Filter notifications' | translate}}…"
|
|
10
|
-
ng-model="vm.notificationsFilter.text"
|
|
11
|
-
/>
|
|
12
|
-
<span class="input-group-addon">
|
|
13
|
-
<span class="label m-r-16" ng-class="vm.statusClass(vm.status)">
|
|
14
|
-
{{vm.statusText(vm.status) | translate}}
|
|
15
|
-
</span>
|
|
16
|
-
</span>
|
|
17
|
-
<span class="input-group-btn">
|
|
18
|
-
<button type="button" class="btn btn-default" ng-click="vm.clearAll()">
|
|
19
|
-
<i c8y-icon="times"></i>
|
|
20
|
-
</button>
|
|
21
|
-
</span>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
<div class="card-block" ng-if="vm.msgs.length === 0">
|
|
25
|
-
<div class="card c8y-empty-state text-left">
|
|
26
|
-
<h1 c8y-icon="rss"></h1>
|
|
27
|
-
<p><strong translate>No notifications received yet.</strong></p>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
<div class="card-block p-t-0" ng-if="vm.msgs.length > 0">
|
|
32
|
-
<table class="table">
|
|
33
|
-
<tr ng-repeat-start="msg in vm.msgs | filter:vm.notificationsFilter.text | orderBy:'id':true track by $index">
|
|
34
|
-
<td ng-class="{'alert, alert-danger': vm.isError(msg)}">
|
|
35
|
-
<span class="interact" ng-click="vm.toggle(msg)">
|
|
36
|
-
<b>
|
|
37
|
-
<span ng-if="vm.isError(msg)" translate>ERROR</span>
|
|
38
|
-
{{'Statement' | translate}}:
|
|
39
|
-
</b>
|
|
40
|
-
{{vm.getStatementName(msg)}}
|
|
41
|
-
</span>
|
|
42
|
-
<small class="text-muted">
|
|
43
|
-
{{'ID' | translate}}: {{msg.id}}
|
|
44
|
-
</small>
|
|
45
|
-
</td>
|
|
46
|
-
</tr>
|
|
47
|
-
<tr ng-repeat-end ng-if="vm.isOpen(msg)">
|
|
48
|
-
<td>
|
|
49
|
-
<h5>
|
|
50
|
-
<i c8y-icon="bars"></i> <translate>Details</translate>
|
|
51
|
-
</h5>
|
|
52
|
-
<pre><code ng-bind-html="msg.data | json"></code></pre>
|
|
53
|
-
</td>
|
|
54
|
-
</tr>
|
|
55
|
-
</table>
|
|
56
|
-
</div>
|
|
57
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";!function(){function e(e){_.assign(this,{RULES_LIST:"eventprocessing",isSmartRuleModule:e.isSmartRuleModule})}e.$inject=["c8yCepModule"],angular.module("c8y.eventProcessing").component("c8yEventProcessingRuleTitle",{templateUrl:":::PLUGIN_PATH:::/details/eventProcessingRuleTitle.html",bindings:{rule:"<",onSaveName:"&",ngDisabled:"="},controller:e,controllerAs:"vm"})}();
|