@c8y/ng1-modules 1017.81.0 → 1017.83.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-auditLogs/views/filter.html +2 -4
- package/cell-id-usage-statistics/cell-id-usage-statistics.html +14 -10
- package/core/ui/controllers/eventList.js +1 -1
- package/core/ui/views/dateTimePicker.html +2 -2
- package/dataPointTable/views/widget.html +2 -2
- package/device-protocol-lwm2m/lwm2mValidationRules/lwm2mValidationRule.html +1 -1
- package/measurements/views/timeInterval.html +6 -4
- package/package.json +1 -1
- package/smartRestEditor/addTemplate/addTemplate.button.html +1 -1
- package/tenantStatistics/tenant-statistics.html +5 -6
|
@@ -18,12 +18,11 @@
|
|
|
18
18
|
name="dateFrom"
|
|
19
19
|
class="form-control"
|
|
20
20
|
placeholder="{{ 'Date from' | translate }}"
|
|
21
|
-
datepicker-options="{maxDate: viewFilter.dateTo}"
|
|
22
21
|
ng-model="viewFilter.dateFrom"
|
|
23
22
|
uib-datepicker-popup
|
|
23
|
+
datepicker-options="{ maxDate: viewFilter.dateTo, showWeeks: true }"
|
|
24
24
|
datepicker-append-to-body="true"
|
|
25
25
|
show-button-bar="false"
|
|
26
|
-
show-weeks="false"
|
|
27
26
|
is-open="dateOpen.from"
|
|
28
27
|
ng-click="open('from')"
|
|
29
28
|
/>
|
|
@@ -36,10 +35,9 @@
|
|
|
36
35
|
placeholder="{{ 'Date to' | translate }}"
|
|
37
36
|
ng-model="viewFilter.dateTo"
|
|
38
37
|
uib-datepicker-popup
|
|
38
|
+
datepicker-options="{ minDate: viewFilter.dateFrom, showWeeks: true }"
|
|
39
39
|
datepicker-append-to-body="true"
|
|
40
40
|
show-button-bar="false"
|
|
41
|
-
show-weeks="false"
|
|
42
|
-
datepicker-options="{minDate: viewFilter.dateFrom}"
|
|
43
41
|
is-open="dateOpen.to"
|
|
44
42
|
ng-click="open('to')"
|
|
45
43
|
/>
|
|
@@ -6,24 +6,28 @@
|
|
|
6
6
|
<input
|
|
7
7
|
class="form-control text-center"
|
|
8
8
|
placeholder="{{ 'From`date`' | translate }}"
|
|
9
|
-
uib-datepicker-popup
|
|
10
9
|
ng-model="vm.dateFrom"
|
|
11
|
-
datepicker-
|
|
10
|
+
uib-datepicker-popup
|
|
11
|
+
datepicker-options="{ maxDate: vm.dateTo, showWeeks: true }"
|
|
12
|
+
datepicker-append-to-body="true"
|
|
13
|
+
show-button-bar="false"
|
|
12
14
|
is-open="vm.dateFromOpened"
|
|
13
15
|
ng-click="vm.dateFromOpened=true"
|
|
14
|
-
style="width: 120px
|
|
16
|
+
style="width: 120px"
|
|
15
17
|
/>
|
|
16
18
|
</div>
|
|
17
19
|
<div class="form-group datepicker">
|
|
18
20
|
<input
|
|
19
21
|
class="form-control text-center"
|
|
20
22
|
placeholder="{{ 'To`date`' | translate }}"
|
|
21
|
-
uib-datepicker-popup
|
|
22
23
|
ng-model="vm.dateTo"
|
|
23
|
-
datepicker-
|
|
24
|
+
uib-datepicker-popup
|
|
25
|
+
datepicker-options="{ minDate: vm.dateFrom, showWeeks: true }"
|
|
26
|
+
datepicker-append-to-body="true"
|
|
27
|
+
show-button-bar="false"
|
|
24
28
|
is-open="vm.dateToOpened"
|
|
25
29
|
ng-click="vm.dateToOpened=true"
|
|
26
|
-
style="width: 120px
|
|
30
|
+
style="width: 120px"
|
|
27
31
|
/>
|
|
28
32
|
</div>
|
|
29
33
|
<button
|
|
@@ -55,7 +59,8 @@
|
|
|
55
59
|
c8y-headers="vm.subtenantList.csvHeaders"
|
|
56
60
|
c8y-data="vm.subtenantList.csvData()"
|
|
57
61
|
>
|
|
58
|
-
<i c8y-icon="table"></i>
|
|
62
|
+
<i c8y-icon="table"></i>
|
|
63
|
+
<span translate>Export CSV</span>
|
|
59
64
|
</button>
|
|
60
65
|
|
|
61
66
|
<button
|
|
@@ -64,7 +69,7 @@
|
|
|
64
69
|
class="btn btn-link"
|
|
65
70
|
ng-click="vm.refresh()"
|
|
66
71
|
>
|
|
67
|
-
<i c8y-icon="refresh" ng-class="{'icon-spin': refreshLoading}"></i>
|
|
72
|
+
<i c8y-icon="refresh" ng-class="{ 'icon-spin': refreshLoading }"></i>
|
|
68
73
|
<span translate>Reload</span>
|
|
69
74
|
</button>
|
|
70
75
|
</c8y-ui-action-bar-set>
|
|
@@ -95,6 +100,5 @@
|
|
|
95
100
|
on-columns-config-changed="vm.subtenantList.onColumnsConfigChanged(columnsConfig)"
|
|
96
101
|
items="vm.subtenantList.filteredSortedStatisticsItems"
|
|
97
102
|
on-item-click="vm.subtenantList.goToSubtenant(item)"
|
|
98
|
-
>
|
|
99
|
-
</c8y-filtered-sorted-list>
|
|
103
|
+
></c8y-filtered-sorted-list>
|
|
100
104
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){function e(a,i,n,r,t,o,d,s){var l=this;l.datePickerOptionsFrom={},l.datePickerOptionsTo={},a.refreshLoading=!1;var c=[],f=!0;function u(e,t){(!a.events||a.refreshLoading||t)&&(a.events=[],a.refreshLoading=!1),a.ordering="".concat(f?"-":"","dateTime"),a.events=_.uniqBy(a.events.concat(e),"id"),_.forEach(a.events,function(e){e.dateTime=new Date(e.time)}),a.paging=e.paging,T(a.events.length),a.onEventLoaded({qty:a.events.length})}function e(){!function(){var e=a.realtimeChannel;b(),t.getStatus(a.$id,e)&&e!==a.realtimeChannel&&(
|
|
1
|
+
"use strict";!function(){function e(a,i,n,r,t,o,d,s){var l=this;l.datePickerOptionsFrom={showWeeks:!0},l.datePickerOptionsTo={showWeeks:!0},a.refreshLoading=!1;var c=[],f=!0;function u(e,t){(!a.events||a.refreshLoading||t)&&(a.events=[],a.refreshLoading=!1),a.ordering="".concat(f?"-":"","dateTime"),a.events=_.uniqBy(a.events.concat(e),"id"),_.forEach(a.events,function(e){e.dateTime=new Date(e.time)}),a.paging=e.paging,T(a.events.length),a.onEventLoaded({qty:a.events.length})}function e(){!function(){var e=a.realtimeChannel;b(),t.getStatus(a.$id,e)&&e!==a.realtimeChannel&&(E(),function(e){t.stop(a.$id,e)}(e),C())}(),a.refreshLoading=!0,m(),T()}function m(e){var t=function(e){var i=e||{};_.assign(i,a.filters),_.forOwn(i,function(e,t){e||delete i[t]}),(i.source||i.deviceId)&&(i.source=i.source||i.deviceId,delete i.deviceId,i.withSourceDevices=!0,i.withSourceAssets=!0),_.isUndefined(i.pageSize)&&(i.pageSize=10);var t=a.timeRangeUnit||"day";return i.dateFrom&&(i.dateFrom=moment(i.dateFrom).startOf(t).format(r.dateFullFormat)),i.dateTo&&(i.dateTo=moment(i.dateTo).endOf(t).format(r.dateFullFormat)),i}(e);return n.list(t).then(u)}function g(){a.refreshLoading=!0,f?(f=!1,y().finally(function(){a.refreshLoading=!1})):a.paging.refresh().then(_.partialRight(u,!0))}function v(e){return c.indexOf(e)}function h(e){return-1<v(e)}function y(){f=!f,a.recentFirstActive=f;var e=a.paging.statistics.totalPages,t=f?void 0:{currentPage:e};return a.refreshLoading=!0,m(t)}function p(e,t,i){var n={};e&&(n.dateFrom=moment(e).format(r.dateFullFormat)),t&&(n.dateTo=moment(t).format(r.dateFullFormat)),i?n.type=i:(delete n.type,delete a.filters.type),_.merge(a.filters,n)}function F(e){a.dateTo=void 0,a.dateFrom=void 0,l.dateTo=a.dateTo,l.dateFrom=a.dateFrom,a.filters.dateTo=void 0,a.filters.dateFrom=void 0,l.eventType=void 0,p(a.dateFrom,a.dateTo,e)}function T(e){a.filters.source||(a.title=d("Events"),a.subtitle=e?s.getString("{{qty}} loaded",{qty:e}):""),a.showPageTitles&&(a.filters.deviceId||o.changeTitle({title:d("Events"),subtitle:e?s.getString("{{qty}} loaded",{qty:e}):""}))}function $(e,t){if(!_.some(a.events,{id:t.id})){t.dateTime=new Date(t.time);var i=t.dateTime;a.filters.dateFrom&&i<moment(a.filters.dateFrom).startOf("day")||a.filters.dateTo&&i>moment(a.filters.dateTo).endOf("day")||a.filters.type&&a.filters.type!==t.type||a.events.push(t)}}function L(e,t){_.remove(a.events,{id:t.id})}function S(e,t){var i=_.findIndex(a.events,{id:t.id});a.events[i]=t}function w(){a.refreshLoading=!0,m(),T()}function C(){t.start(a.$id,a.realtimeChannel)}function E(){t.addListener(a.$id,a.realtimeChannel,"".concat(a.$id,"-subscribed"),w),t.addListener(a.$id,a.realtimeChannel,"CREATE",$),t.addListener(a.$id,a.realtimeChannel,"UPDATE",S),t.addListener(a.$id,a.realtimeChannel,"DELETE",L)}function b(){var e=a.filters.deviceId||a.filters.source;a.realtimeChannel="/eventsWithChildren/".concat(e||"*")}function O(){return r.checkIfModulesExist(["c8y.eventsBinary"])}a.$watch(function(){return l.dateFrom},function(e){l.datePickerOptionsTo={minDate:e,showWeeks:!0}}),a.$watch(function(){return l.dateTo},function(e){l.datePickerOptionsFrom={maxDate:e,showWeeks:!0}}),l.subscriberId=a.$id,l.filters=a.filters,l.filter=p,l.clearFilter=F,a.isEventsBinaryModuleAvailable=O,a.displayEventsBinary=function(e){return O()&&e.c8y_IsBinary},a.refresh=g,a.loadNext=function(e){if(a.paging.loading=!0,e)a.refreshLoading=!0,m({pageSize:e}).finally(function(){a.refreshLoading=!1});else{var t=f?"next":"prev";a.paging[t]().then(u).finally(function(){a.paging.loading=!1})}},a.isOpen=h,a.toggle=function(e){h(e)?c.splice(v(e),1):c.push(e)},a.filters=a.filters||{},a.getStandardKeys=n.getStandardKeys,a.getNonStandardKeys=function(e){return _.without(n.getNonStandardKeys(e),"dateTime")},a.recentFirst=y,a.filter=p,a.clearFilter=F;var R,k={};a.absolute=function(e){var t=k[e.id];return t||(t=i("absoluteDate")(e.time),k[e.id]=t),t},a.$watch("realtime",function(){a.realtime!==t.getStatus(a.$id,a.realtimeChannel)&&t.switchRealtime(a.$id,a.realtimeChannel)}),a.$on("eventListRefresh",g),a.$on("$destroy",function(){t.removeSubscriber(a.$id,a.realtimeChannel)}),a.$watch("filters",e,!0),b(),E(),a.initialRealtimeState=(R=[a.initialRealtimeState,a.realtime],_.head(_.reject(R,_.isUndefined))),a.initialRealtimeState&&(a.realtime=a.initialRealtimeState,C())}e.$inject=["$scope","$filter","c8yEvents","c8yBase","c8yRealtime","c8yTitle","gettext","gettextCatalog"],angular.module("c8y.ui").controller("eventList",e)}();
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
ng-class="getInputSizeClass()"
|
|
10
10
|
placeholder="{{ placeholder | translate }}"
|
|
11
11
|
is-open="isOpen"
|
|
12
|
+
ng-model="value.date"
|
|
12
13
|
uib-datepicker-popup
|
|
13
|
-
datepicker-append-to-body="appendToBody"
|
|
14
14
|
datepicker-options="datePickerOptions"
|
|
15
|
+
datepicker-append-to-body="appendToBody"
|
|
15
16
|
show-button-bar="false"
|
|
16
|
-
ng-model="value.date"
|
|
17
17
|
ng-required="required"
|
|
18
18
|
ng-disabled="disabled"
|
|
19
19
|
ng-click="isOpen = true"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
ng-model="child.config.dateFrom"
|
|
23
23
|
class="form-group-sm pull-left m-l-8 m-b-4"
|
|
24
24
|
placeholder="{{ 'From`date`' | translate }}"
|
|
25
|
-
show-weeks="
|
|
25
|
+
show-weeks="true"
|
|
26
26
|
show-spinners="false"
|
|
27
27
|
append-to-body="true"
|
|
28
28
|
></c8y-date-time-picker>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
ng-model="child.config.dateTo"
|
|
32
32
|
class="form-group-sm pull-left m-l-8"
|
|
33
33
|
placeholder="{{ 'To`date`' | translate }}"
|
|
34
|
-
show-weeks="
|
|
34
|
+
show-weeks="true"
|
|
35
35
|
show-spinners="false"
|
|
36
36
|
append-to-body="true"
|
|
37
37
|
></c8y-date-time-picker>
|
|
@@ -18,10 +18,11 @@
|
|
|
18
18
|
class="form-control"
|
|
19
19
|
placeholder="{{ 'From`date`' | translate }}"
|
|
20
20
|
is-open="openFrom"
|
|
21
|
+
ng-model="dateFrom"
|
|
21
22
|
uib-datepicker-popup
|
|
22
|
-
datepicker-options="{maxDate: dateTo}"
|
|
23
|
+
datepicker-options="{ maxDate: dateTo, showWeeks: true }"
|
|
24
|
+
datepicker-append-to-body="true"
|
|
23
25
|
show-button-bar="false"
|
|
24
|
-
ng-model="dateFrom"
|
|
25
26
|
ng-click="openFrom=true"
|
|
26
27
|
/>
|
|
27
28
|
</div>
|
|
@@ -31,10 +32,11 @@
|
|
|
31
32
|
class="form-control"
|
|
32
33
|
placeholder="{{ 'To`date`' | translate }}"
|
|
33
34
|
is-open="openTo"
|
|
35
|
+
ng-model="dateTo"
|
|
34
36
|
uib-datepicker-popup
|
|
35
|
-
datepicker-options="{minDate: dateFrom}"
|
|
37
|
+
datepicker-options="{ minDate: dateFrom, showWeeks: true }"
|
|
38
|
+
datepicker-append-to-body="true"
|
|
36
39
|
show-button-bar="false"
|
|
37
|
-
ng-model="dateTo"
|
|
38
40
|
ng-click="openTo=true"
|
|
39
41
|
/>
|
|
40
42
|
</div>
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<button title="{{ 'Create template' | translate }}" class="btn btn-link" ng-click="$ctrl.add()" data-cy="
|
|
1
|
+
<button title="{{ 'Create template' | translate }}" class="btn btn-link" ng-click="$ctrl.add()" data-cy="add-template">
|
|
2
2
|
<i c8y-icon="plus-circle"></i>
|
|
3
3
|
<translate>Create template</translate>
|
|
4
4
|
</button>
|
|
@@ -8,10 +8,7 @@
|
|
|
8
8
|
label="{{ 'Usage statistics' | translate }}"
|
|
9
9
|
icon="cog"
|
|
10
10
|
></c8y-breadcrumbs-item>
|
|
11
|
-
<c8y-breadcrumbs-item
|
|
12
|
-
label="{{ 'Tenants' | translate }}"
|
|
13
|
-
icon="cog"
|
|
14
|
-
></c8y-breadcrumbs-item>
|
|
11
|
+
<c8y-breadcrumbs-item label="{{ 'Tenants' | translate }}" icon="cog"></c8y-breadcrumbs-item>
|
|
15
12
|
</c8y-breadcrumbs-set>
|
|
16
13
|
|
|
17
14
|
<c8y-ui-action-bar-set>
|
|
@@ -24,8 +21,9 @@
|
|
|
24
21
|
class="form-control text-center"
|
|
25
22
|
ng-model="vm.dateFrom"
|
|
26
23
|
uib-datepicker-popup
|
|
24
|
+
datepicker-options="{ maxDate: vm.dateTo, showWeeks: true }"
|
|
27
25
|
datepicker-append-to-body="true"
|
|
28
|
-
|
|
26
|
+
show-button-bar="false"
|
|
29
27
|
is-open="openFrom"
|
|
30
28
|
ng-click="openFrom=true"
|
|
31
29
|
placeholder="{{ 'Date from' | translate }}"
|
|
@@ -38,8 +36,9 @@
|
|
|
38
36
|
class="form-control text-center"
|
|
39
37
|
ng-model="vm.dateTo"
|
|
40
38
|
uib-datepicker-popup
|
|
39
|
+
datepicker-options="{ minDate: vm.dateFrom, showWeeks: true }"
|
|
41
40
|
datepicker-append-to-body="true"
|
|
42
|
-
|
|
41
|
+
show-button-bar="false"
|
|
43
42
|
is-open="openTo"
|
|
44
43
|
ng-click="openTo=true"
|
|
45
44
|
placeholder="{{ 'Date to' | translate }}"
|