From 20be8eba08ffee45561c7b835204ae0609e436b0 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Fri, 29 Dec 2017 19:09:34 +0200 Subject: [PATCH] UI: Access 'loading' property directly from rootScope. --- ui/src/app/admin/general-settings.tpl.html | 8 +- .../app/admin/outgoing-mail-settings.tpl.html | 14 ++-- .../app/alarm/alarm-details-dialog.tpl.html | 6 +- ui/src/app/alarm/alarm-table.tpl.html | 6 +- ui/src/app/api/asset.service.js | 4 +- ui/src/app/api/attribute.service.js | 4 +- ui/src/app/api/customer.service.js | 8 +- ui/src/app/api/dashboard.service.js | 16 ++-- ui/src/app/api/device.service.js | 4 +- ui/src/app/api/entity-relation.service.js | 4 +- ui/src/app/api/entity.service.js | 76 ++++++++++--------- ui/src/app/api/plugin.service.js | 24 +++--- ui/src/app/api/rule.service.js | 12 +-- ui/src/app/api/tenant.service.js | 8 +- ui/src/app/api/user.service.js | 8 +- ui/src/app/api/widget.service.js | 16 ++-- ui/src/app/asset/add-asset.tpl.html | 8 +- .../app/asset/add-assets-to-customer.tpl.html | 8 +- ui/src/app/asset/asset-fieldset.tpl.html | 4 +- ui/src/app/asset/assign-to-customer.tpl.html | 8 +- .../app/component/component-dialog.tpl.html | 14 ++-- ui/src/app/component/component.tpl.html | 4 +- .../dashboard-autocomplete.directive.js | 6 +- .../components/dashboard-select.directive.js | 4 +- .../datakey-config-dialog.controller.js | 2 +- .../components/datakey-config-dialog.tpl.html | 8 +- .../app/components/details-sidenav.tpl.html | 4 +- ui/src/app/components/grid.tpl.html | 14 ++-- .../components/legend-config-panel.tpl.html | 2 +- .../components/material-icons-dialog.tpl.html | 8 +- .../app/components/plugin-select.directive.js | 4 +- .../app/components/timewindow-panel.tpl.html | 6 +- .../action/widget-action-dialog.tpl.html | 10 +-- .../components/widget/widget-config.tpl.html | 4 +- .../widgets-bundle-select.directive.js | 2 +- ui/src/app/customer/add-customer.tpl.html | 8 +- .../app/customer/customer-fieldset.tpl.html | 2 +- ui/src/app/dashboard/add-dashboard.tpl.html | 8 +- .../add-dashboards-to-customer.tpl.html | 8 +- ui/src/app/dashboard/add-widget.controller.js | 2 +- ui/src/app/dashboard/add-widget.tpl.html | 10 +-- .../app/dashboard/assign-to-customer.tpl.html | 8 +- .../app/dashboard/dashboard-fieldset.tpl.html | 2 +- .../app/dashboard/dashboard-settings.tpl.html | 10 +-- ui/src/app/dashboard/dashboard.tpl.html | 16 ++-- ui/src/app/dashboard/edit-widget.directive.js | 2 +- ui/src/app/dashboard/edit-widget.tpl.html | 2 +- .../layouts/dashboard-layout.tpl.html | 2 +- .../layouts/manage-dashboard-layouts.tpl.html | 10 +-- .../layouts/select-target-layout.tpl.html | 6 +- .../states/dashboard-state-dialog.tpl.html | 10 +-- .../states/manage-dashboard-states.tpl.html | 10 +-- .../states/select-target-state.tpl.html | 10 +-- ui/src/app/device/add-device.tpl.html | 8 +- .../device/add-devices-to-customer.tpl.html | 8 +- ui/src/app/device/assign-to-customer.tpl.html | 8 +- ui/src/app/device/device-credentials.tpl.html | 12 +-- ui/src/app/device/device-fieldset.tpl.html | 6 +- .../entity/alias/entity-alias-dialog.tpl.html | 10 +-- .../app/entity/alias/entity-aliases.tpl.html | 16 ++-- .../attribute/add-attribute-dialog.tpl.html | 12 +-- .../add-widget-to-dashboard-dialog.tpl.html | 12 +-- .../entity/attribute/attribute-table.tpl.html | 2 +- .../entity/entity-autocomplete.directive.js | 2 +- ui/src/app/entity/entity-list.directive.js | 2 +- .../entity-subtype-autocomplete.directive.js | 4 +- .../entity/entity-subtype-list.directive.js | 4 +- .../entity/entity-subtype-select.directive.js | 4 +- .../entity/relation/relation-dialog.tpl.html | 12 +-- .../entity/relation/relation-filters.tpl.html | 4 +- .../entity/relation/relation-table.tpl.html | 2 +- .../app/event/event-content-dialog.tpl.html | 2 +- ui/src/app/event/event-table.tpl.html | 6 +- .../app/extension/extension-dialog.tpl.html | 8 +- .../app/import-export/import-dialog.tpl.html | 10 +-- ui/src/app/layout/home.tpl.html | 2 +- ui/src/app/login/create-password.tpl.html | 2 +- ui/src/app/login/login.tpl.html | 2 +- .../app/login/reset-password-request.tpl.html | 2 +- ui/src/app/login/reset-password.tpl.html | 2 +- ui/src/app/plugin/add-plugin.tpl.html | 8 +- ui/src/app/plugin/plugin-fieldset.tpl.html | 8 +- ui/src/app/profile/change-password.tpl.html | 8 +- ui/src/app/profile/profile.tpl.html | 10 +-- ui/src/app/rule/add-rule.tpl.html | 8 +- ui/src/app/rule/rule-fieldset.tpl.html | 10 +-- ui/src/app/tenant/add-tenant.tpl.html | 8 +- ui/src/app/tenant/tenant-fieldset.tpl.html | 2 +- ui/src/app/user/add-user.tpl.html | 8 +- ui/src/app/user/user-fieldset.tpl.html | 10 +-- ui/src/app/widget/add-widgets-bundle.tpl.html | 8 +- .../app/widget/save-widget-type-as.tpl.html | 8 +- ui/src/app/widget/select-widget-type.tpl.html | 8 +- ui/src/app/widget/widget-editor.tpl.html | 4 +- ui/src/app/widget/widget-library.tpl.html | 10 +-- .../widget/widgets-bundle-fieldset.tpl.html | 2 +- 96 files changed, 379 insertions(+), 369 deletions(-) diff --git a/ui/src/app/admin/general-settings.tpl.html b/ui/src/app/admin/general-settings.tpl.html index f6286511b6..50342d3afd 100644 --- a/ui/src/app/admin/general-settings.tpl.html +++ b/ui/src/app/admin/general-settings.tpl.html @@ -22,11 +22,11 @@ admin.general-settings - - + +
-
+
@@ -35,7 +35,7 @@
- {{'action.save' | translate}} + {{'action.save' | translate}}
diff --git a/ui/src/app/admin/outgoing-mail-settings.tpl.html b/ui/src/app/admin/outgoing-mail-settings.tpl.html index fd8476a499..3c59593ff7 100644 --- a/ui/src/app/admin/outgoing-mail-settings.tpl.html +++ b/ui/src/app/admin/outgoing-mail-settings.tpl.html @@ -24,11 +24,11 @@
- - + +
-
+
@@ -38,7 +38,7 @@ - + {{smtpProtocol.toUpperCase()}} @@ -78,7 +78,7 @@
admin.timeout-invalid
- {{ 'admin.enable-tls' | translate }} @@ -89,8 +89,8 @@
- {{'admin.send-test-mail' | translate}} - {{'action.save' | translate}} + {{'admin.send-test-mail' | translate}} + {{'action.save' | translate}}
diff --git a/ui/src/app/alarm/alarm-details-dialog.tpl.html b/ui/src/app/alarm/alarm-details-dialog.tpl.html index b090052228..cc213d1178 100644 --- a/ui/src/app/alarm/alarm-details-dialog.tpl.html +++ b/ui/src/app/alarm/alarm-details-dialog.tpl.html @@ -87,7 +87,7 @@ {{ 'alarm.acknowledge' | translate }} @@ -95,12 +95,12 @@ {{ 'alarm.clear' | translate }} - {{ 'action.close' | + {{ 'action.close' | translate }} diff --git a/ui/src/app/alarm/alarm-table.tpl.html b/ui/src/app/alarm/alarm-table.tpl.html index c32e39a2d2..98d42a2a93 100644 --- a/ui/src/app/alarm/alarm-table.tpl.html +++ b/ui/src/app/alarm/alarm-table.tpl.html @@ -19,7 +19,7 @@
- + {{ ('alarm.search-status.' + searchStatus) | translate }} @@ -31,8 +31,8 @@ - + tenantService.getTenant(id, config), entityIds); break; case types.entityType.customer: - promise = getEntitiesByIdsPromise(customerService.getCustomer, entityIds); + promise = getEntitiesByIdsPromise( + (id) => customerService.getCustomer(id, config), entityIds); break; case types.entityType.rule: - promise = getEntitiesByIdsPromise(ruleService.getRule, entityIds); + promise = getEntitiesByIdsPromise( + (id) => ruleService.getRule(id, config), entityIds); break; case types.entityType.plugin: - promise = getEntitiesByIdsPromise(pluginService.getPlugin, entityIds); + promise = getEntitiesByIdsPromise( + (id) => pluginService.getPlugin(id, config), entityIds); break; case types.entityType.dashboard: - promise = getEntitiesByIdsPromise(dashboardService.getDashboardInfo, entityIds); + promise = getEntitiesByIdsPromise( + (id) => dashboardService.getDashboardInfo(id, config), entityIds); break; case types.entityType.user: - promise = getEntitiesByIdsPromise(userService.getUser, entityIds); + promise = getEntitiesByIdsPromise( + (id) => userService.getUser(id, true, config), entityIds); break; case types.entityType.alarm: $log.error('Get Alarm Entity is not implemented!'); @@ -178,11 +184,11 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device return deferred.promise; } - function getSingleTenantByPageLinkPromise(pageLink) { + function getSingleTenantByPageLinkPromise(pageLink, config) { var user = userService.getCurrentUser(); var tenantId = user.tenantId; var deferred = $q.defer(); - tenantService.getTenant(tenantId).then( + tenantService.getTenant(tenantId, config).then( function success(tenant) { var tenantName = tenant.name; var result = { @@ -202,11 +208,11 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device return deferred.promise; } - function getSingleCustomerByPageLinkPromise(pageLink) { + function getSingleCustomerByPageLinkPromise(pageLink, config) { var user = userService.getCurrentUser(); var customerId = user.customerId; var deferred = $q.defer(); - customerService.getCustomer(customerId).then( + customerService.getCustomer(customerId, config).then( function success(customer) { var customerName = customer.name; var result = { @@ -247,29 +253,29 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device break; case types.entityType.tenant: if (user.authority === 'TENANT_ADMIN') { - promise = getSingleTenantByPageLinkPromise(pageLink); + promise = getSingleTenantByPageLinkPromise(pageLink, config); } else { - promise = tenantService.getTenants(pageLink); + promise = tenantService.getTenants(pageLink, config); } break; case types.entityType.customer: if (user.authority === 'CUSTOMER_USER') { - promise = getSingleCustomerByPageLinkPromise(pageLink); + promise = getSingleCustomerByPageLinkPromise(pageLink, config); } else { - promise = customerService.getCustomers(pageLink); + promise = customerService.getCustomers(pageLink, config); } break; case types.entityType.rule: - promise = ruleService.getAllRules(pageLink); + promise = ruleService.getAllRules(pageLink, config); break; case types.entityType.plugin: - promise = pluginService.getAllPlugins(pageLink); + promise = pluginService.getAllPlugins(pageLink, config); break; case types.entityType.dashboard: if (user.authority === 'CUSTOMER_USER') { - promise = dashboardService.getCustomerDashboards(customerId, pageLink, false); + promise = dashboardService.getCustomerDashboards(customerId, pageLink, false, config); } else { - promise = dashboardService.getTenantDashboards(pageLink, false); + promise = dashboardService.getTenantDashboards(pageLink, false, config); } break; case types.entityType.user: @@ -426,7 +432,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device var stateEntityId = getStateEntityId(filter, stateParams); switch (filter.type) { case types.aliasFilterType.singleEntity.value: - getEntity(filter.singleEntity.entityType, filter.singleEntity.id).then( + getEntity(filter.singleEntity.entityType, filter.singleEntity.id, {ignoreLoading: true}).then( function success(entity) { result.entities = entitiesToEntitiesInfo([entity]); deferred.resolve(result); @@ -437,7 +443,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device ); break; case types.aliasFilterType.entityList.value: - getEntities(filter.entityType, filter.entityList).then( + getEntities(filter.entityType, filter.entityList, {ignoreLoading: true}).then( function success(entities) { if (entities && entities.length || !failOnEmpty) { result.entities = entitiesToEntitiesInfo(entities); @@ -452,7 +458,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device ); break; case types.aliasFilterType.entityName.value: - getEntitiesByNameFilter(filter.entityType, filter.entityNameFilter, maxItems).then( + getEntitiesByNameFilter(filter.entityType, filter.entityNameFilter, maxItems, {ignoreLoading: true}).then( function success(entities) { if (entities && entities.length || !failOnEmpty) { result.entities = entitiesToEntitiesInfo(entities); @@ -469,7 +475,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device case types.aliasFilterType.stateEntity.value: result.stateEntity = true; if (stateEntityId) { - getEntity(stateEntityId.entityType, stateEntityId.id).then( + getEntity(stateEntityId.entityType, stateEntityId.id, {ignoreLoading: true}).then( function success(entity) { result.entities = entitiesToEntitiesInfo([entity]); deferred.resolve(result); @@ -483,7 +489,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device } break; case types.aliasFilterType.assetType.value: - getEntitiesByNameFilter(types.entityType.asset, filter.assetNameFilter, maxItems, null, filter.assetType).then( + getEntitiesByNameFilter(types.entityType.asset, filter.assetNameFilter, maxItems, {ignoreLoading: true}, filter.assetType).then( function success(entities) { if (entities && entities.length || !failOnEmpty) { result.entities = entitiesToEntitiesInfo(entities); @@ -498,7 +504,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device ); break; case types.aliasFilterType.deviceType.value: - getEntitiesByNameFilter(types.entityType.device, filter.deviceNameFilter, maxItems, null, filter.deviceType).then( + getEntitiesByNameFilter(types.entityType.device, filter.deviceNameFilter, maxItems, {ignoreLoading: true}, filter.deviceType).then( function success(entities) { if (entities && entities.length || !failOnEmpty) { result.entities = entitiesToEntitiesInfo(entities); @@ -533,7 +539,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device filters: filter.filters }; searchQuery.parameters.maxLevel = filter.maxLevel && filter.maxLevel > 0 ? filter.maxLevel : -1; - entityRelationService.findInfoByQuery(searchQuery).then( + entityRelationService.findInfoByQuery(searchQuery, {ignoreLoading: true}).then( function success(allRelations) { if (allRelations && allRelations.length || !failOnEmpty) { if (angular.isDefined(maxItems) && maxItems > 0 && allRelations) { @@ -577,10 +583,10 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device var findByQueryPromise; if (filter.type == types.aliasFilterType.assetSearchQuery.value) { searchQuery.assetTypes = filter.assetTypes; - findByQueryPromise = assetService.findByQuery(searchQuery, false); + findByQueryPromise = assetService.findByQuery(searchQuery, false, {ignoreLoading: true}); } else if (filter.type == types.aliasFilterType.deviceSearchQuery.value) { searchQuery.deviceTypes = filter.deviceTypes; - findByQueryPromise = deviceService.findByQuery(searchQuery, false); + findByQueryPromise = deviceService.findByQuery(searchQuery, false, {ignoreLoading: true}); } findByQueryPromise.then( function success(entities) { @@ -762,7 +768,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device return deferred.promise; } - function getEntityKeys(entityType, entityId, query, type) { + function getEntityKeys(entityType, entityId, query, type, config) { var deferred = $q.defer(); var url = '/api/plugins/telemetry/' + entityType + '/' + entityId + '/keys/'; if (type === types.dataKeyType.timeseries) { @@ -770,7 +776,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device } else if (type === types.dataKeyType.attribute) { url += 'attributes'; } - $http.get(url, null).then(function success(response) { + $http.get(url, config).then(function success(response) { var result = []; if (response.data) { if (query) { diff --git a/ui/src/app/api/plugin.service.js b/ui/src/app/api/plugin.service.js index 55429ce1cf..28f63def4e 100644 --- a/ui/src/app/api/plugin.service.js +++ b/ui/src/app/api/plugin.service.js @@ -50,11 +50,11 @@ function PluginService($http, $q, $rootScope, $filter, componentDescriptorServic tenantPlugins = undefined; } - function loadPluginsCache() { + function loadPluginsCache(config) { var deferred = $q.defer(); if (!allPlugins) { var url = '/api/plugins'; - $http.get(url, null).then(function success(response) { + $http.get(url, config).then(function success(response) { componentDescriptorService.getComponentDescriptorsByType(types.componentType.plugin).then( function success(pluginComponents) { allPlugins = response.data; @@ -93,9 +93,9 @@ function PluginService($http, $q, $rootScope, $filter, componentDescriptorServic return deferred.promise; } - function getSystemPlugins(pageLink) { + function getSystemPlugins(pageLink, config) { var deferred = $q.defer(); - loadPluginsCache().then( + loadPluginsCache(config).then( function success() { utils.filterSearchTextEntities(systemPlugins, 'name', pageLink, deferred); }, @@ -106,9 +106,9 @@ function PluginService($http, $q, $rootScope, $filter, componentDescriptorServic return deferred.promise; } - function getTenantPlugins(pageLink) { + function getTenantPlugins(pageLink, config) { var deferred = $q.defer(); - loadPluginsCache().then( + loadPluginsCache(config).then( function success() { utils.filterSearchTextEntities(tenantPlugins, 'name', pageLink, deferred); }, @@ -119,9 +119,9 @@ function PluginService($http, $q, $rootScope, $filter, componentDescriptorServic return deferred.promise; } - function getAllActionPlugins(pageLink) { + function getAllActionPlugins(pageLink, config) { var deferred = $q.defer(); - loadPluginsCache().then( + loadPluginsCache(config).then( function success() { utils.filterSearchTextEntities(allActionPlugins, 'name', pageLink, deferred); }, @@ -132,9 +132,9 @@ function PluginService($http, $q, $rootScope, $filter, componentDescriptorServic return deferred.promise; } - function getAllPlugins(pageLink) { + function getAllPlugins(pageLink, config) { var deferred = $q.defer(); - loadPluginsCache().then( + loadPluginsCache(config).then( function success() { utils.filterSearchTextEntities(allPlugins, 'name', pageLink, deferred); }, @@ -156,10 +156,10 @@ function PluginService($http, $q, $rootScope, $filter, componentDescriptorServic return deferred.promise; } - function getPlugin(pluginId) { + function getPlugin(pluginId, config) { var deferred = $q.defer(); var url = '/api/plugin/' + pluginId; - $http.get(url, null).then(function success(response) { + $http.get(url, config).then(function success(response) { deferred.resolve(response.data); }, function fail(response) { deferred.reject(response.data); diff --git a/ui/src/app/api/rule.service.js b/ui/src/app/api/rule.service.js index ee166f69ac..df37305ec5 100644 --- a/ui/src/app/api/rule.service.js +++ b/ui/src/app/api/rule.service.js @@ -47,11 +47,11 @@ function RuleService($http, $q, $rootScope, $filter, types, utils) { tenantRules = undefined; } - function loadRulesCache() { + function loadRulesCache(config) { var deferred = $q.defer(); if (!allRules) { var url = '/api/rules'; - $http.get(url, null).then(function success(response) { + $http.get(url, config).then(function success(response) { allRules = response.data; systemRules = []; tenantRules = []; @@ -100,9 +100,9 @@ function RuleService($http, $q, $rootScope, $filter, types, utils) { return deferred.promise; } - function getAllRules(pageLink) { + function getAllRules(pageLink, config) { var deferred = $q.defer(); - loadRulesCache().then( + loadRulesCache(config).then( function success() { utils.filterSearchTextEntities(allRules, 'name', pageLink, deferred); }, @@ -124,10 +124,10 @@ function RuleService($http, $q, $rootScope, $filter, types, utils) { return deferred.promise; } - function getRule(ruleId) { + function getRule(ruleId, config) { var deferred = $q.defer(); var url = '/api/rule/' + ruleId; - $http.get(url, null).then(function success(response) { + $http.get(url, config).then(function success(response) { deferred.resolve(response.data); }, function fail(response) { deferred.reject(response.data); diff --git a/ui/src/app/api/tenant.service.js b/ui/src/app/api/tenant.service.js index 594b543e7d..be04ae970d 100644 --- a/ui/src/app/api/tenant.service.js +++ b/ui/src/app/api/tenant.service.js @@ -29,7 +29,7 @@ function TenantService($http, $q) { return service; - function getTenants (pageLink) { + function getTenants (pageLink, config) { var deferred = $q.defer(); var url = '/api/tenants?limit=' + pageLink.limit; if (angular.isDefined(pageLink.textSearch)) { @@ -41,7 +41,7 @@ function TenantService($http, $q) { if (angular.isDefined(pageLink.textOffset)) { url += '&textOffset=' + pageLink.textOffset; } - $http.get(url, null).then(function success(response) { + $http.get(url, config).then(function success(response) { deferred.resolve(response.data); }, function fail() { deferred.reject(); @@ -49,10 +49,10 @@ function TenantService($http, $q) { return deferred.promise; } - function getTenant (tenantId) { + function getTenant (tenantId, config) { var deferred = $q.defer(); var url = '/api/tenant/' + tenantId; - $http.get(url, null).then(function success(response) { + $http.get(url, config).then(function success(response) { deferred.resolve(response.data); }, function fail(response) { deferred.reject(response.data); diff --git a/ui/src/app/api/user.service.js b/ui/src/app/api/user.service.js index d09387bda8..1a146b4e00 100644 --- a/ui/src/app/api/user.service.js +++ b/ui/src/app/api/user.service.js @@ -421,10 +421,14 @@ function UserService($http, $q, $rootScope, adminService, dashboardService, logi return deferred.promise; } - function getUser(userId, ignoreErrors) { + function getUser(userId, ignoreErrors, config) { var deferred = $q.defer(); var url = '/api/user/' + userId; - $http.get(url, { ignoreErrors: ignoreErrors }).then(function success(response) { + if (!config) { + config = {}; + } + config = Object.assign(config, { ignoreErrors: ignoreErrors }); + $http.get(url, config).then(function success(response) { deferred.resolve(response.data); }, function fail() { deferred.reject(); diff --git a/ui/src/app/api/widget.service.js b/ui/src/app/api/widget.service.js index 3c74ecbb4c..fe95729f3b 100644 --- a/ui/src/app/api/widget.service.js +++ b/ui/src/app/api/widget.service.js @@ -298,11 +298,11 @@ function WidgetService($rootScope, $http, $q, $filter, $ocLazyLoad, $window, $tr tenantWidgetsBundles = undefined; } - function loadWidgetsBundleCache() { + function loadWidgetsBundleCache(config) { var deferred = $q.defer(); if (!allWidgetsBundles) { var url = '/api/widgetsBundles'; - $http.get(url, null).then(function success(response) { + $http.get(url, config).then(function success(response) { allWidgetsBundles = response.data; systemWidgetsBundles = []; tenantWidgetsBundles = []; @@ -326,9 +326,9 @@ function WidgetService($rootScope, $http, $q, $filter, $ocLazyLoad, $window, $tr } - function getSystemWidgetsBundles() { + function getSystemWidgetsBundles(config) { var deferred = $q.defer(); - loadWidgetsBundleCache().then( + loadWidgetsBundleCache(config).then( function success() { deferred.resolve(systemWidgetsBundles); }, @@ -339,9 +339,9 @@ function WidgetService($rootScope, $http, $q, $filter, $ocLazyLoad, $window, $tr return deferred.promise; } - function getTenantWidgetsBundles() { + function getTenantWidgetsBundles(config) { var deferred = $q.defer(); - loadWidgetsBundleCache().then( + loadWidgetsBundleCache(config).then( function success() { deferred.resolve(tenantWidgetsBundles); }, @@ -352,9 +352,9 @@ function WidgetService($rootScope, $http, $q, $filter, $ocLazyLoad, $window, $tr return deferred.promise; } - function getAllWidgetsBundles() { + function getAllWidgetsBundles(config) { var deferred = $q.defer(); - loadWidgetsBundleCache().then( + loadWidgetsBundleCache(config).then( function success() { deferred.resolve(allWidgetsBundles); }, diff --git a/ui/src/app/asset/add-asset.tpl.html b/ui/src/app/asset/add-asset.tpl.html index ce22e4e674..71901e4b6a 100644 --- a/ui/src/app/asset/add-asset.tpl.html +++ b/ui/src/app/asset/add-asset.tpl.html @@ -27,8 +27,8 @@ - - + +
@@ -36,10 +36,10 @@ - + {{ 'action.add' | translate }} - {{ 'action.cancel' | translate }} + {{ 'action.cancel' | translate }} diff --git a/ui/src/app/asset/add-assets-to-customer.tpl.html b/ui/src/app/asset/add-assets-to-customer.tpl.html index 18e23ce0ca..64edcf817a 100644 --- a/ui/src/app/asset/add-assets-to-customer.tpl.html +++ b/ui/src/app/asset/add-assets-to-customer.tpl.html @@ -26,8 +26,8 @@
- - + +
@@ -65,11 +65,11 @@ - {{ 'action.assign' | translate }} - {{ 'action.cancel' | + {{ 'action.cancel' | translate }} diff --git a/ui/src/app/asset/asset-fieldset.tpl.html b/ui/src/app/asset/asset-fieldset.tpl.html index d921b2e6c4..afa14adc07 100644 --- a/ui/src/app/asset/asset-fieldset.tpl.html +++ b/ui/src/app/asset/asset-fieldset.tpl.html @@ -48,7 +48,7 @@ ng-show="!isEdit && isPublic && (assetScope === 'customer' || assetScope === 'tenant')"> {{ 'asset.asset-public' | translate }}
-
+
@@ -57,7 +57,7 @@ - - + +
@@ -65,10 +65,10 @@ - + {{ 'action.assign' | translate }} - {{ 'action.cancel' | + {{ 'action.cancel' | translate }} diff --git a/ui/src/app/component/component-dialog.tpl.html b/ui/src/app/component/component-dialog.tpl.html index 271d818555..841d7ef69a 100644 --- a/ui/src/app/component/component-dialog.tpl.html +++ b/ui/src/app/component/component-dialog.tpl.html @@ -27,11 +27,11 @@
- - + +
-
+
@@ -42,7 +42,7 @@ - + {{componentDescriptor.name}} @@ -57,7 +57,7 @@ @@ -67,11 +67,11 @@ - {{ (vm.isAdd ? 'action.add' : 'action.save') | translate }} - {{ 'action.cancel' | + {{ 'action.cancel' | translate }} diff --git a/ui/src/app/component/component.tpl.html b/ui/src/app/component/component.tpl.html index a9faa7f03f..d007ba6ccd 100644 --- a/ui/src/app/component/component.tpl.html +++ b/ui/src/app/component/component.tpl.html @@ -24,7 +24,7 @@ {{ componentTypeName }}
- @@ -43,7 +43,7 @@ edit - diff --git a/ui/src/app/components/dashboard-autocomplete.directive.js b/ui/src/app/components/dashboard-autocomplete.directive.js index ce7e4770fc..2235b82e95 100644 --- a/ui/src/app/components/dashboard-autocomplete.directive.js +++ b/ui/src/app/components/dashboard-autocomplete.directive.js @@ -48,19 +48,19 @@ function DashboardAutocomplete($compile, $templateCache, $q, dashboardService, u var promise; if (scope.dashboardsScope === 'customer' || userService.getAuthority() === 'CUSTOMER_USER') { if (scope.customerId) { - promise = dashboardService.getCustomerDashboards(scope.customerId, pageLink, false); + promise = dashboardService.getCustomerDashboards(scope.customerId, pageLink, false, {ignoreLoading: true}); } else { promise = $q.when({data: []}); } } else { if (userService.getAuthority() === 'SYS_ADMIN') { if (scope.tenantId) { - promise = dashboardService.getTenantDashboardsByTenantId(scope.tenantId, pageLink); + promise = dashboardService.getTenantDashboardsByTenantId(scope.tenantId, pageLink, {ignoreLoading: true}); } else { promise = $q.when({data: []}); } } else { - promise = dashboardService.getTenantDashboards(pageLink, false); + promise = dashboardService.getTenantDashboards(pageLink, false, {ignoreLoading: true}); } } diff --git a/ui/src/app/components/dashboard-select.directive.js b/ui/src/app/components/dashboard-select.directive.js index d7b32d8b06..ac5cd3d5b1 100644 --- a/ui/src/app/components/dashboard-select.directive.js +++ b/ui/src/app/components/dashboard-select.directive.js @@ -48,12 +48,12 @@ function DashboardSelect($compile, $templateCache, $q, $mdMedia, $mdPanel, $docu var promise; if (scope.dashboardsScope === 'customer' || userService.getAuthority() === 'CUSTOMER_USER') { if (scope.customerId && scope.customerId != types.id.nullUid) { - promise = dashboardService.getCustomerDashboards(scope.customerId, pageLink, false); + promise = dashboardService.getCustomerDashboards(scope.customerId, pageLink, false, {ignoreLoading: true}); } else { promise = $q.when({data: []}); } } else { - promise = dashboardService.getTenantDashboards(pageLink, false); + promise = dashboardService.getTenantDashboards(pageLink, false, {ignoreLoading: true}); } promise.then(function success(result) { diff --git a/ui/src/app/components/datakey-config-dialog.controller.js b/ui/src/app/components/datakey-config-dialog.controller.js index ccaac21235..c4e85946f9 100644 --- a/ui/src/app/components/datakey-config-dialog.controller.js +++ b/ui/src/app/components/datakey-config-dialog.controller.js @@ -43,7 +43,7 @@ function DatakeyConfigDialogController($scope, $mdDialog, $q, entityService, dat function success(aliasInfo) { var entity = aliasInfo.currentEntity; if (entity) { - entityService.getEntityKeys(entity.entityType, entity.id, query, type).then( + entityService.getEntityKeys(entity.entityType, entity.id, query, type, {ignoreLoading: true}).then( function success(keys) { deferred.resolve(keys); }, diff --git a/ui/src/app/components/datakey-config-dialog.tpl.html b/ui/src/app/components/datakey-config-dialog.tpl.html index a55c3161c1..574a7af3c8 100644 --- a/ui/src/app/components/datakey-config-dialog.tpl.html +++ b/ui/src/app/components/datakey-config-dialog.tpl.html @@ -26,8 +26,8 @@
- - + + - + {{ 'action.save' | translate }} - {{ 'action.cancel' | translate }} + {{ 'action.cancel' | translate }} diff --git a/ui/src/app/components/details-sidenav.tpl.html b/ui/src/app/components/details-sidenav.tpl.html index 24c22704d7..934aed37b2 100644 --- a/ui/src/app/components/details-sidenav.tpl.html +++ b/ui/src/app/components/details-sidenav.tpl.html @@ -35,7 +35,7 @@
- @@ -44,7 +44,7 @@ - diff --git a/ui/src/app/components/grid.tpl.html b/ui/src/app/components/grid.tpl.html index 24285d898a..b334567e5a 100644 --- a/ui/src/app/components/grid.tpl.html +++ b/ui/src/app/components/grid.tpl.html @@ -45,7 +45,7 @@ - {{ action.details( rowItem[n] ) }} @@ -81,28 +81,28 @@