Browse Source

UI: Access 'loading' property directly from rootScope.

pull/504/head
Igor Kulikov 9 years ago
parent
commit
20be8eba08
  1. 8
      ui/src/app/admin/general-settings.tpl.html
  2. 14
      ui/src/app/admin/outgoing-mail-settings.tpl.html
  3. 6
      ui/src/app/alarm/alarm-details-dialog.tpl.html
  4. 6
      ui/src/app/alarm/alarm-table.tpl.html
  5. 4
      ui/src/app/api/asset.service.js
  6. 4
      ui/src/app/api/attribute.service.js
  7. 8
      ui/src/app/api/customer.service.js
  8. 16
      ui/src/app/api/dashboard.service.js
  9. 4
      ui/src/app/api/device.service.js
  10. 4
      ui/src/app/api/entity-relation.service.js
  11. 76
      ui/src/app/api/entity.service.js
  12. 24
      ui/src/app/api/plugin.service.js
  13. 12
      ui/src/app/api/rule.service.js
  14. 8
      ui/src/app/api/tenant.service.js
  15. 8
      ui/src/app/api/user.service.js
  16. 16
      ui/src/app/api/widget.service.js
  17. 8
      ui/src/app/asset/add-asset.tpl.html
  18. 8
      ui/src/app/asset/add-assets-to-customer.tpl.html
  19. 4
      ui/src/app/asset/asset-fieldset.tpl.html
  20. 8
      ui/src/app/asset/assign-to-customer.tpl.html
  21. 14
      ui/src/app/component/component-dialog.tpl.html
  22. 4
      ui/src/app/component/component.tpl.html
  23. 6
      ui/src/app/components/dashboard-autocomplete.directive.js
  24. 4
      ui/src/app/components/dashboard-select.directive.js
  25. 2
      ui/src/app/components/datakey-config-dialog.controller.js
  26. 8
      ui/src/app/components/datakey-config-dialog.tpl.html
  27. 4
      ui/src/app/components/details-sidenav.tpl.html
  28. 14
      ui/src/app/components/grid.tpl.html
  29. 2
      ui/src/app/components/legend-config-panel.tpl.html
  30. 8
      ui/src/app/components/material-icons-dialog.tpl.html
  31. 4
      ui/src/app/components/plugin-select.directive.js
  32. 6
      ui/src/app/components/timewindow-panel.tpl.html
  33. 10
      ui/src/app/components/widget/action/widget-action-dialog.tpl.html
  34. 4
      ui/src/app/components/widget/widget-config.tpl.html
  35. 2
      ui/src/app/components/widgets-bundle-select.directive.js
  36. 8
      ui/src/app/customer/add-customer.tpl.html
  37. 2
      ui/src/app/customer/customer-fieldset.tpl.html
  38. 8
      ui/src/app/dashboard/add-dashboard.tpl.html
  39. 8
      ui/src/app/dashboard/add-dashboards-to-customer.tpl.html
  40. 2
      ui/src/app/dashboard/add-widget.controller.js
  41. 10
      ui/src/app/dashboard/add-widget.tpl.html
  42. 8
      ui/src/app/dashboard/assign-to-customer.tpl.html
  43. 2
      ui/src/app/dashboard/dashboard-fieldset.tpl.html
  44. 10
      ui/src/app/dashboard/dashboard-settings.tpl.html
  45. 16
      ui/src/app/dashboard/dashboard.tpl.html
  46. 2
      ui/src/app/dashboard/edit-widget.directive.js
  47. 2
      ui/src/app/dashboard/edit-widget.tpl.html
  48. 2
      ui/src/app/dashboard/layouts/dashboard-layout.tpl.html
  49. 10
      ui/src/app/dashboard/layouts/manage-dashboard-layouts.tpl.html
  50. 6
      ui/src/app/dashboard/layouts/select-target-layout.tpl.html
  51. 10
      ui/src/app/dashboard/states/dashboard-state-dialog.tpl.html
  52. 10
      ui/src/app/dashboard/states/manage-dashboard-states.tpl.html
  53. 10
      ui/src/app/dashboard/states/select-target-state.tpl.html
  54. 8
      ui/src/app/device/add-device.tpl.html
  55. 8
      ui/src/app/device/add-devices-to-customer.tpl.html
  56. 8
      ui/src/app/device/assign-to-customer.tpl.html
  57. 12
      ui/src/app/device/device-credentials.tpl.html
  58. 6
      ui/src/app/device/device-fieldset.tpl.html
  59. 10
      ui/src/app/entity/alias/entity-alias-dialog.tpl.html
  60. 16
      ui/src/app/entity/alias/entity-aliases.tpl.html
  61. 12
      ui/src/app/entity/attribute/add-attribute-dialog.tpl.html
  62. 12
      ui/src/app/entity/attribute/add-widget-to-dashboard-dialog.tpl.html
  63. 2
      ui/src/app/entity/attribute/attribute-table.tpl.html
  64. 2
      ui/src/app/entity/entity-autocomplete.directive.js
  65. 2
      ui/src/app/entity/entity-list.directive.js
  66. 4
      ui/src/app/entity/entity-subtype-autocomplete.directive.js
  67. 4
      ui/src/app/entity/entity-subtype-list.directive.js
  68. 4
      ui/src/app/entity/entity-subtype-select.directive.js
  69. 12
      ui/src/app/entity/relation/relation-dialog.tpl.html
  70. 4
      ui/src/app/entity/relation/relation-filters.tpl.html
  71. 2
      ui/src/app/entity/relation/relation-table.tpl.html
  72. 2
      ui/src/app/event/event-content-dialog.tpl.html
  73. 6
      ui/src/app/event/event-table.tpl.html
  74. 8
      ui/src/app/extension/extension-dialog.tpl.html
  75. 10
      ui/src/app/import-export/import-dialog.tpl.html
  76. 2
      ui/src/app/layout/home.tpl.html
  77. 2
      ui/src/app/login/create-password.tpl.html
  78. 2
      ui/src/app/login/login.tpl.html
  79. 2
      ui/src/app/login/reset-password-request.tpl.html
  80. 2
      ui/src/app/login/reset-password.tpl.html
  81. 8
      ui/src/app/plugin/add-plugin.tpl.html
  82. 8
      ui/src/app/plugin/plugin-fieldset.tpl.html
  83. 8
      ui/src/app/profile/change-password.tpl.html
  84. 10
      ui/src/app/profile/profile.tpl.html
  85. 8
      ui/src/app/rule/add-rule.tpl.html
  86. 10
      ui/src/app/rule/rule-fieldset.tpl.html
  87. 8
      ui/src/app/tenant/add-tenant.tpl.html
  88. 2
      ui/src/app/tenant/tenant-fieldset.tpl.html
  89. 8
      ui/src/app/user/add-user.tpl.html
  90. 10
      ui/src/app/user/user-fieldset.tpl.html
  91. 8
      ui/src/app/widget/add-widgets-bundle.tpl.html
  92. 8
      ui/src/app/widget/save-widget-type-as.tpl.html
  93. 8
      ui/src/app/widget/select-widget-type.tpl.html
  94. 4
      ui/src/app/widget/widget-editor.tpl.html
  95. 10
      ui/src/app/widget/widget-library.tpl.html
  96. 2
      ui/src/app/widget/widgets-bundle-fieldset.tpl.html

