Commit 20be8eba08ffee45561c7b835204ae0609e436b0
1 parent
8146480b
UI: Access 'loading' property directly from rootScope.
Showing
96 changed files
with
379 additions
and
369 deletions
... | ... | @@ -22,11 +22,11 @@ |
22 | 22 | <span translate class="md-headline">admin.general-settings</span> |
23 | 23 | </md-card-title-text> |
24 | 24 | </md-card-title> |
25 | - <md-progress-linear md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
26 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
25 | + <md-progress-linear md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
26 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
27 | 27 | <md-card-content> |
28 | 28 | <form name="vm.settingsForm" ng-submit="vm.save()" tb-confirm-on-exit confirm-form="vm.settingsForm"> |
29 | - <fieldset ng-disabled="loading"> | |
29 | + <fieldset ng-disabled="$root.loading"> | |
30 | 30 | <md-input-container class="md-block"> |
31 | 31 | <label translate>admin.base-url</label> |
32 | 32 | <input required name="baseUrl" ng-model="vm.settings.jsonValue.baseUrl"> |
... | ... | @@ -35,7 +35,7 @@ |
35 | 35 | </div> |
36 | 36 | </md-input-container> |
37 | 37 | <div layout="row" layout-align="end center" width="100%" layout-wrap> |
38 | - <md-button ng-disabled="loading || vm.settingsForm.$invalid || !vm.settingsForm.$dirty" type="submit" class="md-raised md-primary">{{'action.save' | translate}}</md-button> | |
38 | + <md-button ng-disabled="$root.loading || vm.settingsForm.$invalid || !vm.settingsForm.$dirty" type="submit" class="md-raised md-primary">{{'action.save' | translate}}</md-button> | |
39 | 39 | </div> |
40 | 40 | </fieldset> |
41 | 41 | </form> | ... | ... |
... | ... | @@ -24,11 +24,11 @@ |
24 | 24 | <div id="help-container"></div> |
25 | 25 | </md-card-title-text> |
26 | 26 | </md-card-title> |
27 | - <md-progress-linear md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
28 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
27 | + <md-progress-linear md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
28 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
29 | 29 | <md-card-content> |
30 | 30 | <form name="vm.settingsForm" ng-submit="vm.save()" tb-confirm-on-exit confirm-form="vm.settingsForm"> |
31 | - <fieldset ng-disabled="loading"> | |
31 | + <fieldset ng-disabled="$root.loading"> | |
32 | 32 | <md-input-container class="md-block"> |
33 | 33 | <label translate>admin.mail-from</label> |
34 | 34 | <input required name="mailFrom" ng-model="vm.settings.jsonValue.mailFrom"> |
... | ... | @@ -38,7 +38,7 @@ |
38 | 38 | </md-input-container> |
39 | 39 | <md-input-container class="md-block"> |
40 | 40 | <label translate>admin.smtp-protocol</label> |
41 | - <md-select ng-disabled="loading" ng-model="vm.settings.jsonValue.smtpProtocol"> | |
41 | + <md-select ng-disabled="$root.loading" ng-model="vm.settings.jsonValue.smtpProtocol"> | |
42 | 42 | <md-option ng-repeat="smtpProtocol in vm.smtpProtocols" value="{{smtpProtocol}}"> |
43 | 43 | {{smtpProtocol.toUpperCase()}} |
44 | 44 | </md-option> |
... | ... | @@ -78,7 +78,7 @@ |
78 | 78 | <div translate ng-message="md-maxlength">admin.timeout-invalid</div> |
79 | 79 | </div> |
80 | 80 | </md-input-container> |
81 | - <md-checkbox ng-disabled="loading" ng-true-value="'true'" ng-false-value="'false'" | |
81 | + <md-checkbox ng-disabled="$root.loading" ng-true-value="'true'" ng-false-value="'false'" | |
82 | 82 | aria-label="{{ 'admin.enable-tls' | translate }}" ng-model="vm.settings.jsonValue.enableTls">{{ 'admin.enable-tls' | translate }}</md-checkbox> |
83 | 83 | <md-input-container class="md-block"> |
84 | 84 | <label translate>common.username</label> |
... | ... | @@ -89,8 +89,8 @@ |
89 | 89 | <input name="password" placeholder="{{ 'common.enter-password' | translate }}" type="password" ng-model="vm.settings.jsonValue.password"> |
90 | 90 | </md-input-container> |
91 | 91 | <div layout="row" layout-align="end center" width="100%" layout-wrap> |
92 | - <md-button ng-disabled="loading || vm.settingsForm.$invalid" ng-click="vm.sendTestMail()" class="md-raised">{{'admin.send-test-mail' | translate}}</md-button> | |
93 | - <md-button ng-disabled="loading || vm.settingsForm.$invalid || !vm.settingsForm.$dirty" type="submit" class="md-raised md-primary">{{'action.save' | translate}}</md-button> | |
92 | + <md-button ng-disabled="$root.loading || vm.settingsForm.$invalid" ng-click="vm.sendTestMail()" class="md-raised">{{'admin.send-test-mail' | translate}}</md-button> | |
93 | + <md-button ng-disabled="$root.loading || vm.settingsForm.$invalid || !vm.settingsForm.$dirty" type="submit" class="md-raised md-primary">{{'action.save' | translate}}</md-button> | |
94 | 94 | </div> |
95 | 95 | </fieldset> |
96 | 96 | </form> | ... | ... |
... | ... | @@ -87,7 +87,7 @@ |
87 | 87 | <md-button ng-if="vm.allowAcknowledgment && (vm.alarm.status==vm.types.alarmStatus.activeUnack || |
88 | 88 | vm.alarm.status==vm.types.alarmStatus.clearedUnack)" |
89 | 89 | class="md-raised md-primary" |
90 | - ng-disabled="loading" | |
90 | + ng-disabled="$root.loading" | |
91 | 91 | ng-click="vm.acknowledge()" |
92 | 92 | style="margin-right:20px;">{{ 'alarm.acknowledge' | |
93 | 93 | translate }} |
... | ... | @@ -95,12 +95,12 @@ |
95 | 95 | <md-button ng-if="vm.allowClear && (vm.alarm.status==vm.types.alarmStatus.activeAck || |
96 | 96 | vm.alarm.status==vm.types.alarmStatus.activeUnack)" |
97 | 97 | class="md-raised md-primary" |
98 | - ng-disabled="loading" | |
98 | + ng-disabled="$root.loading" | |
99 | 99 | ng-click="vm.clear()">{{ 'alarm.clear' | |
100 | 100 | translate }} |
101 | 101 | </md-button> |
102 | 102 | <span flex></span> |
103 | - <md-button ng-disabled="loading" ng-click="vm.close()" style="margin-right:20px;">{{ 'action.close' | | |
103 | + <md-button ng-disabled="$root.loading" ng-click="vm.close()" style="margin-right:20px;">{{ 'action.close' | | |
104 | 104 | translate }} |
105 | 105 | </md-button> |
106 | 106 | </md-dialog-actions> | ... | ... |
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | <section layout="row"> |
20 | 20 | <md-input-container class="md-block" style="width: 200px;"> |
21 | 21 | <label translate>alarm.alarm-status</label> |
22 | - <md-select ng-model="alarmSearchStatus" ng-disabled="loading()"> | |
22 | + <md-select ng-model="alarmSearchStatus" ng-disabled="$root.loading"> | |
23 | 23 | <md-option ng-repeat="searchStatus in types.alarmSearchStatus" ng-value="searchStatus"> |
24 | 24 | {{ ('alarm.search-status.' + searchStatus) | translate }} |
25 | 25 | </md-option> |
... | ... | @@ -31,8 +31,8 @@ |
31 | 31 | <md-list flex layout="column" class="tb-alarm-table"> |
32 | 32 | <md-list class="tb-row tb-header" layout="row" tb-alarm-header> |
33 | 33 | </md-list> |
34 | - <md-progress-linear style="max-height: 0px;" md-mode="indeterminate" ng-disabled="!loading()" | |
35 | - ng-show="loading()"></md-progress-linear> | |
34 | + <md-progress-linear style="max-height: 0px;" md-mode="indeterminate" ng-disabled="!$root.loading" | |
35 | + ng-show="$root.loading"></md-progress-linear> | |
36 | 36 | <md-divider></md-divider> |
37 | 37 | <span translate layout-align="center center" |
38 | 38 | style="margin-top: 25px;" | ... | ... |
... | ... | @@ -265,10 +265,10 @@ function AssetService($http, $q, customerService, userService) { |
265 | 265 | return deferred.promise; |
266 | 266 | } |
267 | 267 | |
268 | - function getAssetTypes() { | |
268 | + function getAssetTypes(config) { | |
269 | 269 | var deferred = $q.defer(); |
270 | 270 | var url = '/api/asset/types'; |
271 | - $http.get(url).then(function success(response) { | |
271 | + $http.get(url, config).then(function success(response) { | |
272 | 272 | deferred.resolve(response.data); |
273 | 273 | }, function fail() { |
274 | 274 | deferred.reject(); | ... | ... |
... | ... | @@ -35,7 +35,7 @@ function AttributeService($http, $q, $filter, types, telemetryWebsocketService) |
35 | 35 | |
36 | 36 | return service; |
37 | 37 | |
38 | - function getEntityKeys(entityType, entityId, query, type) { | |
38 | + function getEntityKeys(entityType, entityId, query, type, config) { | |
39 | 39 | var deferred = $q.defer(); |
40 | 40 | var url = '/api/plugins/telemetry/' + entityType + '/' + entityId + '/keys/'; |
41 | 41 | if (type === types.dataKeyType.timeseries) { |
... | ... | @@ -43,7 +43,7 @@ function AttributeService($http, $q, $filter, types, telemetryWebsocketService) |
43 | 43 | } else if (type === types.dataKeyType.attribute) { |
44 | 44 | url += 'attributes'; |
45 | 45 | } |
46 | - $http.get(url, null).then(function success(response) { | |
46 | + $http.get(url, config).then(function success(response) { | |
47 | 47 | var result = []; |
48 | 48 | if (response.data) { |
49 | 49 | if (query) { | ... | ... |
... | ... | @@ -32,7 +32,7 @@ function CustomerService($http, $q, types) { |
32 | 32 | |
33 | 33 | return service; |
34 | 34 | |
35 | - function getCustomers(pageLink) { | |
35 | + function getCustomers(pageLink, config) { | |
36 | 36 | var deferred = $q.defer(); |
37 | 37 | var url = '/api/customers?limit=' + pageLink.limit; |
38 | 38 | if (angular.isDefined(pageLink.textSearch)) { |
... | ... | @@ -44,7 +44,7 @@ function CustomerService($http, $q, types) { |
44 | 44 | if (angular.isDefined(pageLink.textOffset)) { |
45 | 45 | url += '&textOffset=' + pageLink.textOffset; |
46 | 46 | } |
47 | - $http.get(url, null).then(function success(response) { | |
47 | + $http.get(url, config).then(function success(response) { | |
48 | 48 | deferred.resolve(response.data); |
49 | 49 | }, function fail() { |
50 | 50 | deferred.reject(); |
... | ... | @@ -52,10 +52,10 @@ function CustomerService($http, $q, types) { |
52 | 52 | return deferred.promise; |
53 | 53 | } |
54 | 54 | |
55 | - function getCustomer(customerId) { | |
55 | + function getCustomer(customerId, config) { | |
56 | 56 | var deferred = $q.defer(); |
57 | 57 | var url = '/api/customer/' + customerId; |
58 | - $http.get(url, null).then(function success(response) { | |
58 | + $http.get(url, config).then(function success(response) { | |
59 | 59 | deferred.resolve(response.data); |
60 | 60 | }, function fail(response) { |
61 | 61 | deferred.reject(response.data); | ... | ... |
... | ... | @@ -43,7 +43,7 @@ function DashboardService($rootScope, $http, $q, $location, customerService) { |
43 | 43 | |
44 | 44 | return service; |
45 | 45 | |
46 | - function getTenantDashboardsByTenantId(tenantId, pageLink) { | |
46 | + function getTenantDashboardsByTenantId(tenantId, pageLink, config) { | |
47 | 47 | var deferred = $q.defer(); |
48 | 48 | var url = '/api/tenant/' + tenantId + '/dashboards?limit=' + pageLink.limit; |
49 | 49 | if (angular.isDefined(pageLink.textSearch)) { |
... | ... | @@ -55,7 +55,7 @@ function DashboardService($rootScope, $http, $q, $location, customerService) { |
55 | 55 | if (angular.isDefined(pageLink.textOffset)) { |
56 | 56 | url += '&textOffset=' + pageLink.textOffset; |
57 | 57 | } |
58 | - $http.get(url, null).then(function success(response) { | |
58 | + $http.get(url, config).then(function success(response) { | |
59 | 59 | deferred.resolve(response.data); |
60 | 60 | }, function fail() { |
61 | 61 | deferred.reject(); |
... | ... | @@ -63,7 +63,7 @@ function DashboardService($rootScope, $http, $q, $location, customerService) { |
63 | 63 | return deferred.promise; |
64 | 64 | } |
65 | 65 | |
66 | - function getTenantDashboards(pageLink, applyCustomersInfo) { | |
66 | + function getTenantDashboards(pageLink, applyCustomersInfo, config) { | |
67 | 67 | var deferred = $q.defer(); |
68 | 68 | var url = '/api/tenant/dashboards?limit=' + pageLink.limit; |
69 | 69 | if (angular.isDefined(pageLink.textSearch)) { |
... | ... | @@ -75,7 +75,7 @@ function DashboardService($rootScope, $http, $q, $location, customerService) { |
75 | 75 | if (angular.isDefined(pageLink.textOffset)) { |
76 | 76 | url += '&textOffset=' + pageLink.textOffset; |
77 | 77 | } |
78 | - $http.get(url, null).then(function success(response) { | |
78 | + $http.get(url, config).then(function success(response) { | |
79 | 79 | if (applyCustomersInfo) { |
80 | 80 | customerService.applyAssignedCustomersInfo(response.data.data).then( |
81 | 81 | function success(data) { |
... | ... | @@ -95,7 +95,7 @@ function DashboardService($rootScope, $http, $q, $location, customerService) { |
95 | 95 | return deferred.promise; |
96 | 96 | } |
97 | 97 | |
98 | - function getCustomerDashboards(customerId, pageLink, applyCustomersInfo) { | |
98 | + function getCustomerDashboards(customerId, pageLink, applyCustomersInfo, config) { | |
99 | 99 | var deferred = $q.defer(); |
100 | 100 | var url = '/api/customer/' + customerId + '/dashboards?limit=' + pageLink.limit; |
101 | 101 | if (angular.isDefined(pageLink.textSearch)) { |
... | ... | @@ -107,7 +107,7 @@ function DashboardService($rootScope, $http, $q, $location, customerService) { |
107 | 107 | if (angular.isDefined(pageLink.textOffset)) { |
108 | 108 | url += '&textOffset=' + pageLink.textOffset; |
109 | 109 | } |
110 | - $http.get(url, null).then(function success(response) { | |
110 | + $http.get(url, config).then(function success(response) { | |
111 | 111 | if (applyCustomersInfo) { |
112 | 112 | customerService.applyAssignedCustomerInfo(response.data.data, customerId).then( |
113 | 113 | function success(data) { |
... | ... | @@ -158,10 +158,10 @@ function DashboardService($rootScope, $http, $q, $location, customerService) { |
158 | 158 | return deferred.promise; |
159 | 159 | } |
160 | 160 | |
161 | - function getDashboardInfo(dashboardId) { | |
161 | + function getDashboardInfo(dashboardId, config) { | |
162 | 162 | var deferred = $q.defer(); |
163 | 163 | var url = '/api/dashboard/info/' + dashboardId; |
164 | - $http.get(url, null).then(function success(response) { | |
164 | + $http.get(url, config).then(function success(response) { | |
165 | 165 | deferred.resolve(response.data); |
166 | 166 | }, function fail() { |
167 | 167 | deferred.reject(); | ... | ... |
... | ... | @@ -293,10 +293,10 @@ function DeviceService($http, $q, attributeService, customerService, types) { |
293 | 293 | return deferred.promise; |
294 | 294 | } |
295 | 295 | |
296 | - function getDeviceTypes() { | |
296 | + function getDeviceTypes(config) { | |
297 | 297 | var deferred = $q.defer(); |
298 | 298 | var url = '/api/device/types'; |
299 | - $http.get(url).then(function success(response) { | |
299 | + $http.get(url, config).then(function success(response) { | |
300 | 300 | deferred.resolve(response.data); |
301 | 301 | }, function fail() { |
302 | 302 | deferred.reject(); | ... | ... |
... | ... | @@ -175,10 +175,10 @@ function EntityRelationService($http, $q) { |
175 | 175 | return deferred.promise; |
176 | 176 | } |
177 | 177 | |
178 | - function findInfoByQuery(query) { | |
178 | + function findInfoByQuery(query, config) { | |
179 | 179 | var deferred = $q.defer(); |
180 | 180 | var url = '/api/relations/info'; |
181 | - $http.post(url, query).then(function success(response) { | |
181 | + $http.post(url, query, config).then(function success(response) { | |
182 | 182 | deferred.resolve(response.data); |
183 | 183 | }, function fail() { |
184 | 184 | deferred.reject(); | ... | ... |
... | ... | @@ -56,22 +56,22 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device |
56 | 56 | promise = assetService.getAsset(entityId, true, config); |
57 | 57 | break; |
58 | 58 | case types.entityType.tenant: |
59 | - promise = tenantService.getTenant(entityId); | |
59 | + promise = tenantService.getTenant(entityId, config); | |
60 | 60 | break; |
61 | 61 | case types.entityType.customer: |
62 | - promise = customerService.getCustomer(entityId); | |
62 | + promise = customerService.getCustomer(entityId, config); | |
63 | 63 | break; |
64 | 64 | case types.entityType.rule: |
65 | - promise = ruleService.getRule(entityId); | |
65 | + promise = ruleService.getRule(entityId, config); | |
66 | 66 | break; |
67 | 67 | case types.entityType.plugin: |
68 | - promise = pluginService.getPlugin(entityId); | |
68 | + promise = pluginService.getPlugin(entityId, config); | |
69 | 69 | break; |
70 | 70 | case types.entityType.dashboard: |
71 | - promise = dashboardService.getDashboardInfo(entityId); | |
71 | + promise = dashboardService.getDashboardInfo(entityId, config); | |
72 | 72 | break; |
73 | 73 | case types.entityType.user: |
74 | - promise = userService.getUser(entityId); | |
74 | + promise = userService.getUser(entityId, true, config); | |
75 | 75 | break; |
76 | 76 | case types.entityType.alarm: |
77 | 77 | $log.error('Get Alarm Entity is not implemented!'); |
... | ... | @@ -136,22 +136,28 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device |
136 | 136 | promise = assetService.getAssets(entityIds, config); |
137 | 137 | break; |
138 | 138 | case types.entityType.tenant: |
139 | - promise = getEntitiesByIdsPromise(tenantService.getTenant, entityIds); | |
139 | + promise = getEntitiesByIdsPromise( | |
140 | + (id) => tenantService.getTenant(id, config), entityIds); | |
140 | 141 | break; |
141 | 142 | case types.entityType.customer: |
142 | - promise = getEntitiesByIdsPromise(customerService.getCustomer, entityIds); | |
143 | + promise = getEntitiesByIdsPromise( | |
144 | + (id) => customerService.getCustomer(id, config), entityIds); | |
143 | 145 | break; |
144 | 146 | case types.entityType.rule: |
145 | - promise = getEntitiesByIdsPromise(ruleService.getRule, entityIds); | |
147 | + promise = getEntitiesByIdsPromise( | |
148 | + (id) => ruleService.getRule(id, config), entityIds); | |
146 | 149 | break; |
147 | 150 | case types.entityType.plugin: |
148 | - promise = getEntitiesByIdsPromise(pluginService.getPlugin, entityIds); | |
151 | + promise = getEntitiesByIdsPromise( | |
152 | + (id) => pluginService.getPlugin(id, config), entityIds); | |
149 | 153 | break; |
150 | 154 | case types.entityType.dashboard: |
151 | - promise = getEntitiesByIdsPromise(dashboardService.getDashboardInfo, entityIds); | |
155 | + promise = getEntitiesByIdsPromise( | |
156 | + (id) => dashboardService.getDashboardInfo(id, config), entityIds); | |
152 | 157 | break; |
153 | 158 | case types.entityType.user: |
154 | - promise = getEntitiesByIdsPromise(userService.getUser, entityIds); | |
159 | + promise = getEntitiesByIdsPromise( | |
160 | + (id) => userService.getUser(id, true, config), entityIds); | |
155 | 161 | break; |
156 | 162 | case types.entityType.alarm: |
157 | 163 | $log.error('Get Alarm Entity is not implemented!'); |
... | ... | @@ -178,11 +184,11 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device |
178 | 184 | return deferred.promise; |
179 | 185 | } |
180 | 186 | |
181 | - function getSingleTenantByPageLinkPromise(pageLink) { | |
187 | + function getSingleTenantByPageLinkPromise(pageLink, config) { | |
182 | 188 | var user = userService.getCurrentUser(); |
183 | 189 | var tenantId = user.tenantId; |
184 | 190 | var deferred = $q.defer(); |
185 | - tenantService.getTenant(tenantId).then( | |
191 | + tenantService.getTenant(tenantId, config).then( | |
186 | 192 | function success(tenant) { |
187 | 193 | var tenantName = tenant.name; |
188 | 194 | var result = { |
... | ... | @@ -202,11 +208,11 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device |
202 | 208 | return deferred.promise; |
203 | 209 | } |
204 | 210 | |
205 | - function getSingleCustomerByPageLinkPromise(pageLink) { | |
211 | + function getSingleCustomerByPageLinkPromise(pageLink, config) { | |
206 | 212 | var user = userService.getCurrentUser(); |
207 | 213 | var customerId = user.customerId; |
208 | 214 | var deferred = $q.defer(); |
209 | - customerService.getCustomer(customerId).then( | |
215 | + customerService.getCustomer(customerId, config).then( | |
210 | 216 | function success(customer) { |
211 | 217 | var customerName = customer.name; |
212 | 218 | var result = { |
... | ... | @@ -247,29 +253,29 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device |
247 | 253 | break; |
248 | 254 | case types.entityType.tenant: |
249 | 255 | if (user.authority === 'TENANT_ADMIN') { |
250 | - promise = getSingleTenantByPageLinkPromise(pageLink); | |
256 | + promise = getSingleTenantByPageLinkPromise(pageLink, config); | |
251 | 257 | } else { |
252 | - promise = tenantService.getTenants(pageLink); | |
258 | + promise = tenantService.getTenants(pageLink, config); | |
253 | 259 | } |
254 | 260 | break; |
255 | 261 | case types.entityType.customer: |
256 | 262 | if (user.authority === 'CUSTOMER_USER') { |
257 | - promise = getSingleCustomerByPageLinkPromise(pageLink); | |
263 | + promise = getSingleCustomerByPageLinkPromise(pageLink, config); | |
258 | 264 | } else { |
259 | - promise = customerService.getCustomers(pageLink); | |
265 | + promise = customerService.getCustomers(pageLink, config); | |
260 | 266 | } |
261 | 267 | break; |
262 | 268 | case types.entityType.rule: |
263 | - promise = ruleService.getAllRules(pageLink); | |
269 | + promise = ruleService.getAllRules(pageLink, config); | |
264 | 270 | break; |
265 | 271 | case types.entityType.plugin: |
266 | - promise = pluginService.getAllPlugins(pageLink); | |
272 | + promise = pluginService.getAllPlugins(pageLink, config); | |
267 | 273 | break; |
268 | 274 | case types.entityType.dashboard: |
269 | 275 | if (user.authority === 'CUSTOMER_USER') { |
270 | - promise = dashboardService.getCustomerDashboards(customerId, pageLink, false); | |
276 | + promise = dashboardService.getCustomerDashboards(customerId, pageLink, false, config); | |
271 | 277 | } else { |
272 | - promise = dashboardService.getTenantDashboards(pageLink, false); | |
278 | + promise = dashboardService.getTenantDashboards(pageLink, false, config); | |
273 | 279 | } |
274 | 280 | break; |
275 | 281 | case types.entityType.user: |
... | ... | @@ -426,7 +432,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device |
426 | 432 | var stateEntityId = getStateEntityId(filter, stateParams); |
427 | 433 | switch (filter.type) { |
428 | 434 | case types.aliasFilterType.singleEntity.value: |
429 | - getEntity(filter.singleEntity.entityType, filter.singleEntity.id).then( | |
435 | + getEntity(filter.singleEntity.entityType, filter.singleEntity.id, {ignoreLoading: true}).then( | |
430 | 436 | function success(entity) { |
431 | 437 | result.entities = entitiesToEntitiesInfo([entity]); |
432 | 438 | deferred.resolve(result); |
... | ... | @@ -437,7 +443,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device |
437 | 443 | ); |
438 | 444 | break; |
439 | 445 | case types.aliasFilterType.entityList.value: |
440 | - getEntities(filter.entityType, filter.entityList).then( | |
446 | + getEntities(filter.entityType, filter.entityList, {ignoreLoading: true}).then( | |
441 | 447 | function success(entities) { |
442 | 448 | if (entities && entities.length || !failOnEmpty) { |
443 | 449 | result.entities = entitiesToEntitiesInfo(entities); |
... | ... | @@ -452,7 +458,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device |
452 | 458 | ); |
453 | 459 | break; |
454 | 460 | case types.aliasFilterType.entityName.value: |
455 | - getEntitiesByNameFilter(filter.entityType, filter.entityNameFilter, maxItems).then( | |
461 | + getEntitiesByNameFilter(filter.entityType, filter.entityNameFilter, maxItems, {ignoreLoading: true}).then( | |
456 | 462 | function success(entities) { |
457 | 463 | if (entities && entities.length || !failOnEmpty) { |
458 | 464 | result.entities = entitiesToEntitiesInfo(entities); |
... | ... | @@ -469,7 +475,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device |
469 | 475 | case types.aliasFilterType.stateEntity.value: |
470 | 476 | result.stateEntity = true; |
471 | 477 | if (stateEntityId) { |
472 | - getEntity(stateEntityId.entityType, stateEntityId.id).then( | |
478 | + getEntity(stateEntityId.entityType, stateEntityId.id, {ignoreLoading: true}).then( | |
473 | 479 | function success(entity) { |
474 | 480 | result.entities = entitiesToEntitiesInfo([entity]); |
475 | 481 | deferred.resolve(result); |
... | ... | @@ -483,7 +489,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device |
483 | 489 | } |
484 | 490 | break; |
485 | 491 | case types.aliasFilterType.assetType.value: |
486 | - getEntitiesByNameFilter(types.entityType.asset, filter.assetNameFilter, maxItems, null, filter.assetType).then( | |
492 | + getEntitiesByNameFilter(types.entityType.asset, filter.assetNameFilter, maxItems, {ignoreLoading: true}, filter.assetType).then( | |
487 | 493 | function success(entities) { |
488 | 494 | if (entities && entities.length || !failOnEmpty) { |
489 | 495 | result.entities = entitiesToEntitiesInfo(entities); |
... | ... | @@ -498,7 +504,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device |
498 | 504 | ); |
499 | 505 | break; |
500 | 506 | case types.aliasFilterType.deviceType.value: |
501 | - getEntitiesByNameFilter(types.entityType.device, filter.deviceNameFilter, maxItems, null, filter.deviceType).then( | |
507 | + getEntitiesByNameFilter(types.entityType.device, filter.deviceNameFilter, maxItems, {ignoreLoading: true}, filter.deviceType).then( | |
502 | 508 | function success(entities) { |
503 | 509 | if (entities && entities.length || !failOnEmpty) { |
504 | 510 | result.entities = entitiesToEntitiesInfo(entities); |
... | ... | @@ -533,7 +539,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device |
533 | 539 | filters: filter.filters |
534 | 540 | }; |
535 | 541 | searchQuery.parameters.maxLevel = filter.maxLevel && filter.maxLevel > 0 ? filter.maxLevel : -1; |
536 | - entityRelationService.findInfoByQuery(searchQuery).then( | |
542 | + entityRelationService.findInfoByQuery(searchQuery, {ignoreLoading: true}).then( | |
537 | 543 | function success(allRelations) { |
538 | 544 | if (allRelations && allRelations.length || !failOnEmpty) { |
539 | 545 | if (angular.isDefined(maxItems) && maxItems > 0 && allRelations) { |
... | ... | @@ -577,10 +583,10 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device |
577 | 583 | var findByQueryPromise; |
578 | 584 | if (filter.type == types.aliasFilterType.assetSearchQuery.value) { |
579 | 585 | searchQuery.assetTypes = filter.assetTypes; |
580 | - findByQueryPromise = assetService.findByQuery(searchQuery, false); | |
586 | + findByQueryPromise = assetService.findByQuery(searchQuery, false, {ignoreLoading: true}); | |
581 | 587 | } else if (filter.type == types.aliasFilterType.deviceSearchQuery.value) { |
582 | 588 | searchQuery.deviceTypes = filter.deviceTypes; |
583 | - findByQueryPromise = deviceService.findByQuery(searchQuery, false); | |
589 | + findByQueryPromise = deviceService.findByQuery(searchQuery, false, {ignoreLoading: true}); | |
584 | 590 | } |
585 | 591 | findByQueryPromise.then( |
586 | 592 | function success(entities) { |
... | ... | @@ -762,7 +768,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device |
762 | 768 | return deferred.promise; |
763 | 769 | } |
764 | 770 | |
765 | - function getEntityKeys(entityType, entityId, query, type) { | |
771 | + function getEntityKeys(entityType, entityId, query, type, config) { | |
766 | 772 | var deferred = $q.defer(); |
767 | 773 | var url = '/api/plugins/telemetry/' + entityType + '/' + entityId + '/keys/'; |
768 | 774 | if (type === types.dataKeyType.timeseries) { |
... | ... | @@ -770,7 +776,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device |
770 | 776 | } else if (type === types.dataKeyType.attribute) { |
771 | 777 | url += 'attributes'; |
772 | 778 | } |
773 | - $http.get(url, null).then(function success(response) { | |
779 | + $http.get(url, config).then(function success(response) { | |
774 | 780 | var result = []; |
775 | 781 | if (response.data) { |
776 | 782 | if (query) { | ... | ... |
... | ... | @@ -50,11 +50,11 @@ function PluginService($http, $q, $rootScope, $filter, componentDescriptorServic |
50 | 50 | tenantPlugins = undefined; |
51 | 51 | } |
52 | 52 | |
53 | - function loadPluginsCache() { | |
53 | + function loadPluginsCache(config) { | |
54 | 54 | var deferred = $q.defer(); |
55 | 55 | if (!allPlugins) { |
56 | 56 | var url = '/api/plugins'; |
57 | - $http.get(url, null).then(function success(response) { | |
57 | + $http.get(url, config).then(function success(response) { | |
58 | 58 | componentDescriptorService.getComponentDescriptorsByType(types.componentType.plugin).then( |
59 | 59 | function success(pluginComponents) { |
60 | 60 | allPlugins = response.data; |
... | ... | @@ -93,9 +93,9 @@ function PluginService($http, $q, $rootScope, $filter, componentDescriptorServic |
93 | 93 | return deferred.promise; |
94 | 94 | } |
95 | 95 | |
96 | - function getSystemPlugins(pageLink) { | |
96 | + function getSystemPlugins(pageLink, config) { | |
97 | 97 | var deferred = $q.defer(); |
98 | - loadPluginsCache().then( | |
98 | + loadPluginsCache(config).then( | |
99 | 99 | function success() { |
100 | 100 | utils.filterSearchTextEntities(systemPlugins, 'name', pageLink, deferred); |
101 | 101 | }, |
... | ... | @@ -106,9 +106,9 @@ function PluginService($http, $q, $rootScope, $filter, componentDescriptorServic |
106 | 106 | return deferred.promise; |
107 | 107 | } |
108 | 108 | |
109 | - function getTenantPlugins(pageLink) { | |
109 | + function getTenantPlugins(pageLink, config) { | |
110 | 110 | var deferred = $q.defer(); |
111 | - loadPluginsCache().then( | |
111 | + loadPluginsCache(config).then( | |
112 | 112 | function success() { |
113 | 113 | utils.filterSearchTextEntities(tenantPlugins, 'name', pageLink, deferred); |
114 | 114 | }, |
... | ... | @@ -119,9 +119,9 @@ function PluginService($http, $q, $rootScope, $filter, componentDescriptorServic |
119 | 119 | return deferred.promise; |
120 | 120 | } |
121 | 121 | |
122 | - function getAllActionPlugins(pageLink) { | |
122 | + function getAllActionPlugins(pageLink, config) { | |
123 | 123 | var deferred = $q.defer(); |
124 | - loadPluginsCache().then( | |
124 | + loadPluginsCache(config).then( | |
125 | 125 | function success() { |
126 | 126 | utils.filterSearchTextEntities(allActionPlugins, 'name', pageLink, deferred); |
127 | 127 | }, |
... | ... | @@ -132,9 +132,9 @@ function PluginService($http, $q, $rootScope, $filter, componentDescriptorServic |
132 | 132 | return deferred.promise; |
133 | 133 | } |
134 | 134 | |
135 | - function getAllPlugins(pageLink) { | |
135 | + function getAllPlugins(pageLink, config) { | |
136 | 136 | var deferred = $q.defer(); |
137 | - loadPluginsCache().then( | |
137 | + loadPluginsCache(config).then( | |
138 | 138 | function success() { |
139 | 139 | utils.filterSearchTextEntities(allPlugins, 'name', pageLink, deferred); |
140 | 140 | }, |
... | ... | @@ -156,10 +156,10 @@ function PluginService($http, $q, $rootScope, $filter, componentDescriptorServic |
156 | 156 | return deferred.promise; |
157 | 157 | } |
158 | 158 | |
159 | - function getPlugin(pluginId) { | |
159 | + function getPlugin(pluginId, config) { | |
160 | 160 | var deferred = $q.defer(); |
161 | 161 | var url = '/api/plugin/' + pluginId; |
162 | - $http.get(url, null).then(function success(response) { | |
162 | + $http.get(url, config).then(function success(response) { | |
163 | 163 | deferred.resolve(response.data); |
164 | 164 | }, function fail(response) { |
165 | 165 | deferred.reject(response.data); | ... | ... |
... | ... | @@ -47,11 +47,11 @@ function RuleService($http, $q, $rootScope, $filter, types, utils) { |
47 | 47 | tenantRules = undefined; |
48 | 48 | } |
49 | 49 | |
50 | - function loadRulesCache() { | |
50 | + function loadRulesCache(config) { | |
51 | 51 | var deferred = $q.defer(); |
52 | 52 | if (!allRules) { |
53 | 53 | var url = '/api/rules'; |
54 | - $http.get(url, null).then(function success(response) { | |
54 | + $http.get(url, config).then(function success(response) { | |
55 | 55 | allRules = response.data; |
56 | 56 | systemRules = []; |
57 | 57 | tenantRules = []; |
... | ... | @@ -100,9 +100,9 @@ function RuleService($http, $q, $rootScope, $filter, types, utils) { |
100 | 100 | return deferred.promise; |
101 | 101 | } |
102 | 102 | |
103 | - function getAllRules(pageLink) { | |
103 | + function getAllRules(pageLink, config) { | |
104 | 104 | var deferred = $q.defer(); |
105 | - loadRulesCache().then( | |
105 | + loadRulesCache(config).then( | |
106 | 106 | function success() { |
107 | 107 | utils.filterSearchTextEntities(allRules, 'name', pageLink, deferred); |
108 | 108 | }, |
... | ... | @@ -124,10 +124,10 @@ function RuleService($http, $q, $rootScope, $filter, types, utils) { |
124 | 124 | return deferred.promise; |
125 | 125 | } |
126 | 126 | |
127 | - function getRule(ruleId) { | |
127 | + function getRule(ruleId, config) { | |
128 | 128 | var deferred = $q.defer(); |
129 | 129 | var url = '/api/rule/' + ruleId; |
130 | - $http.get(url, null).then(function success(response) { | |
130 | + $http.get(url, config).then(function success(response) { | |
131 | 131 | deferred.resolve(response.data); |
132 | 132 | }, function fail(response) { |
133 | 133 | deferred.reject(response.data); | ... | ... |
... | ... | @@ -29,7 +29,7 @@ function TenantService($http, $q) { |
29 | 29 | |
30 | 30 | return service; |
31 | 31 | |
32 | - function getTenants (pageLink) { | |
32 | + function getTenants (pageLink, config) { | |
33 | 33 | var deferred = $q.defer(); |
34 | 34 | var url = '/api/tenants?limit=' + pageLink.limit; |
35 | 35 | if (angular.isDefined(pageLink.textSearch)) { |
... | ... | @@ -41,7 +41,7 @@ function TenantService($http, $q) { |
41 | 41 | if (angular.isDefined(pageLink.textOffset)) { |
42 | 42 | url += '&textOffset=' + pageLink.textOffset; |
43 | 43 | } |
44 | - $http.get(url, null).then(function success(response) { | |
44 | + $http.get(url, config).then(function success(response) { | |
45 | 45 | deferred.resolve(response.data); |
46 | 46 | }, function fail() { |
47 | 47 | deferred.reject(); |
... | ... | @@ -49,10 +49,10 @@ function TenantService($http, $q) { |
49 | 49 | return deferred.promise; |
50 | 50 | } |
51 | 51 | |
52 | - function getTenant (tenantId) { | |
52 | + function getTenant (tenantId, config) { | |
53 | 53 | var deferred = $q.defer(); |
54 | 54 | var url = '/api/tenant/' + tenantId; |
55 | - $http.get(url, null).then(function success(response) { | |
55 | + $http.get(url, config).then(function success(response) { | |
56 | 56 | deferred.resolve(response.data); |
57 | 57 | }, function fail(response) { |
58 | 58 | deferred.reject(response.data); | ... | ... |
... | ... | @@ -421,10 +421,14 @@ function UserService($http, $q, $rootScope, adminService, dashboardService, logi |
421 | 421 | return deferred.promise; |
422 | 422 | } |
423 | 423 | |
424 | - function getUser(userId, ignoreErrors) { | |
424 | + function getUser(userId, ignoreErrors, config) { | |
425 | 425 | var deferred = $q.defer(); |
426 | 426 | var url = '/api/user/' + userId; |
427 | - $http.get(url, { ignoreErrors: ignoreErrors }).then(function success(response) { | |
427 | + if (!config) { | |
428 | + config = {}; | |
429 | + } | |
430 | + config = Object.assign(config, { ignoreErrors: ignoreErrors }); | |
431 | + $http.get(url, config).then(function success(response) { | |
428 | 432 | deferred.resolve(response.data); |
429 | 433 | }, function fail() { |
430 | 434 | deferred.reject(); | ... | ... |
... | ... | @@ -298,11 +298,11 @@ function WidgetService($rootScope, $http, $q, $filter, $ocLazyLoad, $window, $tr |
298 | 298 | tenantWidgetsBundles = undefined; |
299 | 299 | } |
300 | 300 | |
301 | - function loadWidgetsBundleCache() { | |
301 | + function loadWidgetsBundleCache(config) { | |
302 | 302 | var deferred = $q.defer(); |
303 | 303 | if (!allWidgetsBundles) { |
304 | 304 | var url = '/api/widgetsBundles'; |
305 | - $http.get(url, null).then(function success(response) { | |
305 | + $http.get(url, config).then(function success(response) { | |
306 | 306 | allWidgetsBundles = response.data; |
307 | 307 | systemWidgetsBundles = []; |
308 | 308 | tenantWidgetsBundles = []; |
... | ... | @@ -326,9 +326,9 @@ function WidgetService($rootScope, $http, $q, $filter, $ocLazyLoad, $window, $tr |
326 | 326 | } |
327 | 327 | |
328 | 328 | |
329 | - function getSystemWidgetsBundles() { | |
329 | + function getSystemWidgetsBundles(config) { | |
330 | 330 | var deferred = $q.defer(); |
331 | - loadWidgetsBundleCache().then( | |
331 | + loadWidgetsBundleCache(config).then( | |
332 | 332 | function success() { |
333 | 333 | deferred.resolve(systemWidgetsBundles); |
334 | 334 | }, |
... | ... | @@ -339,9 +339,9 @@ function WidgetService($rootScope, $http, $q, $filter, $ocLazyLoad, $window, $tr |
339 | 339 | return deferred.promise; |
340 | 340 | } |
341 | 341 | |
342 | - function getTenantWidgetsBundles() { | |
342 | + function getTenantWidgetsBundles(config) { | |
343 | 343 | var deferred = $q.defer(); |
344 | - loadWidgetsBundleCache().then( | |
344 | + loadWidgetsBundleCache(config).then( | |
345 | 345 | function success() { |
346 | 346 | deferred.resolve(tenantWidgetsBundles); |
347 | 347 | }, |
... | ... | @@ -352,9 +352,9 @@ function WidgetService($rootScope, $http, $q, $filter, $ocLazyLoad, $window, $tr |
352 | 352 | return deferred.promise; |
353 | 353 | } |
354 | 354 | |
355 | - function getAllWidgetsBundles() { | |
355 | + function getAllWidgetsBundles(config) { | |
356 | 356 | var deferred = $q.defer(); |
357 | - loadWidgetsBundleCache().then( | |
357 | + loadWidgetsBundleCache(config).then( | |
358 | 358 | function success() { |
359 | 359 | deferred.resolve(allWidgetsBundles); |
360 | 360 | }, | ... | ... |
... | ... | @@ -27,8 +27,8 @@ |
27 | 27 | </md-button> |
28 | 28 | </div> |
29 | 29 | </md-toolbar> |
30 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
31 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
30 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
31 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
32 | 32 | <md-dialog-content> |
33 | 33 | <div class="md-dialog-content"> |
34 | 34 | <tb-asset asset="vm.item" is-edit="true" the-form="theForm"></tb-asset> |
... | ... | @@ -36,10 +36,10 @@ |
36 | 36 | </md-dialog-content> |
37 | 37 | <md-dialog-actions layout="row"> |
38 | 38 | <span flex></span> |
39 | - <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary"> | |
39 | + <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary"> | |
40 | 40 | {{ 'action.add' | translate }} |
41 | 41 | </md-button> |
42 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
42 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
43 | 43 | </md-dialog-actions> |
44 | 44 | </form> |
45 | 45 | </md-dialog> | ... | ... |
... | ... | @@ -26,8 +26,8 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | 33 | <fieldset> |
... | ... | @@ -65,11 +65,11 @@ |
65 | 65 | </md-dialog-content> |
66 | 66 | <md-dialog-actions layout="row"> |
67 | 67 | <span flex></span> |
68 | - <md-button ng-disabled="loading || vm.assets.selectedCount == 0" type="submit" | |
68 | + <md-button ng-disabled="$root.loading || vm.assets.selectedCount == 0" type="submit" | |
69 | 69 | class="md-raised md-primary"> |
70 | 70 | {{ 'action.assign' | translate }} |
71 | 71 | </md-button> |
72 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
72 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
73 | 73 | translate }} |
74 | 74 | </md-button> |
75 | 75 | </md-dialog-actions> | ... | ... |
... | ... | @@ -48,7 +48,7 @@ |
48 | 48 | ng-show="!isEdit && isPublic && (assetScope === 'customer' || assetScope === 'tenant')"> |
49 | 49 | {{ 'asset.asset-public' | translate }} |
50 | 50 | </div> |
51 | - <fieldset ng-disabled="loading || !isEdit"> | |
51 | + <fieldset ng-disabled="$root.loading || !isEdit"> | |
52 | 52 | <md-input-container class="md-block"> |
53 | 53 | <label translate>asset.name</label> |
54 | 54 | <input required name="name" ng-model="asset.name"> |
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 | </div> |
58 | 58 | </md-input-container> |
59 | 59 | <tb-entity-subtype-autocomplete |
60 | - ng-disabled="loading || !isEdit" | |
60 | + ng-disabled="$root.loading || !isEdit" | |
61 | 61 | tb-required="true" |
62 | 62 | the-form="theForm" |
63 | 63 | ng-model="asset.type" | ... | ... |
... | ... | @@ -26,8 +26,8 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | 33 | <fieldset> |
... | ... | @@ -65,10 +65,10 @@ |
65 | 65 | </md-dialog-content> |
66 | 66 | <md-dialog-actions layout="row"> |
67 | 67 | <span flex></span> |
68 | - <md-button ng-disabled="loading || vm.customers.selection==null" type="submit" class="md-raised md-primary"> | |
68 | + <md-button ng-disabled="$root.loading || vm.customers.selection==null" type="submit" class="md-raised md-primary"> | |
69 | 69 | {{ 'action.assign' | translate }} |
70 | 70 | </md-button> |
71 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
71 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
72 | 72 | translate }} |
73 | 73 | </md-button> |
74 | 74 | </md-dialog-actions> | ... | ... |
... | ... | @@ -27,11 +27,11 @@ |
27 | 27 | </md-button> |
28 | 28 | </div> |
29 | 29 | </md-toolbar> |
30 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
31 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
30 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
31 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
32 | 32 | <md-dialog-content> |
33 | 33 | <div class="md-dialog-content tb-filter"> |
34 | - <fieldset ng-disabled="loading || vm.isReadOnly"> | |
34 | + <fieldset ng-disabled="$root.loading || vm.isReadOnly"> | |
35 | 35 | <section flex layout="row"> |
36 | 36 | <md-input-container flex class="md-block"> |
37 | 37 | <label translate>rule.component-name</label> |
... | ... | @@ -42,7 +42,7 @@ |
42 | 42 | </md-input-container> |
43 | 43 | <md-input-container flex class="md-block"> |
44 | 44 | <label translate>rule.component-type</label> |
45 | - <md-select required name="componentType" ng-model="vm.componentInfo.component.clazz" ng-disabled="loading || vm.isReadOnly"> | |
45 | + <md-select required name="componentType" ng-model="vm.componentInfo.component.clazz" ng-disabled="$root.loading || vm.isReadOnly"> | |
46 | 46 | <md-option ng-repeat="componentDescriptor in vm.componentDescriptors" ng-value="componentDescriptor.clazz"> |
47 | 47 | {{componentDescriptor.name}} |
48 | 48 | </md-option> |
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 | <tb-json-form schema="vm.componentDescriptor.configurationDescriptor.schema" |
58 | 58 | form="vm.componentDescriptor.configurationDescriptor.form" |
59 | 59 | model="vm.componentInfo.component.configuration" |
60 | - readonly="loading || vm.isReadOnly" | |
60 | + readonly="$root.loading || vm.isReadOnly" | |
61 | 61 | form-control="theForm"> |
62 | 62 | </tb-json-form> |
63 | 63 | </md-card-content> |
... | ... | @@ -67,11 +67,11 @@ |
67 | 67 | </md-dialog-content> |
68 | 68 | <md-dialog-actions layout="row"> |
69 | 69 | <span flex></span> |
70 | - <md-button ng-if="!vm.isReadOnly" ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
70 | + <md-button ng-if="!vm.isReadOnly" ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
71 | 71 | class="md-raised md-primary"> |
72 | 72 | {{ (vm.isAdd ? 'action.add' : 'action.save') | translate }} |
73 | 73 | </md-button> |
74 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
74 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
75 | 75 | translate }} |
76 | 76 | </md-button> |
77 | 77 | </md-dialog-actions> | ... | ... |
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 | {{ componentTypeName }} |
25 | 25 | </span> |
26 | 26 | <span ng-if="readOnly" style="min-width: 40px; min-height: 40px; margin: 0 6px;"></br></span> |
27 | - <md-button ng-disabled="loading" class="md-icon-button md-primary" | |
27 | + <md-button ng-disabled="$root.loading" class="md-icon-button md-primary" | |
28 | 28 | style="min-width: 40px;" |
29 | 29 | ng-click="openComponent($event)" |
30 | 30 | aria-label="{{ (readOnly ? 'action.view' : 'action.edit') | translate }}"> |
... | ... | @@ -43,7 +43,7 @@ |
43 | 43 | edit |
44 | 44 | </md-icon> |
45 | 45 | </md-button> |
46 | - <md-button ng-if="!readOnly" ng-disabled="loading" class="md-icon-button md-primary" | |
46 | + <md-button ng-if="!readOnly" ng-disabled="$root.loading" class="md-icon-button md-primary" | |
47 | 47 | style="min-width: 40px;" |
48 | 48 | ng-click="onRemoveComponent({event: $event})" |
49 | 49 | aria-label="{{ 'action.remove' | translate }}"> | ... | ... |
... | ... | @@ -48,19 +48,19 @@ function DashboardAutocomplete($compile, $templateCache, $q, dashboardService, u |
48 | 48 | var promise; |
49 | 49 | if (scope.dashboardsScope === 'customer' || userService.getAuthority() === 'CUSTOMER_USER') { |
50 | 50 | if (scope.customerId) { |
51 | - promise = dashboardService.getCustomerDashboards(scope.customerId, pageLink, false); | |
51 | + promise = dashboardService.getCustomerDashboards(scope.customerId, pageLink, false, {ignoreLoading: true}); | |
52 | 52 | } else { |
53 | 53 | promise = $q.when({data: []}); |
54 | 54 | } |
55 | 55 | } else { |
56 | 56 | if (userService.getAuthority() === 'SYS_ADMIN') { |
57 | 57 | if (scope.tenantId) { |
58 | - promise = dashboardService.getTenantDashboardsByTenantId(scope.tenantId, pageLink); | |
58 | + promise = dashboardService.getTenantDashboardsByTenantId(scope.tenantId, pageLink, {ignoreLoading: true}); | |
59 | 59 | } else { |
60 | 60 | promise = $q.when({data: []}); |
61 | 61 | } |
62 | 62 | } else { |
63 | - promise = dashboardService.getTenantDashboards(pageLink, false); | |
63 | + promise = dashboardService.getTenantDashboards(pageLink, false, {ignoreLoading: true}); | |
64 | 64 | } |
65 | 65 | } |
66 | 66 | ... | ... |
... | ... | @@ -48,12 +48,12 @@ function DashboardSelect($compile, $templateCache, $q, $mdMedia, $mdPanel, $docu |
48 | 48 | var promise; |
49 | 49 | if (scope.dashboardsScope === 'customer' || userService.getAuthority() === 'CUSTOMER_USER') { |
50 | 50 | if (scope.customerId && scope.customerId != types.id.nullUid) { |
51 | - promise = dashboardService.getCustomerDashboards(scope.customerId, pageLink, false); | |
51 | + promise = dashboardService.getCustomerDashboards(scope.customerId, pageLink, false, {ignoreLoading: true}); | |
52 | 52 | } else { |
53 | 53 | promise = $q.when({data: []}); |
54 | 54 | } |
55 | 55 | } else { |
56 | - promise = dashboardService.getTenantDashboards(pageLink, false); | |
56 | + promise = dashboardService.getTenantDashboards(pageLink, false, {ignoreLoading: true}); | |
57 | 57 | } |
58 | 58 | |
59 | 59 | promise.then(function success(result) { | ... | ... |
... | ... | @@ -43,7 +43,7 @@ function DatakeyConfigDialogController($scope, $mdDialog, $q, entityService, dat |
43 | 43 | function success(aliasInfo) { |
44 | 44 | var entity = aliasInfo.currentEntity; |
45 | 45 | if (entity) { |
46 | - entityService.getEntityKeys(entity.entityType, entity.id, query, type).then( | |
46 | + entityService.getEntityKeys(entity.entityType, entity.id, query, type, {ignoreLoading: true}).then( | |
47 | 47 | function success(keys) { |
48 | 48 | deferred.resolve(keys); |
49 | 49 | }, | ... | ... |
... | ... | @@ -26,8 +26,8 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <tb-datakey-config ng-model="vm.dataKey" |
33 | 33 | fetch-entity-keys="vm.fetchEntityKeys(entityAliasId, query, type)" |
... | ... | @@ -37,10 +37,10 @@ |
37 | 37 | </md-dialog-content> |
38 | 38 | <md-dialog-actions layout="row"> |
39 | 39 | <span flex></span> |
40 | - <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary"> | |
40 | + <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary"> | |
41 | 41 | {{ 'action.save' | translate }} |
42 | 42 | </md-button> |
43 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
43 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
44 | 44 | </md-dialog-actions> |
45 | 45 | </form> |
46 | 46 | </md-dialog> | ... | ... |
... | ... | @@ -35,7 +35,7 @@ |
35 | 35 | </div> |
36 | 36 | <section ng-if="!isReadOnly" layout="row" layout-wrap |
37 | 37 | class="tb-header-buttons md-fab"> |
38 | - <md-button ng-show="isEdit" ng-disabled="loading || theForm.$invalid || !theForm.$dirty" | |
38 | + <md-button ng-show="isEdit" ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" | |
39 | 39 | class="tb-btn-header md-accent md-hue-2 md-fab md-fab-bottom-right" |
40 | 40 | aria-label="{{ 'action.apply' | translate }}" |
41 | 41 | ng-click="detailsApply()"> |
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | </md-tooltip> |
45 | 45 | <ng-md-icon icon="done"></ng-md-icon> |
46 | 46 | </md-button> |
47 | - <md-button ng-disabled="loading || (isAlwaysEdit && !theForm.$dirty)" class="tb-btn-header md-accent md-hue-2 md-fab md-fab-bottom-right" | |
47 | + <md-button ng-disabled="$root.loading || (isAlwaysEdit && !theForm.$dirty)" class="tb-btn-header md-accent md-hue-2 md-fab md-fab-bottom-right" | |
48 | 48 | aria-label="{{ 'details.edit-mode' | translate }}" |
49 | 49 | ng-click="toggleDetailsEditMode()"> |
50 | 50 | <md-tooltip md-direction="top"> | ... | ... |
... | ... | @@ -45,7 +45,7 @@ |
45 | 45 | <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> |
46 | 46 | </md-card-content> |
47 | 47 | <md-card-actions layout="row" layout-align="end end"> |
48 | - <md-button ng-if="action.isEnabled(rowItem[n])" ng-disabled="loading" class="md-icon-button md-primary" ng-repeat="action in vm.actionsList" | |
48 | + <md-button ng-if="action.isEnabled(rowItem[n])" ng-disabled="$root.loading" class="md-icon-button md-primary" ng-repeat="action in vm.actionsList" | |
49 | 49 | ng-click="action.onAction($event, rowItem[n])" aria-label="{{ action.name() }}"> |
50 | 50 | <md-tooltip md-direction="top"> |
51 | 51 | {{ action.details( rowItem[n] ) }} |
... | ... | @@ -81,28 +81,28 @@ |
81 | 81 | </section> |
82 | 82 | |
83 | 83 | <section layout="row" layout-wrap class="tb-footer-buttons md-fab " layout-align="start end"> |
84 | - <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" | |
84 | + <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" | |
85 | 85 | ng-click="groupAction.onAction($event, vm.items)" aria-label="{{ groupAction.name() }}"> |
86 | 86 | <md-tooltip md-direction="top"> |
87 | 87 | {{ groupAction.details(vm.items.selectedCount) }} |
88 | 88 | </md-tooltip> |
89 | 89 | <ng-md-icon icon="{{groupAction.icon}}"></ng-md-icon> |
90 | 90 | </md-button> |
91 | - <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}}" > | |
91 | + <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}}" > | |
92 | 92 | <md-tooltip md-direction="top"> |
93 | 93 | {{'grid.scroll-to-top' | translate}} |
94 | 94 | </md-tooltip> |
95 | 95 | <ng-md-icon icon="arrow_drop_up"></ng-md-icon> |
96 | 96 | </md-button> |
97 | - <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() }}" > | |
97 | + <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() }}" > | |
98 | 98 | <md-tooltip md-direction="top"> |
99 | 99 | {{ vm.addItemAction.details() }} |
100 | 100 | </md-tooltip> |
101 | 101 | <ng-md-icon icon="{{ vm.addItemAction.icon }}"></ng-md-icon> |
102 | 102 | </md-button> |
103 | - <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()"> | |
103 | + <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()"> | |
104 | 104 | <md-fab-trigger> |
105 | - <md-button ng-disabled="loading" class="tb-btn-footer md-accent md-hue-2 md-fab" aria-label="{{ vm.addItemAction.name() }}" > | |
105 | + <md-button ng-disabled="$root.loading" class="tb-btn-footer md-accent md-hue-2 md-fab" aria-label="{{ vm.addItemAction.name() }}" > | |
106 | 106 | <md-tooltip md-direction="top"> |
107 | 107 | {{ vm.addItemAction.details() }} |
108 | 108 | </md-tooltip> |
... | ... | @@ -110,7 +110,7 @@ |
110 | 110 | </md-button> |
111 | 111 | </md-fab-trigger> |
112 | 112 | <md-fab-actions> |
113 | - <md-button ng-disabled="loading" class="md-accent md-hue-2 md-fab" ng-repeat="addItemAction in vm.addItemActions" | |
113 | + <md-button ng-disabled="$root.loading" class="md-accent md-hue-2 md-fab" ng-repeat="addItemAction in vm.addItemActions" | |
114 | 114 | ng-click="addItemAction.onAction($event)" aria-label="{{ addItemAction.name() }}" > |
115 | 115 | <md-tooltip md-direction="top"> |
116 | 116 | {{ addItemAction.details() }} | ... | ... |
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | |
17 | 17 | --> |
18 | 18 | <form name="theForm" ng-submit="vm.update()"> |
19 | - <fieldset ng-disabled="loading"> | |
19 | + <fieldset ng-disabled="$root.loading"> | |
20 | 20 | <md-content style="height: 100%" flex layout="column"> |
21 | 21 | <section layout="column"> |
22 | 22 | <md-content class="md-padding" layout="column"> | ... | ... |
... | ... | @@ -32,15 +32,15 @@ |
32 | 32 | </md-button> |
33 | 33 | </div> |
34 | 34 | </md-toolbar> |
35 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
36 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
35 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
36 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
37 | 37 | <div class="tb-absolute-fill tb-icons-load" ng-show="vm.loadingIcons" layout="column" layout-align="center center"> |
38 | 38 | <md-progress-circular md-mode="indeterminate" ng-disabled="!vm.loadingIcons" class="md-accent" md-diameter="40"></md-progress-circular> |
39 | 39 | </div> |
40 | 40 | <md-dialog-content> |
41 | 41 | <div class="md-dialog-content"> |
42 | 42 | <md-content class="md-padding" layout="column"> |
43 | - <fieldset ng-disabled="loading"> | |
43 | + <fieldset ng-disabled="$root.loading"> | |
44 | 44 | <md-button ng-class="{'md-primary md-raised': icon == vm.selectedIcon}" class="tb-select-icon-button md-icon-button" |
45 | 45 | ng-repeat="icon in vm.icons" ng-click="vm.selectIcon($event, icon)" tb-on-finish-render="iconsLoadFinished"> |
46 | 46 | <md-icon class="material-icons">{{icon}}</md-icon> |
... | ... | @@ -54,7 +54,7 @@ |
54 | 54 | </md-dialog-content> |
55 | 55 | <md-dialog-actions layout="row"> |
56 | 56 | <span flex></span> |
57 | - <md-button ng-disabled="loading" ng-click="vm.cancel()"> | |
57 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()"> | |
58 | 58 | {{ 'action.cancel' | translate }} |
59 | 59 | </md-button> |
60 | 60 | </md-dialog-actions> | ... | ... |
... | ... | @@ -56,7 +56,7 @@ function PluginSelect($compile, $templateCache, $q, pluginService, types) { |
56 | 56 | |
57 | 57 | var deferred = $q.defer(); |
58 | 58 | |
59 | - scope.pluginFetchFunction(pageLink).then(function success(result) { | |
59 | + scope.pluginFetchFunction(pageLink, {ignoreLoading: true}).then(function success(result) { | |
60 | 60 | deferred.resolve(result.data); |
61 | 61 | }, function fail() { |
62 | 62 | deferred.reject(); |
... | ... | @@ -89,7 +89,7 @@ function PluginSelect($compile, $templateCache, $q, pluginService, types) { |
89 | 89 | |
90 | 90 | if (scope.selectFirstPlugin) { |
91 | 91 | var pageLink = {limit: 1, textSearch: ''}; |
92 | - scope.pluginFetchFunction(pageLink).then(function success(result) { | |
92 | + scope.pluginFetchFunction(pageLink, {ignoreLoading: true}).then(function success(result) { | |
93 | 93 | var plugins = result.data; |
94 | 94 | if (plugins.length > 0) { |
95 | 95 | scope.plugin = plugins[0]; | ... | ... |
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | |
17 | 17 | --> |
18 | 18 | <form name="theForm" ng-submit="vm.update()"> |
19 | - <fieldset ng-disabled="loading"> | |
19 | + <fieldset ng-disabled="$root.loading"> | |
20 | 20 | <md-content style="height: 100%" flex layout="column"> |
21 | 21 | <section layout="column"> |
22 | 22 | <md-tabs ng-class="{'tb-headless': vm.historyOnly}" md-dynamic-height md-selected="vm.timewindow.selectedTab" md-border-bottom> |
... | ... | @@ -81,10 +81,10 @@ |
81 | 81 | <span flex></span> |
82 | 82 | <section layout="row" layout-alignment="start center"> |
83 | 83 | <span flex></span> |
84 | - <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary"> | |
84 | + <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary"> | |
85 | 85 | {{ 'action.update' | translate }} |
86 | 86 | </md-button> |
87 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;"> | |
87 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;"> | |
88 | 88 | {{ 'action.cancel' | translate }} |
89 | 89 | </md-button> |
90 | 90 | </section> | ... | ... |
... | ... | @@ -26,12 +26,12 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | 33 | <md-content class="md-padding" layout="column"> |
34 | - <fieldset ng-disabled="loading" layout="column"> | |
34 | + <fieldset ng-disabled="$root.loading" layout="column"> | |
35 | 35 | <md-input-container class="md-block"> |
36 | 36 | <label translate>widget-config.action-source</label> |
37 | 37 | <md-select name="actionSource" required aria-label="{{ 'widget-config.action-source' | translate }}" ng-model="vm.action.actionSourceId"> |
... | ... | @@ -129,11 +129,11 @@ |
129 | 129 | </md-dialog-content> |
130 | 130 | <md-dialog-actions layout="row"> |
131 | 131 | <span flex></span> |
132 | - <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
132 | + <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
133 | 133 | class="md-raised md-primary"> |
134 | 134 | {{ (vm.isAdd ? 'action.add' : 'action.save') | translate }} |
135 | 135 | </md-button> |
136 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;"> | |
136 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;"> | |
137 | 137 | {{ 'action.cancel' | translate }} |
138 | 138 | </md-button> |
139 | 139 | </md-dialog-actions> | ... | ... |
... | ... | @@ -104,7 +104,7 @@ |
104 | 104 | generate-data-key="generateDataKey(chip,type)" |
105 | 105 | fetch-entity-keys="fetchEntityKeys({entityAliasId: entityAliasId, query: query, type: type})" |
106 | 106 | on-create-entity-alias="onCreateEntityAlias({event: event, alias: alias})"></tb-datasource> |
107 | - <md-button ng-disabled="loading" class="md-icon-button md-primary" | |
107 | + <md-button ng-disabled="$root.loading" class="md-icon-button md-primary" | |
108 | 108 | style="min-width: 40px;" |
109 | 109 | ng-click="removeDatasource($event, datasource)" |
110 | 110 | aria-label="{{ 'action.remove' | translate }}"> |
... | ... | @@ -121,7 +121,7 @@ |
121 | 121 | </div> |
122 | 122 | </div> |
123 | 123 | <div flex layout="row" layout-align="start center"> |
124 | - <md-button ng-show="typeParameters.maxDatasources == -1 || datasources.length < typeParameters.maxDatasources" ng-disabled="loading" class="md-primary md-raised" | |
124 | + <md-button ng-show="typeParameters.maxDatasources == -1 || datasources.length < typeParameters.maxDatasources" ng-disabled="$root.loading" class="md-primary md-raised" | |
125 | 125 | ng-click="addDatasource($event)" aria-label="{{ 'action.add' | translate }}"> |
126 | 126 | <md-tooltip md-direction="top"> |
127 | 127 | {{ 'widget-config.add-datasource' | translate }} | ... | ... |
... | ... | @@ -48,7 +48,7 @@ function WidgetsBundleSelect($compile, $templateCache, widgetService, types) { |
48 | 48 | } |
49 | 49 | } |
50 | 50 | |
51 | - widgetsBundleFetchFunction().then( | |
51 | + widgetsBundleFetchFunction({ignoreLoading: true}).then( | |
52 | 52 | function success(widgetsBundles) { |
53 | 53 | scope.widgetsBundles = widgetsBundles; |
54 | 54 | if (scope.selectFirstBundle) { | ... | ... |
... | ... | @@ -27,8 +27,8 @@ |
27 | 27 | </md-button> |
28 | 28 | </div> |
29 | 29 | </md-toolbar> |
30 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
31 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
30 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
31 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
32 | 32 | <md-dialog-content> |
33 | 33 | <div class="md-dialog-content"> |
34 | 34 | <tb-customer customer="vm.item" is-edit="true" the-form="theForm"></tb-customer> |
... | ... | @@ -36,10 +36,10 @@ |
36 | 36 | </md-dialog-content> |
37 | 37 | <md-dialog-actions layout="row"> |
38 | 38 | <span flex></span> |
39 | - <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary"> | |
39 | + <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary"> | |
40 | 40 | {{ 'action.add' | translate }} |
41 | 41 | </md-button> |
42 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
42 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
43 | 43 | </md-dialog-actions> |
44 | 44 | </form> |
45 | 45 | </md-dialog> | ... | ... |
... | ... | @@ -32,7 +32,7 @@ |
32 | 32 | </div> |
33 | 33 | |
34 | 34 | <md-content class="md-padding" layout="column"> |
35 | - <fieldset ng-show="!isPublic" ng-disabled="loading || !isEdit"> | |
35 | + <fieldset ng-show="!isPublic" ng-disabled="$root.loading || !isEdit"> | |
36 | 36 | <md-input-container class="md-block"> |
37 | 37 | <label translate>customer.title</label> |
38 | 38 | <input required name="title" ng-model="customer.title"> | ... | ... |
... | ... | @@ -27,8 +27,8 @@ |
27 | 27 | </md-button> |
28 | 28 | </div> |
29 | 29 | </md-toolbar> |
30 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
31 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
30 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
31 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
32 | 32 | <md-dialog-content> |
33 | 33 | <div class="md-dialog-content"> |
34 | 34 | <tb-dashboard-details dashboard="vm.item" is-edit="true" the-form="theForm"></tb-dashboard-details> |
... | ... | @@ -36,10 +36,10 @@ |
36 | 36 | </md-dialog-content> |
37 | 37 | <md-dialog-actions layout="row"> |
38 | 38 | <span flex></span> |
39 | - <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary"> | |
39 | + <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary"> | |
40 | 40 | {{ 'action.add' | translate }} |
41 | 41 | </md-button> |
42 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
42 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
43 | 43 | </md-dialog-actions> |
44 | 44 | </form> |
45 | 45 | </md-dialog> |
\ No newline at end of file | ... | ... |
... | ... | @@ -26,8 +26,8 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | 33 | <fieldset> |
... | ... | @@ -65,11 +65,11 @@ |
65 | 65 | </md-dialog-content> |
66 | 66 | <md-dialog-actions layout="row"> |
67 | 67 | <span flex></span> |
68 | - <md-button ng-disabled="loading || vm.dashboards.selectedCount == 0" type="submit" | |
68 | + <md-button ng-disabled="$root.loading || vm.dashboards.selectedCount == 0" type="submit" | |
69 | 69 | class="md-raised md-primary"> |
70 | 70 | {{ 'action.assign' | translate }} |
71 | 71 | </md-button> |
72 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
72 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
73 | 73 | translate }} |
74 | 74 | </md-button> |
75 | 75 | </md-dialog-actions> | ... | ... |
... | ... | @@ -110,7 +110,7 @@ export default function AddWidgetController($scope, widgetService, entityService |
110 | 110 | function success(aliasInfo) { |
111 | 111 | var entity = aliasInfo.currentEntity; |
112 | 112 | if (entity) { |
113 | - entityService.getEntityKeys(entity.entityType, entity.id, query, type).then( | |
113 | + entityService.getEntityKeys(entity.entityType, entity.id, query, type, {ignoreLoading: true}).then( | |
114 | 114 | function success(keys) { |
115 | 115 | deferred.resolve(keys); |
116 | 116 | }, | ... | ... |
... | ... | @@ -27,11 +27,11 @@ |
27 | 27 | </md-button> |
28 | 28 | </div> |
29 | 29 | </md-toolbar> |
30 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
31 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
30 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
31 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
32 | 32 | <md-dialog-content> |
33 | 33 | <div class="md-dialog-content" style="padding-top: 0px;"> |
34 | - <fieldset ng-disabled="loading" style="position: relative; height: 600px;"> | |
34 | + <fieldset ng-disabled="$root.loading" style="position: relative; height: 600px;"> | |
35 | 35 | <tb-widget-config widget-type="vm.widget.type" |
36 | 36 | type-parameters="vm.widgetInfo.typeParameters" |
37 | 37 | action-sources="vm.widgetInfo.actionSources" |
... | ... | @@ -50,11 +50,11 @@ |
50 | 50 | </md-dialog-content> |
51 | 51 | <md-dialog-actions layout="row"> |
52 | 52 | <span flex></span> |
53 | - <md-button ng-disabled="loading || theForm.$invalid" type="submit" | |
53 | + <md-button ng-disabled="$root.loading || theForm.$invalid" type="submit" | |
54 | 54 | class="md-raised md-primary"> |
55 | 55 | {{ 'action.add' | translate }} |
56 | 56 | </md-button> |
57 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
57 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
58 | 58 | translate }} |
59 | 59 | </md-button> |
60 | 60 | </md-dialog-actions> | ... | ... |
... | ... | @@ -26,8 +26,8 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | 33 | <fieldset> |
... | ... | @@ -65,10 +65,10 @@ |
65 | 65 | </md-dialog-content> |
66 | 66 | <md-dialog-actions layout="row"> |
67 | 67 | <span flex></span> |
68 | - <md-button ng-disabled="loading || vm.customers.selection==null" type="submit" class="md-raised md-primary"> | |
68 | + <md-button ng-disabled="$root.loading || vm.customers.selection==null" type="submit" class="md-raised md-primary"> | |
69 | 69 | {{ 'action.assign' | translate }} |
70 | 70 | </md-button> |
71 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
71 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
72 | 72 | translate }} |
73 | 73 | </md-button> |
74 | 74 | </md-dialog-actions> | ... | ... |
... | ... | @@ -59,7 +59,7 @@ |
59 | 59 | </md-button> |
60 | 60 | </div> |
61 | 61 | </div> |
62 | - <fieldset ng-disabled="loading || !isEdit"> | |
62 | + <fieldset ng-disabled="$root.loading || !isEdit"> | |
63 | 63 | <md-input-container class="md-block"> |
64 | 64 | <label translate>dashboard.title</label> |
65 | 65 | <input required name="title" ng-model="dashboard.title"> | ... | ... |
... | ... | @@ -26,11 +26,11 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | - <fieldset ng-disabled="loading"> | |
33 | + <fieldset ng-disabled="$root.loading"> | |
34 | 34 | <div ng-show="vm.settings"> |
35 | 35 | <md-input-container class="md-block"> |
36 | 36 | <label translate>dashboard.state-controller</label> |
... | ... | @@ -194,10 +194,10 @@ |
194 | 194 | </md-dialog-content> |
195 | 195 | <md-dialog-actions layout="row"> |
196 | 196 | <span flex></span> |
197 | - <md-button ng-disabled="loading || !theForm.$dirty || !theForm.$valid" type="submit" class="md-raised md-primary"> | |
197 | + <md-button ng-disabled="$root.loading || !theForm.$dirty || !theForm.$valid" type="submit" class="md-raised md-primary"> | |
198 | 198 | {{ 'action.save' | translate }} |
199 | 199 | </md-button> |
200 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
200 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
201 | 201 | </md-dialog-actions> |
202 | 202 | </form> |
203 | 203 | </md-dialog> | ... | ... |
... | ... | @@ -110,7 +110,7 @@ |
110 | 110 | </section> |
111 | 111 | <section class="tb-dashboard-container tb-absolute-fill" |
112 | 112 | ng-class="{ 'is-fullscreen': forceFullscreen, 'tb-dashboard-toolbar-opened': vm.toolbarOpened, 'tb-dashboard-toolbar-closed': !vm.toolbarOpened }"> |
113 | - <section ng-show="!loading && vm.dashboardConfigurationError()" layout-align="center center" | |
113 | + <section ng-show="!$root.loading && vm.dashboardConfigurationError()" layout-align="center center" | |
114 | 114 | ng-style="{'color': vm.dashboard.configuration.settings.titleColor}" |
115 | 115 | ng-class="{'tb-padded' : !vm.widgetEditMode}" |
116 | 116 | style="text-transform: uppercase; display: flex; z-index: 1;" |
... | ... | @@ -277,10 +277,10 @@ |
277 | 277 | </div> |
278 | 278 | </tb-details-sidenav> |
279 | 279 | <section layout="row" layout-wrap class="tb-footer-buttons md-fab" layout-align="start end"> |
280 | - <md-fab-speed-dial ng-disabled="loading" ng-show="!vm.isAddingWidget && vm.isEdit && !vm.widgetEditMode" | |
280 | + <md-fab-speed-dial ng-disabled="$root.loading" ng-show="!vm.isAddingWidget && vm.isEdit && !vm.widgetEditMode" | |
281 | 281 | md-open="vm.addItemActionsOpen" class="md-scale" md-direction="up"> |
282 | 282 | <md-fab-trigger> |
283 | - <md-button ng-disabled="loading" | |
283 | + <md-button ng-disabled="$root.loading" | |
284 | 284 | class="tb-btn-footer md-accent md-hue-2 md-fab" |
285 | 285 | aria-label="{{ 'dashboard.add-widget' | translate }}"> |
286 | 286 | <md-tooltip md-direction="top"> |
... | ... | @@ -290,7 +290,7 @@ |
290 | 290 | </md-button> |
291 | 291 | </md-fab-trigger> |
292 | 292 | <md-fab-actions> |
293 | - <md-button ng-disabled="loading" | |
293 | + <md-button ng-disabled="$root.loading" | |
294 | 294 | class="tmd-accent md-hue-2 md-fab" ng-click="vm.addWidget($event)" |
295 | 295 | aria-label="{{ 'action.create' | translate }}"> |
296 | 296 | <md-tooltip md-direction="top"> |
... | ... | @@ -298,7 +298,7 @@ |
298 | 298 | </md-tooltip> |
299 | 299 | <ng-md-icon icon="insert_drive_file"></ng-md-icon> |
300 | 300 | </md-button> |
301 | - <md-button ng-disabled="loading" | |
301 | + <md-button ng-disabled="$root.loading" | |
302 | 302 | class="tmd-accent md-hue-2 md-fab" ng-click="vm.importWidget($event)" |
303 | 303 | aria-label="{{ 'action.import' | translate }}"> |
304 | 304 | <md-tooltip md-direction="top"> |
... | ... | @@ -308,7 +308,7 @@ |
308 | 308 | </md-button> |
309 | 309 | </md-fab-actions> |
310 | 310 | </md-fab-speed-dial> |
311 | - <md-button ng-if="(vm.isTenantAdmin() || vm.isSystemAdmin()) && !forceFullscreen" ng-show="vm.isEdit && !vm.isAddingWidget && !loading" ng-disabled="loading" | |
311 | + <md-button ng-if="(vm.isTenantAdmin() || vm.isSystemAdmin()) && !forceFullscreen" ng-show="vm.isEdit && !vm.isAddingWidget && !$root.loading" ng-disabled="$root.loading" | |
312 | 312 | class="tb-btn-footer md-accent md-hue-2 md-fab" |
313 | 313 | aria-label="{{ 'action.apply' | translate }}" |
314 | 314 | ng-click="vm.saveDashboard()"> |
... | ... | @@ -317,8 +317,8 @@ |
317 | 317 | </md-tooltip> |
318 | 318 | <ng-md-icon icon="done"></ng-md-icon> |
319 | 319 | </md-button> |
320 | - <md-button ng-show="!vm.isAddingWidget && !loading" | |
321 | - ng-if="(vm.isTenantAdmin() || vm.isSystemAdmin()) && !forceFullscreen" ng-disabled="loading" | |
320 | + <md-button ng-show="!vm.isAddingWidget && !$root.loading" | |
321 | + ng-if="(vm.isTenantAdmin() || vm.isSystemAdmin()) && !forceFullscreen" ng-disabled="$root.loading" | |
322 | 322 | class="tb-btn-footer md-accent md-hue-2 md-fab" |
323 | 323 | aria-label="{{ 'action.edit-mode' | translate }}" |
324 | 324 | ng-click="vm.toggleDashboardEditMode()"> | ... | ... |
... | ... | @@ -75,7 +75,7 @@ export default function EditWidgetDirective($compile, $templateCache, types, wid |
75 | 75 | function success(aliasInfo) { |
76 | 76 | var entity = aliasInfo.currentEntity; |
77 | 77 | if (entity) { |
78 | - entityService.getEntityKeys(entity.entityType, entity.id, query, type).then( | |
78 | + entityService.getEntityKeys(entity.entityType, entity.id, query, type, {ignoreLoading: true}).then( | |
79 | 79 | function success(keys) { |
80 | 80 | deferred.resolve(keys); |
81 | 81 | }, | ... | ... |
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 | 'background-attachment': 'scroll', |
23 | 23 | 'background-size': vm.layoutCtx.gridSettings.backgroundSizeMode || '100%', |
24 | 24 | 'background-position': '0% 0%'}"> |
25 | - <section ng-show="!loading && vm.noData()" layout-align="center center" | |
25 | + <section ng-show="!$root.loading && vm.noData()" layout-align="center center" | |
26 | 26 | ng-style="{'color': vm.layoutCtx.gridSettings.color}" |
27 | 27 | style="text-transform: uppercase; display: flex; z-index: 1; pointer-events: none;" |
28 | 28 | class="md-headline tb-absolute-fill"> | ... | ... |
... | ... | @@ -26,11 +26,11 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | - <fieldset ng-disabled="loading"> | |
33 | + <fieldset ng-disabled="$root.loading"> | |
34 | 34 | <div layout="row" layout-align="start center"> |
35 | 35 | <md-checkbox ng-disabled="true" flex aria-label="{{ 'layout.main' | translate }}" |
36 | 36 | ng-model="vm.displayLayouts.main">{{ 'layout.main' | translate }} |
... | ... | @@ -56,10 +56,10 @@ |
56 | 56 | </md-dialog-content> |
57 | 57 | <md-dialog-actions layout="row"> |
58 | 58 | <span flex></span> |
59 | - <md-button ng-disabled="loading || !theForm.$dirty || !theForm.$valid" type="submit" class="md-raised md-primary"> | |
59 | + <md-button ng-disabled="$root.loading || !theForm.$dirty || !theForm.$valid" type="submit" class="md-raised md-primary"> | |
60 | 60 | {{ 'action.save' | translate }} |
61 | 61 | </md-button> |
62 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
62 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
63 | 63 | </md-dialog-actions> |
64 | 64 | </form> |
65 | 65 | </md-dialog> | ... | ... |
... | ... | @@ -26,11 +26,11 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | - <fieldset ng-disabled="loading"> | |
33 | + <fieldset ng-disabled="$root.loading"> | |
34 | 34 | <div layout="row" layout-align="start center"> |
35 | 35 | <md-button flex class="tb-layout-button md-raised md-primary" layout="column" |
36 | 36 | ng-click="vm.selectLayout($event, 'main')"> | ... | ... |
... | ... | @@ -26,12 +26,12 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | 33 | <md-content class="md-padding" layout="column"> |
34 | - <fieldset ng-disabled="loading"> | |
34 | + <fieldset ng-disabled="$root.loading"> | |
35 | 35 | <md-input-container class="md-block"> |
36 | 36 | <label translate>dashboard.state-name</label> |
37 | 37 | <input name="name" required ng-model="vm.state.name"> |
... | ... | @@ -57,11 +57,11 @@ |
57 | 57 | </md-dialog-content> |
58 | 58 | <md-dialog-actions layout="row"> |
59 | 59 | <span flex></span> |
60 | - <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
60 | + <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
61 | 61 | class="md-raised md-primary"> |
62 | 62 | {{ (vm.isAdd ? 'action.add' : 'action.save') | translate }} |
63 | 63 | </md-button> |
64 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;"> | |
64 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;"> | |
65 | 65 | {{ 'action.cancel' | translate }} |
66 | 66 | </md-button> |
67 | 67 | </md-dialog-actions> | ... | ... |
... | ... | @@ -26,11 +26,11 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | - <fieldset ng-disabled="loading"> | |
33 | + <fieldset ng-disabled="$root.loading"> | |
34 | 34 | <div class="manage-dashboard-states" layout="column"> |
35 | 35 | <md-toolbar class="md-table-toolbar md-default" ng-show="vm.query.search === null"> |
36 | 36 | <div class="md-toolbar-tools"> |
... | ... | @@ -118,10 +118,10 @@ |
118 | 118 | </md-dialog-content> |
119 | 119 | <md-dialog-actions layout="row"> |
120 | 120 | <span flex></span> |
121 | - <md-button ng-disabled="loading || !theForm.$dirty || !theForm.$valid" type="submit" class="md-raised md-primary"> | |
121 | + <md-button ng-disabled="$root.loading || !theForm.$dirty || !theForm.$valid" type="submit" class="md-raised md-primary"> | |
122 | 122 | {{ 'action.save' | translate }} |
123 | 123 | </md-button> |
124 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
124 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
125 | 125 | </md-dialog-actions> |
126 | 126 | </form> |
127 | 127 | </md-dialog> | ... | ... |
... | ... | @@ -26,11 +26,11 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | - <fieldset ng-disabled="loading"> | |
33 | + <fieldset ng-disabled="$root.loading"> | |
34 | 34 | <md-select required aria-label="{{ 'dashboard.state' | translate }}" ng-model="vm.stateId"> |
35 | 35 | <md-option ng-repeat="(stateId, state) in vm.states" ng-value="stateId"> |
36 | 36 | {{state.name}} |
... | ... | @@ -41,10 +41,10 @@ |
41 | 41 | </md-dialog-content> |
42 | 42 | <md-dialog-actions layout="row"> |
43 | 43 | <span flex></span> |
44 | - <md-button ng-disabled="loading || !theForm.$dirty || !theForm.$valid" type="submit" class="md-raised md-primary"> | |
44 | + <md-button ng-disabled="$root.loading || !theForm.$dirty || !theForm.$valid" type="submit" class="md-raised md-primary"> | |
45 | 45 | {{ 'action.save' | translate }} |
46 | 46 | </md-button> |
47 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
47 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
48 | 48 | </md-dialog-actions> |
49 | 49 | </form> |
50 | 50 | </md-dialog> | ... | ... |
... | ... | @@ -27,8 +27,8 @@ |
27 | 27 | </md-button> |
28 | 28 | </div> |
29 | 29 | </md-toolbar> |
30 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
31 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
30 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
31 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
32 | 32 | <md-dialog-content> |
33 | 33 | <div class="md-dialog-content"> |
34 | 34 | <tb-device device="vm.item" is-edit="true" the-form="theForm"></tb-device> |
... | ... | @@ -36,10 +36,10 @@ |
36 | 36 | </md-dialog-content> |
37 | 37 | <md-dialog-actions layout="row"> |
38 | 38 | <span flex></span> |
39 | - <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary"> | |
39 | + <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary"> | |
40 | 40 | {{ 'action.add' | translate }} |
41 | 41 | </md-button> |
42 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
42 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
43 | 43 | </md-dialog-actions> |
44 | 44 | </form> |
45 | 45 | </md-dialog> |
\ No newline at end of file | ... | ... |
... | ... | @@ -26,8 +26,8 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | 33 | <fieldset> |
... | ... | @@ -65,11 +65,11 @@ |
65 | 65 | </md-dialog-content> |
66 | 66 | <md-dialog-actions layout="row"> |
67 | 67 | <span flex></span> |
68 | - <md-button ng-disabled="loading || vm.devices.selectedCount == 0" type="submit" | |
68 | + <md-button ng-disabled="$root.loading || vm.devices.selectedCount == 0" type="submit" | |
69 | 69 | class="md-raised md-primary"> |
70 | 70 | {{ 'action.assign' | translate }} |
71 | 71 | </md-button> |
72 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
72 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
73 | 73 | translate }} |
74 | 74 | </md-button> |
75 | 75 | </md-dialog-actions> | ... | ... |
... | ... | @@ -26,8 +26,8 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | 33 | <fieldset> |
... | ... | @@ -65,10 +65,10 @@ |
65 | 65 | </md-dialog-content> |
66 | 66 | <md-dialog-actions layout="row"> |
67 | 67 | <span flex></span> |
68 | - <md-button ng-disabled="loading || vm.customers.selection==null" type="submit" class="md-raised md-primary"> | |
68 | + <md-button ng-disabled="$root.loading || vm.customers.selection==null" type="submit" class="md-raised md-primary"> | |
69 | 69 | {{ 'action.assign' | translate }} |
70 | 70 | </md-button> |
71 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
71 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
72 | 72 | translate }} |
73 | 73 | </md-button> |
74 | 74 | </md-dialog-actions> | ... | ... |
... | ... | @@ -26,14 +26,14 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | - <fieldset ng-disabled="loading || vm.isReadOnly"> | |
33 | + <fieldset ng-disabled="$root.loading || vm.isReadOnly"> | |
34 | 34 | <md-input-container class="md-block"> |
35 | 35 | <label translate>device.credentials-type</label> |
36 | - <md-select ng-disabled="loading || vm.isReadOnly" ng-model="vm.deviceCredentials.credentialsType" | |
36 | + <md-select ng-disabled="$root.loading || vm.isReadOnly" ng-model="vm.deviceCredentials.credentialsType" | |
37 | 37 | ng-change="vm.clear()"> |
38 | 38 | <md-option ng-repeat="credentialsType in vm.credentialsTypes" value="{{credentialsType.value}}"> |
39 | 39 | {{credentialsType.name}} |
... | ... | @@ -62,10 +62,10 @@ |
62 | 62 | </md-dialog-content> |
63 | 63 | <md-dialog-actions layout="row"> |
64 | 64 | <span flex></span> |
65 | - <md-button ng-if="!vm.isReadOnly" ng-disabled="loading || theForm.$invalid || !theForm.$dirty || !vm.valid()" type="submit" class="md-raised md-primary"> | |
65 | + <md-button ng-if="!vm.isReadOnly" ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty || !vm.valid()" type="submit" class="md-raised md-primary"> | |
66 | 66 | {{ 'action.save' | translate }} |
67 | 67 | </md-button> |
68 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ (vm.isReadOnly ? 'action.close' : 'action.cancel') | translate }}</md-button> | |
68 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ (vm.isReadOnly ? 'action.close' : 'action.cancel') | translate }}</md-button> | |
69 | 69 | </md-dialog-actions> |
70 | 70 | </form> |
71 | 71 | </md-dialog> |
\ No newline at end of file | ... | ... |
... | ... | @@ -58,7 +58,7 @@ |
58 | 58 | ng-show="!isEdit && isPublic && (deviceScope === 'customer' || deviceScope === 'tenant')"> |
59 | 59 | {{ 'device.device-public' | translate }} |
60 | 60 | </div> |
61 | - <fieldset ng-disabled="loading || !isEdit"> | |
61 | + <fieldset ng-disabled="$root.loading || !isEdit"> | |
62 | 62 | <md-input-container class="md-block"> |
63 | 63 | <label translate>device.name</label> |
64 | 64 | <input required name="name" ng-model="device.name"> |
... | ... | @@ -67,14 +67,14 @@ |
67 | 67 | </div> |
68 | 68 | </md-input-container> |
69 | 69 | <tb-entity-subtype-autocomplete |
70 | - ng-disabled="loading || !isEdit" | |
70 | + ng-disabled="$root.loading || !isEdit" | |
71 | 71 | tb-required="true" |
72 | 72 | the-form="theForm" |
73 | 73 | ng-model="device.type" |
74 | 74 | entity-type="types.entityType.device"> |
75 | 75 | </tb-entity-subtype-autocomplete> |
76 | 76 | <md-input-container class="md-block"> |
77 | - <md-checkbox ng-disabled="loading || !isEdit" flex aria-label="{{ 'device.is-gateway' | translate }}" | |
77 | + <md-checkbox ng-disabled="$root.loading || !isEdit" flex aria-label="{{ 'device.is-gateway' | translate }}" | |
78 | 78 | ng-model="device.additionalInfo.gateway">{{ 'device.is-gateway' | translate }} |
79 | 79 | </md-checkbox> |
80 | 80 | </md-input-container> | ... | ... |
... | ... | @@ -26,11 +26,11 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | - <fieldset ng-disabled="loading"> | |
33 | + <fieldset ng-disabled="$root.loading"> | |
34 | 34 | <div flex layout="column"> |
35 | 35 | <div layout="row"> |
36 | 36 | <md-input-container flex class="md-block"> |
... | ... | @@ -64,10 +64,10 @@ |
64 | 64 | </md-dialog-content> |
65 | 65 | <md-dialog-actions layout="row"> |
66 | 66 | <span flex></span> |
67 | - <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary"> | |
67 | + <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary"> | |
68 | 68 | {{ (vm.isAdd ? 'action.add' : 'action.save') | translate }} |
69 | 69 | </md-button> |
70 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
70 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
71 | 71 | </md-dialog-actions> |
72 | 72 | </form> |
73 | 73 | </md-dialog> | ... | ... |
... | ... | @@ -26,8 +26,8 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <div class="tb-aliases-header" flex layout="row" layout-align="start center"> |
32 | 32 | <span flex="5"></span> |
33 | 33 | <div flex layout="row" layout-align="start center"> |
... | ... | @@ -40,7 +40,7 @@ |
40 | 40 | <md-divider></md-divider> |
41 | 41 | <md-dialog-content> |
42 | 42 | <div class="md-dialog-content"> |
43 | - <fieldset ng-disabled="loading"> | |
43 | + <fieldset ng-disabled="$root.loading"> | |
44 | 44 | <div ng-form name="aliasForm" flex layout="row" layout-align="start center" ng-repeat="entityAlias in vm.entityAliases track by $index"> |
45 | 45 | <span flex="5">{{$index + 1}}.</span> |
46 | 46 | <di class="md-whiteframe-4dp tb-alias" flex layout="row" layout-align="start center"> |
... | ... | @@ -63,7 +63,7 @@ |
63 | 63 | aria-label="resolve-multiple-switcher"> |
64 | 64 | </md-switch> |
65 | 65 | </section> |
66 | - <md-button ng-disabled="loading" class="md-icon-button md-primary" style="min-width: 40px;" | |
66 | + <md-button ng-disabled="$root.loading" class="md-icon-button md-primary" style="min-width: 40px;" | |
67 | 67 | ng-click="vm.editAlias($event, entityAlias)" aria-label="{{ 'action.edit' | translate }}"> |
68 | 68 | <md-tooltip md-direction="top"> |
69 | 69 | {{ 'alias.edit' | translate }} |
... | ... | @@ -72,7 +72,7 @@ |
72 | 72 | edit |
73 | 73 | </md-icon> |
74 | 74 | </md-button> |
75 | - <md-button ng-disabled="loading" class="md-icon-button md-primary" style="min-width: 40px;" | |
75 | + <md-button ng-disabled="$root.loading" class="md-icon-button md-primary" style="min-width: 40px;" | |
76 | 76 | ng-click="vm.removeAlias($event, entityAlias)" aria-label="{{ 'action.remove' | translate }}"> |
77 | 77 | <md-tooltip md-direction="top"> |
78 | 78 | {{ 'entity.remove-alias' | translate }} |
... | ... | @@ -87,7 +87,7 @@ |
87 | 87 | </div> |
88 | 88 | </md-dialog-content> |
89 | 89 | <md-dialog-actions layout="row"> |
90 | - <md-button ng-show="!vm.disableAdd" ng-disabled="loading" class="md-primary md-raised" | |
90 | + <md-button ng-show="!vm.disableAdd" ng-disabled="$root.loading" class="md-primary md-raised" | |
91 | 91 | ng-click="vm.addAlias($event)" |
92 | 92 | aria-label="{{ 'alias.add' | translate }}"> |
93 | 93 | <md-tooltip md-direction="top"> |
... | ... | @@ -96,10 +96,10 @@ |
96 | 96 | <span translate>alias.add</span> |
97 | 97 | </md-button> |
98 | 98 | <span flex></span> |
99 | - <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary"> | |
99 | + <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary"> | |
100 | 100 | {{ 'action.save' | translate }} |
101 | 101 | </md-button> |
102 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
102 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
103 | 103 | </md-dialog-actions> |
104 | 104 | </form> |
105 | 105 | </md-dialog> |
\ No newline at end of file | ... | ... |
... | ... | @@ -26,12 +26,12 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | 33 | <md-content class="md-padding" layout="column"> |
34 | - <fieldset ng-disabled="loading"> | |
34 | + <fieldset ng-disabled="$root.loading"> | |
35 | 35 | <md-input-container class="md-block"> |
36 | 36 | <label translate>attribute.key</label> |
37 | 37 | <input required name="key" ng-model="vm.attribute.key"> |
... | ... | @@ -42,7 +42,7 @@ |
42 | 42 | <section layout="row"> |
43 | 43 | <md-input-container flex="40" class="md-block" style="width: 200px;"> |
44 | 44 | <label translate>value.type</label> |
45 | - <md-select ng-model="vm.valueType" ng-disabled="loading()"> | |
45 | + <md-select ng-model="vm.valueType" ng-disabled="$root.loading"> | |
46 | 46 | <md-option ng-repeat="type in vm.valueTypes" ng-value="type"> |
47 | 47 | <md-icon md-svg-icon="{{ type.icon }}"></md-icon> |
48 | 48 | <span>{{type.name | translate}}</span> |
... | ... | @@ -83,11 +83,11 @@ |
83 | 83 | </md-dialog-content> |
84 | 84 | <md-dialog-actions layout="row"> |
85 | 85 | <span flex></span> |
86 | - <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
86 | + <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
87 | 87 | class="md-raised md-primary"> |
88 | 88 | {{ 'action.add' | translate }} |
89 | 89 | </md-button> |
90 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
90 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
91 | 91 | translate }} |
92 | 92 | </md-button> |
93 | 93 | </md-dialog-actions> | ... | ... |
... | ... | @@ -26,18 +26,18 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | 33 | <md-content class="md-padding" layout="column"> |
34 | - <fieldset ng-disabled="loading"> | |
34 | + <fieldset ng-disabled="$root.loading"> | |
35 | 35 | <md-radio-group ng-model="vm.addToDashboardType" class="md-primary"> |
36 | 36 | <md-radio-button flex ng-value=0 class="md-primary md-align-top-left md-radio-interactive"> |
37 | 37 | <section flex layout="column" style="width: 300px;"> |
38 | 38 | <span translate style="padding-bottom: 10px;">dashboard.select-existing</span> |
39 | 39 | <tb-dashboard-autocomplete the-form="theForm" |
40 | - ng-disabled="loading || vm.addToDashboardType != 0" | |
40 | + ng-disabled="$root.loading || vm.addToDashboardType != 0" | |
41 | 41 | tb-required="vm.addToDashboardType === 0" |
42 | 42 | ng-model="vm.dashboardId" |
43 | 43 | select-first-dashboard="false"> |
... | ... | @@ -69,11 +69,11 @@ |
69 | 69 | style="margin-bottom: 0px; padding-right: 20px;"> |
70 | 70 | {{ 'dashboard.open-dashboard' | translate }} |
71 | 71 | </md-checkbox> |
72 | - <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
72 | + <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
73 | 73 | class="md-raised md-primary"> |
74 | 74 | {{ 'action.add' | translate }} |
75 | 75 | </md-button> |
76 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
76 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
77 | 77 | translate }} |
78 | 78 | </md-button> |
79 | 79 | </md-dialog-actions> | ... | ... |
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | <section ng-show="!disableAttributeScopeSelection"> |
20 | 20 | <md-input-container class="md-block" style="width: 200px;"> |
21 | 21 | <label translate>attribute.attributes-scope</label> |
22 | - <md-select ng-model="attributeScope" ng-disabled="loading() || attributeScopeSelectionReadonly"> | |
22 | + <md-select ng-model="attributeScope" ng-disabled="$root.loading || attributeScopeSelectionReadonly"> | |
23 | 23 | <md-option ng-repeat="scope in attributeScopes" ng-value="scope"> |
24 | 24 | {{scope.name | translate}} |
25 | 25 | </md-option> | ... | ... |
... | ... | @@ -38,7 +38,7 @@ export default function EntityAutocomplete($compile, $templateCache, $q, $filter |
38 | 38 | if (scope.excludeEntityIds && scope.excludeEntityIds.length) { |
39 | 39 | limit += scope.excludeEntityIds.length; |
40 | 40 | } |
41 | - entityService.getEntitiesByNameFilter(scope.entityType, searchText, limit, null, scope.entitySubtype).then(function success(result) { | |
41 | + entityService.getEntitiesByNameFilter(scope.entityType, searchText, limit, {ignoreLoading: true}, scope.entitySubtype).then(function success(result) { | |
42 | 42 | if (result) { |
43 | 43 | if (scope.excludeEntityIds && scope.excludeEntityIds.length) { |
44 | 44 | var entities = []; | ... | ... |
... | ... | @@ -38,7 +38,7 @@ export default function EntityListDirective($compile, $templateCache, $q, $mdUti |
38 | 38 | |
39 | 39 | scope.fetchEntities = function(searchText, limit) { |
40 | 40 | var deferred = $q.defer(); |
41 | - entityService.getEntitiesByNameFilter(scope.entityType, searchText, limit).then( | |
41 | + entityService.getEntitiesByNameFilter(scope.entityType, searchText, limit, {ignoreLoading: true}).then( | |
42 | 42 | function success(result) { |
43 | 43 | if (result) { |
44 | 44 | deferred.resolve(result); | ... | ... |
... | ... | @@ -93,9 +93,9 @@ export default function EntitySubtypeAutocomplete($compile, $templateCache, $q, |
93 | 93 | if (!scope.entitySubtypes) { |
94 | 94 | var entitySubtypesPromise; |
95 | 95 | if (scope.entityType == types.entityType.asset) { |
96 | - entitySubtypesPromise = assetService.getAssetTypes(); | |
96 | + entitySubtypesPromise = assetService.getAssetTypes({ignoreLoading: true}); | |
97 | 97 | } else if (scope.entityType == types.entityType.device) { |
98 | - entitySubtypesPromise = deviceService.getDeviceTypes(); | |
98 | + entitySubtypesPromise = deviceService.getDeviceTypes({ignoreLoading: true}); | |
99 | 99 | } |
100 | 100 | if (entitySubtypesPromise) { |
101 | 101 | entitySubtypesPromise.then( | ... | ... |
... | ... | @@ -95,9 +95,9 @@ export default function EntitySubtypeListDirective($compile, $templateCache, $q, |
95 | 95 | if (!scope.entitySubtypes) { |
96 | 96 | var entitySubtypesPromise; |
97 | 97 | if (scope.entityType == types.entityType.asset) { |
98 | - entitySubtypesPromise = assetService.getAssetTypes(); | |
98 | + entitySubtypesPromise = assetService.getAssetTypes({ignoreLoading: true}); | |
99 | 99 | } else if (scope.entityType == types.entityType.device) { |
100 | - entitySubtypesPromise = deviceService.getDeviceTypes(); | |
100 | + entitySubtypesPromise = deviceService.getDeviceTypes({ignoreLoading: true}); | |
101 | 101 | } |
102 | 102 | if (entitySubtypesPromise) { |
103 | 103 | entitySubtypesPromise.then( | ... | ... |
... | ... | @@ -73,9 +73,9 @@ export default function EntitySubtypeSelect($compile, $templateCache, $translate |
73 | 73 | scope.entitySubtypes = []; |
74 | 74 | var entitySubtypesPromise; |
75 | 75 | if (scope.entityType == types.entityType.asset) { |
76 | - entitySubtypesPromise = assetService.getAssetTypes(); | |
76 | + entitySubtypesPromise = assetService.getAssetTypes({ignoreLoading: true}); | |
77 | 77 | } else if (scope.entityType == types.entityType.device) { |
78 | - entitySubtypesPromise = deviceService.getDeviceTypes(); | |
78 | + entitySubtypesPromise = deviceService.getDeviceTypes({ignoreLoading: true}); | |
79 | 79 | } |
80 | 80 | if (entitySubtypesPromise) { |
81 | 81 | entitySubtypesPromise.then( | ... | ... |
... | ... | @@ -26,16 +26,16 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | 33 | <md-content class="md-padding" layout="column"> |
34 | - <fieldset ng-disabled="loading"> | |
34 | + <fieldset ng-disabled="$root.loading"> | |
35 | 35 | <tb-relation-type-autocomplete ng-disabled="!vm.isAdd" |
36 | 36 | ng-model="vm.relation.type" |
37 | 37 | tb-required="true" |
38 | - ng-disabled="loading"> | |
38 | + ng-disabled="$root.loading"> | |
39 | 39 | </tb-relation-type-autocomplete> |
40 | 40 | <small>{{(vm.direction == vm.types.entitySearchDirection.from ? |
41 | 41 | 'relation.to-entity' : 'relation.from-entity') | translate}}</small> |
... | ... | @@ -61,11 +61,11 @@ |
61 | 61 | </md-dialog-content> |
62 | 62 | <md-dialog-actions layout="row"> |
63 | 63 | <span flex></span> |
64 | - <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
64 | + <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
65 | 65 | class="md-raised md-primary"> |
66 | 66 | {{ (vm.isAdd ? 'action.add' : 'action.save') | translate }} |
67 | 67 | </md-button> |
68 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
68 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
69 | 69 | translate }} |
70 | 70 | </md-button> |
71 | 71 | </md-dialog-actions> | ... | ... |
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 | allowed-entity-types="allowedEntityTypes" |
38 | 38 | tb-required="false"> |
39 | 39 | </tb-entity-type-list> |
40 | - <md-button ng-disabled="loading" class="md-icon-button md-primary" style="width: 40px; min-width: 40px;" | |
40 | + <md-button ng-disabled="$root.loading" class="md-icon-button md-primary" style="width: 40px; min-width: 40px;" | |
41 | 41 | ng-click="removeFilter($event, filter)" aria-label="{{ 'action.remove' | translate }}"> |
42 | 42 | <md-tooltip md-direction="top"> |
43 | 43 | {{ 'relation.remove-relation-filter' | translate }} |
... | ... | @@ -54,7 +54,7 @@ |
54 | 54 | class="tb-prompt" translate>relation.any-relation</span> |
55 | 55 | </div> |
56 | 56 | <div> |
57 | - <md-button ng-disabled="loading" class="md-primary md-raised" ng-click="addFilter($event)" aria-label="{{ 'action.add' | translate }}"> | |
57 | + <md-button ng-disabled="$root.loading" class="md-primary md-raised" ng-click="addFilter($event)" aria-label="{{ 'action.add' | translate }}"> | |
58 | 58 | <md-tooltip md-direction="top"> |
59 | 59 | {{ 'relation.add-relation-filter' | translate }} |
60 | 60 | </md-tooltip> | ... | ... |
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | <section layout="row"> |
20 | 20 | <md-input-container class="md-block" style="width: 200px;"> |
21 | 21 | <label translate>relation.direction</label> |
22 | - <md-select ng-model="vm.direction" ng-disabled="loading"> | |
22 | + <md-select ng-model="vm.direction" ng-disabled="$root.loading"> | |
23 | 23 | <md-option ng-repeat="direction in vm.types.entitySearchDirection" ng-value="direction"> |
24 | 24 | {{ ('relation.search-direction.' + direction) | translate}} |
25 | 25 | </md-option> | ... | ... |
... | ... | @@ -35,7 +35,7 @@ |
35 | 35 | </md-dialog-content> |
36 | 36 | <md-dialog-actions layout="row"> |
37 | 37 | <span flex></span> |
38 | - <md-button ng-disabled="loading" ng-click="vm.close()" style="margin-right:20px;">{{ 'action.close' | | |
38 | + <md-button ng-disabled="$root.loading" ng-click="vm.close()" style="margin-right:20px;">{{ 'action.close' | | |
39 | 39 | translate }} |
40 | 40 | </md-button> |
41 | 41 | </md-dialog-actions> | ... | ... |
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | <section layout="row"> |
20 | 20 | <md-input-container class="md-block" style="width: 200px;"> |
21 | 21 | <label translate>event.event-type</label> |
22 | - <md-select ng-model="eventType" ng-disabled="loading()"> | |
22 | + <md-select ng-model="eventType" ng-disabled="$root.loading"> | |
23 | 23 | <md-option ng-repeat="type in eventTypes" ng-value="type.value"> |
24 | 24 | {{type.name | translate}} |
25 | 25 | </md-option> |
... | ... | @@ -30,8 +30,8 @@ |
30 | 30 | <md-list flex layout="column" class="md-whiteframe-z1 tb-event-table"> |
31 | 31 | <md-list class="tb-row tb-header" layout="row" tb-event-header event-type="{{eventType}}"> |
32 | 32 | </md-list> |
33 | - <md-progress-linear style="max-height: 0px;" md-mode="indeterminate" ng-disabled="!loading()" | |
34 | - ng-show="loading()"></md-progress-linear> | |
33 | + <md-progress-linear style="max-height: 0px;" md-mode="indeterminate" ng-disabled="!$root.loading" | |
34 | + ng-show="$root.loading"></md-progress-linear> | |
35 | 35 | <md-divider></md-divider> |
36 | 36 | <span translate layout-align="center center" |
37 | 37 | style="margin-top: 25px;" | ... | ... |
... | ... | @@ -27,14 +27,14 @@ |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | 29 | |
30 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
31 | 31 | |
32 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
32 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
33 | 33 | |
34 | 34 | <md-dialog-content> |
35 | 35 | <div class="md-dialog-content"> |
36 | 36 | <md-content class="md-padding" layout="column"> |
37 | - <fieldset ng-disabled="loading"> | |
37 | + <fieldset ng-disabled="$root.loading"> | |
38 | 38 | <section flex layout="row"> |
39 | 39 | <md-input-container flex="60" class="md-block" md-is-error="theForm.extensionId.$touched && theForm.extensionId.$invalid"> |
40 | 40 | <label translate>extension.extension-id</label> |
... | ... | @@ -74,7 +74,7 @@ |
74 | 74 | {{ (vm.isAdd ? 'action.add' : 'action.save') | translate }} |
75 | 75 | </md-button> |
76 | 76 | |
77 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }} | |
77 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }} | |
78 | 78 | </md-button> |
79 | 79 | </md-dialog-actions> |
80 | 80 | </form> | ... | ... |
... | ... | @@ -26,11 +26,11 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | - <fieldset ng-disabled="loading"> | |
33 | + <fieldset ng-disabled="$root.loading"> | |
34 | 34 | <div layout="column" layout-padding> |
35 | 35 | <div class="tb-container"> |
36 | 36 | <label class="tb-label" translate>{{ vm.importFileLabel }}</label> |
... | ... | @@ -63,10 +63,10 @@ |
63 | 63 | </md-dialog-content> |
64 | 64 | <md-dialog-actions layout="row"> |
65 | 65 | <span flex></span> |
66 | - <md-button ng-disabled="loading || !theForm.$dirty || !theForm.$valid || !vm.importData" type="submit" class="md-raised md-primary"> | |
66 | + <md-button ng-disabled="$root.loading || !theForm.$dirty || !theForm.$valid || !vm.importData" type="submit" class="md-raised md-primary"> | |
67 | 67 | {{ 'action.import' | translate }} |
68 | 68 | </md-button> |
69 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
69 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
70 | 70 | </md-dialog-actions> |
71 | 71 | </form> |
72 | 72 | </md-dialog> | ... | ... |
... | ... | @@ -76,7 +76,7 @@ |
76 | 76 | </tb-user-menu> |
77 | 77 | </div> |
78 | 78 | </md-toolbar> |
79 | - <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> | |
79 | + <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> | |
80 | 80 | |
81 | 81 | <div flex layout="column" id="toast-parent" style="position: relative;"> |
82 | 82 | <md-content ng-cloak flex layout="column" class="page-content" ui-view name="content"></md-content> | ... | ... |
... | ... | @@ -23,7 +23,7 @@ |
23 | 23 | </md-card-title-text> |
24 | 24 | </md-card-title> |
25 | 25 | <md-progress-linear class="md-warn" style="z-index: 1; max-height: 5px; width: inherit; position: absolute" |
26 | - md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
26 | + md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
27 | 27 | <md-card-content> |
28 | 28 | <form class="create-password-form" ng-submit="vm.createPassword()"> |
29 | 29 | <div layout="column" layout-padding="" id="toast-parent"> | ... | ... |
... | ... | @@ -23,7 +23,7 @@ |
23 | 23 | </md-card-title-text> |
24 | 24 | </md-card-title> |
25 | 25 | <md-progress-linear class="md-warn" style="z-index: 1; max-height: 5px; width: inherit; position: absolute" |
26 | - md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
26 | + md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
27 | 27 | <md-card-content> |
28 | 28 | <form class="login-form" ng-submit="vm.login()"> |
29 | 29 | <div layout="column" layout-padding="" id="toast-parent"> | ... | ... |
... | ... | @@ -23,7 +23,7 @@ |
23 | 23 | </md-card-title-text> |
24 | 24 | </md-card-title> |
25 | 25 | <md-progress-linear class="md-warn" style="z-index: 1; max-height: 5px; width: inherit; position: absolute" |
26 | - md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
26 | + md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
27 | 27 | <md-card-content> |
28 | 28 | <form class="request-password-reset-form" ng-submit="vm.sendResetPasswordLink()"> |
29 | 29 | <div layout="column" layout-padding="" id="toast-parent"> | ... | ... |
... | ... | @@ -23,7 +23,7 @@ |
23 | 23 | </md-card-title-text> |
24 | 24 | </md-card-title> |
25 | 25 | <md-progress-linear class="md-warn" style="z-index: 1; max-height: 5px; width: inherit; position: absolute" |
26 | - md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
26 | + md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
27 | 27 | <md-card-content> |
28 | 28 | <form class="password-reset-form" ng-submit="vm.resetPassword()"> |
29 | 29 | <div layout="column" layout-padding="" id="toast-parent"> | ... | ... |
... | ... | @@ -27,8 +27,8 @@ |
27 | 27 | </md-button> |
28 | 28 | </div> |
29 | 29 | </md-toolbar> |
30 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
31 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
30 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
31 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
32 | 32 | <md-dialog-content> |
33 | 33 | <div class="md-dialog-content"> |
34 | 34 | <tb-plugin plugin="vm.item" is-edit="true" the-form="theForm"></tb-plugin> |
... | ... | @@ -36,11 +36,11 @@ |
36 | 36 | </md-dialog-content> |
37 | 37 | <md-dialog-actions layout="row"> |
38 | 38 | <span flex></span> |
39 | - <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
39 | + <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
40 | 40 | class="md-raised md-primary"> |
41 | 41 | {{ 'action.add' | translate }} |
42 | 42 | </md-button> |
43 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
43 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
44 | 44 | translate }} |
45 | 45 | </md-button> |
46 | 46 | </md-dialog-actions> | ... | ... |
... | ... | @@ -39,7 +39,7 @@ |
39 | 39 | </div> |
40 | 40 | |
41 | 41 | <md-content class="md-padding" layout="column" style="overflow-x: hidden"> |
42 | - <fieldset ng-disabled="loading || !isEdit || isReadOnly"> | |
42 | + <fieldset ng-disabled="$root.loading || !isEdit || isReadOnly"> | |
43 | 43 | <md-input-container class="md-block"> |
44 | 44 | <label translate>plugin.name</label> |
45 | 45 | <input required name="name" ng-model="plugin.name"> |
... | ... | @@ -61,7 +61,7 @@ |
61 | 61 | </md-input-container> |
62 | 62 | <md-input-container flex class="md-block"> |
63 | 63 | <label translate>plugin.type</label> |
64 | - <md-select required name="pluginType" ng-model="plugin.clazz" ng-disabled="loading || !isEdit"> | |
64 | + <md-select required name="pluginType" ng-model="plugin.clazz" ng-disabled="$root.loading || !isEdit"> | |
65 | 65 | <md-option ng-repeat="component in pluginComponents" ng-value="component.clazz"> |
66 | 66 | {{component.name}} |
67 | 67 | </md-option> |
... | ... | @@ -74,14 +74,14 @@ |
74 | 74 | <md-card flex class="plugin-config" ng-if="showPluginConfig"> |
75 | 75 | <md-card-title> |
76 | 76 | <md-card-title-text> |
77 | - <span translate class="md-headline" ng-class="{'tb-readonly-label' : (loading || !isEdit || isReadOnly)}">plugin.configuration</span> | |
77 | + <span translate class="md-headline" ng-class="{'tb-readonly-label' : ($root.loading || !isEdit || isReadOnly)}">plugin.configuration</span> | |
78 | 78 | </md-card-title-text> |
79 | 79 | </md-card-title> |
80 | 80 | <md-card-content> |
81 | 81 | <tb-json-form schema="pluginComponent.configurationDescriptor.schema" |
82 | 82 | form="pluginComponent.configurationDescriptor.form" |
83 | 83 | model="pluginConfiguration.data" |
84 | - readonly="loading || !isEdit || isReadOnly" | |
84 | + readonly="$root.loading || !isEdit || isReadOnly" | |
85 | 85 | form-control="theForm"> |
86 | 86 | </tb-json-form> |
87 | 87 | </md-card-content> | ... | ... |
... | ... | @@ -26,8 +26,8 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | 33 | <md-input-container class="md-block"> |
... | ... | @@ -55,10 +55,10 @@ |
55 | 55 | </md-dialog-content> |
56 | 56 | <md-dialog-actions layout="row"> |
57 | 57 | <span flex></span> |
58 | - <md-button ng-disabled="loading || theForm.$invalid" type="submit" class="md-raised md-primary"> | |
58 | + <md-button ng-disabled="$root.loading || theForm.$invalid" type="submit" class="md-raised md-primary"> | |
59 | 59 | {{ 'profile.change-password' | translate }} |
60 | 60 | </md-button> |
61 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
61 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
62 | 62 | </md-dialog-actions> |
63 | 63 | </form> |
64 | 64 | </md-dialog> | ... | ... |
... | ... | @@ -23,11 +23,11 @@ |
23 | 23 | <span style='opacity: 0.7;'>{{ vm.profileUser.email }}</span> |
24 | 24 | </md-card-title-text> |
25 | 25 | </md-card-title> |
26 | - <md-progress-linear md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
27 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
26 | + <md-progress-linear md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
27 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
28 | 28 | <md-card-content> |
29 | 29 | <form name="theForm" ng-submit="vm.save()" tb-confirm-on-exit confirm-form="theForm"> |
30 | - <fieldset ng-disabled="loading"> | |
30 | + <fieldset ng-disabled="$root.loading"> | |
31 | 31 | <md-input-container class="md-block"> |
32 | 32 | <label translate>user.email</label> |
33 | 33 | <input name="email" type="email" ng-model="vm.profileUser.email"> |
... | ... | @@ -48,11 +48,11 @@ |
48 | 48 | </md-option> |
49 | 49 | </md-select> |
50 | 50 | </md-input-container> |
51 | - <md-button ng-disabled="loading" ng-click="vm.changePassword($event)" | |
51 | + <md-button ng-disabled="$root.loading" ng-click="vm.changePassword($event)" | |
52 | 52 | class="md-raised md-primary">{{ 'profile.change-password' | translate }} |
53 | 53 | </md-button> |
54 | 54 | <div layout="row" layout-align="end center" width="100%" layout-wrap> |
55 | - <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
55 | + <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
56 | 56 | class="md-raised md-primary">{{ 'action.save' | translate }} |
57 | 57 | </md-button> |
58 | 58 | </div> | ... | ... |
... | ... | @@ -27,8 +27,8 @@ |
27 | 27 | </md-button> |
28 | 28 | </div> |
29 | 29 | </md-toolbar> |
30 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
31 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
30 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
31 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
32 | 32 | <md-dialog-content> |
33 | 33 | <div class="md-dialog-content"> |
34 | 34 | <tb-rule rule="vm.item" is-edit="true" the-form="theForm"></tb-rule> |
... | ... | @@ -36,11 +36,11 @@ |
36 | 36 | </md-dialog-content> |
37 | 37 | <md-dialog-actions layout="row"> |
38 | 38 | <span flex></span> |
39 | - <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
39 | + <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
40 | 40 | class="md-raised md-primary"> |
41 | 41 | {{ 'action.add' | translate }} |
42 | 42 | </md-button> |
43 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
43 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
44 | 44 | translate }} |
45 | 45 | </md-button> |
46 | 46 | </md-dialog-actions> | ... | ... |
... | ... | @@ -39,7 +39,7 @@ |
39 | 39 | </div> |
40 | 40 | |
41 | 41 | <md-content class="md-padding tb-rule" layout="column"> |
42 | - <fieldset ng-disabled="loading || !isEdit || isReadOnly"> | |
42 | + <fieldset ng-disabled="$root.loading || !isEdit || isReadOnly"> | |
43 | 43 | <md-input-container class="md-block"> |
44 | 44 | <label translate>rule.name</label> |
45 | 45 | <input required name="name" ng-model="rule.name"> |
... | ... | @@ -109,7 +109,7 @@ |
109 | 109 | </div> |
110 | 110 | </div> |
111 | 111 | <div ng-if="isEdit && !isReadOnly" flex layout="row" layout-align="start center"> |
112 | - <md-button ng-disabled="loading" class="md-primary md-raised" | |
112 | + <md-button ng-disabled="$root.loading" class="md-primary md-raised" | |
113 | 113 | ng-click="addFilter($event)" aria-label="{{ 'action.add' | translate }}"> |
114 | 114 | <md-tooltip md-direction="top"> |
115 | 115 | {{ 'rule.add-filter' | translate }} |
... | ... | @@ -149,7 +149,7 @@ |
149 | 149 | <span ng-if="!isEdit || isReadOnly" translate layout-align="center center" |
150 | 150 | class="tb-prompt">rule.no-processor-configured</span> |
151 | 151 | <div ng-if="isEdit && !isReadOnly" flex layout="row" layout-align="start center"> |
152 | - <md-button ng-disabled="loading" class="md-primary md-raised" | |
152 | + <md-button ng-disabled="$root.loading" class="md-primary md-raised" | |
153 | 153 | ng-click="addProcessor($event)" aria-label="{{ 'action.create' | translate }}"> |
154 | 154 | <md-tooltip md-direction="top"> |
155 | 155 | {{ 'rule.create-processor' | translate }} |
... | ... | @@ -162,7 +162,7 @@ |
162 | 162 | </v-pane-content> |
163 | 163 | </v-pane> |
164 | 164 | </v-accordion> |
165 | - <fieldset ng-disabled="loading || !isEdit || isReadOnly"> | |
165 | + <fieldset ng-disabled="$root.loading || !isEdit || isReadOnly"> | |
166 | 166 | <md-input-container ng-if="!isEdit || isReadOnly" flex class="md-block"> |
167 | 167 | <label translate>plugin.plugin</label> |
168 | 168 | <input name="name" ng-model="plugin.name"> |
... | ... | @@ -203,7 +203,7 @@ |
203 | 203 | <span translate layout-align="center center" |
204 | 204 | class="tb-prompt">rule.create-action-prompt</span> |
205 | 205 | <div ng-if="isEdit && !isReadOnly" flex layout="row" layout-align="start center"> |
206 | - <md-button ng-disabled="loading" class="md-primary md-raised" | |
206 | + <md-button ng-disabled="$root.loading" class="md-primary md-raised" | |
207 | 207 | ng-click="addAction($event)" aria-label="{{ 'action.create' | translate }}"> |
208 | 208 | <md-tooltip md-direction="top"> |
209 | 209 | {{ 'rule.create-action' | translate }} | ... | ... |
... | ... | @@ -27,8 +27,8 @@ |
27 | 27 | </md-button> |
28 | 28 | </div> |
29 | 29 | </md-toolbar> |
30 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
31 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
30 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
31 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
32 | 32 | <md-dialog-content> |
33 | 33 | <div class="md-dialog-content"> |
34 | 34 | <tb-tenant tenant="vm.item" is-edit="true" the-form="theForm"></tb-tenant> |
... | ... | @@ -36,11 +36,11 @@ |
36 | 36 | </md-dialog-content> |
37 | 37 | <md-dialog-actions layout="row"> |
38 | 38 | <span flex></span> |
39 | - <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
39 | + <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
40 | 40 | class="md-raised md-primary"> |
41 | 41 | {{ 'action.add' | translate }} |
42 | 42 | </md-button> |
43 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
43 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
44 | 44 | translate }} |
45 | 45 | </md-button> |
46 | 46 | </md-dialog-actions> | ... | ... |
... | ... | @@ -29,7 +29,7 @@ |
29 | 29 | </div> |
30 | 30 | |
31 | 31 | <md-content class="md-padding" layout="column"> |
32 | - <fieldset ng-disabled="loading || !isEdit"> | |
32 | + <fieldset ng-disabled="$root.loading || !isEdit"> | |
33 | 33 | <md-input-container class="md-block"> |
34 | 34 | <label translate>tenant.title</label> |
35 | 35 | <input required name="title" ng-model="tenant.title"> | ... | ... |
... | ... | @@ -27,8 +27,8 @@ |
27 | 27 | </md-button> |
28 | 28 | </div> |
29 | 29 | </md-toolbar> |
30 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
31 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
30 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
31 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
32 | 32 | <md-dialog-content> |
33 | 33 | <div class="md-dialog-content"> |
34 | 34 | <tb-user user="vm.item" is-edit="true" the-form="theForm"></tb-user> |
... | ... | @@ -45,10 +45,10 @@ |
45 | 45 | </md-dialog-content> |
46 | 46 | <md-dialog-actions layout="row"> |
47 | 47 | <span flex></span> |
48 | - <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary"> | |
48 | + <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" class="md-raised md-primary"> | |
49 | 49 | {{ 'action.add' | translate }} |
50 | 50 | </md-button> |
51 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
51 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | translate }}</md-button> | |
52 | 52 | </md-dialog-actions> |
53 | 53 | </form> |
54 | 54 | </md-dialog> | ... | ... |
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 | </md-button> |
27 | 27 | |
28 | 28 | <md-content class="md-padding" layout="column"> |
29 | - <fieldset ng-disabled="loading || !isEdit"> | |
29 | + <fieldset ng-disabled="$root.loading || !isEdit"> | |
30 | 30 | <md-input-container class="md-block"> |
31 | 31 | <label translate>user.email</label> |
32 | 32 | <input required name="email" |
... | ... | @@ -50,11 +50,11 @@ |
50 | 50 | <textarea ng-model="user.additionalInfo.description" rows="2"></textarea> |
51 | 51 | </md-input-container> |
52 | 52 | <section class="tb-default-dashboard" flex layout="column" ng-if="user.id"> |
53 | - <span class="tb-default-dashboard-label" ng-class="{'tb-disabled-label': loading || !isEdit}" translate>user.default-dashboard</span> | |
53 | + <span class="tb-default-dashboard-label" ng-class="{'tb-disabled-label': $root.loading || !isEdit}" translate>user.default-dashboard</span> | |
54 | 54 | <section flex layout="column" layout-gt-sm="row"> |
55 | 55 | <tb-dashboard-autocomplete ng-if="isTenantAdmin()" |
56 | 56 | flex |
57 | - ng-disabled="loading || !isEdit" | |
57 | + ng-disabled="$root.loading || !isEdit" | |
58 | 58 | the-form="theForm" |
59 | 59 | ng-model="user.additionalInfo.defaultDashboardId" |
60 | 60 | tenant-id="user.tenantId.id" |
... | ... | @@ -62,14 +62,14 @@ |
62 | 62 | </tb-dashboard-autocomplete> |
63 | 63 | <tb-dashboard-autocomplete ng-if="isCustomerUser()" |
64 | 64 | flex |
65 | - ng-disabled="loading || !isEdit" | |
65 | + ng-disabled="$root.loading || !isEdit" | |
66 | 66 | the-form="theForm" |
67 | 67 | ng-model="user.additionalInfo.defaultDashboardId" |
68 | 68 | dashboards-scope="customer" |
69 | 69 | customer-id="user.customerId.id" |
70 | 70 | select-first-dashboard="false"> |
71 | 71 | </tb-dashboard-autocomplete> |
72 | - <md-checkbox ng-disabled="loading || !isEdit" flex aria-label="{{ 'user.always-fullscreen' | translate }}" | |
72 | + <md-checkbox ng-disabled="$root.loading || !isEdit" flex aria-label="{{ 'user.always-fullscreen' | translate }}" | |
73 | 73 | ng-model="user.additionalInfo.defaultDashboardFullscreen">{{ 'user.always-fullscreen' | translate }} |
74 | 74 | </md-checkbox> |
75 | 75 | </section> | ... | ... |
... | ... | @@ -27,8 +27,8 @@ |
27 | 27 | </md-button> |
28 | 28 | </div> |
29 | 29 | </md-toolbar> |
30 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
31 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
30 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
31 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
32 | 32 | <md-dialog-content> |
33 | 33 | <div class="md-dialog-content"> |
34 | 34 | <tb-widgets-bundle widgets-bundle="vm.item" is-edit="true" the-form="theForm"></tb-widgets-bundle> |
... | ... | @@ -36,11 +36,11 @@ |
36 | 36 | </md-dialog-content> |
37 | 37 | <md-dialog-actions layout="row"> |
38 | 38 | <span flex></span> |
39 | - <md-button ng-disabled="loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
39 | + <md-button ng-disabled="$root.loading || theForm.$invalid || !theForm.$dirty" type="submit" | |
40 | 40 | class="md-raised md-primary"> |
41 | 41 | {{ 'action.add' | translate }} |
42 | 42 | </md-button> |
43 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
43 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
44 | 44 | translate }} |
45 | 45 | </md-button> |
46 | 46 | </md-dialog-actions> | ... | ... |
... | ... | @@ -26,8 +26,8 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | 33 | <fieldset> |
... | ... | @@ -49,10 +49,10 @@ |
49 | 49 | </md-dialog-content> |
50 | 50 | <md-dialog-actions layout="row"> |
51 | 51 | <span flex></span> |
52 | - <md-button ng-disabled="loading || theForm.$invalid" type="submit" class="md-raised md-primary"> | |
52 | + <md-button ng-disabled="$root.loading || theForm.$invalid" type="submit" class="md-raised md-primary"> | |
53 | 53 | {{ 'action.saveAs' | translate }} |
54 | 54 | </md-button> |
55 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
55 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
56 | 56 | translate }} |
57 | 57 | </md-button> |
58 | 58 | </md-dialog-actions> | ... | ... |
... | ... | @@ -26,11 +26,11 @@ |
26 | 26 | </md-button> |
27 | 27 | </div> |
28 | 28 | </md-toolbar> |
29 | - <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!loading" ng-show="loading"></md-progress-linear> | |
30 | - <span style="min-height: 5px;" flex="" ng-show="!loading"></span> | |
29 | + <md-progress-linear class="md-warn" md-mode="indeterminate" ng-disabled="!$root.loading" ng-show="$root.loading"></md-progress-linear> | |
30 | + <span style="min-height: 5px;" flex="" ng-show="!$root.loading"></span> | |
31 | 31 | <md-dialog-content> |
32 | 32 | <div class="md-dialog-content"> |
33 | - <fieldset ng-disabled="loading"> | |
33 | + <fieldset ng-disabled="$root.loading"> | |
34 | 34 | <div layout="column" layout-gt-sm="row" layout-align="center center"> |
35 | 35 | <md-button class="tb-card-button md-raised md-primary" layout="column" |
36 | 36 | ng-click="vm.typeSelected(vm.types.widgetType.timeseries.value)"> |
... | ... | @@ -73,7 +73,7 @@ |
73 | 73 | </md-dialog-content> |
74 | 74 | <md-dialog-actions layout="row"> |
75 | 75 | <span flex></span> |
76 | - <md-button ng-disabled="loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
76 | + <md-button ng-disabled="$root.loading" ng-click="vm.cancel()" style="margin-right:20px;">{{ 'action.cancel' | | |
77 | 77 | translate }} |
78 | 78 | </md-button> |
79 | 79 | </md-dialog-actions> | ... | ... |
... | ... | @@ -129,7 +129,7 @@ |
129 | 129 | <input placeholder="{{ 'widget.resource-url' | translate }}" |
130 | 130 | ng-required="true" name="resource" ng-model="resource.url"> |
131 | 131 | </md-input-container> |
132 | - <md-button ng-disabled="loading" class="md-icon-button md-primary" | |
132 | + <md-button ng-disabled="$root.loading" class="md-icon-button md-primary" | |
133 | 133 | ng-click="vm.removeResource($index)" |
134 | 134 | aria-label="{{ 'action.remove' | translate }}"> |
135 | 135 | <md-tooltip md-direction="top"> |
... | ... | @@ -142,7 +142,7 @@ |
142 | 142 | </md-button> |
143 | 143 | </div> |
144 | 144 | <div> |
145 | - <md-button ng-disabled="loading" class="md-primary md-raised" | |
145 | + <md-button ng-disabled="$root.loading" class="md-primary md-raised" | |
146 | 146 | ng-click="vm.addResource()" |
147 | 147 | aria-label="{{ 'action.add' | translate }}"> |
148 | 148 | <md-tooltip md-direction="top"> | ... | ... |
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | limitations under the License. |
16 | 16 | |
17 | 17 | --> |
18 | -<section ng-show="!loading && vm.noData()" layout-align="center center" | |
18 | +<section ng-show="!$root.loading && vm.noData()" layout-align="center center" | |
19 | 19 | style="text-transform: uppercase; display: flex; z-index: 1;" |
20 | 20 | class="md-headline tb-absolute-fill"> |
21 | 21 | <md-button ng-if="!vm.isReadOnly()" class="tb-add-new-widget" ng-click="vm.addWidgetType($event)"> |
... | ... | @@ -42,10 +42,10 @@ |
42 | 42 | on-init-failed="vm.dashboardInitFailed(e)"> |
43 | 43 | </tb-dashboard> |
44 | 44 | <section layout="row" layout-wrap class="tb-footer-buttons md-fab "> |
45 | - <md-fab-speed-dial ng-disabled="loading" ng-show="!vm.isReadOnly()" | |
45 | + <md-fab-speed-dial ng-disabled="$root.loading" ng-show="!vm.isReadOnly()" | |
46 | 46 | md-open="vm.addItemActionsOpen" class="md-scale" md-direction="up"> |
47 | 47 | <md-fab-trigger> |
48 | - <md-button ng-disabled="loading" | |
48 | + <md-button ng-disabled="$root.loading" | |
49 | 49 | class="tb-btn-footer md-accent md-hue-2 md-fab" |
50 | 50 | aria-label="{{ 'widget.add-widget-type' | translate }}"> |
51 | 51 | <md-tooltip md-direction="top"> |
... | ... | @@ -55,7 +55,7 @@ |
55 | 55 | </md-button> |
56 | 56 | </md-fab-trigger> |
57 | 57 | <md-fab-actions> |
58 | - <md-button ng-disabled="loading" | |
58 | + <md-button ng-disabled="$root.loading" | |
59 | 59 | class="tmd-accent md-hue-2 md-fab" ng-click="vm.addWidgetType($event)" |
60 | 60 | aria-label="{{ 'action.create' | translate }}"> |
61 | 61 | <md-tooltip md-direction="top"> |
... | ... | @@ -63,7 +63,7 @@ |
63 | 63 | </md-tooltip> |
64 | 64 | <ng-md-icon icon="insert_drive_file"></ng-md-icon> |
65 | 65 | </md-button> |
66 | - <md-button ng-disabled="loading" | |
66 | + <md-button ng-disabled="$root.loading" | |
67 | 67 | class="tmd-accent md-hue-2 md-fab" ng-click="vm.importWidgetType($event)" |
68 | 68 | aria-label="{{ 'action.import' | translate }}"> |
69 | 69 | <md-tooltip md-direction="top"> | ... | ... |
... | ... | @@ -23,7 +23,7 @@ |
23 | 23 | class="md-raised md-primary">{{ 'widgets-bundle.delete' | translate }}</md-button> |
24 | 24 | |
25 | 25 | <md-content class="md-padding" layout="column"> |
26 | - <fieldset ng-disabled="loading || !isEdit"> | |
26 | + <fieldset ng-disabled="$root.loading || !isEdit"> | |
27 | 27 | <md-input-container class="md-block"> |
28 | 28 | <label translate>widgets-bundle.title</label> |
29 | 29 | <input required name="title" ng-model="widgetsBundle.title"> | ... | ... |