@c8y/ng1-modules 1021.4.3 → 1021.7.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 +1 @@
1
- angular.module("c8y.cockpit.dataPointExplorer").controller("DataPointWidgetConfigCtrl",["$scope","c8yDataPointSvc","gettext",function(a,n,t){a.noActions=!0,a.dontSave=!0,a.onRealtimeAlarmFn=function(t){a.onAlarm=t},a.onRealtimeEventFn=function(t){a.onEvent=t},a.dateSelectionHelpPopoverText=t('\n Choose how to select a date range, the available options are:\n <ul class="m-l-0 p-l-8 m-t-8 m-b-0">\n <li><b>Widget configuration:</b> restricts the date selection only to the widget configuration</li>\n <li><b>Widget and widget configuration:</b> restricts the date selection to the widget view and widget configuration only</li>\n <li><b>Dashboard time range:</b> restricts date selection to the global dashboard configuration only</li>\n </ul>\n ');function e(t,a){var a=_.pick(a,"dateFrom","dateTo","aggregation","displayDateSelection","interval","realtime","displayDateSelection","widgetInstanceGlobalTimeContext","canDecoupleGlobalTimeContext"),e=n.getDefaultFilters();_.assign(t,e,a)}a.onBoxChanged=function(t){a.chartBox=t},a.data={},a.data.datapoints=_.cloneDeep(a.config.datapoints),a.data.alarmsEventsConfigs=_.cloneDeep(a.config.alarmsEventsConfigs),e(a.data,a.config),a.dateSelection=(()=>{var t=a.data.widgetInstanceGlobalTimeContext?"dashboard_context":a.data.displayDateSelection?"view_and_config":"config";return t})(),a.$watch("dateSelection",function(){switch(a.dateSelection){case"dashboard_context":a.data.widgetInstanceGlobalTimeContext=!0;break;case"view_and_config":a.data.widgetInstanceGlobalTimeContext=!1,a.data.displayDateSelection=!0;break;default:a.data.widgetInstanceGlobalTimeContext=!1,a.data.displayDateSelection=!1}},!0),a.$watch("data",function(){a.data.widgetInstanceGlobalTimeContext&&(a.data.dateFrom=a.config.date?a.config.date[0]:a.data.dateFrom,a.data.dateTo=a.config.date?a.config.date[1]:a.data.dateTo,a.data.realtime=a.config.realtime,a.data.displayDateSelection=!1,a.data.canDecoupleGlobalTimeContext=!1,a.data.interval=null),e(a.config,a.data),a.config.datapoints=a.data.graphDataPoints,a.config.alarmsEventsConfigs=a.data.graphAlarmsEventsConfigs},!0)}]);
1
+ angular.module("c8y.cockpit.dataPointExplorer").controller("DataPointWidgetConfigCtrl",["$scope","c8yDataPointSvc","gettext",function(a,n,t){a.noActions=!0,a.dontSave=!0,a.onRealtimeAlarmFn=function(t){a.onAlarm=t},a.onRealtimeEventFn=function(t){a.onEvent=t},a.dateSelectionHelpPopoverText=t('\n Choose how to select a date range, the available options are:\n <ul class="m-l-0 p-l-8 m-t-8 m-b-0">\n <li><b>Dashboard time range:</b> restricts date selection to the global dashboard configuration only</li>\n <li><b>Widget configuration:</b> restricts the date selection only to the widget configuration</li>\n <li><b>Widget and widget configuration:</b> restricts the date selection to the widget view and widget configuration only</li>\n </ul>\n ');function e(t,a){var a=_.pick(a,"dateFrom","dateTo","aggregation","displayDateSelection","interval","realtime","displayDateSelection","widgetInstanceGlobalTimeContext","canDecoupleGlobalTimeContext"),e=n.getDefaultFilters();_.assign(t,e,a)}a.onBoxChanged=function(t){a.chartBox=t},a.data={},a.data.datapoints=_.cloneDeep(a.config.datapoints),a.data.alarmsEventsConfigs=_.cloneDeep(a.config.alarmsEventsConfigs),e(a.data,a.config),a.dateSelection=(()=>{var t=!Object.hasOwn(a.data,"widgetInstanceGlobalTimeContext")&&!Object.hasOwn(a.data,"displayDateSelection")||a.data.widgetInstanceGlobalTimeContext?"dashboard_context":a.data.displayDateSelection?"view_and_config":"config";return t})(),a.$watch("dateSelection",function(){switch(a.dateSelection){case"dashboard_context":a.data.widgetInstanceGlobalTimeContext=!0;break;case"view_and_config":a.data.widgetInstanceGlobalTimeContext=!1,a.data.displayDateSelection=!0;break;default:a.data.widgetInstanceGlobalTimeContext=!1,a.data.displayDateSelection=!1}},!0),a.$watch("data",function(){a.data.widgetInstanceGlobalTimeContext&&(a.data.dateFrom=a.config.date?a.config.date[0]:a.data.dateFrom,a.data.dateTo=a.config.date?a.config.date[1]:a.data.dateTo,a.data.realtime=a.config.realtime,a.data.displayDateSelection=!1,a.data.canDecoupleGlobalTimeContext=!1,a.data.interval=null),e(a.config,a.data),a.config.datapoints=a.data.graphDataPoints,a.config.alarmsEventsConfigs=a.data.graphAlarmsEventsConfigs},!0)}]);
@@ -27,6 +27,12 @@
27
27
  aria-label="{{ 'Date selection' | translate }}"
