You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by an...@apache.org on 2019/04/19 10:12:23 UTC
[incubator-dlab] 01/04: [DLAB-607]: added last status check on key
upload complete
This is an automated email from the ASF dual-hosted git repository.
ankovalyshyn pushed a commit to branch DLAB-607
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit 8e1662eb98ca0c192e8552eb85fd9fc57348b270
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Fri Apr 19 12:16:11 2019 +0300
[DLAB-607]: added last status check on key upload complete
---
.../resources/webapp/src/app/shared/bubble/bubble.service.ts | 2 +-
.../resources/webapp/src/app/shared/navbar/navbar.component.ts | 9 +++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/bubble/bubble.service.ts b/services/self-service/src/main/resources/webapp/src/app/shared/bubble/bubble.service.ts
index 4b88a59..1d77d67 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/bubble/bubble.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/bubble/bubble.service.ts
@@ -63,7 +63,7 @@ export class BubblesCollector {
this.bubbles.filter((component: BubbleComponent) => component.isVisible)
.forEach((component: BubbleComponent) => component.hide());
});
- };
+ }
public addBubble(bubbleComponent: BubbleComponent) {
this.bubbles.push(bubbleComponent);
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts
index 21938f9..aab32e2 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts
@@ -44,6 +44,7 @@ export class NavbarComponent implements OnInit, OnDestroy {
readonly PROVIDER = DICTIONARY.cloud_provider;
private alive: boolean = false;
+ private lastStatus: number | boolean = false;
private readonly CHECK_ACCESS_KEY_TIMEOUT: number = 30000;
private readonly CHECK_ACTIVE_SCHEDULE_TIMEOUT: number = 55000;
private readonly CHECK_ACTIVE_SCHEDULE_PERIOD: number = 15;
@@ -157,6 +158,7 @@ export class NavbarComponent implements OnInit, OnDestroy {
this.preloaderDialog.bindDialog.isOpened && this.preloaderDialog.close();
this.keyUploadDialog.open({ isFooter: false });
this.alive = false;
+ this.lastStatus = status;
} else if (status === HTTP_STATUS_CODES.ACCEPTED) {
!this.preloaderDialog.bindDialog.isOpened && this.preloaderDialog.open({ isHeader: false, isFooter: false });
@@ -167,10 +169,13 @@ export class NavbarComponent implements OnInit, OnDestroy {
.pipe(takeWhile(() => this.alive))
.subscribe(() => this.userAccessKeyService.initialUserAccessKeyCheck()));
}
-
+ this.lastStatus = status;
} else if (status === HTTP_STATUS_CODES.OK) {
+ if (this.lastStatus) {
+ this.userAccessKeyService.emitActionOnKeyUploadComplete();
+ this.lastStatus = false;
+ }
this.alive = false;
- this.userAccessKeyService.emitActionOnKeyUploadComplete();
this.preloaderDialog.close();
this.keyUploadDialog.close();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org