From 9d009beb36d0041d341acb8a2a7cbb8c865d6228 Mon Sep 17 00:00:00 2001 From: Max Peintner Date: Tue, 27 Oct 2020 10:30:16 +0100 Subject: [PATCH] fix(console): start verification flow on domain create, show verification if token is requested (#907) * start verification flow on add, show v if token req * fix: sem --- .../domain-verification.component.html | 9 +++++++-- .../domain-verification.component.scss | 2 +- .../domain-verification.component.ts | 13 ++++++++----- .../pages/orgs/org-detail/org-detail.component.ts | 3 +++ console/src/assets/i18n/de.json | 4 ++-- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/console/src/app/pages/orgs/org-detail/domain-verification/domain-verification.component.html b/console/src/app/pages/orgs/org-detail/domain-verification/domain-verification.component.html index bddb573c0a..3c71b746fc 100644 --- a/console/src/app/pages/orgs/org-detail/domain-verification/domain-verification.component.html +++ b/console/src/app/pages/orgs/org-detail/domain-verification/domain-verification.component.html @@ -5,13 +5,14 @@

{{ 'ORG.PAGES.ORGDOMAIN.VERIFICATION_VALIDATION_DESC' | translate }}

-

+

{{'ORG.PAGES.ORGDOMAIN.VERIFICATION_VALIDATION_ONGOING' | translate: domain }} {{'ORG.PAGES.ORGDOMAIN.VERIFICATION_VALIDATION_ONGOING_TYPE' | translate}} {{'ORG.PAGES.ORGDOMAIN.TYPES.'+ domain.validationType | translate}}

- +
@@ -45,6 +48,8 @@ +

{{dns?.url}}

diff --git a/console/src/app/pages/orgs/org-detail/domain-verification/domain-verification.component.scss b/console/src/app/pages/orgs/org-detail/domain-verification/domain-verification.component.scss index dc2fc5cb53..b02cd75537 100644 --- a/console/src/app/pages/orgs/org-detail/domain-verification/domain-verification.component.scss +++ b/console/src/app/pages/orgs/org-detail/domain-verification/domain-verification.component.scss @@ -13,7 +13,7 @@ font-size: .9rem; &.warn { - color: rgb(201, 51, 71); + color: rgb(201, 51, 72); } } diff --git a/console/src/app/pages/orgs/org-detail/domain-verification/domain-verification.component.ts b/console/src/app/pages/orgs/org-detail/domain-verification/domain-verification.component.ts index 75c40a38a6..1b75be70e2 100644 --- a/console/src/app/pages/orgs/org-detail/domain-verification/domain-verification.component.ts +++ b/console/src/app/pages/orgs/org-detail/domain-verification/domain-verification.component.ts @@ -28,22 +28,25 @@ export class DomainVerificationComponent { private mgmtService: ManagementService, ) { this.domain = data.domain; - console.log(data); if (this.domain.validationType === OrgDomainValidationType.ORGDOMAINVALIDATIONTYPE_UNSPECIFIED) { this.showNew = true; } } async loadHttpToken(): Promise { - this.http = (await this.mgmtService.GenerateMyOrgDomainValidation( + this.mgmtService.GenerateMyOrgDomainValidation( this.domain.domain, - OrgDomainValidationType.ORGDOMAINVALIDATIONTYPE_HTTP)).toObject(); + OrgDomainValidationType.ORGDOMAINVALIDATIONTYPE_HTTP).then((http) => { + this.http = http.toObject(); + }); } async loadDnsToken(): Promise { - this.dns = (await this.mgmtService.GenerateMyOrgDomainValidation( + this.mgmtService.GenerateMyOrgDomainValidation( this.domain.domain, - OrgDomainValidationType.ORGDOMAINVALIDATIONTYPE_DNS)).toObject(); + OrgDomainValidationType.ORGDOMAINVALIDATIONTYPE_DNS).then((dns) => { + this.dns = dns.toObject(); + }); } public closeDialog(): void { diff --git a/console/src/app/pages/orgs/org-detail/org-detail.component.ts b/console/src/app/pages/orgs/org-detail/org-detail.component.ts index 6ac618ac41..46d8df084d 100644 --- a/console/src/app/pages/orgs/org-detail/org-detail.component.ts +++ b/console/src/app/pages/orgs/org-detail/org-detail.component.ts @@ -134,6 +134,8 @@ export class OrgDetailComponent implements OnInit, OnDestroy { newDomainView.setVerified(newDomain.getVerified()); this.domains.push(newDomainView.toObject()); + + this.verifyDomain(newDomainView.toObject()); this.toast.showInfo('ORG.TOAST.DOMAINADDED', true); }); } @@ -204,6 +206,7 @@ export class OrgDetailComponent implements OnInit, OnDestroy { data: { domain: domain, }, + width: '500px', }); } diff --git a/console/src/assets/i18n/de.json b/console/src/assets/i18n/de.json index 30d64bf21a..f0e3faa537 100644 --- a/console/src/assets/i18n/de.json +++ b/console/src/assets/i18n/de.json @@ -381,8 +381,8 @@ "VERIFICATION_SKIP":"Du kannst die Überprüfung vorerst überspringen und Deine Organisation erstellen. Um Deine Organisation jedoch verwenden zu können, muss dieser Schritt abgeschlossen sein.", "VERIFICATION_VALIDATION_DESC":"Die Tokens werden regelmässig überprüft, um sicherzustellen, dass Du weiterhin im Besitz der Domain bist.", "VERIFICATION_NEWTOKEN_TITLE":"Neues Token anfordern", - "VERIFICATION_NEWTOKEN_DESC":"Wenn Du ein neues Token anfordern willst, klicke auf die gewünschte Methode. Wenn Du ein vorhandenes Token validieren möchtest, klicke auf \"Validieren\".", - "VERIFICATION_VALIDATION_ONGOING":"Ein Token zur Validierung wurde bereits angefragt. Klicke auf \"Validieren\", um dieses Token zu validieren.", + "VERIFICATION_NEWTOKEN_DESC":"Wenn Du ein neues Token anfordern willst, klicke auf die gewünschte Methode. Wenn Du ein vorhandenes Token validieren möchtest, klicke auf \"Verifizieren\".", + "VERIFICATION_VALIDATION_ONGOING":"Ein Token zur Validierung wurde bereits angefragt. Klicke auf \"Verifizieren\", um dieses Token zu validieren.", "VERIFICATION_VALIDATION_ONGOING_TYPE":"Typ des Tokens:", "REQUESTNEWTOKEN":"Neues Token anfordern", "TYPES": {