28
28
  ng-model="dateSelection"
29
29
  >
30
+ <option
31
+ title="{{ 'Dashboard time range' | translate }}"
32
+ value="{{ 'dashboard_context' }}"
33
+ >
34
+ {{ 'Dashboard time range' | translate }}
35
+ </option>
30
36
  <option
31
37
  title="{{ 'Widget configuration' | translate }}"
32
38
  value="{{ 'config' }}"
@@ -39,12 +45,6 @@
39
45
  >
40
46
  {{ 'Widget and widget configuration' | translate }}
41
47
  </option>
42
- <option
43
- title="{{ 'Dashboard time range' | translate }}"
44
- value="{{ 'dashboard_context' }}"
45
- >
46
- {{ 'Dashboard time range' | translate }}
47
- </option>
48
48
  </select>
49
49
  </div>
50
50
  </div>
@@ -1 +1 @@
1
- (()=>{function e(e){this.dateSelectionHelpPopoverText=e('\n Choose how to select a date range, the available options are:\n <ul class="m-l-0 p-l-8 m-t-8 m-b-0">\n <li><b>Widget:</b> restricts the date selection to the widget view only</li>\n <li><b>Dashboard time range:</b> restricts date selection to the global dashboard configuration only</li>\n </ul>\n ')}e.$inject=["gettext"],angular.module("c8y.eventList").controller("EventListConfigCtrl",e)})();
1
+ (()=>{function e(e,t){!!e.config.displaySettings&&"true"!==e.config.widgetInstanceGlobalTimeContext||(e.config.widgetInstanceGlobalTimeContext=!0),this.dateSelectionHelpPopoverText=t('\n Choose how to select a date range, the available options are:\n <ul class="m-l-0 p-l-8 m-t-8 m-b-0">\n <li><b>Dashboard time range:</b> restricts date selection to the global dashboard configuration only</li>\n <li><b>Widget:</b> restricts the date selection to the widget view only</li>\n </ul>\n ')}e.$inject=["$scope","gettext"],angular.module("c8y.eventList").controller("EventListConfigCtrl",["$scope","gettext",e])})();
@@ -20,12 +20,12 @@
20
20
  aria-label="{{ 'Date selection' | translate }}"
21
21
  ng-model="config.widgetInstanceGlobalTimeContext"
22
22
  >
23
- <option title="{{ 'Widget' | translate }}" value="{{ undefined }}">
24
- {{ 'Widget' | translate }}
25
- </option>
26
- <option title="{{ 'Dashboard time range' | translate }}" value="{{ true }}">
23
+ <option title="{{ 'Dashboard time range' | translate }}" ng-value="true">
27
24
  {{ 'Dashboard time range' | translate }}
28
25
  </option>
26
+ <option title="{{ 'Widget' | translate }}" ng-value="undefined">
27
+ {{ 'Widget' | translate }}
28
+ </option>
29
29
  </select>
30
30
  </div>
31
31
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/ng1-modules",
3
- "version": "1021.4.3",
3
+ "version": "1021.7.0",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Cumulocity",
6
6
  "description": "AngularJS modules for Cumulocity IoT applications.",