@c8y/ng1-modules 1018.463.0 → 1018.467.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
- "use strict";!function(){function n(n,e,l,o,t,s){var i=this;_.assign(i,{$onInit:function(){i.configs=i.configs||[]},add:function(){t({templateUrl:":::PLUGIN_PATH:::/alarmsEventsTimelinesConfig/alarmsEventsTimelineConfig.modal.html",controller:"c8yAlarmsEventsTimelineConfigModalController",controllerAs:"vm",resolve:{config:function(){return{allowOnlyContextMo:i.allowAlarmsEventsFromContextMoOnly}}}}).then(function(n){i.configs=i.configs.concat(n)})},remove:function(n){_.pull(i.configs,n)},timelineTypes:s.TIMELINE_TYPES.values()})}n.$inject=["$q","c8yBase","c8yAlarms","c8yEvents","c8yModal","c8yAlarmsEventsTimelinesChartService"],angular.module("c8y.alarmsEventsExplorer").component("c8yAlarmsEventsTimelinesConfig",{bindings:{configs:"=",allowAlarmsEventsFromContextMoOnly:"<"},templateUrl:":::PLUGIN_PATH:::/alarmsEventsTimelinesConfig/alarmsEventsTimelinesConfig.html",controller:n,controllerAs:"vm"})}();
1
+ "use strict";!function(){function n(n,e,l,o,t,s){var i=this;_.assign(i,{$onInit:function(){i.configs=i.configs||[]},add:function(){t({templateUrl:":::PLUGIN_PATH:::/alarmsEventsTimelinesConfig/alarmsEventsTimelineConfig.modal.html",controller:"c8yAlarmsEventsTimelineConfigModalController",controllerAs:"vm",keyboard:!1,resolve:{config:function(){return{allowOnlyContextMo:i.allowAlarmsEventsFromContextMoOnly}}}}).then(function(n){i.configs=i.configs.concat(n)})},remove:function(n){_.pull(i.configs,n)},timelineTypes:s.TIMELINE_TYPES.values()})}n.$inject=["$q","c8yBase","c8yAlarms","c8yEvents","c8yModal","c8yAlarmsEventsTimelinesChartService"],angular.module("c8y.alarmsEventsExplorer").component("c8yAlarmsEventsTimelinesConfig",{bindings:{configs:"=",allowAlarmsEventsFromContextMoOnly:"<"},templateUrl:":::PLUGIN_PATH:::/alarmsEventsTimelinesConfig/alarmsEventsTimelinesConfig.html",controller:n,controllerAs:"vm"})}();
@@ -5,17 +5,17 @@
5
5
  <i class="p-l-24"></i>
6
6
  </div>
7
7
  <div class="c8y-list__item__body">
8
- <div class="content-flex-350">
9
- <div class="col-3">
8
+ <div class="row">
9
+ <div class="col-xs-3">
10
10
  <label class="m-0">{{ 'Tenant' | translate }}</label>
11
11
  </div>
12
- <div class="col-3">
12
+ <div class="col-xs-3">
13
13
  <label class="m-0">{{ 'Active' | translate }}</label>
14
14
  </div>
15
- <div class="col-3">
15
+ <div class="col-xs-3">
16
16
  <label class="m-0">{{ 'Unhealthy' | translate }}</label>
17
17
  </div>
18
- <div class="col-3">
18
+ <div class="col-xs-3">
19
19
  <label class="m-0">{{ 'Desired' | translate }}</label>
20
20
  </div>
21
21
  </div>
@@ -30,53 +30,79 @@
30
30
  ng-repeat="subscription in vm.subscriptionsList | orderBy:'tenantName' track by subscription.tenantName"
31
31
  >
32
32
  <div class="c8y-list__item__block">
33
- <div class="c8y-list__item__icon p-l-0">
33
+ <div class="c8y-list__item__icon p-l-4 p-r-8">
34
34
  <button
35
35
  class="btn-clean"
36
- type="button"
37
36
  aria-label="{{ 'Status' | translate }}: {{ subscription.status | translate }}"
