@c8y/ng1-modules 1018.466.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.
package/alarmsEventsExplorer/alarmsEventsTimelinesConfig/alarmsEventsTimelinesConfig.component.js
CHANGED
|
@@ -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"})}();
|
package/package.json
CHANGED
|
@@ -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)}();
|