You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2019/02/21 07:03:39 UTC
[ignite] branch master updated: IGNITE-11327 Web Console: Fixed
error on progress line show/hide.
This is an automated email from the ASF dual-hosted git repository.
akuznetsov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new fd821a3 IGNITE-11327 Web Console: Fixed error on progress line show/hide.
fd821a3 is described below
commit fd821a3180c575e07be06ec9485605ee89fad9f5
Author: Alexander Kalinin <ve...@yandex.ru>
AuthorDate: Thu Feb 21 14:02:35 2019 +0700
IGNITE-11327 Web Console: Fixed error on progress line show/hide.
---
.../components/global-progress-line/controller.ts | 24 ++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/modules/web-console/frontend/app/components/global-progress-line/controller.ts b/modules/web-console/frontend/app/components/global-progress-line/controller.ts
index ee33b2e..fd8a4bbb 100644
--- a/modules/web-console/frontend/app/components/global-progress-line/controller.ts
+++ b/modules/web-console/frontend/app/components/global-progress-line/controller.ts
@@ -19,21 +19,29 @@ export default class GlobalProgressLine {
/** @type {boolean} */
isLoading;
- static $inject = ['$element', '$document'];
+ static $inject = ['$element', '$document', '$scope'];
_child: Element;
- constructor(private $element: JQLite, private $document: ng.IDocumentService) {}
+ constructor(private $element: JQLite, private $document: ng.IDocumentService, private $scope: ng.IScope) {}
$onChanges() {
- if (this.isLoading === true) {
- this._child = this.$element[0].querySelector('.global-progress-line__progress-line');
- this.$document[0].querySelector('web-console-header').appendChild(this._child);
- } else
- this.$element.hide();
+ this.$scope.$evalAsync(() => {
+ if (this.isLoading) {
+ this._child = this.$element[0].querySelector('.global-progress-line__progress-line');
+
+ if (this._child)
+ this.$document[0].querySelector('web-console-header').appendChild(this._child);
+ }
+ else
+ this.$element.hide();
+ });
}
$onDestroy() {
- if (this._child) this._child.parentElement.removeChild(this._child);
+ if (this._child) {
+ this._child.parentElement.removeChild(this._child);
+ this._child = null;
+ }
}
}