@c8y/ng1-modules 1018.325.0 → 1018.327.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/asset-notes/assetNotes.component.js +1 -1
- package/asset-notes/assetNotes.html +36 -18
- package/assetPropertyWidget/views/main.html +2 -0
- package/core/ui/properties/schemaPropertySelector.html +2 -0
- package/deviceStatusWidget/requiredAvailabilityIntervalSetting.html +3 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){function
|
|
1
|
+
"use strict";!function(){function e(e,t,n){var o=this;_.assign(o,{$onInit:function(){return t.get(o.config.device).then(function(e){o.notes=e})},edit:function(){o.editable=!0,o.editedNotes=_.cloneDeep(o.notes)},save:function(){t.save(o.config.device,o.editedNotes).then(function(e){o.editable=!1,o.notes=e}).then(function(){return e.success(n("Notes saved."))})},cancel:function(){o.editable=!1,o.editedNotes=void 0}})}e.$inject=["c8yAlert","assetNotesSvc","gettext"],angular.module("c8y.assetNotes").component("c8yAssetNotes",{bindings:{config:"<"},templateUrl:":::PLUGIN_PATH:::/assetNotes.html",controller:e,controllerAs:"vm"})}();
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
<div class="fit-h d-flex flex-wrap a-i-stretch">
|
|
2
|
-
<span
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<span
|
|
3
|
+
class="c8y-icon c8y-icon-duocolor asset-notes-icon"
|
|
4
|
+
c8y-icon="c8y-notification"
|
|
5
|
+
></span>
|
|
6
|
+
<div
|
|
7
|
+
class="asset-notes-content"
|
|
8
|
+
ng-if="!vm.editable"
|
|
9
|
+
>
|
|
10
|
+
<c8y-rectangle-spinner
|
|
11
|
+
class="spinner-inline"
|
|
12
|
+
ng-show="!vm.notes"
|
|
13
|
+
></c8y-rectangle-spinner>
|
|
5
14
|
|
|
6
15
|
<div ng-if="vm.notes && !vm.notes.htmlContent">
|
|
7
16
|
{{ 'No notes yet.' | translate }}
|
|
8
|
-
<c8y-if-allowed admin-mos="[vm.config.
|
|
17
|
+
<c8y-if-allowed admin-mos="[vm.config.device]">
|
|
9
18
|
<button
|
|
10
|
-
type="button"
|
|
11
|
-
title="{{ 'Edit' | translate }}"
|
|
12
19
|
class="btn btn-link btn-sm"
|
|
20
|
+
title="{{ 'Edit' | translate }}"
|
|
21
|
+
type="button"
|
|
13
22
|
ng-click="vm.edit()"
|
|
14
23
|
>
|
|
15
24
|
<i c8y-icon="pencil"></i>
|
|
@@ -18,13 +27,16 @@
|
|
|
18
27
|
</c8y-if-allowed>
|
|
19
28
|
</div>
|
|
20
29
|
|
|
21
|
-
<div
|
|
30
|
+
<div
|
|
31
|
+
class="text-break-word asset-notes-body"
|
|
32
|
+
ng-if="vm.notes && vm.notes.htmlContent"
|
|
33
|
+
>
|
|
22
34
|
<span ng-bind-html="vm.notes.htmlContent | safeLinks"></span>
|
|
23
|
-
<c8y-if-allowed admin-mos="[vm.config.
|
|
35
|
+
<c8y-if-allowed admin-mos="[vm.config.device]">
|
|
24
36
|
<button
|
|
25
|
-
type="button"
|
|
26
|
-
title="{{ 'Edit' | translate }}"
|
|
27
37
|
class="btn btn-link btn-sm"
|
|
38
|
+
title="{{ 'Edit' | translate }}"
|
|
39
|
+
type="button"
|
|
28
40
|
ng-click="vm.edit()"
|
|
29
41
|
>
|
|
30
42
|
<i c8y-icon="pencil"></i>
|
|
@@ -35,37 +47,43 @@
|
|
|
35
47
|
|
|
36
48
|
<div class="asset-notes-footer m-t-8">
|
|
37
49
|
<small class="text-muted">
|
|
38
|
-
<em
|
|
50
|
+
<em
|
|
51
|
+
ng-if="vm.notes.lastUpdated"
|
|
52
|
+
translate
|
|
53
|
+
>
|
|
39
54
|
{{ vm.notes.lastUpdated | absoluteDate }} by {{ vm.notes.user }}
|
|
40
55
|
</em>
|
|
41
56
|
</small>
|
|
42
57
|
</div>
|
|
43
58
|
</div>
|
|
44
|
-
<div
|
|
59
|
+
<div
|
|
60
|
+
class="fit-h flex-grow"
|
|
61
|
+
ng-if="vm.editable"
|
|
62
|
+
>
|
|
45
63
|
<div class="d-flex a-i-stretch fit-h">
|
|
46
64
|
<textarea
|
|
47
|
-
aria-label="{{ 'Notes' | translate }}"
|
|
48
65
|
class="form-control fit-h"
|
|
49
|
-
|
|
66
|
+
aria-label="{{ 'Notes' | translate }}"
|
|
50
67
|
rows="5"
|
|
68
|
+
ng-model="vm.editedNotes.htmlContent"
|
|
51
69
|
c8y-code-editor
|
|
52
70
|
></textarea>
|
|
53
71
|
<div class="input-group-btn a-s-center">
|
|
54
72
|
<button
|
|
55
|
-
type="button"
|
|
56
73
|
class="btn btn-dot"
|
|
57
|
-
ng-click="vm.save()"
|
|
58
74
|
title="{{ 'Save' | translate }}"
|
|
75
|
+
type="button"
|
|
76
|
+
ng-click="vm.save()"
|
|
59
77
|
>
|
|
60
78
|
<i c8y-icon="check"></i>
|
|
61
79
|
</button>
|
|
62
80
|
</div>
|
|
63
81
|
<div class="input-group-btn a-s-center">
|
|
64
82
|
<button
|
|
65
|
-
type="button"
|
|
66
83
|
class="btn btn-dot"
|
|
67
|
-
ng-click="vm.cancel()"
|
|
68
84
|
title="{{ 'Cancel' | translate }}"
|
|
85
|
+
type="button"
|
|
86
|
+
ng-click="vm.cancel()"
|
|
69
87
|
>
|
|
70
88
|
<i c8y-icon="times"></i>
|
|
71
89
|
</button>
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
type="button"
|
|
16
16
|
class="btn btn-default m-b-0"
|
|
17
17
|
ng-click="addProperties()"
|
|
18
|
+
data-cy="assetPropertyWidget--addProperties"
|
|
18
19
|
>
|
|
19
20
|
<i c8y-icon="plus-circle"></i>
|
|
20
21
|
{{ 'Add fragment' | translate }}
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
type="button"
|
|
28
29
|
class="btn btn-link p-l-0 min-width-unset"
|
|
29
30
|
ng-click="startEdit()"
|
|
31
|
+
data-cy="main--edit"
|
|
30
32
|
ng-show="!editable"
|
|
31
33
|
>
|
|
32
34
|
<i c8y-icon="pencil"></i>
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
class="form-control"
|
|
10
10
|
type="search"
|
|
11
11
|
ng-model="search"
|
|
12
|
+
data-cy="schemaPropertySelector--search"
|
|
12
13
|
placeholder="{{ 'Filter properties' | translate }}"
|
|
13
14
|
/>
|
|
14
15
|
<span class="input-group-addon">
|
|
@@ -66,6 +67,7 @@
|
|
|
66
67
|
aria-label="{{ property.label }}"
|
|
67
68
|
id="checkbox-{{ property.keyPath.join('.') }}"
|
|
68
69
|
ng-change="onSelectProperty(property)"
|
|
70
|
+
data-cy="schemaPropertySelector--checkProperty"
|
|
69
71
|
ng-model="property.__active"
|
|
70
72
|
/>
|
|
71
73
|
<span></span>
|
|
@@ -91,8 +91,10 @@
|
|
|
91
91
|
type="checkbox"
|
|
92
92
|
ng-click="vm.switchMaintenance(vm.device)"
|
|
93
93
|
ng-checked="vm.status.maintenanceStatus"
|
|
94
|
+
data-cy="requiredAvailabilityIntervalSetting--switchMaintenance"
|
|
94
95
|
/>
|
|
95
|
-
<span
|
|
96
|
+
<span>
|
|
97
|
+
</span>
|
|
96
98
|
</label>
|
|
97
99
|
</div>
|
|
98
100
|
</div>
|