@c8y/ng1-modules 1018.290.0 → 1018.291.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/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _defineProperty(t,e,n){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"===_typeof(e)?e:String(e)}function _toPrimitive(t,e){if("object"!==_typeof(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);var o=n.call(t,e||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){function t(t,e,n,o,r,i,u,a,s,c,l,m,f,g,p){var d=this,y=l.another(l.paths.Tenants),C=c.stringToDate(i.fromThisMonthStartFilter().dateFrom),h=g("No tenants to display.");function b(){d.refreshLoading=!0,a.isCurrentUserTopTenant().then(function(t){d.isTopTenant=t}).then(v).then(S).then(T).then(D).then(w).then(F).then(function(){d.refreshLoading=!1})}function v(){d.storageLimitFeatureEnabled=i.appOption("storageLimitationFeatureEnabled")}function S(){d.dateFrom=c.stringToDate(n.dateFrom)||C,d.dateTo=c.stringToDate(n.dateTo)}function T(){return u.list(P()).then(O)}function P(){return{dateFrom:c.dateToStringWithTimeZone(d.dateFrom),dateTo:void 0!==d.dateTo?c.dateToStringWithTimeZone(moment(d.dateTo).endOf("day")):void 0}}function O(t){d.statistics=function(t){return _.map(t,function(t){return _objectSpread(_objectSpread({},t),{},{storageQuota:j(function(t){var e=t.storageLimitPerDevice,n=t.deviceWithChildrenCount,o=e;o&&(o*=n||1);return o}(t)),storageSize:j(t.storageSize),peakStorageSize:j(t.peakStorageSize)})})}(t)}function j(t){return!_.isUndefined(t)&&Number((t/Math.pow(2,20)).toFixed(2))}function D(){return y.list().then(function(t){return _.filter(t,{id:"c8ySchema!!customProperties"})}).then(function(t){return y.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){d.customProperties=_.sortBy(t,"title")})}function w(){d.columns=_([m.getTenantNameColumn(),m.getTenantIdColumn(),m.getTenantDomainColumn(),m.getApiRequestsColumn(),m.getDeviceApiRequestsColumn(),d.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(),d.isTopTenant?m.getParentTenantIdColumn():null,_.map(d.customProperties,function(t){return m.getCustomPropertyColumn(t)})]).flattenDeep().compact().orderBy([function(t){return t.priority||0}],["desc"]).value(),d.columnsConfig={}}function F(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:d.columnsConfig;d.columnsConfig=t,d.filteredSortedStatistics=f.filterSort(d.statistics,d.columns,d.columnsConfig)}_.assign(d,{noItemsMessage:h,getSubtitle:function(){var t=_.get(d.statistics,"length"),e=p.getPlural(t,"1 tenant","{{$count}} tenants",{});return _.isNumber(t)?e:""},$onInit:b,onColumnsConfigChanged:function(t){F(t)},getCsvHeaders:function(){return _(d.columns).map(function(t){return _.result(t,"getCsvHeaders")||_.get(t,"header.text")||_.get(t,"header")}).flatten().value()},getCsvData:function(){return _.map(d.filteredSortedStatistics,function(e){return _(d.columns).map(function(t){return t.getCsvValues(e)}).flatten().value()})},detail:function(t){o.path("/tenants/".concat(t.tenantId))},filter:function(){_.isEqual(P().dateFrom,C)&&_.isUndefined(P().dateTo)||o.search(P())},clearFilter:function(){o.search({})},refresh:function(){b()}})}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 _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _defineProperty(t,e,n){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"===_typeof(e)?e:String(e)}function _toPrimitive(t,e){if("object"!==_typeof(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);var o=n.call(t,e||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){function t(t,e,n,o,r,i,u,a,s,c,l,m,f,g,p){var d=this,y=l.another(l.paths.Tenants),C=c.stringToDate(i.fromThisMonthStartFilter().dateFrom),h=g("No tenants to display.");function b(){d.refreshLoading=!0,a.isCurrentUserTopTenant().then(function(t){d.isTopTenant=t}).then(v).then(S).then(T).then(D).then(w).then(F).then(function(){d.refreshLoading=!1})}function v(){d.storageLimitFeatureEnabled=i.appOption("storageLimitationFeatureEnabled")}function S(){d.dateFrom=c.stringToDate(n.dateFrom)||C,d.dateTo=c.stringToDate(n.dateTo)}function T(){return u.list(P()).then(O)}function P(){return{dateFrom:c.dateToStringWithTimeZone(d.dateFrom),dateTo:void 0!==d.dateTo?c.dateToStringWithTimeZone(moment(d.dateTo).endOf("day")):void 0}}function O(t){d.statistics=function(t){return _.map(t,function(t){return _objectSpread(_objectSpread({},t),{},{storageQuota:j(function(t){var e=t.storageLimitPerDevice,n=t.deviceWithChildrenCount,o=e;o&&(o*=n||1);return o}(t)),storageSize:j(t.storageSize),peakStorageSize:j(t.peakStorageSize)})})}(t)}function j(t){return!_.isUndefined(t)&&Number((t/Math.pow(2,20)).toFixed(2))}function D(){return y.list().then(function(t){return _.filter(t,{id:"c8ySchema!!customProperties"})}).then(function(t){return y.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){d.customProperties=_.sortBy(t,"title")})}function w(){d.columns=_([m.getTenantNameColumn(),m.getTenantIdColumn(),m.getTenantDomainColumn(),m.getApiRequestsColumn(),m.getDeviceApiRequestsColumn(),d.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(),d.isTopTenant?m.getParentTenantIdColumn():null,_.map(d.customProperties,function(t){return m.getCustomPropertyColumn(t)})]).flattenDeep().compact().orderBy([function(t){return t.priority||0}],["desc"]).value(),d.columnsConfig={}}function F(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:d.columnsConfig;d.columnsConfig=t,d.filteredSortedStatistics=f.filterSort(d.statistics,d.columns,d.columnsConfig)}_.assign(d,{noItemsMessage:h,getSubtitle:function(){var t=_.get(d.statistics,"length"),e=p.getPlural(t,"1 tenant","{{$count}} tenants",{});return _.isNumber(t)?e:""},$onInit:b,onColumnsConfigChanged:function(t){F(t)},getCsvHeaders:function(){return _(d.columns).map(function(t){return _.result(t,"getCsvHeaders")||_.get(t,"header.text")||_.get(t,"header")}).flatten().value()},getCsvData:function(){return _.map(d.filteredSortedStatistics,function(e){return _(d.columns).map(function(t){return t.getCsvValues(e)}).flatten().value()})},detail:function(t){o.path("/tenants/".concat(t.tenantId))},filter:function(){_.isEqual(P().dateFrom,C)&&_.isUndefined(P().dateTo)||o.search(P())},clearFilter:function(){d.onColumnsConfigChanged({}),o.search({})},refresh:function(){b()}})}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"})}();
|