38
37
  uib-tooltip="{{ 'Status' | translate }}: {{ subscription.status | translate }}"
39
38
  tooltip-placement="right"
40
39
  tooltip-popup-delay="500"
41
40
  tooltip-trigger="'mouseenter'"
41
+ type="button"
42
42
  >
43
43
  <i c8y-icon="{{ vm.getStatusIcon(subscription.status) }}"></i>
44
44
  </button>
45
45
  </div>
46
46
  <div class="c8y-list__item__body">
47
- <div class="content-flex-350">
48
- <div class="col-3 text-truncate" title="{{ subscription.tenantName }}">
49
- <span class="text-label-small visible-xs-inline" translate>Tenant</span>
47
+ <div class="row">
48
+ <div
49
+ class="col-xs-3 text-truncate"
50
+ title="{{ subscription.tenantName }}"
51
+ >
52
+ <span
53
+ class="text-label-small visible-xs-inline"
54
+ translate
55
+ >
56
+ Tenant
57
+ </span>
50
58
  {{ subscription.tenantName }}
51
59
  </div>
52
60
  <div
53
- class="col-3 text-truncate"
61
+ class="col-xs-3 text-truncate"
54
62
  title="{{ 'Active' | translate }} {{ subscription.active || 0 }}"
55
63
  >
56
- <span class="text-label-small visible-xs-inline" translate>Active</span>
64
+ <span
65
+ class="text-label-small visible-xs-inline"
66
+ translate
67
+ >
68
+ Active
69
+ </span>
57
70
  {{ subscription.active || 0 }}
58
71
  </div>
59
72
  <div
60
- class="col-3 text-truncate"
73
+ class="col-xs-3 text-truncate"
61
74
  title="{{ 'Unhealthy' | translate }} {{ subscription.unhealthy || 0 }}"
62
75
  >
63
- <span class="text-label-small visible-xs-inline" translate>Unhealthy</span>
76
+ <span
77
+ class="text-label-small visible-xs-inline"
78
+ translate
79
+ >
80
+ Unhealthy
81
+ </span>
64
82
  {{ subscription.unhealthy || 0 }}
65
83
  </div>
66
84
  <div
67
- class="col-3 text-truncate"
85
+ class="col-xs-3 text-truncate"
68
86
  title="{{ 'Desired' | translate }} {{ subscription.desired || 0 }}"
69
87
  >
70
- <span class="text-label-small visible-xs-inline" translate>Desired</span>
88
+ <span
89
+ class="text-label-small visible-xs-inline"
90
+ translate
91
+ >
92
+ Desired
93
+ </span>
71
94
  {{ subscription.desired || 0 }}
72
95
  </div>
73
96
  </div>
74
97
  </div>
75
- <div class="c8y-list__item__actions" ng-if="vm.showDetails(subscription)">
98
+ <div
99
+ class="c8y-list__item__actions"
100
+ ng-if="vm.showDetails(subscription)"
101
+ >
76
102
  <button
77
103
  class="collapse-btn"
78
- type="button"
79
104
  title="{{ 'Expand' | translate }}"
105
+ type="button"
80
106
  ng-click="vm.openItem(subscription)"
81
107
  >
82
108
  <i c8y-icon="chevron-down"></i>
@@ -85,8 +111,8 @@
85
111
  </div>
86
112
  <div uib-collapse="!vm.isOpen(subscription)">
87
113
  <c8y-app-instances-details
88
- instances-details="vm.getSubscriptionInstances(subscription)"
89
114
  class="c8y-list__item__collapse--container d-block"
115
+ instances-details="vm.getSubscriptionInstances(subscription)"
90
116
  ></c8y-app-instances-details>
91
117
  </div>
92
118
  </li>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/ng1-modules",
3
- "version": "1018.463.0",
3
+ "version": "1018.467.0",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Cumulocity",
6
6
  "description": "AngularJS modules for Cumulocity IoT applications.",
