thingsboard-aplcache
Changes
ui/src/app/api/asset.service.js 4(+2 -2)
ui/src/app/api/attribute.service.js 4(+2 -2)
ui/src/app/api/customer.service.js 8(+4 -4)
ui/src/app/api/dashboard.service.js 16(+8 -8)
ui/src/app/api/device.service.js 4(+2 -2)
ui/src/app/api/entity.service.js 76(+41 -35)
ui/src/app/api/plugin.service.js 24(+12 -12)
ui/src/app/api/rule.service.js 12(+6 -6)
ui/src/app/api/tenant.service.js 8(+4 -4)
ui/src/app/api/user.service.js 8(+6 -2)
ui/src/app/api/widget.service.js 16(+8 -8)
ui/src/app/asset/add-asset.tpl.html 8(+4 -4)
ui/src/app/components/grid.tpl.html 14(+7 -7)
ui/src/app/dashboard/add-widget.tpl.html 10(+5 -5)
ui/src/app/dashboard/dashboard.tpl.html 16(+8 -8)
ui/src/app/layout/home.tpl.html 2(+1 -1)
ui/src/app/login/login.tpl.html 2(+1 -1)
ui/src/app/profile/profile.tpl.html 10(+5 -5)
ui/src/app/rule/add-rule.tpl.html 8(+4 -4)
ui/src/app/rule/rule-fieldset.tpl.html 10(+5 -5)
ui/src/app/user/add-user.tpl.html 8(+4 -4)
ui/src/app/user/user-fieldset.tpl.html 10(+5 -5)
Details
diff --git a/ui/src/app/admin/general-settings.tpl.html b/ui/src/app/admin/general-settings.tpl.html
index f628651..50342d3 100644
--- a/ui/src/app/admin/general-settings.tpl.html
+++ b/ui/src/app/admin/general-settings.tpl.html
@@ -22,11 +22,11 @@
<span translate class="md-headline">admin.general-settings</span>
</md-card-title-text>
</md-card-title>
- <md-progress-linear md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-card-content>
<form name="vm.settingsForm" ng-submit="vm.save()" tb-confirm-on-exit confirm-form="vm.settingsForm">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<md-input-container class="md-block">
<label translate>admin.base-url</label>
<input required name="baseUrl" ng-model="vm.settings.jsonValue.baseUrl">
@@ -35,7 +35,7 @@
</div>
</md-input-container>
<div layout="row" layout-align="end center" width="100%" layout-wrap>
- <md-button ng-disabled="loading || vm.settingsForm.$invalid || !vm.settingsForm.$dirty" type="submit" class="md-raised md-primary">{{'action.save' | translate}}</md-button>
+ <md-button ng-disabled="$root.loading || vm.settingsForm.$invalid || !vm.settingsForm.$dirty" type="submit" class="md-raised md-primary">{{'action.save' | translate}}</md-button>
</div>
</fieldset>
</form>
diff --git a/ui/src/app/admin/outgoing-mail-settings.tpl.html b/ui/src/app/admin/outgoing-mail-settings.tpl.html
index fd8476a..3c59593 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 @@
<div id="help-container"></div>
</md-card-title-text>
</md-card-title>
- <md-progress-linear md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-card-content>
<form name="vm.settingsForm" ng-submit="vm.save()" tb-confirm-on-exit confirm-form="vm.settingsForm">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<md-input-container class="md-block">
<label translate>admin.mail-from</label>
<input required name="mailFrom" ng-model="vm.settings.jsonValue.mailFrom">
@@ -38,7 +38,7 @@
</md-input-container>
<md-input-container class="md-block">
<label translate>admin.smtp-protocol</label>
- <md-select ng-disabled="loading" ng-model="vm.settings.jsonValue.smtpProtocol">
+ <md-select ng-disabled="$root.loading" ng-model="vm.settings.jsonValue.smtpProtocol">
<md-option ng-repeat="smtpProtocol in vm.smtpProtocols" value="{{smtpProtocol}}">
{{smtpProtocol.toUpperCase()}}
</md-option>
@@ -78,7 +78,7 @@
<div translate ng-message="md-maxlength">admin.timeout-invalid</div>
</div>
</md-input-container>
- <md-checkbox ng-disabled="loading" ng-true-value="'true'" ng-false-value="'false'"
+ <md-checkbox ng-disabled="$root.loading" ng-true-value="'true'" ng-false-value="'false'"
aria-label="{{ 'admin.enable-tls' | translate }}" ng-model="vm.settings.jsonValue.enableTls">{{ 'admin.enable-tls' | translate }}</md-checkbox>
<md-input-container class="md-block">
<label translate>common.username</label>
@@ -89,8 +89,8 @@
<input name="password" placeholder="{{ 'common.enter-password' | translate }}" type="password" ng-model="vm.settings.jsonValue.password">
</md-input-container>
<div layout="row" layout-align="end center" width="100%" layout-wrap>
- <md-button ng-disabled="loading || vm.settingsForm.$invalid" ng-click="vm.sendTestMail()" class="md-raised">{{'admin.send-test-mail' | translate}}</md-button>
- <md-button ng-disabled="loading || vm.settingsForm.$invalid || !vm.settingsForm.$dirty" type="submit" class="md-raised md-primary">{{'action.save' | translate}}</md-button>
+ <md-button ng-disabled="$root.loading || vm.settingsForm.$invalid" ng-click="vm.sendTestMail()" class="md-raised">{{'admin.send-test-mail' | translate}}</md-button>
+ <md-button ng-disabled="$root.loading || vm.settingsForm.$invalid || !vm.settingsForm.$dirty" type="submit" class="md-raised md-primary">{{'action.save' | translate}}</md-button>
</div>
</fieldset>
</form>
diff --git a/ui/src/app/alarm/alarm-details-dialog.tpl.html b/ui/src/app/alarm/alarm-details-dialog.tpl.html
index b090052..cc213d1 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 @@
<md-button ng-if="vm.allowAcknowledgment && (vm.alarm.status==vm.types.alarmStatus.activeUnack ||
vm.alarm.status==vm.types.alarmStatus.clearedUnack)"
class="md-raised md-primary"
- ng-disabled="loading"
+ ng-disabled="$root.loading"
ng-click="vm.acknowledge()"
style="margin-right:20px;">{{ 'alarm.acknowledge' |
translate }}
@@ -95,12 +95,12 @@
<md-button ng-if="vm.allowClear && (vm.alarm.status==vm.types.alarmStatus.activeAck ||
vm.alarm.status==vm.types.alarmStatus.activeUnack)"
class="md-raised md-primary"
- ng-disabled="loading"
+ ng-disabled="$root.loading"
ng-click="vm.clear()">{{ 'alarm.clear' |
translate }}
</md-button>
<span flex></span>
- <md-button ng-disabled="loading" ng-click="vm.close()" style="margin-right:20px;">{{ 'action.close' |
+ <md-button ng-disabled="$root.loading" ng-click="vm.close()" style="margin-right:20px;">{{ 'action.close' |
translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/alarm/alarm-table.tpl.html b/ui/src/app/alarm/alarm-table.tpl.html
index c32e39a..98d42a2 100644
--- a/ui/src/app/alarm/alarm-table.tpl.html
+++ b/ui/src/app/alarm/alarm-table.tpl.html
@@ -19,7 +19,7 @@
<section layout="row">
<md-input-container class="md-block" style="width: 200px;">
<label translate>alarm.alarm-status</label>
- <md-select ng-model="alarmSearchStatus" ng-disabled="loading()">
+ <md-select ng-model="alarmSearchStatus" ng-disabled="$root.loading">
<md-option ng-repeat="searchStatus in types.alarmSearchStatus" ng-value="searchStatus">
{{ ('alarm.search-status.' + searchStatus) | translate }}
</md-option>
@@ -31,8 +31,8 @@
<md-list flex layout="column" class="tb-alarm-table">
<md-list class="tb-row tb-header" layout="row" tb-alarm-header>
</md-list>
- <md-progress-linear style="max-height: 0px;" md-mode="indeterminate" ng-disabled="!loading()"
- ng-show="loading()"></md-progress-linear>
+ <md-progress-linear style="max-height: 0px;" md-mode="indeterminate" ng-disabled="!$root.loading"
+ ng-show="$root.loading"></md-progress-linear>
<md-divider></md-divider>
<span translate layout-align="center center"
style="margin-top: 25px;"
ui/src/app/api/asset.service.js 4(+2 -2)
diff --git a/ui/src/app/api/asset.service.js b/ui/src/app/api/asset.service.js
index 2fbb11d..51ea107 100644
--- a/ui/src/app/api/asset.service.js
+++ b/ui/src/app/api/asset.service.js
@@ -265,10 +265,10 @@ function AssetService($http, $q, customerService, userService) {
return deferred.promise;
}
- function getAssetTypes() {
+ function getAssetTypes(config) {
var deferred = $q.defer();
var url = '/api/asset/types';
- $http.get(url).then(function success(response) {
+ $http.get(url, config).then(function success(response) {
deferred.resolve(response.data);
}, function fail() {
deferred.reject();
ui/src/app/api/attribute.service.js 4(+2 -2)
diff --git a/ui/src/app/api/attribute.service.js b/ui/src/app/api/attribute.service.js
index 3f4b971..6e1aeec 100644
--- a/ui/src/app/api/attribute.service.js
+++ b/ui/src/app/api/attribute.service.js
@@ -35,7 +35,7 @@ function AttributeService($http, $q, $filter, types, telemetryWebsocketService)
return service;
- 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) {
@@ -43,7 +43,7 @@ function AttributeService($http, $q, $filter, types, telemetryWebsocketService)
} 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) {
ui/src/app/api/customer.service.js 8(+4 -4)
diff --git a/ui/src/app/api/customer.service.js b/ui/src/app/api/customer.service.js
index b36b44a..b520a09 100644
--- a/ui/src/app/api/customer.service.js
+++ b/ui/src/app/api/customer.service.js
@@ -32,7 +32,7 @@ function CustomerService($http, $q, types) {
return service;
- function getCustomers(pageLink) {
+ function getCustomers(pageLink, config) {
var deferred = $q.defer();
var url = '/api/customers?limit=' + pageLink.limit;
if (angular.isDefined(pageLink.textSearch)) {
@@ -44,7 +44,7 @@ function CustomerService($http, $q, types) {
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();
@@ -52,10 +52,10 @@ function CustomerService($http, $q, types) {
return deferred.promise;
}
- function getCustomer(customerId) {
+ function getCustomer(customerId, config) {
var deferred = $q.defer();
var url = '/api/customer/' + customerId;
- $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);
ui/src/app/api/dashboard.service.js 16(+8 -8)
diff --git a/ui/src/app/api/dashboard.service.js b/ui/src/app/api/dashboard.service.js
index 362a539..3082bd3 100644
--- a/ui/src/app/api/dashboard.service.js
+++ b/ui/src/app/api/dashboard.service.js
@@ -43,7 +43,7 @@ function DashboardService($rootScope, $http, $q, $location, customerService) {
return service;
- function getTenantDashboardsByTenantId(tenantId, pageLink) {
+ function getTenantDashboardsByTenantId(tenantId, pageLink, config) {
var deferred = $q.defer();
var url = '/api/tenant/' + tenantId + '/dashboards?limit=' + pageLink.limit;
if (angular.isDefined(pageLink.textSearch)) {
@@ -55,7 +55,7 @@ function DashboardService($rootScope, $http, $q, $location, customerService) {
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();
@@ -63,7 +63,7 @@ function DashboardService($rootScope, $http, $q, $location, customerService) {
return deferred.promise;
}
- function getTenantDashboards(pageLink, applyCustomersInfo) {
+ function getTenantDashboards(pageLink, applyCustomersInfo, config) {
var deferred = $q.defer();
var url = '/api/tenant/dashboards?limit=' + pageLink.limit;
if (angular.isDefined(pageLink.textSearch)) {
@@ -75,7 +75,7 @@ function DashboardService($rootScope, $http, $q, $location, customerService) {
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) {
if (applyCustomersInfo) {
customerService.applyAssignedCustomersInfo(response.data.data).then(
function success(data) {
@@ -95,7 +95,7 @@ function DashboardService($rootScope, $http, $q, $location, customerService) {
return deferred.promise;
}
- function getCustomerDashboards(customerId, pageLink, applyCustomersInfo) {
+ function getCustomerDashboards(customerId, pageLink, applyCustomersInfo, config) {
var deferred = $q.defer();
var url = '/api/customer/' + customerId + '/dashboards?limit=' + pageLink.limit;
if (angular.isDefined(pageLink.textSearch)) {
@@ -107,7 +107,7 @@ function DashboardService($rootScope, $http, $q, $location, customerService) {
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) {
if (applyCustomersInfo) {
customerService.applyAssignedCustomerInfo(response.data.data, customerId).then(
function success(data) {
@@ -158,10 +158,10 @@ function DashboardService($rootScope, $http, $q, $location, customerService) {
return deferred.promise;
}
- function getDashboardInfo(dashboardId) {
+ function getDashboardInfo(dashboardId, config) {
var deferred = $q.defer();
var url = '/api/dashboard/info/' + dashboardId;
- $http.get(url, null).then(function success(response) {
+ $http.get(url, config).then(function success(response) {
deferred.resolve(response.data);
}, function fail() {
deferred.reject();
ui/src/app/api/device.service.js 4(+2 -2)
diff --git a/ui/src/app/api/device.service.js b/ui/src/app/api/device.service.js
index b1d1bb6..bb4249e 100644
--- a/ui/src/app/api/device.service.js
+++ b/ui/src/app/api/device.service.js
@@ -293,10 +293,10 @@ function DeviceService($http, $q, attributeService, customerService, types) {
return deferred.promise;
}
- function getDeviceTypes() {
+ function getDeviceTypes(config) {
var deferred = $q.defer();
var url = '/api/device/types';
- $http.get(url).then(function success(response) {
+ $http.get(url, config).then(function success(response) {
deferred.resolve(response.data);
}, function fail() {
deferred.reject();
ui/src/app/api/entity.service.js 76(+41 -35)
diff --git a/ui/src/app/api/entity.service.js b/ui/src/app/api/entity.service.js
index 0022607..df1c3e0 100644
--- a/ui/src/app/api/entity.service.js
+++ b/ui/src/app/api/entity.service.js
@@ -56,22 +56,22 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device
promise = assetService.getAsset(entityId, true, config);
break;
case types.entityType.tenant:
- promise = tenantService.getTenant(entityId);
+ promise = tenantService.getTenant(entityId, config);
break;
case types.entityType.customer:
- promise = customerService.getCustomer(entityId);
+ promise = customerService.getCustomer(entityId, config);
break;
case types.entityType.rule:
- promise = ruleService.getRule(entityId);
+ promise = ruleService.getRule(entityId, config);
break;
case types.entityType.plugin:
- promise = pluginService.getPlugin(entityId);
+ promise = pluginService.getPlugin(entityId, config);
break;
case types.entityType.dashboard:
- promise = dashboardService.getDashboardInfo(entityId);
+ promise = dashboardService.getDashboardInfo(entityId, config);
break;
case types.entityType.user:
- promise = userService.getUser(entityId);
+ promise = userService.getUser(entityId, true, config);
break;
case types.entityType.alarm:
$log.error('Get Alarm Entity is not implemented!');
@@ -136,22 +136,28 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device
promise = assetService.getAssets(entityIds, config);
break;
case types.entityType.tenant:
- promise = getEntitiesByIdsPromise(tenantService.getTenant, entityIds);
+ promise = getEntitiesByIdsPromise(
+ (id) => 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/entity-relation.service.js b/ui/src/app/api/entity-relation.service.js
index 742aec7..79f80da 100644
--- a/ui/src/app/api/entity-relation.service.js
+++ b/ui/src/app/api/entity-relation.service.js
@@ -175,10 +175,10 @@ function EntityRelationService($http, $q) {
return deferred.promise;
}
- function findInfoByQuery(query) {
+ function findInfoByQuery(query, config) {
var deferred = $q.defer();
var url = '/api/relations/info';
- $http.post(url, query).then(function success(response) {
+ $http.post(url, query, config).then(function success(response) {
deferred.resolve(response.data);
}, function fail() {
deferred.reject();
ui/src/app/api/plugin.service.js 24(+12 -12)
diff --git a/ui/src/app/api/plugin.service.js b/ui/src/app/api/plugin.service.js
index 55429ce..28f63de 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);
ui/src/app/api/rule.service.js 12(+6 -6)
diff --git a/ui/src/app/api/rule.service.js b/ui/src/app/api/rule.service.js
index ee166f6..df37305 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);
ui/src/app/api/tenant.service.js 8(+4 -4)
diff --git a/ui/src/app/api/tenant.service.js b/ui/src/app/api/tenant.service.js
index 594b543..be04ae9 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);
ui/src/app/api/user.service.js 8(+6 -2)
diff --git a/ui/src/app/api/user.service.js b/ui/src/app/api/user.service.js
index d09387b..1a146b4 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();
ui/src/app/api/widget.service.js 16(+8 -8)
diff --git a/ui/src/app/api/widget.service.js b/ui/src/app/api/widget.service.js
index 3c74ecb..fe95729 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);
},
ui/src/app/asset/add-asset.tpl.html 8(+4 -4)
diff --git a/ui/src/app/asset/add-asset.tpl.html b/ui/src/app/asset/add-asset.tpl.html
index ce22e4e..71901e4 100644
--- a/ui/src/app/asset/add-asset.tpl.html
+++ b/ui/src/app/asset/add-asset.tpl.html
@@ -27,8 +27,8 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<tb-asset asset="vm.item" is-edit="true" the-form="theForm"></tb-asset>
@@ -36,10 +36,10 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary">
+ <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary">
{{ 'action.add' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
</md-dialog-actions>
</form>
</md-dialog>
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 18e23ce..64edcf8 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 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<fieldset>
@@ -65,11 +65,11 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || vm.assets.selectedCount == 0" type="submit"
+ <md-button ng-disabled="$root.loading || vm.assets.selectedCount == 0" type="submit"
class="md-raised md-primary">
{{ 'action.assign' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/asset/asset-fieldset.tpl.html b/ui/src/app/asset/asset-fieldset.tpl.html
index d921b2e..afa14ad 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 }}
</div>
- <fieldset ng-disabled="loading || !isEdit">
+ <fieldset ng-disabled="$root.loading || !isEdit">
<md-input-container class="md-block">
<label translate>asset.name</label>
<input required name="name" ng-model="asset.name">
@@ -57,7 +57,7 @@
</div>
</md-input-container>
<tb-entity-subtype-autocomplete
- ng-disabled="loading || !isEdit"
+ ng-disabled="$root.loading || !isEdit"
tb-required="true"
the-form="theForm"
ng-model="asset.type"
diff --git a/ui/src/app/asset/assign-to-customer.tpl.html b/ui/src/app/asset/assign-to-customer.tpl.html
index fba56ce..9030ec4 100644
--- a/ui/src/app/asset/assign-to-customer.tpl.html
+++ b/ui/src/app/asset/assign-to-customer.tpl.html
@@ -26,8 +26,8 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<fieldset>
@@ -65,10 +65,10 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || vm.customers.selection==null" type="submit" class="md-raised md-primary">
+ <md-button ng-disabled="$root.loading || vm.customers.selection==null" type="submit" class="md-raised md-primary">
{{ 'action.assign' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/component/component.tpl.html b/ui/src/app/component/component.tpl.html
index a9faa7f..d007ba6 100644
--- a/ui/src/app/component/component.tpl.html
+++ b/ui/src/app/component/component.tpl.html
@@ -24,7 +24,7 @@
{{ componentTypeName }}
</span>
<span ng-if="readOnly" style="min-width: 40px; min-height: 40px; margin: 0 6px;"></br></span>
- <md-button ng-disabled="loading" class="md-icon-button md-primary"
+ <md-button ng-disabled="$root.loading" class="md-icon-button md-primary"
style="min-width: 40px;"
ng-click="openComponent($event)"
aria-label="{{ (readOnly ? 'action.view' : 'action.edit') | translate }}">
@@ -43,7 +43,7 @@
edit
</md-icon>
</md-button>
- <md-button ng-if="!readOnly" ng-disabled="loading" class="md-icon-button md-primary"
+ <md-button ng-if="!readOnly" ng-disabled="$root.loading" class="md-icon-button md-primary"
style="min-width: 40px;"
ng-click="onRemoveComponent({event: $event})"
aria-label="{{ 'action.remove' | translate }}">
diff --git a/ui/src/app/component/component-dialog.tpl.html b/ui/src/app/component/component-dialog.tpl.html
index 271d818..841d7ef 100644
--- a/ui/src/app/component/component-dialog.tpl.html
+++ b/ui/src/app/component/component-dialog.tpl.html
@@ -27,11 +27,11 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content tb-filter">
- <fieldset ng-disabled="loading || vm.isReadOnly">
+ <fieldset ng-disabled="$root.loading || vm.isReadOnly">
<section flex layout="row">
<md-input-container flex class="md-block">
<label translate>rule.component-name</label>
@@ -42,7 +42,7 @@
</md-input-container>
<md-input-container flex class="md-block">
<label translate>rule.component-type</label>
- <md-select required name="componentType" ng-model="vm.componentInfo.component.clazz" ng-disabled="loading || vm.isReadOnly">
+ <md-select required name="componentType" ng-model="vm.componentInfo.component.clazz" ng-disabled="$root.loading || vm.isReadOnly">
<md-option ng-repeat="componentDescriptor in vm.componentDescriptors" ng-value="componentDescriptor.clazz">
{{componentDescriptor.name}}
</md-option>
@@ -57,7 +57,7 @@
<tb-json-form schema="vm.componentDescriptor.configurationDescriptor.schema"
form="vm.componentDescriptor.configurationDescriptor.form"
model="vm.componentInfo.component.configuration"
- readonly="loading || vm.isReadOnly"
+ readonly="$root.loading || vm.isReadOnly"
form-control="theForm">
</tb-json-form>
</md-card-content>
@@ -67,11 +67,11 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-if="!vm.isReadOnly" ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit"
+ <md-button ng-if="!vm.isReadOnly" ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit"
class="md-raised md-primary">
{{ (vm.isAdd ? 'action.add' : 'action.save') | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/components/dashboard-autocomplete.directive.js b/ui/src/app/components/dashboard-autocomplete.directive.js
index ce7e477..2235b82 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 d7b32d8..ac5cd3d 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 ccaac21..c4e8594 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 a55c316..574a7af 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 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<tb-datakey-config ng-model="vm.dataKey"
fetch-entity-keys="vm.fetchEntityKeys(entityAliasId, query, type)"
@@ -37,10 +37,10 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary">
+ <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary">
{{ 'action.save' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
</md-dialog-actions>
</form>
</md-dialog>
diff --git a/ui/src/app/components/details-sidenav.tpl.html b/ui/src/app/components/details-sidenav.tpl.html
index 24c2270..934aed3 100644
--- a/ui/src/app/components/details-sidenav.tpl.html
+++ b/ui/src/app/components/details-sidenav.tpl.html
@@ -35,7 +35,7 @@
</div>
<section ng-if="!isReadOnly" layout="row" layout-wrap
class="tb-header-buttons md-fab">
- <md-button ng-show="isEdit" ng-disabled="loading || theForm.$invalid || !theForm.$dirty"
+ <md-button ng-show="isEdit" ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty"
class="tb-btn-header md-accent md-hue-2 md-fab md-fab-bottom-right"
aria-label="{{ 'action.apply' | translate }}"
ng-click="detailsApply()">
@@ -44,7 +44,7 @@
</md-tooltip>
<ng-md-icon icon="done"></ng-md-icon>
</md-button>
- <md-button ng-disabled="loading || (isAlwaysEdit && !theForm.$dirty)" class="tb-btn-header md-accent md-hue-2 md-fab md-fab-bottom-right"
+ <md-button ng-disabled="$root.loading || (isAlwaysEdit && !theForm.$dirty)" class="tb-btn-header md-accent md-hue-2 md-fab md-fab-bottom-right"
aria-label="{{ 'details.edit-mode' | translate }}"
ng-click="toggleDetailsEditMode()">
<md-tooltip md-direction="top">
ui/src/app/components/grid.tpl.html 14(+7 -7)
diff --git a/ui/src/app/components/grid.tpl.html b/ui/src/app/components/grid.tpl.html
index 24285d8..b334567 100644
--- a/ui/src/app/components/grid.tpl.html
+++ b/ui/src/app/components/grid.tpl.html
@@ -45,7 +45,7 @@
<tb-grid-card-content flex grid-ctl="vm" parent-ctl="vm.parentCtl" item-controller="vm.itemCardController" item-template="vm.itemCardTemplate" item="rowItem[n]"></tb-grid-card-content>
</md-card-content>
<md-card-actions layout="row" layout-align="end end">
- <md-button ng-if="action.isEnabled(rowItem[n])" ng-disabled="loading" class="md-icon-button md-primary" ng-repeat="action in vm.actionsList"
+ <md-button ng-if="action.isEnabled(rowItem[n])" ng-disabled="$root.loading" class="md-icon-button md-primary" ng-repeat="action in vm.actionsList"
ng-click="action.onAction($event, rowItem[n])" aria-label="{{ action.name() }}">
<md-tooltip md-direction="top">
{{ action.details( rowItem[n] ) }}
@@ -81,28 +81,28 @@
</section>
<section layout="row" layout-wrap class="tb-footer-buttons md-fab " layout-align="start end">
- <md-button ng-disabled="loading" ng-show="vm.items.selectedCount > 0" class="tb-btn-footer md-accent md-hue-2 md-fab" ng-repeat="groupAction in vm.groupActionsList"
+ <md-button ng-disabled="$root.loading" ng-show="vm.items.selectedCount > 0" class="tb-btn-footer md-accent md-hue-2 md-fab" ng-repeat="groupAction in vm.groupActionsList"
ng-click="groupAction.onAction($event, vm.items)" aria-label="{{ groupAction.name() }}">
<md-tooltip md-direction="top">
{{ groupAction.details(vm.items.selectedCount) }}
</md-tooltip>
<ng-md-icon icon="{{groupAction.icon}}"></ng-md-icon>
</md-button>
- <md-button ng-disabled="loading" ng-show="vm.topIndex > 0" class="tb-btn-footer md-primary md-hue-1 md-fab" ng-click="vm.moveToTop()" aria-label="{{'grid.scroll-to-top' | translate}}" >
+ <md-button ng-disabled="$root.loading" ng-show="vm.topIndex > 0" class="tb-btn-footer md-primary md-hue-1 md-fab" ng-click="vm.moveToTop()" aria-label="{{'grid.scroll-to-top' | translate}}" >
<md-tooltip md-direction="top">
{{'grid.scroll-to-top' | translate}}
</md-tooltip>
<ng-md-icon icon="arrow_drop_up"></ng-md-icon>
</md-button>
- <md-button ng-disabled="loading" ng-if="vm.addItemAction.name() && vm.addItemActions.length == 0" class="tb-btn-footer md-accent md-hue-2 md-fab" ng-click="vm.addItemAction.onAction($event)" aria-label="{{ vm.addItemAction.name() }}" >
+ <md-button ng-disabled="$root.loading" ng-if="vm.addItemAction.name() && vm.addItemActions.length == 0" class="tb-btn-footer md-accent md-hue-2 md-fab" ng-click="vm.addItemAction.onAction($event)" aria-label="{{ vm.addItemAction.name() }}" >
<md-tooltip md-direction="top">
{{ vm.addItemAction.details() }}
</md-tooltip>
<ng-md-icon icon="{{ vm.addItemAction.icon }}"></ng-md-icon>
</md-button>
- <md-fab-speed-dial ng-disabled="loading" ng-if="vm.addItemAction.name() && vm.addItemActions.length > 0" md-open="vm.addItemActionsOpen" class="md-scale" md-direction="up" ng-if="vm.addItemAction.name()">
+ <md-fab-speed-dial ng-disabled="$root.loading" ng-if="vm.addItemAction.name() && vm.addItemActions.length > 0" md-open="vm.addItemActionsOpen" class="md-scale" md-direction="up" ng-if="vm.addItemAction.name()">
<md-fab-trigger>
- <md-button ng-disabled="loading" class="tb-btn-footer md-accent md-hue-2 md-fab" aria-label="{{ vm.addItemAction.name() }}" >
+ <md-button ng-disabled="$root.loading" class="tb-btn-footer md-accent md-hue-2 md-fab" aria-label="{{ vm.addItemAction.name() }}" >
<md-tooltip md-direction="top">
{{ vm.addItemAction.details() }}
</md-tooltip>
@@ -110,7 +110,7 @@
</md-button>
</md-fab-trigger>
<md-fab-actions>
- <md-button ng-disabled="loading" class="md-accent md-hue-2 md-fab" ng-repeat="addItemAction in vm.addItemActions"
+ <md-button ng-disabled="$root.loading" class="md-accent md-hue-2 md-fab" ng-repeat="addItemAction in vm.addItemActions"
ng-click="addItemAction.onAction($event)" aria-label="{{ addItemAction.name() }}" >
<md-tooltip md-direction="top">
{{ addItemAction.details() }}
diff --git a/ui/src/app/components/legend-config-panel.tpl.html b/ui/src/app/components/legend-config-panel.tpl.html
index c5538a1..fe64204 100644
--- a/ui/src/app/components/legend-config-panel.tpl.html
+++ b/ui/src/app/components/legend-config-panel.tpl.html
@@ -16,7 +16,7 @@
-->
<form name="theForm" ng-submit="vm.update()">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<md-content style="height: 100%" flex layout="column">
<section layout="column">
<md-content class="md-padding" layout="column">
diff --git a/ui/src/app/components/material-icons-dialog.tpl.html b/ui/src/app/components/material-icons-dialog.tpl.html
index 8a2eb65..db1abda 100644
--- a/ui/src/app/components/material-icons-dialog.tpl.html
+++ b/ui/src/app/components/material-icons-dialog.tpl.html
@@ -32,15 +32,15 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<div class="tb-absolute-fill tb-icons-load" ng-show="vm.loadingIcons" layout="column" layout-align="center center">
<md-progress-circular md-mode="indeterminate" ng-disabled="!vm.loadingIcons" class="md-accent" md-diameter="40"></md-progress-circular>
</div>
<md-dialog-content>
<div class="md-dialog-content">
<md-content class="md-padding" layout="column">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<md-button ng-class="{'md-primary md-raised': icon == vm.selectedIcon}" class="tb-select-icon-button md-icon-button"
ng-repeat="icon in vm.icons" ng-click="vm.selectIcon($event, icon)" tb-on-finish-render="iconsLoadFinished">
<md-icon class="material-icons">{{icon}}</md-icon>
@@ -54,7 +54,7 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading" ng-click="vm.cancel()">
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()">
{{ 'action.cancel' | translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/components/plugin-select.directive.js b/ui/src/app/components/plugin-select.directive.js
index f20076f..0e52657 100644
--- a/ui/src/app/components/plugin-select.directive.js
+++ b/ui/src/app/components/plugin-select.directive.js
@@ -56,7 +56,7 @@ function PluginSelect($compile, $templateCache, $q, pluginService, types) {
var deferred = $q.defer();
- scope.pluginFetchFunction(pageLink).then(function success(result) {
+ scope.pluginFetchFunction(pageLink, {ignoreLoading: true}).then(function success(result) {
deferred.resolve(result.data);
}, function fail() {
deferred.reject();
@@ -89,7 +89,7 @@ function PluginSelect($compile, $templateCache, $q, pluginService, types) {
if (scope.selectFirstPlugin) {
var pageLink = {limit: 1, textSearch: ''};
- scope.pluginFetchFunction(pageLink).then(function success(result) {
+ scope.pluginFetchFunction(pageLink, {ignoreLoading: true}).then(function success(result) {
var plugins = result.data;
if (plugins.length > 0) {
scope.plugin = plugins[0];
diff --git a/ui/src/app/components/timewindow-panel.tpl.html b/ui/src/app/components/timewindow-panel.tpl.html
index 27187dc..0c80538 100644
--- a/ui/src/app/components/timewindow-panel.tpl.html
+++ b/ui/src/app/components/timewindow-panel.tpl.html
@@ -16,7 +16,7 @@
-->
<form name="theForm" ng-submit="vm.update()">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<md-content style="height: 100%" flex layout="column">
<section layout="column">
<md-tabs ng-class="{'tb-headless': vm.historyOnly}" md-dynamic-height md-selected="vm.timewindow.selectedTab" md-border-bottom>
@@ -81,10 +81,10 @@
<span flex></span>
<section layout="row" layout-alignment="start center">
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary">
+ <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary">
{{ 'action.update' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">
{{ 'action.cancel' | translate }}
</md-button>
</section>
diff --git a/ui/src/app/components/widget/action/widget-action-dialog.tpl.html b/ui/src/app/components/widget/action/widget-action-dialog.tpl.html
index aa0971a..91b4981 100644
--- a/ui/src/app/components/widget/action/widget-action-dialog.tpl.html
+++ b/ui/src/app/components/widget/action/widget-action-dialog.tpl.html
@@ -26,12 +26,12 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<md-content class="md-padding" layout="column">
- <fieldset ng-disabled="loading" layout="column">
+ <fieldset ng-disabled="$root.loading" layout="column">
<md-input-container class="md-block">
<label translate>widget-config.action-source</label>
<md-select name="actionSource" required aria-label="{{ 'widget-config.action-source' | translate }}" ng-model="vm.action.actionSourceId">
@@ -129,11 +129,11 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit"
+ <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit"
class="md-raised md-primary">
{{ (vm.isAdd ? 'action.add' : 'action.save') | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">
{{ 'action.cancel' | translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/components/widget/widget-config.tpl.html b/ui/src/app/components/widget/widget-config.tpl.html
index b0084d7..c50aade 100644
--- a/ui/src/app/components/widget/widget-config.tpl.html
+++ b/ui/src/app/components/widget/widget-config.tpl.html
@@ -104,7 +104,7 @@
generate-data-key="generateDataKey(chip,type)"
fetch-entity-keys="fetchEntityKeys({entityAliasId: entityAliasId, query: query, type: type})"
on-create-entity-alias="onCreateEntityAlias({event: event, alias: alias})"></tb-datasource>
- <md-button ng-disabled="loading" class="md-icon-button md-primary"
+ <md-button ng-disabled="$root.loading" class="md-icon-button md-primary"
style="min-width: 40px;"
ng-click="removeDatasource($event, datasource)"
aria-label="{{ 'action.remove' | translate }}">
@@ -121,7 +121,7 @@
</div>
</div>
<div flex layout="row" layout-align="start center">
- <md-button ng-show="typeParameters.maxDatasources == -1 || datasources.length < typeParameters.maxDatasources" ng-disabled="loading" class="md-primary md-raised"
+ <md-button ng-show="typeParameters.maxDatasources == -1 || datasources.length < typeParameters.maxDatasources" ng-disabled="$root.loading" class="md-primary md-raised"
ng-click="addDatasource($event)" aria-label="{{ 'action.add' | translate }}">
<md-tooltip md-direction="top">
{{ 'widget-config.add-datasource' | translate }}
diff --git a/ui/src/app/components/widgets-bundle-select.directive.js b/ui/src/app/components/widgets-bundle-select.directive.js
index b90d240..7e1ed71 100644
--- a/ui/src/app/components/widgets-bundle-select.directive.js
+++ b/ui/src/app/components/widgets-bundle-select.directive.js
@@ -48,7 +48,7 @@ function WidgetsBundleSelect($compile, $templateCache, widgetService, types) {
}
}
- widgetsBundleFetchFunction().then(
+ widgetsBundleFetchFunction({ignoreLoading: true}).then(
function success(widgetsBundles) {
scope.widgetsBundles = widgetsBundles;
if (scope.selectFirstBundle) {
diff --git a/ui/src/app/customer/add-customer.tpl.html b/ui/src/app/customer/add-customer.tpl.html
index c1da19d..69c3832 100644
--- a/ui/src/app/customer/add-customer.tpl.html
+++ b/ui/src/app/customer/add-customer.tpl.html
@@ -27,8 +27,8 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<tb-customer customer="vm.item" is-edit="true" the-form="theForm"></tb-customer>
@@ -36,10 +36,10 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary">
+ <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary">
{{ 'action.add' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
</md-dialog-actions>
</form>
</md-dialog>
diff --git a/ui/src/app/customer/customer-fieldset.tpl.html b/ui/src/app/customer/customer-fieldset.tpl.html
index 3facd0f..e367c88 100644
--- a/ui/src/app/customer/customer-fieldset.tpl.html
+++ b/ui/src/app/customer/customer-fieldset.tpl.html
@@ -32,7 +32,7 @@
</div>
<md-content class="md-padding" layout="column">
- <fieldset ng-show="!isPublic" ng-disabled="loading || !isEdit">
+ <fieldset ng-show="!isPublic" ng-disabled="$root.loading || !isEdit">
<md-input-container class="md-block">
<label translate>customer.title</label>
<input required name="title" ng-model="customer.title">
diff --git a/ui/src/app/dashboard/add-dashboard.tpl.html b/ui/src/app/dashboard/add-dashboard.tpl.html
index 4807522..79735e0 100644
--- a/ui/src/app/dashboard/add-dashboard.tpl.html
+++ b/ui/src/app/dashboard/add-dashboard.tpl.html
@@ -27,8 +27,8 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<tb-dashboard-details dashboard="vm.item" is-edit="true" the-form="theForm"></tb-dashboard-details>
@@ -36,10 +36,10 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary">
+ <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary">
{{ 'action.add' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
</md-dialog-actions>
</form>
</md-dialog>
\ No newline at end of file
diff --git a/ui/src/app/dashboard/add-dashboards-to-customer.tpl.html b/ui/src/app/dashboard/add-dashboards-to-customer.tpl.html
index cfd6b6a..6ae2f8d 100644
--- a/ui/src/app/dashboard/add-dashboards-to-customer.tpl.html
+++ b/ui/src/app/dashboard/add-dashboards-to-customer.tpl.html
@@ -26,8 +26,8 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<fieldset>
@@ -65,11 +65,11 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || vm.dashboards.selectedCount == 0" type="submit"
+ <md-button ng-disabled="$root.loading || vm.dashboards.selectedCount == 0" type="submit"
class="md-raised md-primary">
{{ 'action.assign' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/dashboard/add-widget.controller.js b/ui/src/app/dashboard/add-widget.controller.js
index c15492d..bae486b 100644
--- a/ui/src/app/dashboard/add-widget.controller.js
+++ b/ui/src/app/dashboard/add-widget.controller.js
@@ -110,7 +110,7 @@ export default function AddWidgetController($scope, widgetService, entityService
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);
},
ui/src/app/dashboard/add-widget.tpl.html 10(+5 -5)
diff --git a/ui/src/app/dashboard/add-widget.tpl.html b/ui/src/app/dashboard/add-widget.tpl.html
index 4ca29f0..8d5e130 100644
--- a/ui/src/app/dashboard/add-widget.tpl.html
+++ b/ui/src/app/dashboard/add-widget.tpl.html
@@ -27,11 +27,11 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content" style="padding-top: 0px;">
- <fieldset ng-disabled="loading" style="position: relative; height: 600px;">
+ <fieldset ng-disabled="$root.loading" style="position: relative; height: 600px;">
<tb-widget-config widget-type="vm.widget.type"
type-parameters="vm.widgetInfo.typeParameters"
action-sources="vm.widgetInfo.actionSources"
@@ -50,11 +50,11 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid" type="submit"
+ <md-button ng-disabled="$root.loading || theForm.$invalid" type="submit"
class="md-raised md-primary">
{{ 'action.add' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/dashboard/assign-to-customer.tpl.html b/ui/src/app/dashboard/assign-to-customer.tpl.html
index b08e44a..4d7ba85 100644
--- a/ui/src/app/dashboard/assign-to-customer.tpl.html
+++ b/ui/src/app/dashboard/assign-to-customer.tpl.html
@@ -26,8 +26,8 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<fieldset>
@@ -65,10 +65,10 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || vm.customers.selection==null" type="submit" class="md-raised md-primary">
+ <md-button ng-disabled="$root.loading || vm.customers.selection==null" type="submit" class="md-raised md-primary">
{{ 'action.assign' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
translate }}
</md-button>
</md-dialog-actions>
ui/src/app/dashboard/dashboard.tpl.html 16(+8 -8)
diff --git a/ui/src/app/dashboard/dashboard.tpl.html b/ui/src/app/dashboard/dashboard.tpl.html
index 87f2840..fab4634 100644
--- a/ui/src/app/dashboard/dashboard.tpl.html
+++ b/ui/src/app/dashboard/dashboard.tpl.html
@@ -110,7 +110,7 @@
</section>
<section class="tb-dashboard-container tb-absolute-fill"
ng-class="{ 'is-fullscreen': forceFullscreen, 'tb-dashboard-toolbar-opened': vm.toolbarOpened, 'tb-dashboard-toolbar-closed': !vm.toolbarOpened }">
- <section ng-show="!loading && vm.dashboardConfigurationError()" layout-align="center center"
+ <section ng-show="!$root.loading && vm.dashboardConfigurationError()" layout-align="center center"
ng-style="{'color': vm.dashboard.configuration.settings.titleColor}"
ng-class="{'tb-padded' : !vm.widgetEditMode}"
style="text-transform: uppercase; display: flex; z-index: 1;"
@@ -277,10 +277,10 @@
</div>
</tb-details-sidenav>
<section layout="row" layout-wrap class="tb-footer-buttons md-fab" layout-align="start end">
- <md-fab-speed-dial ng-disabled="loading" ng-show="!vm.isAddingWidget && vm.isEdit && !vm.widgetEditMode"
+ <md-fab-speed-dial ng-disabled="$root.loading" ng-show="!vm.isAddingWidget && vm.isEdit && !vm.widgetEditMode"
md-open="vm.addItemActionsOpen" class="md-scale" md-direction="up">
<md-fab-trigger>
- <md-button ng-disabled="loading"
+ <md-button ng-disabled="$root.loading"
class="tb-btn-footer md-accent md-hue-2 md-fab"
aria-label="{{ 'dashboard.add-widget' | translate }}">
<md-tooltip md-direction="top">
@@ -290,7 +290,7 @@
</md-button>
</md-fab-trigger>
<md-fab-actions>
- <md-button ng-disabled="loading"
+ <md-button ng-disabled="$root.loading"
class="tmd-accent md-hue-2 md-fab" ng-click="vm.addWidget($event)"
aria-label="{{ 'action.create' | translate }}">
<md-tooltip md-direction="top">
@@ -298,7 +298,7 @@
</md-tooltip>
<ng-md-icon icon="insert_drive_file"></ng-md-icon>
</md-button>
- <md-button ng-disabled="loading"
+ <md-button ng-disabled="$root.loading"
class="tmd-accent md-hue-2 md-fab" ng-click="vm.importWidget($event)"
aria-label="{{ 'action.import' | translate }}">
<md-tooltip md-direction="top">
@@ -308,7 +308,7 @@
</md-button>
</md-fab-actions>
</md-fab-speed-dial>
- <md-button ng-if="(vm.isTenantAdmin() || vm.isSystemAdmin()) && !forceFullscreen" ng-show="vm.isEdit && !vm.isAddingWidget && !loading" ng-disabled="loading"
+ <md-button ng-if="(vm.isTenantAdmin() || vm.isSystemAdmin()) && !forceFullscreen" ng-show="vm.isEdit && !vm.isAddingWidget && !$root.loading" ng-disabled="$root.loading"
class="tb-btn-footer md-accent md-hue-2 md-fab"
aria-label="{{ 'action.apply' | translate }}"
ng-click="vm.saveDashboard()">
@@ -317,8 +317,8 @@
</md-tooltip>
<ng-md-icon icon="done"></ng-md-icon>
</md-button>
- <md-button ng-show="!vm.isAddingWidget && !loading"
- ng-if="(vm.isTenantAdmin() || vm.isSystemAdmin()) && !forceFullscreen" ng-disabled="loading"
+ <md-button ng-show="!vm.isAddingWidget && !$root.loading"
+ ng-if="(vm.isTenantAdmin() || vm.isSystemAdmin()) && !forceFullscreen" ng-disabled="$root.loading"
class="tb-btn-footer md-accent md-hue-2 md-fab"
aria-label="{{ 'action.edit-mode' | translate }}"
ng-click="vm.toggleDashboardEditMode()">
diff --git a/ui/src/app/dashboard/dashboard-fieldset.tpl.html b/ui/src/app/dashboard/dashboard-fieldset.tpl.html
index 954d881..a54f477 100644
--- a/ui/src/app/dashboard/dashboard-fieldset.tpl.html
+++ b/ui/src/app/dashboard/dashboard-fieldset.tpl.html
@@ -59,7 +59,7 @@
</md-button>
</div>
</div>
- <fieldset ng-disabled="loading || !isEdit">
+ <fieldset ng-disabled="$root.loading || !isEdit">
<md-input-container class="md-block">
<label translate>dashboard.title</label>
<input required name="title" ng-model="dashboard.title">
diff --git a/ui/src/app/dashboard/dashboard-settings.tpl.html b/ui/src/app/dashboard/dashboard-settings.tpl.html
index 38e2af3..da2b254 100644
--- a/ui/src/app/dashboard/dashboard-settings.tpl.html
+++ b/ui/src/app/dashboard/dashboard-settings.tpl.html
@@ -26,11 +26,11 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<div ng-show="vm.settings">
<md-input-container class="md-block">
<label translate>dashboard.state-controller</label>
@@ -194,10 +194,10 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || !theForm.$dirty || !theForm.$valid" type="submit" class="md-raised md-primary">
+ <md-button ng-disabled="$root.loading || !theForm.$dirty || !theForm.$valid" type="submit" class="md-raised md-primary">
{{ 'action.save' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
</md-dialog-actions>
</form>
</md-dialog>
diff --git a/ui/src/app/dashboard/edit-widget.directive.js b/ui/src/app/dashboard/edit-widget.directive.js
index 9bf1548..9357812 100644
--- a/ui/src/app/dashboard/edit-widget.directive.js
+++ b/ui/src/app/dashboard/edit-widget.directive.js
@@ -75,7 +75,7 @@ export default function EditWidgetDirective($compile, $templateCache, types, wid
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/dashboard/edit-widget.tpl.html b/ui/src/app/dashboard/edit-widget.tpl.html
index 1f724a8..5b225e2 100644
--- a/ui/src/app/dashboard/edit-widget.tpl.html
+++ b/ui/src/app/dashboard/edit-widget.tpl.html
@@ -15,7 +15,7 @@
limitations under the License.
-->
-<fieldset ng-disabled="loading">
+<fieldset ng-disabled="$root.loading">
<tb-widget-config widget-type="widget.type"
type-parameters="typeParameters"
action-sources="actionSources"
diff --git a/ui/src/app/dashboard/layouts/dashboard-layout.tpl.html b/ui/src/app/dashboard/layouts/dashboard-layout.tpl.html
index d9c7c23..c54901e 100644
--- a/ui/src/app/dashboard/layouts/dashboard-layout.tpl.html
+++ b/ui/src/app/dashboard/layouts/dashboard-layout.tpl.html
@@ -22,7 +22,7 @@
'background-attachment': 'scroll',
'background-size': vm.layoutCtx.gridSettings.backgroundSizeMode || '100%',
'background-position': '0% 0%'}">
- <section ng-show="!loading && vm.noData()" layout-align="center center"
+ <section ng-show="!$root.loading && vm.noData()" layout-align="center center"
ng-style="{'color': vm.layoutCtx.gridSettings.color}"
style="text-transform: uppercase; display: flex; z-index: 1; pointer-events: none;"
class="md-headline tb-absolute-fill">
diff --git a/ui/src/app/dashboard/layouts/manage-dashboard-layouts.tpl.html b/ui/src/app/dashboard/layouts/manage-dashboard-layouts.tpl.html
index d4d95db..335563d 100644
--- a/ui/src/app/dashboard/layouts/manage-dashboard-layouts.tpl.html
+++ b/ui/src/app/dashboard/layouts/manage-dashboard-layouts.tpl.html
@@ -26,11 +26,11 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<div layout="row" layout-align="start center">
<md-checkbox ng-disabled="true" flex aria-label="{{ 'layout.main' | translate }}"
ng-model="vm.displayLayouts.main">{{ 'layout.main' | translate }}
@@ -56,10 +56,10 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || !theForm.$dirty || !theForm.$valid" type="submit" class="md-raised md-primary">
+ <md-button ng-disabled="$root.loading || !theForm.$dirty || !theForm.$valid" type="submit" class="md-raised md-primary">
{{ 'action.save' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
</md-dialog-actions>
</form>
</md-dialog>
diff --git a/ui/src/app/dashboard/layouts/select-target-layout.tpl.html b/ui/src/app/dashboard/layouts/select-target-layout.tpl.html
index f69f487..a84f4f2 100644
--- a/ui/src/app/dashboard/layouts/select-target-layout.tpl.html
+++ b/ui/src/app/dashboard/layouts/select-target-layout.tpl.html
@@ -26,11 +26,11 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<div layout="row" layout-align="start center">
<md-button flex class="tb-layout-button md-raised md-primary" layout="column"
ng-click="vm.selectLayout($event, 'main')">
diff --git a/ui/src/app/dashboard/states/dashboard-state-dialog.tpl.html b/ui/src/app/dashboard/states/dashboard-state-dialog.tpl.html
index 4cf0a3d..3f9fb43 100644
--- a/ui/src/app/dashboard/states/dashboard-state-dialog.tpl.html
+++ b/ui/src/app/dashboard/states/dashboard-state-dialog.tpl.html
@@ -26,12 +26,12 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<md-content class="md-padding" layout="column">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<md-input-container class="md-block">
<label translate>dashboard.state-name</label>
<input name="name" required ng-model="vm.state.name">
@@ -57,11 +57,11 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit"
+ <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit"
class="md-raised md-primary">
{{ (vm.isAdd ? 'action.add' : 'action.save') | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">
{{ 'action.cancel' | translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/dashboard/states/manage-dashboard-states.tpl.html b/ui/src/app/dashboard/states/manage-dashboard-states.tpl.html
index 9f86b9b..9f73652 100644
--- a/ui/src/app/dashboard/states/manage-dashboard-states.tpl.html
+++ b/ui/src/app/dashboard/states/manage-dashboard-states.tpl.html
@@ -26,11 +26,11 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<div class="manage-dashboard-states" layout="column">
<md-toolbar class="md-table-toolbar md-default" ng-show="vm.query.search === null">
<div class="md-toolbar-tools">
@@ -118,10 +118,10 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || !theForm.$dirty || !theForm.$valid" type="submit" class="md-raised md-primary">
+ <md-button ng-disabled="$root.loading || !theForm.$dirty || !theForm.$valid" type="submit" class="md-raised md-primary">
{{ 'action.save' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
</md-dialog-actions>
</form>
</md-dialog>
diff --git a/ui/src/app/dashboard/states/select-target-state.tpl.html b/ui/src/app/dashboard/states/select-target-state.tpl.html
index c874a07..412b818 100644
--- a/ui/src/app/dashboard/states/select-target-state.tpl.html
+++ b/ui/src/app/dashboard/states/select-target-state.tpl.html
@@ -26,11 +26,11 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<md-select required aria-label="{{ 'dashboard.state' | translate }}" ng-model="vm.stateId">
<md-option ng-repeat="(stateId, state) in vm.states" ng-value="stateId">
{{state.name}}
@@ -41,10 +41,10 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || !theForm.$dirty || !theForm.$valid" type="submit" class="md-raised md-primary">
+ <md-button ng-disabled="$root.loading || !theForm.$dirty || !theForm.$valid" type="submit" class="md-raised md-primary">
{{ 'action.save' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
</md-dialog-actions>
</form>
</md-dialog>
diff --git a/ui/src/app/device/add-device.tpl.html b/ui/src/app/device/add-device.tpl.html
index 4db792f..3e26d70 100644
--- a/ui/src/app/device/add-device.tpl.html
+++ b/ui/src/app/device/add-device.tpl.html
@@ -27,8 +27,8 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<tb-device device="vm.item" is-edit="true" the-form="theForm"></tb-device>
@@ -36,10 +36,10 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary">
+ <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary">
{{ 'action.add' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
</md-dialog-actions>
</form>
</md-dialog>
\ No newline at end of file
diff --git a/ui/src/app/device/add-devices-to-customer.tpl.html b/ui/src/app/device/add-devices-to-customer.tpl.html
index 0795f95..04b28fd 100644
--- a/ui/src/app/device/add-devices-to-customer.tpl.html
+++ b/ui/src/app/device/add-devices-to-customer.tpl.html
@@ -26,8 +26,8 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<fieldset>
@@ -65,11 +65,11 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || vm.devices.selectedCount == 0" type="submit"
+ <md-button ng-disabled="$root.loading || vm.devices.selectedCount == 0" type="submit"
class="md-raised md-primary">
{{ 'action.assign' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/device/assign-to-customer.tpl.html b/ui/src/app/device/assign-to-customer.tpl.html
index b9736c6..7bc2a12 100644
--- a/ui/src/app/device/assign-to-customer.tpl.html
+++ b/ui/src/app/device/assign-to-customer.tpl.html
@@ -26,8 +26,8 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<fieldset>
@@ -65,10 +65,10 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || vm.customers.selection==null" type="submit" class="md-raised md-primary">
+ <md-button ng-disabled="$root.loading || vm.customers.selection==null" type="submit" class="md-raised md-primary">
{{ 'action.assign' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/device/device-credentials.tpl.html b/ui/src/app/device/device-credentials.tpl.html
index 705f983..c050349 100644
--- a/ui/src/app/device/device-credentials.tpl.html
+++ b/ui/src/app/device/device-credentials.tpl.html
@@ -26,14 +26,14 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
- <fieldset ng-disabled="loading || vm.isReadOnly">
+ <fieldset ng-disabled="$root.loading || vm.isReadOnly">
<md-input-container class="md-block">
<label translate>device.credentials-type</label>
- <md-select ng-disabled="loading || vm.isReadOnly" ng-model="vm.deviceCredentials.credentialsType"
+ <md-select ng-disabled="$root.loading || vm.isReadOnly" ng-model="vm.deviceCredentials.credentialsType"
ng-change="vm.clear()">
<md-option ng-repeat="credentialsType in vm.credentialsTypes" value="{{credentialsType.value}}">
{{credentialsType.name}}
@@ -62,10 +62,10 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-if="!vm.isReadOnly" ng-disabled="loading || theForm.$invalid || !theForm.$dirty || !vm.valid()" type="submit" class="md-raised md-primary">
+ <md-button ng-if="!vm.isReadOnly" ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty || !vm.valid()" type="submit" class="md-raised md-primary">
{{ 'action.save' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ (vm.isReadOnly ? 'action.close' : 'action.cancel') | translate }}</md-button>
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ (vm.isReadOnly ? 'action.close' : 'action.cancel') | translate }}</md-button>
</md-dialog-actions>
</form>
</md-dialog>
\ No newline at end of file
diff --git a/ui/src/app/device/device-fieldset.tpl.html b/ui/src/app/device/device-fieldset.tpl.html
index 767e47a..a4d15f3 100644
--- a/ui/src/app/device/device-fieldset.tpl.html
+++ b/ui/src/app/device/device-fieldset.tpl.html
@@ -58,7 +58,7 @@
ng-show="!isEdit && isPublic && (deviceScope === 'customer' || deviceScope === 'tenant')">
{{ 'device.device-public' | translate }}
</div>
- <fieldset ng-disabled="loading || !isEdit">
+ <fieldset ng-disabled="$root.loading || !isEdit">
<md-input-container class="md-block">
<label translate>device.name</label>
<input required name="name" ng-model="device.name">
@@ -67,14 +67,14 @@
</div>
</md-input-container>
<tb-entity-subtype-autocomplete
- ng-disabled="loading || !isEdit"
+ ng-disabled="$root.loading || !isEdit"
tb-required="true"
the-form="theForm"
ng-model="device.type"
entity-type="types.entityType.device">
</tb-entity-subtype-autocomplete>
<md-input-container class="md-block">
- <md-checkbox ng-disabled="loading || !isEdit" flex aria-label="{{ 'device.is-gateway' | translate }}"
+ <md-checkbox ng-disabled="$root.loading || !isEdit" flex aria-label="{{ 'device.is-gateway' | translate }}"
ng-model="device.additionalInfo.gateway">{{ 'device.is-gateway' | translate }}
</md-checkbox>
</md-input-container>
diff --git a/ui/src/app/entity/alias/entity-alias-dialog.tpl.html b/ui/src/app/entity/alias/entity-alias-dialog.tpl.html
index b78a795..546f8bf 100644
--- a/ui/src/app/entity/alias/entity-alias-dialog.tpl.html
+++ b/ui/src/app/entity/alias/entity-alias-dialog.tpl.html
@@ -26,11 +26,11 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<div flex layout="column">
<div layout="row">
<md-input-container flex class="md-block">
@@ -64,10 +64,10 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary">
+ <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary">
{{ (vm.isAdd ? 'action.add' : 'action.save') | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
</md-dialog-actions>
</form>
</md-dialog>
diff --git a/ui/src/app/entity/alias/entity-aliases.tpl.html b/ui/src/app/entity/alias/entity-aliases.tpl.html
index 40010a2..227619b 100644
--- a/ui/src/app/entity/alias/entity-aliases.tpl.html
+++ b/ui/src/app/entity/alias/entity-aliases.tpl.html
@@ -26,8 +26,8 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<div class="tb-aliases-header" flex layout="row" layout-align="start center">
<span flex="5"></span>
<div flex layout="row" layout-align="start center">
@@ -40,7 +40,7 @@
<md-divider></md-divider>
<md-dialog-content>
<div class="md-dialog-content">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<div ng-form name="aliasForm" flex layout="row" layout-align="start center" ng-repeat="entityAlias in vm.entityAliases track by $index">
<span flex="5">{{$index + 1}}.</span>
<di class="md-whiteframe-4dp tb-alias" flex layout="row" layout-align="start center">
@@ -63,7 +63,7 @@
aria-label="resolve-multiple-switcher">
</md-switch>
</section>
- <md-button ng-disabled="loading" class="md-icon-button md-primary" style="min-width: 40px;"
+ <md-button ng-disabled="$root.loading" class="md-icon-button md-primary" style="min-width: 40px;"
ng-click="vm.editAlias($event, entityAlias)" aria-label="{{ 'action.edit' | translate }}">
<md-tooltip md-direction="top">
{{ 'alias.edit' | translate }}
@@ -72,7 +72,7 @@
edit
</md-icon>
</md-button>
- <md-button ng-disabled="loading" class="md-icon-button md-primary" style="min-width: 40px;"
+ <md-button ng-disabled="$root.loading" class="md-icon-button md-primary" style="min-width: 40px;"
ng-click="vm.removeAlias($event, entityAlias)" aria-label="{{ 'action.remove' | translate }}">
<md-tooltip md-direction="top">
{{ 'entity.remove-alias' | translate }}
@@ -87,7 +87,7 @@
</div>
</md-dialog-content>
<md-dialog-actions layout="row">
- <md-button ng-show="!vm.disableAdd" ng-disabled="loading" class="md-primary md-raised"
+ <md-button ng-show="!vm.disableAdd" ng-disabled="$root.loading" class="md-primary md-raised"
ng-click="vm.addAlias($event)"
aria-label="{{ 'alias.add' | translate }}">
<md-tooltip md-direction="top">
@@ -96,10 +96,10 @@
<span translate>alias.add</span>
</md-button>
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary">
+ <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary">
{{ 'action.save' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
</md-dialog-actions>
</form>
</md-dialog>
\ No newline at end of file
diff --git a/ui/src/app/entity/attribute/add-attribute-dialog.tpl.html b/ui/src/app/entity/attribute/add-attribute-dialog.tpl.html
index 18f99fc..6df9343 100644
--- a/ui/src/app/entity/attribute/add-attribute-dialog.tpl.html
+++ b/ui/src/app/entity/attribute/add-attribute-dialog.tpl.html
@@ -26,12 +26,12 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<md-content class="md-padding" layout="column">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<md-input-container class="md-block">
<label translate>attribute.key</label>
<input required name="key" ng-model="vm.attribute.key">
@@ -42,7 +42,7 @@
<section layout="row">
<md-input-container flex="40" class="md-block" style="width: 200px;">
<label translate>value.type</label>
- <md-select ng-model="vm.valueType" ng-disabled="loading()">
+ <md-select ng-model="vm.valueType" ng-disabled="$root.loading">
<md-option ng-repeat="type in vm.valueTypes" ng-value="type">
<md-icon md-svg-icon="{{ type.icon }}"></md-icon>
<span>{{type.name | translate}}</span>
@@ -83,11 +83,11 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit"
+ <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit"
class="md-raised md-primary">
{{ 'action.add' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/entity/attribute/add-widget-to-dashboard-dialog.tpl.html b/ui/src/app/entity/attribute/add-widget-to-dashboard-dialog.tpl.html
index d7fe890..d74aa34 100644
--- a/ui/src/app/entity/attribute/add-widget-to-dashboard-dialog.tpl.html
+++ b/ui/src/app/entity/attribute/add-widget-to-dashboard-dialog.tpl.html
@@ -26,18 +26,18 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<md-content class="md-padding" layout="column">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<md-radio-group ng-model="vm.addToDashboardType" class="md-primary">
<md-radio-button flex ng-value=0 class="md-primary md-align-top-left md-radio-interactive">
<section flex layout="column" style="width: 300px;">
<span translate style="padding-bottom: 10px;">dashboard.select-existing</span>
<tb-dashboard-autocomplete the-form="theForm"
- ng-disabled="loading || vm.addToDashboardType != 0"
+ ng-disabled="$root.loading || vm.addToDashboardType != 0"
tb-required="vm.addToDashboardType === 0"
ng-model="vm.dashboardId"
select-first-dashboard="false">
@@ -69,11 +69,11 @@
style="margin-bottom: 0px; padding-right: 20px;">
{{ 'dashboard.open-dashboard' | translate }}
</md-checkbox>
- <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit"
+ <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit"
class="md-raised md-primary">
{{ 'action.add' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/entity/attribute/attribute-table.tpl.html b/ui/src/app/entity/attribute/attribute-table.tpl.html
index 3b19e9d..f7075fb 100644
--- a/ui/src/app/entity/attribute/attribute-table.tpl.html
+++ b/ui/src/app/entity/attribute/attribute-table.tpl.html
@@ -19,7 +19,7 @@
<section ng-show="!disableAttributeScopeSelection">
<md-input-container class="md-block" style="width: 200px;">
<label translate>attribute.attributes-scope</label>
- <md-select ng-model="attributeScope" ng-disabled="loading() || attributeScopeSelectionReadonly">
+ <md-select ng-model="attributeScope" ng-disabled="$root.loading || attributeScopeSelectionReadonly">
<md-option ng-repeat="scope in attributeScopes" ng-value="scope">
{{scope.name | translate}}
</md-option>
diff --git a/ui/src/app/entity/entity-autocomplete.directive.js b/ui/src/app/entity/entity-autocomplete.directive.js
index 4610426..62f3d6d 100644
--- a/ui/src/app/entity/entity-autocomplete.directive.js
+++ b/ui/src/app/entity/entity-autocomplete.directive.js
@@ -38,7 +38,7 @@ export default function EntityAutocomplete($compile, $templateCache, $q, $filter
if (scope.excludeEntityIds && scope.excludeEntityIds.length) {
limit += scope.excludeEntityIds.length;
}
- entityService.getEntitiesByNameFilter(scope.entityType, searchText, limit, null, scope.entitySubtype).then(function success(result) {
+ entityService.getEntitiesByNameFilter(scope.entityType, searchText, limit, {ignoreLoading: true}, scope.entitySubtype).then(function success(result) {
if (result) {
if (scope.excludeEntityIds && scope.excludeEntityIds.length) {
var entities = [];
diff --git a/ui/src/app/entity/entity-list.directive.js b/ui/src/app/entity/entity-list.directive.js
index 0863153..f0bd7d9 100644
--- a/ui/src/app/entity/entity-list.directive.js
+++ b/ui/src/app/entity/entity-list.directive.js
@@ -38,7 +38,7 @@ export default function EntityListDirective($compile, $templateCache, $q, $mdUti
scope.fetchEntities = function(searchText, limit) {
var deferred = $q.defer();
- entityService.getEntitiesByNameFilter(scope.entityType, searchText, limit).then(
+ entityService.getEntitiesByNameFilter(scope.entityType, searchText, limit, {ignoreLoading: true}).then(
function success(result) {
if (result) {
deferred.resolve(result);
diff --git a/ui/src/app/entity/entity-subtype-autocomplete.directive.js b/ui/src/app/entity/entity-subtype-autocomplete.directive.js
index 57f2e04..511f275 100644
--- a/ui/src/app/entity/entity-subtype-autocomplete.directive.js
+++ b/ui/src/app/entity/entity-subtype-autocomplete.directive.js
@@ -93,9 +93,9 @@ export default function EntitySubtypeAutocomplete($compile, $templateCache, $q,
if (!scope.entitySubtypes) {
var entitySubtypesPromise;
if (scope.entityType == types.entityType.asset) {
- entitySubtypesPromise = assetService.getAssetTypes();
+ entitySubtypesPromise = assetService.getAssetTypes({ignoreLoading: true});
} else if (scope.entityType == types.entityType.device) {
- entitySubtypesPromise = deviceService.getDeviceTypes();
+ entitySubtypesPromise = deviceService.getDeviceTypes({ignoreLoading: true});
}
if (entitySubtypesPromise) {
entitySubtypesPromise.then(
diff --git a/ui/src/app/entity/entity-subtype-list.directive.js b/ui/src/app/entity/entity-subtype-list.directive.js
index c7d6329..4468f64 100644
--- a/ui/src/app/entity/entity-subtype-list.directive.js
+++ b/ui/src/app/entity/entity-subtype-list.directive.js
@@ -95,9 +95,9 @@ export default function EntitySubtypeListDirective($compile, $templateCache, $q,
if (!scope.entitySubtypes) {
var entitySubtypesPromise;
if (scope.entityType == types.entityType.asset) {
- entitySubtypesPromise = assetService.getAssetTypes();
+ entitySubtypesPromise = assetService.getAssetTypes({ignoreLoading: true});
} else if (scope.entityType == types.entityType.device) {
- entitySubtypesPromise = deviceService.getDeviceTypes();
+ entitySubtypesPromise = deviceService.getDeviceTypes({ignoreLoading: true});
}
if (entitySubtypesPromise) {
entitySubtypesPromise.then(
diff --git a/ui/src/app/entity/entity-subtype-select.directive.js b/ui/src/app/entity/entity-subtype-select.directive.js
index 36d9729..72c4250 100644
--- a/ui/src/app/entity/entity-subtype-select.directive.js
+++ b/ui/src/app/entity/entity-subtype-select.directive.js
@@ -73,9 +73,9 @@ export default function EntitySubtypeSelect($compile, $templateCache, $translate
scope.entitySubtypes = [];
var entitySubtypesPromise;
if (scope.entityType == types.entityType.asset) {
- entitySubtypesPromise = assetService.getAssetTypes();
+ entitySubtypesPromise = assetService.getAssetTypes({ignoreLoading: true});
} else if (scope.entityType == types.entityType.device) {
- entitySubtypesPromise = deviceService.getDeviceTypes();
+ entitySubtypesPromise = deviceService.getDeviceTypes({ignoreLoading: true});
}
if (entitySubtypesPromise) {
entitySubtypesPromise.then(
diff --git a/ui/src/app/entity/relation/relation-dialog.tpl.html b/ui/src/app/entity/relation/relation-dialog.tpl.html
index 8799287..652b9d2 100644
--- a/ui/src/app/entity/relation/relation-dialog.tpl.html
+++ b/ui/src/app/entity/relation/relation-dialog.tpl.html
@@ -26,16 +26,16 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<md-content class="md-padding" layout="column">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<tb-relation-type-autocomplete ng-disabled="!vm.isAdd"
ng-model="vm.relation.type"
tb-required="true"
- ng-disabled="loading">
+ ng-disabled="$root.loading">
</tb-relation-type-autocomplete>
<small>{{(vm.direction == vm.types.entitySearchDirection.from ?
'relation.to-entity' : 'relation.from-entity') | translate}}</small>
@@ -61,11 +61,11 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit"
+ <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit"
class="md-raised md-primary">
{{ (vm.isAdd ? 'action.add' : 'action.save') | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/entity/relation/relation-filters.tpl.html b/ui/src/app/entity/relation/relation-filters.tpl.html
index 679a488..4f84fe1 100644
--- a/ui/src/app/entity/relation/relation-filters.tpl.html
+++ b/ui/src/app/entity/relation/relation-filters.tpl.html
@@ -37,7 +37,7 @@
allowed-entity-types="allowedEntityTypes"
tb-required="false">
</tb-entity-type-list>
- <md-button ng-disabled="loading" class="md-icon-button md-primary" style="width: 40px; min-width: 40px;"
+ <md-button ng-disabled="$root.loading" class="md-icon-button md-primary" style="width: 40px; min-width: 40px;"
ng-click="removeFilter($event, filter)" aria-label="{{ 'action.remove' | translate }}">
<md-tooltip md-direction="top">
{{ 'relation.remove-relation-filter' | translate }}
@@ -54,7 +54,7 @@
class="tb-prompt" translate>relation.any-relation</span>
</div>
<div>
- <md-button ng-disabled="loading" class="md-primary md-raised" ng-click="addFilter($event)" aria-label="{{ 'action.add' | translate }}">
+ <md-button ng-disabled="$root.loading" class="md-primary md-raised" ng-click="addFilter($event)" aria-label="{{ 'action.add' | translate }}">
<md-tooltip md-direction="top">
{{ 'relation.add-relation-filter' | translate }}
</md-tooltip>
diff --git a/ui/src/app/entity/relation/relation-table.tpl.html b/ui/src/app/entity/relation/relation-table.tpl.html
index 8599397..1553d93 100644
--- a/ui/src/app/entity/relation/relation-table.tpl.html
+++ b/ui/src/app/entity/relation/relation-table.tpl.html
@@ -19,7 +19,7 @@
<section layout="row">
<md-input-container class="md-block" style="width: 200px;">
<label translate>relation.direction</label>
- <md-select ng-model="vm.direction" ng-disabled="loading">
+ <md-select ng-model="vm.direction" ng-disabled="$root.loading">
<md-option ng-repeat="direction in vm.types.entitySearchDirection" ng-value="direction">
{{ ('relation.search-direction.' + direction) | translate}}
</md-option>
diff --git a/ui/src/app/event/event-content-dialog.tpl.html b/ui/src/app/event/event-content-dialog.tpl.html
index 7b4184c..9678616 100644
--- a/ui/src/app/event/event-content-dialog.tpl.html
+++ b/ui/src/app/event/event-content-dialog.tpl.html
@@ -35,7 +35,7 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading" ng-click="vm.close()" style="margin-right:20px;">{{ 'action.close' |
+ <md-button ng-disabled="$root.loading" ng-click="vm.close()" style="margin-right:20px;">{{ 'action.close' |
translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/event/event-table.tpl.html b/ui/src/app/event/event-table.tpl.html
index 82a921f..760b55b 100644
--- a/ui/src/app/event/event-table.tpl.html
+++ b/ui/src/app/event/event-table.tpl.html
@@ -19,7 +19,7 @@
<section layout="row">
<md-input-container class="md-block" style="width: 200px;">
<label translate>event.event-type</label>
- <md-select ng-model="eventType" ng-disabled="loading()">
+ <md-select ng-model="eventType" ng-disabled="$root.loading">
<md-option ng-repeat="type in eventTypes" ng-value="type.value">
{{type.name | translate}}
</md-option>
@@ -30,8 +30,8 @@
<md-list flex layout="column" class="md-whiteframe-z1 tb-event-table">
<md-list class="tb-row tb-header" layout="row" tb-event-header event-type="{{eventType}}">
</md-list>
- <md-progress-linear style="max-height: 0px;" md-mode="indeterminate" ng-disabled="!loading()"
- ng-show="loading()"></md-progress-linear>
+ <md-progress-linear style="max-height: 0px;" md-mode="indeterminate" ng-disabled="!$root.loading"
+ ng-show="$root.loading"></md-progress-linear>
<md-divider></md-divider>
<span translate layout-align="center center"
style="margin-top: 25px;"
diff --git a/ui/src/app/extension/extension-dialog.tpl.html b/ui/src/app/extension/extension-dialog.tpl.html
index 73c33d8..50520d1 100644
--- a/ui/src/app/extension/extension-dialog.tpl.html
+++ b/ui/src/app/extension/extension-dialog.tpl.html
@@ -27,14 +27,14 @@
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<md-content class="md-padding" layout="column">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<section flex layout="row">
<md-input-container flex="60" class="md-block" md-is-error="theForm.extensionId.$touched && theForm.extensionId.$invalid">
<label translate>extension.extension-id</label>
@@ -74,7 +74,7 @@
{{ (vm.isAdd ? 'action.add' : 'action.save') | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}
</md-button>
</md-dialog-actions>
</form>
diff --git a/ui/src/app/import-export/import-dialog.tpl.html b/ui/src/app/import-export/import-dialog.tpl.html
index c15fc23..8e0b32f 100644
--- a/ui/src/app/import-export/import-dialog.tpl.html
+++ b/ui/src/app/import-export/import-dialog.tpl.html
@@ -26,11 +26,11 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<div layout="column" layout-padding>
<div class="tb-container">
<label class="tb-label" translate>{{ vm.importFileLabel }}</label>
@@ -63,10 +63,10 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || !theForm.$dirty || !theForm.$valid || !vm.importData" type="submit" class="md-raised md-primary">
+ <md-button ng-disabled="$root.loading || !theForm.$dirty || !theForm.$valid || !vm.importData" type="submit" class="md-raised md-primary">
{{ 'action.import' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
</md-dialog-actions>
</form>
</md-dialog>
ui/src/app/layout/home.tpl.html 2(+1 -1)
diff --git a/ui/src/app/layout/home.tpl.html b/ui/src/app/layout/home.tpl.html
index a35c370..b9d2c0a 100644
--- a/ui/src/app/layout/home.tpl.html
+++ b/ui/src/app/layout/home.tpl.html
@@ -76,7 +76,7 @@
</tb-user-menu>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" style="z-index: 10; max-height: 0px; width: 100%;" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
+ <md-progress-linear class="md-warn" style="z-index: 10; max-height: 0px; width: 100%;" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
<div flex layout="column" id="toast-parent" style="position: relative;">
<md-content ng-cloak flex layout="column" class="page-content" ui-view name="content"></md-content>
diff --git a/ui/src/app/login/create-password.tpl.html b/ui/src/app/login/create-password.tpl.html
index 16ed81c..96dd8e6 100644
--- a/ui/src/app/login/create-password.tpl.html
+++ b/ui/src/app/login/create-password.tpl.html
@@ -23,7 +23,7 @@
</md-card-title-text>
</md-card-title>
<md-progress-linear class="md-warn" style="z-index: 1; max-height: 5px; width: inherit; position: absolute"
- md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
+ md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
<md-card-content>
<form class="create-password-form" ng-submit="vm.createPassword()">
<div layout="column" layout-padding="" id="toast-parent">
ui/src/app/login/login.tpl.html 2(+1 -1)
diff --git a/ui/src/app/login/login.tpl.html b/ui/src/app/login/login.tpl.html
index afe2a1c..05f9c89 100644
--- a/ui/src/app/login/login.tpl.html
+++ b/ui/src/app/login/login.tpl.html
@@ -23,7 +23,7 @@
</md-card-title-text>
</md-card-title>
<md-progress-linear class="md-warn" style="z-index: 1; max-height: 5px; width: inherit; position: absolute"
- md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
+ md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
<md-card-content>
<form class="login-form" ng-submit="vm.login()">
<div layout="column" layout-padding="" id="toast-parent">
diff --git a/ui/src/app/login/reset-password.tpl.html b/ui/src/app/login/reset-password.tpl.html
index 43b5803..52788dd 100644
--- a/ui/src/app/login/reset-password.tpl.html
+++ b/ui/src/app/login/reset-password.tpl.html
@@ -23,7 +23,7 @@
</md-card-title-text>
</md-card-title>
<md-progress-linear class="md-warn" style="z-index: 1; max-height: 5px; width: inherit; position: absolute"
- md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
+ md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
<md-card-content>
<form class="password-reset-form" ng-submit="vm.resetPassword()">
<div layout="column" layout-padding="" id="toast-parent">
diff --git a/ui/src/app/login/reset-password-request.tpl.html b/ui/src/app/login/reset-password-request.tpl.html
index a478927..51afe88 100644
--- a/ui/src/app/login/reset-password-request.tpl.html
+++ b/ui/src/app/login/reset-password-request.tpl.html
@@ -23,7 +23,7 @@
</md-card-title-text>
</md-card-title>
<md-progress-linear class="md-warn" style="z-index: 1; max-height: 5px; width: inherit; position: absolute"
- md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
+ md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
<md-card-content>
<form class="request-password-reset-form" ng-submit="vm.sendResetPasswordLink()">
<div layout="column" layout-padding="" id="toast-parent">
diff --git a/ui/src/app/plugin/add-plugin.tpl.html b/ui/src/app/plugin/add-plugin.tpl.html
index 8d99408..4060a62 100644
--- a/ui/src/app/plugin/add-plugin.tpl.html
+++ b/ui/src/app/plugin/add-plugin.tpl.html
@@ -27,8 +27,8 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<tb-plugin plugin="vm.item" is-edit="true" the-form="theForm"></tb-plugin>
@@ -36,11 +36,11 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit"
+ <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit"
class="md-raised md-primary">
{{ 'action.add' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/plugin/plugin-fieldset.tpl.html b/ui/src/app/plugin/plugin-fieldset.tpl.html
index b5f8742..987040c 100644
--- a/ui/src/app/plugin/plugin-fieldset.tpl.html
+++ b/ui/src/app/plugin/plugin-fieldset.tpl.html
@@ -39,7 +39,7 @@
</div>
<md-content class="md-padding" layout="column" style="overflow-x: hidden">
- <fieldset ng-disabled="loading || !isEdit || isReadOnly">
+ <fieldset ng-disabled="$root.loading || !isEdit || isReadOnly">
<md-input-container class="md-block">
<label translate>plugin.name</label>
<input required name="name" ng-model="plugin.name">
@@ -61,7 +61,7 @@
</md-input-container>
<md-input-container flex class="md-block">
<label translate>plugin.type</label>
- <md-select required name="pluginType" ng-model="plugin.clazz" ng-disabled="loading || !isEdit">
+ <md-select required name="pluginType" ng-model="plugin.clazz" ng-disabled="$root.loading || !isEdit">
<md-option ng-repeat="component in pluginComponents" ng-value="component.clazz">
{{component.name}}
</md-option>
@@ -74,14 +74,14 @@
<md-card flex class="plugin-config" ng-if="showPluginConfig">
<md-card-title>
<md-card-title-text>
- <span translate class="md-headline" ng-class="{'tb-readonly-label' : (loading || !isEdit || isReadOnly)}">plugin.configuration</span>
+ <span translate class="md-headline" ng-class="{'tb-readonly-label' : ($root.loading || !isEdit || isReadOnly)}">plugin.configuration</span>
</md-card-title-text>
</md-card-title>
<md-card-content>
<tb-json-form schema="pluginComponent.configurationDescriptor.schema"
form="pluginComponent.configurationDescriptor.form"
model="pluginConfiguration.data"
- readonly="loading || !isEdit || isReadOnly"
+ readonly="$root.loading || !isEdit || isReadOnly"
form-control="theForm">
</tb-json-form>
</md-card-content>
diff --git a/ui/src/app/profile/change-password.tpl.html b/ui/src/app/profile/change-password.tpl.html
index 9057e8c..dd1c577 100644
--- a/ui/src/app/profile/change-password.tpl.html
+++ b/ui/src/app/profile/change-password.tpl.html
@@ -26,8 +26,8 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<md-input-container class="md-block">
@@ -55,10 +55,10 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid" type="submit" class="md-raised md-primary">
+ <md-button ng-disabled="$root.loading || theForm.$invalid" type="submit" class="md-raised md-primary">
{{ 'profile.change-password' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
</md-dialog-actions>
</form>
</md-dialog>
ui/src/app/profile/profile.tpl.html 10(+5 -5)
diff --git a/ui/src/app/profile/profile.tpl.html b/ui/src/app/profile/profile.tpl.html
index 39401f7..3849f9b 100644
--- a/ui/src/app/profile/profile.tpl.html
+++ b/ui/src/app/profile/profile.tpl.html
@@ -23,11 +23,11 @@
<span style='opacity: 0.7;'>{{ vm.profileUser.email }}</span>
</md-card-title-text>
</md-card-title>
- <md-progress-linear md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-card-content>
<form name="theForm" ng-submit="vm.save()" tb-confirm-on-exit confirm-form="theForm">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<md-input-container class="md-block">
<label translate>user.email</label>
<input name="email" type="email" ng-model="vm.profileUser.email">
@@ -48,11 +48,11 @@
</md-option>
</md-select>
</md-input-container>
- <md-button ng-disabled="loading" ng-click="vm.changePassword($event)"
+ <md-button ng-disabled="$root.loading" ng-click="vm.changePassword($event)"
class="md-raised md-primary">{{ 'profile.change-password' | translate }}
</md-button>
<div layout="row" layout-align="end center" width="100%" layout-wrap>
- <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit"
+ <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit"
class="md-raised md-primary">{{ 'action.save' | translate }}
</md-button>
</div>
ui/src/app/rule/add-rule.tpl.html 8(+4 -4)
diff --git a/ui/src/app/rule/add-rule.tpl.html b/ui/src/app/rule/add-rule.tpl.html
index f0d4cca..cfb1f62 100644
--- a/ui/src/app/rule/add-rule.tpl.html
+++ b/ui/src/app/rule/add-rule.tpl.html
@@ -27,8 +27,8 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<tb-rule rule="vm.item" is-edit="true" the-form="theForm"></tb-rule>
@@ -36,11 +36,11 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit"
+ <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit"
class="md-raised md-primary">
{{ 'action.add' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
translate }}
</md-button>
</md-dialog-actions>
ui/src/app/rule/rule-fieldset.tpl.html 10(+5 -5)
diff --git a/ui/src/app/rule/rule-fieldset.tpl.html b/ui/src/app/rule/rule-fieldset.tpl.html
index 835b783..ca63203 100644
--- a/ui/src/app/rule/rule-fieldset.tpl.html
+++ b/ui/src/app/rule/rule-fieldset.tpl.html
@@ -39,7 +39,7 @@
</div>
<md-content class="md-padding tb-rule" layout="column">
- <fieldset ng-disabled="loading || !isEdit || isReadOnly">
+ <fieldset ng-disabled="$root.loading || !isEdit || isReadOnly">
<md-input-container class="md-block">
<label translate>rule.name</label>
<input required name="name" ng-model="rule.name">
@@ -109,7 +109,7 @@
</div>
</div>
<div ng-if="isEdit && !isReadOnly" flex layout="row" layout-align="start center">
- <md-button ng-disabled="loading" class="md-primary md-raised"
+ <md-button ng-disabled="$root.loading" class="md-primary md-raised"
ng-click="addFilter($event)" aria-label="{{ 'action.add' | translate }}">
<md-tooltip md-direction="top">
{{ 'rule.add-filter' | translate }}
@@ -149,7 +149,7 @@
<span ng-if="!isEdit || isReadOnly" translate layout-align="center center"
class="tb-prompt">rule.no-processor-configured</span>
<div ng-if="isEdit && !isReadOnly" flex layout="row" layout-align="start center">
- <md-button ng-disabled="loading" class="md-primary md-raised"
+ <md-button ng-disabled="$root.loading" class="md-primary md-raised"
ng-click="addProcessor($event)" aria-label="{{ 'action.create' | translate }}">
<md-tooltip md-direction="top">
{{ 'rule.create-processor' | translate }}
@@ -162,7 +162,7 @@
</v-pane-content>
</v-pane>
</v-accordion>
- <fieldset ng-disabled="loading || !isEdit || isReadOnly">
+ <fieldset ng-disabled="$root.loading || !isEdit || isReadOnly">
<md-input-container ng-if="!isEdit || isReadOnly" flex class="md-block">
<label translate>plugin.plugin</label>
<input name="name" ng-model="plugin.name">
@@ -203,7 +203,7 @@
<span translate layout-align="center center"
class="tb-prompt">rule.create-action-prompt</span>
<div ng-if="isEdit && !isReadOnly" flex layout="row" layout-align="start center">
- <md-button ng-disabled="loading" class="md-primary md-raised"
+ <md-button ng-disabled="$root.loading" class="md-primary md-raised"
ng-click="addAction($event)" aria-label="{{ 'action.create' | translate }}">
<md-tooltip md-direction="top">
{{ 'rule.create-action' | translate }}
diff --git a/ui/src/app/tenant/add-tenant.tpl.html b/ui/src/app/tenant/add-tenant.tpl.html
index d589e04..d7ee48e 100644
--- a/ui/src/app/tenant/add-tenant.tpl.html
+++ b/ui/src/app/tenant/add-tenant.tpl.html
@@ -27,8 +27,8 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<tb-tenant tenant="vm.item" is-edit="true" the-form="theForm"></tb-tenant>
@@ -36,11 +36,11 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit"
+ <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit"
class="md-raised md-primary">
{{ 'action.add' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/tenant/tenant-fieldset.tpl.html b/ui/src/app/tenant/tenant-fieldset.tpl.html
index 76b0c3f..41e371b 100644
--- a/ui/src/app/tenant/tenant-fieldset.tpl.html
+++ b/ui/src/app/tenant/tenant-fieldset.tpl.html
@@ -29,7 +29,7 @@
</div>
<md-content class="md-padding" layout="column">
- <fieldset ng-disabled="loading || !isEdit">
+ <fieldset ng-disabled="$root.loading || !isEdit">
<md-input-container class="md-block">
<label translate>tenant.title</label>
<input required name="title" ng-model="tenant.title">
ui/src/app/user/add-user.tpl.html 8(+4 -4)
diff --git a/ui/src/app/user/add-user.tpl.html b/ui/src/app/user/add-user.tpl.html
index 4883394..a34f994 100644
--- a/ui/src/app/user/add-user.tpl.html
+++ b/ui/src/app/user/add-user.tpl.html
@@ -27,8 +27,8 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<tb-user user="vm.item" is-edit="true" the-form="theForm"></tb-user>
@@ -45,10 +45,10 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary">
+ <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary">
{{ 'action.add' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button>
</md-dialog-actions>
</form>
</md-dialog>
ui/src/app/user/user-fieldset.tpl.html 10(+5 -5)
diff --git a/ui/src/app/user/user-fieldset.tpl.html b/ui/src/app/user/user-fieldset.tpl.html
index d03b462..b804813 100644
--- a/ui/src/app/user/user-fieldset.tpl.html
+++ b/ui/src/app/user/user-fieldset.tpl.html
@@ -26,7 +26,7 @@
</md-button>
<md-content class="md-padding" layout="column">
- <fieldset ng-disabled="loading || !isEdit">
+ <fieldset ng-disabled="$root.loading || !isEdit">
<md-input-container class="md-block">
<label translate>user.email</label>
<input required name="email"
@@ -50,11 +50,11 @@
<textarea ng-model="user.additionalInfo.description" rows="2"></textarea>
</md-input-container>
<section class="tb-default-dashboard" flex layout="column" ng-if="user.id">
- <span class="tb-default-dashboard-label" ng-class="{'tb-disabled-label': loading || !isEdit}" translate>user.default-dashboard</span>
+ <span class="tb-default-dashboard-label" ng-class="{'tb-disabled-label': $root.loading || !isEdit}" translate>user.default-dashboard</span>
<section flex layout="column" layout-gt-sm="row">
<tb-dashboard-autocomplete ng-if="isTenantAdmin()"
flex
- ng-disabled="loading || !isEdit"
+ ng-disabled="$root.loading || !isEdit"
the-form="theForm"
ng-model="user.additionalInfo.defaultDashboardId"
tenant-id="user.tenantId.id"
@@ -62,14 +62,14 @@
</tb-dashboard-autocomplete>
<tb-dashboard-autocomplete ng-if="isCustomerUser()"
flex
- ng-disabled="loading || !isEdit"
+ ng-disabled="$root.loading || !isEdit"
the-form="theForm"
ng-model="user.additionalInfo.defaultDashboardId"
dashboards-scope="customer"
customer-id="user.customerId.id"
select-first-dashboard="false">
</tb-dashboard-autocomplete>
- <md-checkbox ng-disabled="loading || !isEdit" flex aria-label="{{ 'user.always-fullscreen' | translate }}"
+ <md-checkbox ng-disabled="$root.loading || !isEdit" flex aria-label="{{ 'user.always-fullscreen' | translate }}"
ng-model="user.additionalInfo.defaultDashboardFullscreen">{{ 'user.always-fullscreen' | translate }}
</md-checkbox>
</section>
diff --git a/ui/src/app/widget/add-widgets-bundle.tpl.html b/ui/src/app/widget/add-widgets-bundle.tpl.html
index 5544ddd..fcd4582 100644
--- a/ui/src/app/widget/add-widgets-bundle.tpl.html
+++ b/ui/src/app/widget/add-widgets-bundle.tpl.html
@@ -27,8 +27,8 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<tb-widgets-bundle widgets-bundle="vm.item" is-edit="true" the-form="theForm"></tb-widgets-bundle>
@@ -36,11 +36,11 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit"
+ <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit"
class="md-raised md-primary">
{{ 'action.add' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/widget/save-widget-type-as.tpl.html b/ui/src/app/widget/save-widget-type-as.tpl.html
index 6bdc54d..87fb0cf 100644
--- a/ui/src/app/widget/save-widget-type-as.tpl.html
+++ b/ui/src/app/widget/save-widget-type-as.tpl.html
@@ -26,8 +26,8 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
<fieldset>
@@ -49,10 +49,10 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading || theForm.$invalid" type="submit" class="md-raised md-primary">
+ <md-button ng-disabled="$root.loading || theForm.$invalid" type="submit" class="md-raised md-primary">
{{ 'action.saveAs' | translate }}
</md-button>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/widget/select-widget-type.tpl.html b/ui/src/app/widget/select-widget-type.tpl.html
index b7ebcb1..ccae912 100644
--- a/ui/src/app/widget/select-widget-type.tpl.html
+++ b/ui/src/app/widget/select-widget-type.tpl.html
@@ -26,11 +26,11 @@
</md-button>
</div>
</md-toolbar>
- <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear>
- <span style="min-height: 5px;" flex="" ng-show="!loading"></span>
+ <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear>
+ <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span>
<md-dialog-content>
<div class="md-dialog-content">
- <fieldset ng-disabled="loading">
+ <fieldset ng-disabled="$root.loading">
<div layout="column" layout-gt-sm="row" layout-align="center center">
<md-button class="tb-card-button md-raised md-primary" layout="column"
ng-click="vm.typeSelected(vm.types.widgetType.timeseries.value)">
@@ -73,7 +73,7 @@
</md-dialog-content>
<md-dialog-actions layout="row">
<span flex></span>
- <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
+ <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' |
translate }}
</md-button>
</md-dialog-actions>
diff --git a/ui/src/app/widget/widget-editor.tpl.html b/ui/src/app/widget/widget-editor.tpl.html
index 732cf8f..9d10c05 100644
--- a/ui/src/app/widget/widget-editor.tpl.html
+++ b/ui/src/app/widget/widget-editor.tpl.html
@@ -129,7 +129,7 @@
<input placeholder="{{ 'widget.resource-url' | translate }}"
ng-required="true" name="resource" ng-model="resource.url">
</md-input-container>
- <md-button ng-disabled="loading" class="md-icon-button md-primary"
+ <md-button ng-disabled="$root.loading" class="md-icon-button md-primary"
ng-click="vm.removeResource($index)"
aria-label="{{ 'action.remove' | translate }}">
<md-tooltip md-direction="top">
@@ -142,7 +142,7 @@
</md-button>
</div>
<div>
- <md-button ng-disabled="loading" class="md-primary md-raised"
+ <md-button ng-disabled="$root.loading" class="md-primary md-raised"
ng-click="vm.addResource()"
aria-label="{{ 'action.add' | translate }}">
<md-tooltip md-direction="top">
diff --git a/ui/src/app/widget/widget-library.tpl.html b/ui/src/app/widget/widget-library.tpl.html
index b2dd4a7..ad48131 100644
--- a/ui/src/app/widget/widget-library.tpl.html
+++ b/ui/src/app/widget/widget-library.tpl.html
@@ -15,7 +15,7 @@
limitations under the License.
-->
-<section ng-show="!loading && vm.noData()" layout-align="center center"
+<section ng-show="!$root.loading && vm.noData()" layout-align="center center"
style="text-transform: uppercase; display: flex; z-index: 1;"
class="md-headline tb-absolute-fill">
<md-button ng-if="!vm.isReadOnly()" class="tb-add-new-widget" ng-click="vm.addWidgetType($event)">
@@ -42,10 +42,10 @@
on-init-failed="vm.dashboardInitFailed(e)">
</tb-dashboard>
<section layout="row" layout-wrap class="tb-footer-buttons md-fab ">
- <md-fab-speed-dial ng-disabled="loading" ng-show="!vm.isReadOnly()"
+ <md-fab-speed-dial ng-disabled="$root.loading" ng-show="!vm.isReadOnly()"
md-open="vm.addItemActionsOpen" class="md-scale" md-direction="up">
<md-fab-trigger>
- <md-button ng-disabled="loading"
+ <md-button ng-disabled="$root.loading"
class="tb-btn-footer md-accent md-hue-2 md-fab"
aria-label="{{ 'widget.add-widget-type' | translate }}">
<md-tooltip md-direction="top">
@@ -55,7 +55,7 @@
</md-button>
</md-fab-trigger>
<md-fab-actions>
- <md-button ng-disabled="loading"
+ <md-button ng-disabled="$root.loading"
class="tmd-accent md-hue-2 md-fab" ng-click="vm.addWidgetType($event)"
aria-label="{{ 'action.create' | translate }}">
<md-tooltip md-direction="top">
@@ -63,7 +63,7 @@
</md-tooltip>
<ng-md-icon icon="insert_drive_file"></ng-md-icon>
</md-button>
- <md-button ng-disabled="loading"
+ <md-button ng-disabled="$root.loading"
class="tmd-accent md-hue-2 md-fab" ng-click="vm.importWidgetType($event)"
aria-label="{{ 'action.import' | translate }}">
<md-tooltip md-direction="top">
diff --git a/ui/src/app/widget/widgets-bundle-fieldset.tpl.html b/ui/src/app/widget/widgets-bundle-fieldset.tpl.html
index 15810d0..e4d8ea1 100644
--- a/ui/src/app/widget/widgets-bundle-fieldset.tpl.html
+++ b/ui/src/app/widget/widgets-bundle-fieldset.tpl.html
@@ -23,7 +23,7 @@
class="md-raised md-primary">{{ 'widgets-bundle.delete' | translate }}</md-button>
<md-content class="md-padding" layout="column">
- <fieldset ng-disabled="loading || !isEdit">
+ <fieldset ng-disabled="$root.loading || !isEdit">
<md-input-container class="md-block">
<label translate>widgets-bundle.title</label>
<input required name="title" ng-model="widgetsBundle.title">