8
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>

14
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>

6
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>

6
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;"

4
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();

4
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) {

8
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);

16
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();

4
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();

4
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();

76
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) {

24
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);

12
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);

8
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);

8
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();

16
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);
},

8
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>

8
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>

4
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"

8
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>

14
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>

4
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 }}">

6
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});
}
}

4
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) {

2
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);
},

8
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>

4
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">

14
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() }}

2
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">

8
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>

4
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];

6
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>

10
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>

4
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 }}

2
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) {

8
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>

2
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">

8
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>

8
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>

2
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);
},

10
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>

8
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>

2
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">

10
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>

16
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()">

2
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);
},

2
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"

2
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">

10
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>

6
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')">

10
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>

10
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>

10
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>

8
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>

8
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>

8
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>

12
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>

6
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>

10
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>

16
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>

12
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>

12
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>

2
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>

2
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 = [];

2
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);

4
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(

4
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(

4
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(

12
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>

4
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>

2
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>

2
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>

6
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;"

8
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>

10
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>

2
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>

2
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">

2
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">

2
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">

2
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">

8
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>

8
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>

8
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>

10
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>

8
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>

10
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 }}

8
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>

2
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">

8
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>

10
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>

8
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>

8
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>

8
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>

4
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">

10
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">

2
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">

Loading…
Cancel
Save