@@ -1 +1 @@
1
- "use strict";!function(){function e(i,u,o,r,n,a,t,c,l,s){var d=o.url("service/smartrule"),f="".concat(d,"/smartrules"),h=["id","self","cepModuleId","lastUpdated","creationTime"],p=["type","cepModuleId","creationTime","lastUpdated"];return{permissionsCfgs:{create:[{anyRole:["ROLE_INVENTORY_ADMIN","ROLE_INVENTORY_CREATE"]},{anyRole:["ROLE_CEP_MANAGEMENT_ADMIN","ROLE_SMARTRULE_ADMIN"]}]},getEmpty:function(e){var e=e||n.getContext(),t={type:"c8y_SmartRule",name:"",enabled:!0,config:{}};e.context&&e.id&&(t.c8y_Context=e,t.type="c8y_PrivateSmartRule");return t},list:function(){return u.get(f).then(o.getResData).then(_.property("rules")).then(m)},listByContext:function(e){return u.get(S({moId:e})).then(o.getResData).then(_.property("rules")).then(m)},detail:function(e){e=v({id:e});return u.get(e).then(o.getResData)},save:function(e,t,n){e=e.id?g(e):function(e,t,n){var r=v(e,!0);return function(e,t,n){return e.ruleTemplateName=t.name,function(e,t){var n=i.when(e);e.c8y_Context||t.mo?(e.enabledSources=[],e.disabledSources=void 0,n=y(e,t.mo,t.withChildren)):(e.enabledSources=void 0,e.disabledSources=[]);return n}(e,n)}(e,t,n).then(_.partial(u.post,r)).then(o.getResData)}(e,t,n);return e},remove:function(e){e=v(e,!0);return u.delete(e)},hasSource:function(e,t){t=t&&t.id||t;if(!t)return!1;if(e.disabledSources)return!R(e.disabledSources,t);if(e.enabledSources)return R(e.enabledSources,t);return!0},activate:function(e,t,n){return y(e,t,n).then(g)},deactivate:function(e,t,n){return b(e,t,n).then(g)},updateSources:function(e,t,r,u){return function(e,t,n){return t.reduce(function(e,t){return e.then(function(e){return y(e,t,n)})},i.resolve(e))}(e,t,u).then(function(e){return n=u,r.reduce(function(e,t){return e.then(function(e){return b(e,t,n)})},i.resolve(e));var n}).then(g)},addNewWithUI:U,addNewForInputAlarmAndOutputUserWithUI:function(e,t){return U({inputAlarm:e,outputUser:t})},addNewForInputDataPointWithUI:function(e){return U({inputDataPoint:e})},addNewForOutputOperationWithUI:function(e){return U({outputOperation:{template:function(e){return o.cleanFields(e,["id","self","status","deviceId","creationTime","failureReason"])}(e)}})},createInstanceWithUI:A,createInstanceWithUIByName:function(e,t){return c.getTemplateByName(e).then(function(e){return A(e,t)})},editWithUI:function(e){return N(e,void 0)},cloneWithUI:function(e){return t.current().then(_.partial(D,e)).then(N)}};function m(e){return i.all(_.map(e,function(t){return c.getTemplateForRule(t).then(function(e){return _.isUndefined(e)?null:t})})).then(_.flatten).then(_.filter)}function v(e,t){var n=_.get(e,"c8y_Context.id"),t=t&&n?S({moId:n}):f;return e.id&&(t+="/".concat(e.id)),t}function S(e){return"".concat(d,"/managedObjects/").concat(e.moId,"/smartrules")}function g(e){var t=v(e,!0),e=o.cleanFields(e,p);return u.put(t,e)}function y(n,e,t){return I(e,t).then(function(e){return _.forEach(e,function(t){_.isArray(n.enabledSources)&&!R(n.enabledSources,t)&&n.enabledSources.push(t),_.isArray(n.disabledSources)&&R(n.disabledSources,t)&&_.remove(n.disabledSources,function(e){return _.toString(e)===_.toString(t)})}),n})}function b(n,e,t){return I(e,t).then(function(e){return _.forEach(e,function(t){_.isArray(n.enabledSources)&&R(n.enabledSources,t)&&_.remove(n.enabledSources,function(e){return _.toString(e)===_.toString(t)}),_.isArray(n.disabledSources)&&!R(n.disabledSources,t)&&n.disabledSources.push(t)}),n})}function I(e,t){var e=e&&e.id||e,n=[];return e&&(n.push(i.when(e)),n.push(function(e,t){var n=[];!0!==t&&!0!==t.assets||n.push(r.childAssets(e));!0!==t&&!0!==t.devices||n.push(r.childDevices(e));return i.all(n).then(_.flattenDeep).then(_.partialRight(_.map,"id"))}(e,t))),i.all(n).then(_.flattenDeep)}function R(e,t){var n=t.id||t;return _.some(e,function(e){return _.toString(e)===_.toString(n)})}function U(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=1<arguments.length?arguments[1]:void 0,n=2<arguments.length?arguments[2]:void 0;return a({title:l("Add global smart rule"),templateUrl:":::PLUGIN_PATH:::/views/add.html",controller:"SmartRuleAddCtrl",ariaLabelledBy:"modal-title",ariaDescribedBy:"modal-body",size:"lg",resolve:{context:function(){return _.cloneDeep(e)},ruleInitialObj:function(){return _.cloneDeep(n)},ruleTemplatesFilterFn:function(){return t}}})}function A(e,t){return N(t,e)}function D(e,t){e=_.cloneDeep(e);return(e=o.cleanFields(e,h)).name=s.getString("Duplicate of {{name}}",e),t&&(e.owner=t.id),e}function N(e,t){return a({templateUrl:":::PLUGIN_PATH:::/views/edit.html",controller:"SmartRuleEditCtrl",size:"sm",resolve:{ruleTemplate:function(){return _.cloneDeep(t)},rule:function(){return _.cloneDeep(e)}}})}}e.$inject=["$q","$http","c8yBase","c8yInventory","c8yUiUtil","c8yModal","c8yUser","smartRuleTemplatesSvc","gettext","gettextCatalog"],angular.module("c8y.smartRules").factory("smartRulesSvc",e)}();
1
+ "use strict";!function(){function e(i,u,o,r,n,a,t,c,l,s){var d=o.url("service/smartrule"),f="".concat(d,"/smartrules"),h=["id","self","cepModuleId","lastUpdated","creationTime"],p=["type","cepModuleId","creationTime","lastUpdated"];return{permissionsCfgs:{create:[{anyRole:["ROLE_INVENTORY_ADMIN","ROLE_INVENTORY_CREATE"]},{anyRole:["ROLE_CEP_MANAGEMENT_ADMIN","ROLE_SMARTRULE_ADMIN"]}]},getEmpty:function(e){var e=e||n.getContext(),t={type:"c8y_SmartRule",name:"",enabled:!0,config:{}};e.context&&e.id&&(t.c8y_Context=e,t.type="c8y_PrivateSmartRule");return t},list:function(){return u.get(f).then(o.getResData).then(_.property("rules")).then(m)},listByContext:function(e){return u.get(S({moId:e})).then(o.getResData).then(_.property("rules")).then(m)},detail:function(e){e=v({id:e});return u.get(e).then(o.getResData)},save:function(e,t,n){e=e.id?g(e):function(e,t,n){var r=v(e,!0);return function(e,t,n){return e.ruleTemplateName=t.name,function(e,t){var n=i.when(e);e.c8y_Context||t.mo?(e.enabledSources=[],e.disabledSources=void 0,n=y(e,t.mo,t.withChildren)):(e.enabledSources=void 0,e.disabledSources=[]);return n}(e,n)}(e,t,n).then(_.partial(u.post,r)).then(o.getResData)}(e,t,n);return e},remove:function(e){e=v(e,!0);return u.delete(e)},hasSource:function(e,t){t=t&&t.id||t;if(!t)return!1;if(e.disabledSources)return!R(e.disabledSources,t);if(e.enabledSources)return R(e.enabledSources,t);return!0},activate:function(e,t,n){return y(e,t,n).then(g)},deactivate:function(e,t,n){return b(e,t,n).then(g)},updateSources:function(e,t,r,u){return function(e,t,n){return t.reduce(function(e,t){return e.then(function(e){return y(e,t,n)})},i.resolve(e))}(e,t,u).then(function(e){return n=u,r.reduce(function(e,t){return e.then(function(e){return b(e,t,n)})},i.resolve(e));var n}).then(g)},addNewWithUI:U,addNewForInputAlarmAndOutputUserWithUI:function(e,t){return U({inputAlarm:e,outputUser:t})},addNewForInputDataPointWithUI:function(e){return U({inputDataPoint:e})},addNewForOutputOperationWithUI:function(e){return U({outputOperation:{template:function(e){return o.cleanFields(e,["id","self","status","deviceId","creationTime","failureReason"])}(e)}})},createInstanceWithUI:A,createInstanceWithUIByName:function(e,t){return c.getTemplateByName(e).then(function(e){return A(e,t)})},editWithUI:function(e){return N(e,void 0)},cloneWithUI:function(e){return t.current().then(_.partial(D,e)).then(N)}};function m(e){return i.all(_.map(e,function(t){return c.getTemplateForRule(t).then(function(e){return _.isUndefined(e)?null:t})})).then(_.flatten).then(_.filter)}function v(e,t){var n=_.get(e,"c8y_Context.id"),t=t&&n?S({moId:n}):f;return e.id&&(t+="/".concat(e.id)),t}function S(e){return"".concat(d,"/managedObjects/").concat(e.moId,"/smartrules")}function g(e){var t=v(e,!0),e=o.cleanFields(e,p);return u.put(t,e)}function y(n,e,t){return I(e,t).then(function(e){return _.forEach(e,function(t){_.isArray(n.enabledSources)&&!R(n.enabledSources,t)&&n.enabledSources.push(t),_.isArray(n.disabledSources)&&R(n.disabledSources,t)&&_.remove(n.disabledSources,function(e){return _.toString(e)===_.toString(t)})}),n})}function b(n,e,t){return I(e,t).then(function(e){return _.forEach(e,function(t){_.isArray(n.enabledSources)&&R(n.enabledSources,t)&&_.remove(n.enabledSources,function(e){return _.toString(e)===_.toString(t)}),_.isArray(n.disabledSources)&&!R(n.disabledSources,t)&&n.disabledSources.push(t)}),n})}function I(e,t){var e=e&&e.id||e,n=[];return e&&(n.push(i.when(e)),n.push(function(e,t){var n=[];!0!==t&&!0!==t.assets||n.push(r.childAssets(e));!0!==t&&!0!==t.devices||n.push(r.childDevices(e));return i.all(n).then(_.flattenDeep).then(_.partialRight(_.map,"id"))}(e,t))),i.all(n).then(_.flattenDeep)}function R(e,t){var n=t.id||t;return _.some(e,function(e){return _.toString(e)===_.toString(n)})}function U(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=1<arguments.length?arguments[1]:void 0,n=2<arguments.length?arguments[2]:void 0;return a({title:l("Add global smart rule"),templateUrl:":::PLUGIN_PATH:::/views/add.html",controller:"SmartRuleAddCtrl",ariaLabelledBy:"modal-title",ariaDescribedBy:"modal-body",size:"lg",keyboard:!1,resolve:{context:function(){return _.cloneDeep(e)},ruleInitialObj:function(){return _.cloneDeep(n)},ruleTemplatesFilterFn:function(){return t}}})}function A(e,t){return N(t,e)}function D(e,t){e=_.cloneDeep(e);return(e=o.cleanFields(e,h)).name=s.getString("Duplicate of {{name}}",e),t&&(e.owner=t.id),e}function N(e,t){return a({templateUrl:":::PLUGIN_PATH:::/views/edit.html",controller:"SmartRuleEditCtrl",size:"sm",keyboard:!1,resolve:{ruleTemplate:function(){return _.cloneDeep(t)},rule:function(){return _.cloneDeep(e)}}})}}e.$inject=["$q","$http","c8yBase","c8yInventory","c8yUiUtil","c8yModal","c8yUser","smartRuleTemplatesSvc","gettext","gettextCatalog"],angular.module("c8y.smartRules").factory("smartRulesSvc",e)}();