@c8y/ng1-modules 1021.13.3 → 1021.22.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/core/locales/de.po +289 -18
- package/core/locales/en.po +12 -0
- package/core/locales/en_US.po +3 -0
- package/core/locales/es.po +253 -18
- package/core/locales/fr.po +253 -18
- package/core/locales/ja_JP.po +282 -18
- package/core/locales/nl.po +253 -18
- package/core/locales/pl.po +253 -18
- package/core/locales/pt_BR.po +253 -18
- package/package.json +1 -1
- package/tenantStatistics/tenant-statistics-columns.service.js +1 -1
- package/tenantStatistics/tenant-statistics.component.js +1 -1
- package/dataPointTable/cumulocity.json +0 -26
- package/dataPointTable/dataPointTable.controller.js +0 -1
- package/dataPointTable/dataPointTable.directive.js +0 -1
- package/dataPointTable/dataPointTable.service.js +0 -1
- package/dataPointTable/img/data-point-table-widget-pr.png +0 -0
- package/dataPointTable/index.js +0 -1
- package/dataPointTable/realtimeRadioButton.directive.js +0 -1
- package/dataPointTable/views/dataPointTable.html +0 -39
- package/dataPointTable/views/realtimeRadioButton.html +0 -13
- package/dataPointTable/views/widget.html +0 -83
- package/dataPointTable/views/widgetConfig.html +0 -109
- package/dataPointTable/widget.controller.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{function t(t,o,r,i,e,d,a){var n,l=[{val:"min",text:e("Minimum")},{val:"max",text:e("Maximum")},{val:"area",text:e("Area")}],c="YYYY-MM-DD HH:mm:ss",s={BLOCK_DISPLAY:"d-block",DANGER_FIELD_CSS_CLASS:"danger",DANGER_TEXT_CSS_CLASS:"text-danger",DATE_LEGEND_CSS_CLASS_TEXT_LEFT:"text-left",DATE_LEGEND_CSS_CLASS_TEXT_NOWRAP:"text-nowrap",DATE_LEGEND_LAST_CSS_CLASS:"text-left",DATE_LEGEND_REST_CSS_CLASS:"text-muted text-left",SELECTED_CSS_CLASS:"active",TIME_LEGEND_FIRST_CSS_CLASS:"text-muted text-right",TIME_LEGEND_REST_CSS_CLASS_TEXT_RIGHT:"text-right",TIME_LEGEND_REST_CSS_CLASS_TEXT_NOWRAP:"text-nowrap",VALUE_CSS_CLASS:"text-right",VALUE_SEPARATOR_CSS_CLASS:"text-muted",WARNING_FIELD_CSS_CLASS:"warning",WARNING_TEXT_CSS_CLASS:"text-warning"},u=!1,S=[],m=500,g=_.throttle(function(){var i=o.activePoints;return N().then(function(t){_.forEach(t,function(t,e){var a,n=i[e],r=(n.data=_.cloneDeep(t),a=n,_.findIndex(a.data.series,function(t){return t.type===a.fragment&&t.name===a.series})),e=_.cloneDeep(n.data.series);delete n.data.series,-1<r?(n.data.series=e[r],_.forOwn(n.data.values,function(t,e){_.isObjectLike(n.data.values[e][r])&&(o.legend.push({date:e,momentDate:moment(e),targetId:n.__target.id,targetName:n.__target.name}),w(n,e,r))})):_.forOwn(n.data.values,function(t,e){w(n,e)})})}).then(A).then(I).then(L).then(function(){u=!(n=!0)}).then(y)},100,{leading:!1,trailing:!0}),f=function(){u=!(n=!1),g()},E=_.memoize(function(t){return moment(t).format("ll")},function(t){return"".concat(t,"_").concat(o.aggregation)}),T=_.memoize(function(t){var t=moment(t),e="";"HOURLY"===o.aggregation?e="".concat(t.format("HH[:00]"),"-").concat(t.add(1,"hour").format("HH[:00]")):"MINUTELY"===o.aggregation?e="".concat(t.format("HH:mm"),"-").concat(t.add(1,"minute").format("HH:mm")):o.aggregation||(e=t.format("HH:mm:ss"));return e},function(t){return"".concat(t,"_").concat(o.aggregation)});function L(){var t,e,a=o.tbody.selectAll("tr").data(o.legend,function(t){return[t.date,t.targetId,t.modifiedAt].join(";")}),n=((n=(t=a).enter().append("tr").on("click",function(t){var e;e=t.date,t=t.targetId,o.rowsSelectable&&(o.selected&&o.selected.target===t&&moment(o.selected.date).isSame(e)?o.selected={}:(o.selected={date:e,target:t},o.skipScroll=!0))})).append("td").classed("datetime",!0).call(function(t){t.append("strong").attr("class",[s.DATE_LEGEND_CSS_CLASS_TEXT_LEFT,s.DATE_LEGEND_CSS_CLASS_TEXT_NOWRAP].join(" ")).style("margin-right","2px"),t.append("span")}),n.append("td").classed("target",!0).style("display",o.displayTarget?"table-cell":"none").text(function(t){return t.targetName}),(e=n.selectAll("td.datapoint").data(o.activePoints,function(t){return t._id||t._kpiId||t.$$hashKey})).enter().append("td").call((a=>{function r(t){var e=a.data()||[];return _.filter(e,_.identity)[t]}return function(t){t.attr("class",function(t,e,a){return _(p(r(a),t,"FIELD")).pickBy(_.identity).keys().value().join(" ")}).attr("stw-datatable-tooltip",function(t,e,a){var a=r(a),a=C(a,t),n=null;return x(a,t)?n=d.getString("Red range: {{min}} … {{max}}",{min:t.redRangeMin,max:t.redRangeMax}):D(a,t)&&(n=d.getString("Yellow range: {{min}} … {{max}}",{min:t.yellowRangeMin,max:t.yellowRangeMax})),n}),t.append("strong").text(function(t,e,a){a=r(a);return R(a,t,"min")?C(a,t).min:""}).attr("class",function(t,e,a){return _(p(r(a),t,"TEXT","min")).pickBy(_.identity).keys().value().join(" ")}),t.append("strong").text(function(t,e,a){a=r(a);return R(a,t,"min")&&R(a,t,"max")?" ... ":""}).classed(s.VALUE_SEPARATOR_CSS_CLASS,!0),t.append("strong").text(function(t,e,a){a=r(a);return R(a,t,"max")?C(a,t).max:""}).attr("class",function(t,e,a){return _(p(r(a),t,"TEXT","max")).pickBy(_.identity).keys().value().join(" ")})}})(n)).classed("datapoint",!0).classed(s.VALUE_CSS_CLASS,!0),e.exit().remove(),e.order(),t.sort(function(t,e){return moment(e.date).isAfter(moment(t.date))?1:-1}),a);return n.classed(s.SELECTED_CSS_CLASS,function(t){return!!o.selected&&moment(o.selected.date).valueOf()===t.momentDate.valueOf()&&o.selected.target===t.targetId}),(n=n.select("td.datetime")).attr("stw-datatable-tooltip",function(t){return t.isFirstNewDate?void 0:E(t.date)}),n.select("strong").attr("class",function(t){return t.isLastForDate?s.DATE_LEGEND_LAST_CSS_CLASS:s.DATE_LEGEND_REST_CSS_CLASS}).text(function(t){t=t.date;return E(t)}),n.select("span").attr("class",[s.TIME_LEGEND_REST_CSS_CLASS_TEXT_RIGHT,s.TIME_LEGEND_REST_CSS_CLASS_TEXT_NOWRAP].join(" ")).text(function(t){return T(t.date)}),a.exit().remove(),a}function A(){o.legend=_.sortBy(_.uniqBy(o.legend,function(t){return"".concat(t.date).concat(t.targetId)}),["momentDate","targetName"])}function p(t,e,a,n){var n=n?C(t,e)[n]:C(t,e),t={},r=s["DANGER_".concat(a,"_CSS_CLASS")],a=s["WARNING_".concat(a,"_CSS_CLASS")];return t[r]=!1,t[a]=!1,x(n,e)?t[r]=!0:D(n,e)&&(t[a]=!0),t}function C(t,e){if(n=e,r=(a=t).date,!(n.data&&n.data.values&&n.__target.id===a.targetId&&_.isObjectLike(n.data.values[r])&&_.isNumber(n.data.values[r].min)&&_.isNumber(n.data.values[r].max)))return{};var a,n,r,i={},o=e.data.values,d=t.date;switch(e.renderType){case"area":i.min=o[d].min,i.max=o[d].max;break;case"min":i.min=o[d].min;break;case"max":i.max=o[d].max;break;default:i.min=o[d].min}return i}function v(t,e,a){return _.isObjectLike(t)?t.min>=e&&t.min<=a||t.max>=e&&t.max<=a:e<=t&&t<=a}function x(t,e){return v(t,e.redRangeMin,e.redRangeMax)}function D(t,e){return v(t,e.yellowRangeMin,e.yellowRangeMax)}o.legend=[],o.firstNewDates=[],o.$watch("datapoints",function(t){o.legend=[],o.firstNewDates=[],o.activePoints=[],L();t=_.cloneDeep(t);o.activePoints=_.filter(t,function(t){return t.__active}),o.displayTarget=1<_.uniqBy(o.activePoints,function(t){return t.__target.id}).length,f()}),o.$watch("dateFrom",b),o.$watch("dateTo",b),o.$watch("aggregation",f),o.$watch("selected",function(){var t;n&&(L(),o.skipScroll?o.skipScroll=!1:(t=o.table.find(".".concat(s.SELECTED_CSS_CLASS)).get(0))&&o.panel.animate({scrollTop:(t.offsetTop-o.panel.height())/2},500))}),_.assign(o,{getChartTypeTooltip:function(e){var t=e.label,a=e.unit||e.data&&e.data.series&&e.data.series.unit,n=e.renderType&&l[_.findIndex(l,function(t){return t.val===e.renderType})].text;return[t,a?[" [",a,"]"].join(""):"",n?[" (",d.getString(n),")"].join(""):""].join("")},getFieldStyling:p,getFieldValue:C,onData:function(t){S.push(t),y()},data:{},selected:o.selected||{},isDataLoading:function(){return u}});var N=a.latest(function(){var t=o.activePoints,e=o.dateFrom,a=o.dateTo,n=o.aggregation;return o.legend=[],o.firstNewDates=[],r.all(_.map(t,function(t){return i.loadSeriesData(t,e,a,n)}))});var h=_.throttle(function(){o.panel.scrollTop(0)},500);function y(){if(!u){for(var t=S.shift();t;)(n=>{_.forEach(o.activePoints,function(t){var e,a;e=n[(a=t).fragment],a.__target.id===n.source.id&&e&&e[a.series]&&(t.data=t.data||{values:{}},t.data.values[n.time]={min:n[t.fragment][t.series].value,max:n[t.fragment][t.series].value},_.last(o.legend)&&(e=n.time,a=_.last(o.legend).date,e)&&a&&(e=moment(e).format(c),a=moment(a).format(c),moment(e).isSame(a))&&t.__target.id===_.last(o.legend).targetId&&(o.legend=_.dropRight(o.legend)),o.legend.push({date:n.time,momentDate:moment(n.time),targetId:t.__target.id,targetName:t.__target.name,modifiedAt:moment().toISOString()}),o.legend.length>m)&&o.legend.shift()})})(t),t=S.shift();I(),L(),k()}}function R(t,e,a){return _.isNumber(C(t,e)[a])}function I(){for(var t=o.legend.length,e=0;e<t;e++){var a=0===e,n=e===t-1,r=(o.legend[e-1]?o.legend[e-1].date.substr(0,10):"")!==o.legend[e].date.substr(0,10);o.legend[e].isFirstNewDate=a||r,o.legend[e].isLastForDate=n||r}}function w(t,e,a){t.data.values[e]=_.isUndefined(a)?{}:t.data.values[e][a]}function b(){o.tbody.selectAll("tr").remove(),f()}function k(){o.scrollLocked&&h()}o.$watch("scrollLocked",k)}t.$inject=["$filter","$scope","$q","c8yDataPoint","gettext","gettextCatalog","c8yBase"],angular.module("c8y.cockpit.dataPointTable").controller("c8yDataPointTableController",t)})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
angular.module("c8y.cockpit.dataPointTable").directive("c8yDataPointTable",function(){return{restrict:"E",scope:{datapoints:"=?",dateFrom:"=?",dateTo:"=?",aggregation:"=?",selected:"=?",rowsSelectable:"=?",onData:"=?",scrollLocked:"=?"},controller:"c8yDataPointTableController",templateUrl:":::PLUGIN_PATH:::/views/dataPointTable.html",compile:function(e){if(0!==e.parents(".card.card-dashboard").children(".card-header-actions").length)return function(e,t){e.element=t,e.panel=t.parents("div.card-inner-scroll"),e.table=t.find("table"),e.tbody=d3.select(t.find("tbody").get(0))}}}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{function t(o,n){return{loadSeriesData:function(t,a,e,r){a=a&&moment(a).subtract(1,"minute").startOf("minute"),e=e&&moment(e).add(1,"minute").startOf("minute");return n.listSeries({dateFrom:a&&a.format(o.dateFullFormat),dateTo:e&&e.format(o.dateFullFormat),source:t.__target.id,aggregationType:r||void 0})}}}t.$inject=["c8yBase","c8yMeasurements"],angular.module("c8y.cockpit.dataPointTable").factory("c8yDataPoint",t)})();
|
|
Binary file
|
package/dataPointTable/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{function t(t,e){t.add({name:"Data points table",nameDisplay:e("Data points table"),description:e("A table display of a collection of data points"),templateUrl:":::PLUGIN_PATH:::/views/widget.html",configTemplateUrl:":::PLUGIN_PATH:::/views/widgetConfig.html",previewImage:":::PLUGIN_PATH:::/img/data-point-table-widget-pr.png",options:{noDeviceTarget:!0,minCol:6,datapointAttributes:["datapoints"]},displaySettings:{globalTimeContext:!0,globalRealtimeContext:!0,globalAggregationContext:!0}})}t.$inject=["c8yComponentsProvider","gettext"],angular.module("c8y.cockpit.dataPointTable",[]).config(t)})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
angular.module("c8y.cockpit.dataPointTable").directive("c8yRealtimeRadioButton",["c8yRealtime",function(r){function l(n,t){r.start(n,t)}function u(n,t){r.stop(n,t)}function s(n,t){return r.getStatus(n,t)}return{scope:{start:"=",channel:"@",data:"&onData",subscribed:"&onSubscribed",state:"="},replace:!0,restrict:"EA",templateUrl:":::PLUGIN_PATH:::/views/realtimeRadioButton.html",controller:["$scope",function(c){var o=c.$id;function i(n,t){c.data({data:t})}c.$watch("channel",function(n,t){var a,e;n&&(a=o,e=n,r.addListener(a,e,"CREATE",i),!c.state&&!c.start||s(a,e)||l(a,e)),t&&t!==n&&u(o,t)}),c.$on("$destroy",function(){u(o,c.channel)}),c.icon=function(){var n=r.getStatus(o,c.channel);return c.channel&&(c.state=n),void 0!==n?r.icon(n):r.icon(!1)},c.on=function(){(s(o,c.channel)?u:l)(o,c.channel)},c.$watch("start",function(n){c.channel&&n&&l(o,c.channel),!1===n&&s(o,c.channel)&&u(o,c.channel)})}]}}]);
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<div class="data-point-table">
|
|
2
|
-
<table class="table table-condensed table-striped table-vertical-middle table-fixed">
|
|
3
|
-
<thead class="headers table-header-sticky">
|
|
4
|
-
<tr>
|
|
5
|
-
<th
|
|
6
|
-
style="
|
|
7
|
-
min-width: 140px !important;
|
|
8
|
-
top: var(--data-point-table-header-height);
|
|
9
|
-
z-index: 9;
|
|
10
|
-
"
|
|
11
|
-
>
|
|
12
|
-
<div translate class="header-cell">Date and time</div>
|
|
13
|
-
</th>
|
|
14
|
-
<th ng-show="displayTarget" style="top: var(--data-point-table-header-height); z-index: 9">
|
|
15
|
-
<div translate class="header-cell">Device</div>
|
|
16
|
-
</th>
|
|
17
|
-
<th
|
|
18
|
-
ng-repeat="datapoint in activePoints"
|
|
19
|
-
uib-tooltip="{{ getChartTypeTooltip(datapoint) }}"
|
|
20
|
-
tooltip-popup-delay="500"
|
|
21
|
-
tooltip-append-to-body="true"
|
|
22
|
-
class="header-cell text-right"
|
|
23
|
-
style="top: var(--data-point-table-header-height); z-index: 9"
|
|
24
|
-
>
|
|
25
|
-
<div class="text-truncate-wrap text-center d-inline-block">
|
|
26
|
-
{{ datapoint.label }}
|
|
27
|
-
<br />
|
|
28
|
-
<span class="text-muted">
|
|
29
|
-
{{ datapoint.unit || datapoint.data.series.unit || ' ' }}
|
|
30
|
-
</span>
|
|
31
|
-
</div>
|
|
32
|
-
</th>
|
|
33
|
-
</tr>
|
|
34
|
-
</thead>
|
|
35
|
-
<tbody ng-click="selectDate()"></tbody>
|
|
36
|
-
</table>
|
|
37
|
-
|
|
38
|
-
<c8y-rectangle-spinner ng-show="isDataLoading()"></c8y-rectangle-spinner>
|
|
39
|
-
</div>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<div class="d-block">
|
|
2
|
-
<span title="{{ 'Realtime' | translate }}" style="line-height: 20px;">
|
|
3
|
-
{{ 'Realtime' | translate }}
|
|
4
|
-
</span>
|
|
5
|
-
<button
|
|
6
|
-
type="radio"
|
|
7
|
-
class="btn btn-xs btn-default text-muted"
|
|
8
|
-
ng-click="on()"
|
|
9
|
-
ng-disabled="!channel"
|
|
10
|
-
ng-model="start"
|
|
11
|
-
uib-btn-checkbox
|
|
12
|
-
></button>
|
|
13
|
-
</div>
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
<div
|
|
2
|
-
ng-controller="c8yDataPointTableWidgetCtrl as ctrl"
|
|
3
|
-
style="--data-point-table-header-height: {{
|
|
4
|
-
!child.config.widgetInstanceGlobalTimeContext
|
|
5
|
-
? child.config.displayDateSelection || ctrl.realtime
|
|
6
|
-
? ' 32px'
|
|
7
|
-
: '0'
|
|
8
|
-
: '0'
|
|
9
|
-
}}"
|
|
10
|
-
>
|
|
11
|
-
<c8y-realtime-button
|
|
12
|
-
ng-show="false"
|
|
13
|
-
channel="{{ ctrl.channel }}"
|
|
14
|
-
state="ctrl.realtime"
|
|
15
|
-
on-data="onData($data)"
|
|
16
|
-
></c8y-realtime-button>
|
|
17
|
-
<div class="d-flex sticky-top bg-level-0">
|
|
18
|
-
<div class="top-chart-bar d-flex flex-wrap has-data-selector" ng-if="!child.config.widgetInstanceGlobalTimeContext">
|
|
19
|
-
<span
|
|
20
|
-
class="measurement-icon c8y-realtime"
|
|
21
|
-
tooltip-placement="right"
|
|
22
|
-
tooltip-popup-delay="500"
|
|
23
|
-
tooltip-append-to-body="true"
|
|
24
|
-
uib-tooltip="{{
|
|
25
|
-
(child.config.realtime ? 'Realtime active' : 'Realtime inactive') | translate
|
|
26
|
-
}} "
|
|
27
|
-
aria-label="{{
|
|
28
|
-
(child.config.realtime ? 'Realtime active' : 'Realtime inactive') | translate
|
|
29
|
-
}}"
|
|
30
|
-
>
|
|
31
|
-
<span
|
|
32
|
-
class="c8y-pulse {{ child.config.realtime ? 'active' : 'inactive' }}"
|
|
33
|
-
ng-class="{ active: $scope.realtime }"
|
|
34
|
-
></span>
|
|
35
|
-
</span>
|
|
36
|
-
</div>
|
|
37
|
-
<div class="datepicker-container clearfix p-l-8 flex-grow" ng-if="!child.config.widgetInstanceGlobalTimeContext">
|
|
38
|
-
<div ng-if="child.config.displayDateSelection">
|
|
39
|
-
<c8y-date-time-picker
|
|
40
|
-
ng-model-options="{ debounce: 500 }"
|
|
41
|
-
ng-model="child.config.dateFrom"
|
|
42
|
-
class="form-group-sm pull-left m-l-8 m-b-4"
|
|
43
|
-
placeholder="{{ 'From`date`' | translate }}"
|
|
44
|
-
show-weeks="true"
|
|
45
|
-
show-spinners="false"
|
|
46
|
-
ng-disabled="child.config.realtime"
|
|
47
|
-
append-to-body="true"
|
|
48
|
-
></c8y-date-time-picker>
|
|
49
|
-
<c8y-date-time-picker
|
|
50
|
-
ng-model-options="{ debounce: 500 }"
|
|
51
|
-
ng-model="child.config.dateTo"
|
|
52
|
-
class="form-group-sm pull-left m-l-8"
|
|
53
|
-
placeholder="{{ 'To`date`' | translate }}"
|
|
54
|
-
show-weeks="true"
|
|
55
|
-
show-spinners="false"
|
|
56
|
-
ng-disabled="child.config.realtime"
|
|
57
|
-
append-to-body="true"
|
|
58
|
-
></c8y-date-time-picker>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
<label
|
|
62
|
-
ng-if="ctrl.realtime"
|
|
63
|
-
class="c8y-switch m-r-8 flex-no-shrink m-l-auto"
|
|
64
|
-
title="{{ 'Automatically scrolls to the latest value' | translate }}"
|
|
65
|
-
>
|
|
66
|
-
<input type="checkbox" ng-init="ctrl.scrollLocked=true" ng-model="ctrl.scrollLocked" />
|
|
67
|
-
<span></span>
|
|
68
|
-
<small>{{ 'Auto-scroll' | translate }}</small>
|
|
69
|
-
</label>
|
|
70
|
-
</div>
|
|
71
|
-
|
|
72
|
-
<c8y-data-point-table
|
|
73
|
-
datapoints="child.config.datapoints"
|
|
74
|
-
date-from="child.config.dateFrom"
|
|
75
|
-
date-to="child.config.dateTo"
|
|
76
|
-
aggregation="child.config.aggregation"
|
|
77
|
-
on-data="(onData)"
|
|
78
|
-
widget-id="child.id"
|
|
79
|
-
rows-selectable="child.config.selectable"
|
|
80
|
-
selected="child.config.selected"
|
|
81
|
-
scroll-locked="ctrl.scrollLocked"
|
|
82
|
-
></c8y-data-point-table>
|
|
83
|
-
</div>
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
<div
|
|
2
|
-
ng-controller="DataPointWidgetConfigCtrl"
|
|
3
|
-
ng-init="disableLocalStorage = true"
|
|
4
|
-
class="row no-card-context d-flex"
|
|
5
|
-
style="height: calc(100vh - 422px);"
|
|
6
|
-
>
|
|
7
|
-
<div class="col-md-5 bg-level-1 a-s-stretch inner-scroll">
|
|
8
|
-
<div class="p-l-24 bg-inherit p-t-8">
|
|
9
|
-
<div class="form-group m-b-0 p-b-16 separator-bottom">
|
|
10
|
-
<label for="dateSelection">
|
|
11
|
-
{{ 'Date selection' | translate }}
|
|
12
|
-
<button
|
|
13
|
-
type="button"
|
|
14
|
-
class="btn-help btn-help--sm"
|
|
15
|
-
aria-label="{{ 'Help' | translate }}"
|
|
16
|
-
uib-popover-html="dateSelectionHelpPopoverText | translate"
|
|
17
|
-
popover-placement="right"
|
|
18
|
-
popover-trigger="'focus'"
|
|
19
|
-
popover-append-to-body="true"
|
|
20
|
-
></button>
|
|
21
|
-
</label>
|
|
22
|
-
<div class="c8y-select-wrapper">
|
|
23
|
-
<select
|
|
24
|
-
id="dateSelection"
|
|
25
|
-
class="form-control"
|
|
26
|
-
title="{{ 'Date selection' | translate }}"
|
|
27
|
-
aria-label="{{ 'Date selection' | translate }}"
|
|
28
|
-
ng-model="dateSelection"
|
|
29
|
-
>
|
|
30
|
-
<option
|
|
31
|
-
title="{{ 'Widget configuration' | translate }}"
|
|
32
|
-
value="{{ 'config' }}"
|
|
33
|
-
>
|
|
34
|
-
{{ 'Widget configuration' | translate }}
|
|
35
|
-
</option>
|
|
36
|
-
<option
|
|
37
|
-
title="{{ 'Widget and widget configuration' | translate }}"
|
|
38
|
-
value="{{ 'view_and_config' }}"
|
|
39
|
-
>
|
|
40
|
-
{{ 'Widget and widget configuration' | translate }}
|
|
41
|
-
</option>
|
|
42
|
-
<option
|
|
43
|
-
title="{{ 'Dashboard time range' | translate }}"
|
|
44
|
-
value="{{ 'dashboard_context' }}"
|
|
45
|
-
>
|
|
46
|
-
{{ 'Dashboard time range' | translate }}
|
|
47
|
-
</option>
|
|
48
|
-
</select>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
<c8y-data-point-list
|
|
53
|
-
datapoints="data.datapoints"
|
|
54
|
-
allow-adding-data-points-from-context-mo-only="dashboard.deviceType && dashboard.deviceTypeValue"
|
|
55
|
-
dont-save="true"
|
|
56
|
-
class="bg-inherit separator-bottom"
|
|
57
|
-
></c8y-data-point-list>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
<div class="col-md-7 sticky-top">
|
|
62
|
-
<div class="p-r-24 p-t-8">
|
|
63
|
-
<div
|
|
64
|
-
class="data-point-explorer d-flex d-col"
|
|
65
|
-
ng-controller="c8yDataPointExplorerCtrl"
|
|
66
|
-
>
|
|
67
|
-
<div ng-show="!data.widgetInstanceGlobalTimeContext" class="m-b-4 m-t-4 d-flex j-c-end gap-8">
|
|
68
|
-
<c8y-realtime-button
|
|
69
|
-
class="top-right-control"
|
|
70
|
-
channel="{{ channel }}"
|
|
71
|
-
state="data.realtime"
|
|
72
|
-
on-data="onData($data)"
|
|
73
|
-
></c8y-realtime-button>
|
|
74
|
-
<c8y-aggregation
|
|
75
|
-
class="top-right-control"
|
|
76
|
-
date-from="data.dateFrom"
|
|
77
|
-
date-to="data.dateTo"
|
|
78
|
-
aggregation="data.aggregation"
|
|
79
|
-
realtime="data.realtime"
|
|
80
|
-
auto="true"
|
|
81
|
-
></c8y-aggregation>
|
|
82
|
-
<c8y-interval
|
|
83
|
-
class="top-right-control"
|
|
84
|
-
date-from="data.dateFrom"
|
|
85
|
-
date-to="data.dateTo"
|
|
86
|
-
interval="data.interval"
|
|
87
|
-
></c8y-interval>
|
|
88
|
-
</div>
|
|
89
|
-
<div
|
|
90
|
-
class="c8yGraphFill"
|
|
91
|
-
style="height: calc(100vh - 520px);"
|
|
92
|
-
>
|
|
93
|
-
<c8y-chart
|
|
94
|
-
datapoints="data.graphDataPoints"
|
|
95
|
-
date-from="data.dateFrom"
|
|
96
|
-
date-to="data.dateTo"
|
|
97
|
-
realtime="data.realtime"
|
|
98
|
-
aggregation="data.aggregation"
|
|
99
|
-
show-time="!data.widgetInstanceGlobalTimeContext"
|
|
100
|
-
on-data="(onData)"
|
|
101
|
-
on-update-dates="onUpdateDates($dateFrom, $dateTo)"
|
|
102
|
-
on-update-displayed-dates="onUpdateDisplayedDates($dateFrom, $dateTo)"
|
|
103
|
-
on-box-changed="onBoxChanged(box)"
|
|
104
|
-
></c8y-chart>
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
</div>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{function t(i,t){var n=this,c=(i.$watch("child.config.datapoints",function(t){t=_(t).map("__target.id").compact().uniq().value();t.length?n.channel="/measurements/".concat(t.join(",")):n.channel=""}),i.$watch("child.config.realtime",function(t){n.realtime=!!t}),i.$watch("child.config.date",function(){i.child.config.widgetInstanceGlobalTimeContext&&(i.child.config.dateFrom=new Date(i.child.config.date[0]),i.child.config.dateTo=new Date(i.child.config.date[1]))}),i.child.config.interval);c&&c!==t.custom.id&&(c=_.find(t.intervals,function(t){return t.id===i.child.config.interval})||{}).qty&&(i.child.config.dateFrom=moment().subtract(c.qty,c.unit).toDate(),i.child.config.dateTo=moment().toDate())}t.$inject=["$scope","INTERVAL_CONSTANTS"],angular.module("c8y.cockpit.dataPointTable").controller("c8yDataPointTableWidgetCtrl",t)})();
|