@c8y/ng1-modules 1017.0.231 → 1017.0.233

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/ng1-modules",
3
- "version": "1017.0.231",
3
+ "version": "1017.0.233",
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 _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&o.push.apply(o,Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),o.forEach(function(t){_defineProperty(e,t,n[t])})}return e}function _defineProperty(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}!function(){function t(t,e,n,o,r,i,a,u,s,c,l,m,g,f,d){var C=this,p=l.another(l.paths.Tenants),h=c.stringToDate(i.fromThisMonthStartFilter().dateFrom),T=f("No tenants to display.");function S(){C.refreshLoading=!0,u.isCurrentUserTopTenant().then(function(t){C.isTopTenant=t}).then(y).then(v).then(b).then(O).then(U).then(j).then(function(){C.refreshLoading=!1})}function y(){C.storageLimitFeatureEnabled=i.appOption("storageLimitationFeatureEnabled")}function v(){C.dateFrom=c.stringToDate(n.dateFrom)||h,C.dateTo=c.stringToDate(n.dateTo)}function b(){return a.list(P()).then(D)}function P(){return{dateFrom:c.dateToStringWithTimeZone(C.dateFrom),dateTo:void 0!==C.dateTo?c.dateToStringWithTimeZone(moment(C.dateTo).endOf("day")):void 0}}function D(t){C.statistics=function(t){return _.map(t,function(t){return _objectSpread({},t,{storageQuota:F(function(t){var e=t.storageLimitPerDevice,n=t.deviceWithChildrenCount,o=e;o&&(o*=n||1);return o}(t)),storageSize:F(t.storageSize),peakStorageSize:F(t.peakStorageSize)})})}(t)}function F(t){return!_.isUndefined(t)&&Number((t/Math.pow(2,20)).toFixed(2))}function O(){return p.list().then(function(t){return _.filter(t,{id:"c8ySchema!!customProperties"})}).then(function(t){return p.getSchema(t)}).then(function(t){return _.get(t,"properties.customProperties.properties",{})}).then(function(t){return _.map(t,function(t,e){return{title:t.title,key:e,schema:t}})}).then(function(t){C.customProperties=_.sortBy(t,"title")})}function U(){C.columns=_([m.getTenantNameColumn(),m.getTenantIdColumn(),m.getTenantDomainColumn(),m.getApiRequestsColumn(),m.getDeviceApiRequestsColumn(),C.storageLimitFeatureEnabled?m.getStorageQuotaColumn():null,m.getStorageSizeColumn(),m.getPeakStorageSizeColumn(),m.getRootDevicesColumn(),m.getPeakRootDevicesColumn(),m.getDevicesColumn(),m.getPeakDevicesColumn(),m.getDeviceEndpointCountColumn(),m.getSubscribedApplicationsColumn(),m.getCreationTimeColumn(),m.getAlarmsCreatedCountColumn(),m.getAlarmsUpdatedCountColumn(),m.getInventoriesCreatedCountColumn(),m.getInventoriesUpdatedCountColumn(),m.getEventsCreatedCountColumn(),m.getEventsUpdatedCountColumn(),m.getMeasurementsCreatedCountColumn(),m.getTotalInboundTransferColumn(),m.getCpuUsageColumn(),m.getMemoryUsageColumn(),C.isTopTenant?m.getParentTenantIdColumn():null,_.map(C.customProperties,function(t){return m.getCustomPropertyColumn(t)})]).flattenDeep().compact().orderBy([function(t){return t.priority||0}],["desc"]).value(),C.columnsConfig={}}function j(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:C.columnsConfig;C.columnsConfig=t,C.filteredSortedStatistics=g.filterSort(C.statistics,C.columns,C.columnsConfig)}_.assign(C,{noItemsMessage:T,getSubtitle:function(){var t=_.get(C.statistics,"length"),e=d.getPlural(t,"1 tenant","{{$count}} tenants",{});return _.isNumber(t)?e:""},$onInit:S,onColumnsConfigChanged:function(t){j(t)},getCsvHeaders:function(){return _(C.columns).map(function(t){return _.result(t,"getCsvHeaders")||_.get(t,"header.text")||_.get(t,"header")}).flatten().value()},getCsvData:function(){return _.map(C.filteredSortedStatistics,function(e){return _(C.columns).map(function(t){return t.getCsvValues(e)}).flatten().value()})},detail:function(t){o.path("/tenants/".concat(t.tenantId))},filter:function(){_.isEqual(P().dateFrom,h)&&_.isUndefined(P().dateTo)||o.search(P())},clearFilter:function(){o.search({})},refresh:function(){S()}})}t.$inject=["$scope","$q","$routeParams","$location","$filter","c8yBase","c8yStatistics","c8yTenant","c8yTitle","c8yUtil","c8yPropertiesLibrary","c8yTenantStatisticsColumns","c8yFilteringSortingCollections","gettext","gettextCatalog"],angular.module("c8y.tenantStatistics").component("c8yTenantStatistics",{templateUrl:":::PLUGIN_PATH:::/tenant-statistics.html",controller:t,controllerAs:"vm"})}();
1
+ "use strict";function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&o.push.apply(o,Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),o.forEach(function(t){_defineProperty(e,t,n[t])})}return e}function _defineProperty(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}!function(){function t(t,e,n,o,r,i,a,u,s,c,l,m,g,f,d){var C=this,p=l.another(l.paths.Tenants),h=c.stringToDate(i.fromThisMonthStartFilter().dateFrom),T=f("No tenants to display.");function S(){C.refreshLoading=!0,u.isCurrentUserTopTenant().then(function(t){C.isTopTenant=t}).then(y).then(v).then(b).then(O).then(U).then(j).then(function(){C.refreshLoading=!1})}function y(){C.storageLimitFeatureEnabled=i.appOption("storageLimitationFeatureEnabled")}function v(){C.dateFrom=c.stringToDate(n.dateFrom)||h,C.dateTo=c.stringToDate(n.dateTo)}function b(){return a.list(P()).then(D)}function P(){return{dateFrom:c.dateToStringWithTimeZone(C.dateFrom),dateTo:void 0!==C.dateTo?c.dateToStringWithTimeZone(moment(C.dateTo).endOf("day")):void 0}}function D(t){C.statistics=function(t){return _.map(t,function(t){return _objectSpread({},t,{storageQuota:F(function(t){var e=t.storageLimitPerDevice,n=t.deviceWithChildrenCount,o=e;o&&(o*=n||1);return o}(t)),storageSize:F(t.storageSize),peakStorageSize:F(t.peakStorageSize)})})}(t)}function F(t){return!_.isUndefined(t)&&Number((t/Math.pow(2,20)).toFixed(2))}function O(){return p.list().then(function(t){return _.filter(t,{id:"c8ySchema!!customProperties"})}).then(function(t){return p.getSchema(t)}).then(function(t){return _.get(t,"properties.customProperties.properties",{})}).then(function(t){return _.map(t,function(t,e){return{title:t.title,key:e,schema:t}})}).then(function(t){C.customProperties=_.sortBy(t,"title")})}function U(){C.columns=_([m.getTenantNameColumn(),m.getTenantIdColumn(),m.getTenantDomainColumn(),m.getApiRequestsColumn(),m.getDeviceApiRequestsColumn(),C.storageLimitFeatureEnabled?m.getStorageQuotaColumn():null,m.getStorageSizeColumn(),m.getPeakStorageSizeColumn(),m.getRootDevicesColumn(),m.getPeakRootDevicesColumn(),m.getDevicesColumn(),m.getPeakDevicesColumn(),m.getDeviceEndpointCountColumn(),m.getSubscribedApplicationsColumn(),m.getCreationTimeColumn(),m.getAlarmsCreatedCountColumn(),m.getAlarmsUpdatedCountColumn(),m.getInventoriesCreatedCountColumn(),m.getInventoriesUpdatedCountColumn(),m.getEventsCreatedCountColumn(),m.getEventsUpdatedCountColumn(),m.getMeasurementsCreatedCountColumn(),m.getTotalInboundTransferColumn(),m.getCpuUsageColumn(),m.getMemoryUsageColumn(),C.isTopTenant?m.getParentTenantIdColumn():null,_.map(C.customProperties,function(t){return m.getCustomPropertyColumn(t)})]).flattenDeep().compact().orderBy([function(t){return t.priority||0}],["desc"]).value(),C.columnsConfig={}}function j(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:C.columnsConfig;C.columnsConfig=t,C.filteredSortedStatistics=g.filterSort(C.statistics,C.columns,C.columnsConfig)}_.assign(C,{noItemsMessage:T,getSubtitle:function(){var t=_.get(C.statistics,"length"),e=d.getPlural(t,"1 tenant","{{$count}} tenants",{});return _.isNumber(t)?e:""},$onInit:S,onColumnsConfigChanged:function(t){j(t)},getCsvHeaders:function(){return _(C.columns).map(function(t){return _.result(t,"getCsvHeaders")||_.get(t,"header.text")||_.get(t,"header")}).flatten().value()},getCsvData:function(){return _.map(C.filteredSortedStatistics,function(e){return _(C.columns).map(function(t){return t.getCsvValues(e)}).flatten().value()})},detail:function(t){o.path("/tenants/".concat(t.tenantId))},filter:function(){_.isEqual(P().dateFrom,h)&&_.isUndefined(P().dateTo)||o.search(P())},clearFilter:function(){C.onColumnsConfigChanged({}),o.search({})},refresh:function(){S()}})}t.$inject=["$scope","$q","$routeParams","$location","$filter","c8yBase","c8yStatistics","c8yTenant","c8yTitle","c8yUtil","c8yPropertiesLibrary","c8yTenantStatisticsColumns","c8yFilteringSortingCollections","gettext","gettextCatalog"],angular.module("c8y.tenantStatistics").component("c8yTenantStatistics",{templateUrl:":::PLUGIN_PATH:::/tenant-statistics.html",controller:t,controllerAs:"vm"})}();