@c8y/ng1-modules 1021.22.110 → 1021.22.112
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/app-status/app-status/app-status.component.js +1 -1
- package/app-status/app-status/app-status.html +1 -1
- package/package.json +1 -1
- package/smartRules/services/smartRuleTemplates.js +1 -1
- package/userRoles/inventoryRoleSelector/inventoryRoleSelector.component.js +1 -1
- package/userRoles/inventoryRoleSelector/inventoryRoleSelector.html +1 -0
- package/userRoles/inventoryRolesTab/inventoryRolesTab.html +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{function t(t,n,e,i){var
|
|
1
|
+
(()=>{function t(t,n,s,e,i){var a,r=this;function c(){u(!0),s.getApplicationMO(n.applicationId).then(l).then(function(){a="/managedobjects/".concat(r.mo.id),e.addListener(t.$id,a,e.realtimeActions().UPDATE,function(t,n){return l(n)}),e.start(t.$id,a)}).finally(function(){return u(!1)})}function o(){e.stop(t.$id,a),e.removeSubscriber(t.$id,a)}function u(t){r.refreshingItems.appDetails=t}function l(t){r.mo=t,r.status=t.c8y_Status}_.assign(r,{status:"",realtime:!0,refreshingItems:{},tenantSubscriptions:{},$onInit:function(){c(),i.list(!0,!1).then(function(t){r.smartRulesMsExist=!!t}).catch(function(){r.smartRulesMsExist=!1})},$onDestroy:function(){o()},refresh:function(){o(),c(),t.$broadcast("alarmListRefresh"),t.$broadcast("eventListRefresh"),t.$broadcast("smartRulesListReload")},isRefreshing:function(){return _.includes(r.refreshingItems,!0)},statusVisible:function(){return!_.isEmpty(_.get(r.mo,"c8y_Status"))},subscriptionsVisible:function(){return!_.isEmpty(_.get(r.mo,"c8y_Subscriptions"))}}),t.$watch("vm.realtime",function(t,n){t!==n&&(t?c:o)()})}t.$inject=["$scope","$routeParams","c8yApplication","c8yRealtime","smartRuleTemplatesSvc"],angular.module("c8y.appStatus").component("c8yAppStatus",{bindings:{basePath:"@"},templateUrl:":::PLUGIN_PATH:::/app-status/app-status.html",controller:t,controllerAs:"vm"})})();
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
></c8y-app-alarms>
|
|
119
119
|
</div>
|
|
120
120
|
</div>
|
|
121
|
-
<div ng-if="vm.mo" class="inner-scroll--md">
|
|
121
|
+
<div ng-if="vm.mo && vm.smartRulesMsExist" class="inner-scroll--md">
|
|
122
122
|
<div class="card-header large-padding separator-top-bottom sticky-top">
|
|
123
123
|
<div class="card-title">
|
|
124
124
|
{{ 'Smart rules' | translate }}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _slicedToArray(e,r){return _arrayWithHoles(e)||_iterableToArrayLimit(e,r)||_unsupportedIterableToArray(e,r)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,r){var t;if(e)return"string"==typeof e?_arrayLikeToArray(e,r):"Map"===(t="Object"===(t={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function _iterableToArrayLimit(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,a,i,l,o=[],u=!0,c=!1;try{if(i=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;u=!1}else for(;!(u=(n=i.call(t)).done)&&(o.push(n.value),o.length!==r);u=!0);}catch(e){c=!0,a=e}finally{try{if(!u&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(c)throw a}}return o}}function _arrayWithHoles(e){if(Array.isArray(e))return e}(()=>{function e(e,r,
|
|
1
|
+
function _slicedToArray(e,r){return _arrayWithHoles(e)||_iterableToArrayLimit(e,r)||_unsupportedIterableToArray(e,r)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,r){var t;if(e)return"string"==typeof e?_arrayLikeToArray(e,r):"Map"===(t="Object"===(t={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function _iterableToArrayLimit(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,a,i,l,o=[],u=!0,c=!1;try{if(i=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;u=!1}else for(;!(u=(n=i.call(t)).done)&&(o.push(n.value),o.length!==r);u=!0);}catch(e){c=!0,a=e}finally{try{if(!u&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(c)throw a}}return o}}function _arrayWithHoles(e){if(Array.isArray(e))return e}(()=>{function e(e,t,r,n,a,i,l,o){var u=a.url("service/smartrule/smartrules/configurations"),c=e("smartRuleTemplates"),s="list";return 0<_.get(window,"c8y.collections.smartrules",[]).length&&r.warn("In-memory definitions of smart rules are not supported right now."),{list:f,getTemplateForRule:function(r){return f().then(function(e){return _.find(e,{name:r.ruleTemplateName})})},getTemplateByName:function(r){return f().then(function(e){return _.find(e,{name:r})}).then(y)},mustBeAvailable:function(e){return h(e).then(function(e){return e?n.when():n.reject()})},isAvailable:h};function f(){var e={url:u,silentError:0<arguments.length&&void 0!==arguments[0]&&arguments[0]};if(!(1<arguments.length&&void 0!==arguments[1])||arguments[1]){var r=c.get(s);if(r)return n.when(r)}return t(e).then(a.getResData).then(function(e){return _.filter(e,function(e){return!_.includes(l.smartRules.exclude,e.name)})}).then(m).then(function(e){return c.put(s,e),e})}function m(e){var r=[];return e.forEach(function(e){r.push(y(e))}),n.all(r)}function y(r){return h(r.name).then(function(e){return r._active=e,n.when(r)})}function h(e){switch(e){case"sendDashboardsViaEmail":return n.all({systemOption:i.getSystemOptionValue({category:"reportMailer",key:"available"},!1),featureActive:o.isAvailable({name:"feature-dashboard-mailer"})}).then(_.every);case"onAlarmSendSms":return n.all([o.isAvailable({contextPath:"messaging"}),i.detailValue({category:"messaging",key:"provider"})]).then(function(e){var e=_slicedToArray(e,2),r=e[0];return Boolean(r&&e[1])});case"onAlarmEscalateAlarm":return h("onAlarmSendSms");default:return n.when(!0)}}}e.$inject=["$cacheFactory","$http","$log","$q","c8yBase","c8ySettings","c8yConfig","c8yApplication"],angular.module("c8y.smartRules").factory("smartRuleTemplatesSvc",e)})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{function e(e,n){var o=this,t=[],i=[];function r(){t=_.clone((o.assignedRoles||{}).roles)||[]}function l(e){return _(e).sortBy(y).map(y).value().join(", ")}function s(e){return _.some(t,{id:e.id})||d(e)}function d(e){return _.some(i,{id:e.id})}function c(){return e("filter")(o.inventoryRoles,o.roleTextFilter)}function u(){var e=c().filter(g);return _.every(e,s)}function a(){return t.filter(g)}function g(e){return!o.ownerAllowedRoles||_.some(o.ownerAllowedRoles,{id:e.id})}function f(){var e=_.sortBy(_.map((o.assignedRoles||{}).roles,"id")),n=_.sortBy(_.map(t,"id"));o.isUnchanged=_.isEqual(e,n)}function y(e){return n.getString(e.name)}_.assign(o,{displayTextAssigned:function(){return l((o.assignedRoles||{}).roles)},displayTextInherited:function(){return l(i)},$onChanges:function(e){e.assignedRoles&&r();e.inheritedRoles&&(i=o.inheritedRoles)},toggle:function(e){s(e)?_.remove(t,{id:e.id}):(t.push(e),t=_.uniqBy(t,"id"));f()},toggleSelectAll:function(){u()?t.length=0:t=_.reject(c(),d);f()},allSelected:u,isSelected:s,isInherited:d,filteredAssignedRoles:a,apply:function(){var e=a();o.onApply({roles:e}),o.isDropDownOpen=!1},onToggleDropdown:function(e){e||(r(),o.isUnchanged=!0)},isAllowedByOwner:g,isUnchanged:!0,getFormattedInventoryRoleDescription:_.memoize(function(e){return n.getString(e.trim())}),translateName:y})}e.$inject=["$filter","gettextCatalog"],angular.module("c8y.userRoles").component("c8yInventoryRoleSelector",{bindings:{assignedRoles:"<",inheritedRoles:"<",inventoryRoles:"<",ownerAllowedRoles:"<",onApply:"&"},templateUrl:":::PLUGIN_PATH:::/inventoryRoleSelector/inventoryRoleSelector.html",controller:e,controllerAs:"vm"})})();
|
|
1
|
+
(()=>{function e(e,n){var o=this,t=[],i=[];function r(){t=_.clone((o.assignedRoles||{}).roles)||[]}function l(e){return _(e).sortBy(y).map(y).value().join(", ")}function s(e){return _.some(t,{id:e.id})||d(e)}function d(e){return _.some(i,{id:e.id})}function c(){return e("filter")(o.inventoryRoles,o.roleTextFilter)}function u(){var e=c().filter(g);return _.every(e,s)}function a(){return t.filter(g)}function g(e){return!o.ownerAllowedRoles||_.some(o.ownerAllowedRoles,{id:e.id})}function f(){var e=_.sortBy(_.map((o.assignedRoles||{}).roles,"id")),n=_.sortBy(_.map(t,"id"));o.isUnchanged=_.isEqual(e,n)}function y(e){return n.getString(e.name)}_.assign(o,{displayTextAssigned:function(){return l((o.assignedRoles||{}).roles)},displayTextInherited:function(){return l(i)},$onChanges:function(e){e.assignedRoles&&r();e.inheritedRoles&&(i=o.inheritedRoles)},toggle:function(e){s(e)?_.remove(t,{id:e.id}):(t.push(e),t=_.uniqBy(t,"id"));f()},toggleSelectAll:function(){u()?t.length=0:t=_.reject(c(),d);f()},allSelected:u,isSelected:s,isInherited:d,filteredAssignedRoles:a,apply:function(){var e=a();o.onApply({roles:e}),o.isDropDownOpen=!1},onToggleDropdown:function(e){e||(r(),o.isUnchanged=!0)},isAllowedByOwner:g,isUnchanged:!0,getFormattedInventoryRoleDescription:_.memoize(function(e){return n.getString(e.trim())}),translateName:y})}e.$inject=["$filter","gettextCatalog"],angular.module("c8y.userRoles").component("c8yInventoryRoleSelector",{bindings:{assignedRoles:"<",inheritedRoles:"<",inventoryRoles:"<",ownerAllowedRoles:"<",disableEditForExternalUsers:"<",onApply:"&"},templateUrl:":::PLUGIN_PATH:::/inventoryRoleSelector/inventoryRoleSelector.html",controller:e,controllerAs:"vm"})})();
|
|
@@ -146,6 +146,7 @@
|
|
|
146
146
|
[assigned-roles]="vm.assignedRoles"
|
|
147
147
|
[page-size]="vm.pageSize"
|
|
148
148
|
[pagination-offset]="(vm.currentPage - 1) * vm.pageSize"
|
|
149
|
+
[disable-edit-for-external-users]="vm.disableEditForExternalUsers"
|
|
149
150
|
(on-change-roles)="vm.onChangeRoles($event)"
|
|
150
151
|
(on-change-item-count)="vm.totalItemsCount = $event"
|
|
151
152
|
></c8y-roles-asset-tree-downgraded>
|