diff --git a/console/src/app/app.component.html b/console/src/app/app.component.html index 0b8514eec..f9d20ed49 100644 --- a/console/src/app/app.component.html +++ b/console/src/app/app.component.html @@ -19,7 +19,8 @@ - Show all organizations + {{'MENU.SHOWORGS' | translate}} diff --git a/console/src/app/pages/apps/app-detail/app-detail.component.ts b/console/src/app/pages/apps/app-detail/app-detail.component.ts index 6719bd935..c4468431c 100644 --- a/console/src/app/pages/apps/app-detail/app-detail.component.ts +++ b/console/src/app/pages/apps/app-detail/app-detail.component.ts @@ -144,13 +144,13 @@ export class AppDetailComponent implements OnInit, OnDestroy { public changeState(event: MatButtonToggleChange): void { if (event.value === AppState.APPSTATE_ACTIVE) { - this.projectService.ReactivateApplication(this.app.id).then(() => { + this.projectService.ReactivateApplication(this.projectId, this.app.id).then(() => { this.toast.showInfo('Reactivated Application'); }).catch((error: any) => { this.toast.showError(error.message); }); } else if (event.value === AppState.APPSTATE_INACTIVE) { - this.projectService.DectivateApplication(this.app.id).then(() => { + this.projectService.DeactivateApplication(this.projectId, this.app.id).then(() => { this.toast.showInfo('Deactivated Application'); }).catch((error: any) => { this.toast.showError(error.message); diff --git a/console/src/app/pages/project-grant-create/project-grant-create.component.html b/console/src/app/pages/project-grant-create/project-grant-create.component.html index ed294edf6..7b1d16392 100644 --- a/console/src/app/pages/project-grant-create/project-grant-create.component.html +++ b/console/src/app/pages/project-grant-create/project-grant-create.component.html @@ -10,10 +10,11 @@ {{'PROJECT.GRANT.CREATE.SEL_ORG' | translate}} + {{'PROJECT.GRANT.CREATE.SEL_ORG_DESC' | translate}} - {{'PROJECT.GRANT.CREATE.SEL_ORG' | translate}} + {{'PROJECT.GRANT.CREATE.SEL_ORG_FORMFIELD' | translate}} diff --git a/console/src/app/pages/project-role-create/project-role-create.component.ts b/console/src/app/pages/project-role-create/project-role-create.component.ts index cbafe9b10..2a2df9561 100644 --- a/console/src/app/pages/project-role-create/project-role-create.component.ts +++ b/console/src/app/pages/project-role-create/project-role-create.component.ts @@ -84,12 +84,15 @@ export class ProjectRoleCreateComponent implements OnInit, OnDestroy { } public addRole(): void { - const promises = this.formArray.value.map((role: ProjectRoleAdd.AsObject) => { - role.id = this.projectId; - return this.projectService.AddProjectRole(role); + const rolesToAdd: ProjectRoleAdd[] = this.formArray.value.map((element: any) => { + const role = new ProjectRoleAdd(); + role.setKey(element.key); + role.setDisplayName(element.displayName); + role.setGroup(element.group); + return role; }); - Promise.all(promises).then(() => { + this.projectService.BulkAddProjectRole(this.projectId, rolesToAdd).then(() => { this.router.navigate(['projects', this.projectId]); }).catch(data => { this.toast.showError(data.message); diff --git a/console/src/app/pages/user-grant-create/user-grant-create.component.html b/console/src/app/pages/user-grant-create/user-grant-create.component.html index a01f5525b..4be2af7fe 100644 --- a/console/src/app/pages/user-grant-create/user-grant-create.component.html +++ b/console/src/app/pages/user-grant-create/user-grant-create.component.html @@ -25,7 +25,7 @@ - {{'PROJECT.GRANT.CREATE.SEL_PROJECT' | translate}} + {{'PROJECT.GRANT.CREATE.SEL_USER' | translate}} diff --git a/console/src/app/services/project.service.ts b/console/src/app/services/project.service.ts index ff2cb5a31..ec14ae56b 100644 --- a/console/src/app/services/project.service.ts +++ b/console/src/app/services/project.service.ts @@ -297,9 +297,11 @@ export class ProjectService { ); } - public async ReactivateApplication(appId: string): Promise { + public async ReactivateApplication(projectId: string, appId: string): Promise { const req = new ApplicationID(); req.setId(appId); + req.setProjectId(projectId); + return await this.request( c => c.reactivateApplication, req, @@ -307,9 +309,11 @@ export class ProjectService { ); } - public async DectivateApplication(projectId: string): Promise { + public async DeactivateApplication(projectId: string, appId: string): Promise { const req = new ApplicationID(); - req.setId(projectId); + req.setId(appId); + req.setProjectId(projectId); + return await this.request( c => c.deactivateApplication, req, diff --git a/console/src/app/services/update.service.ts b/console/src/app/services/update.service.ts index 47aefd54a..f3006d8fb 100644 --- a/console/src/app/services/update.service.ts +++ b/console/src/app/services/update.service.ts @@ -2,12 +2,13 @@ import { Injectable } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; import { SwUpdate } from '@angular/service-worker'; - @Injectable({ providedIn: 'root', }) export class UpdateService { constructor(private swUpdate: SwUpdate, snackbar: MatSnackBar) { + this.swUpdate.checkForUpdate(); + this.swUpdate.available.subscribe((evt) => { const snack = snackbar.open('Update Available', 'Reload'); diff --git a/console/src/assets/i18n/de.json b/console/src/assets/i18n/de.json index d7a2ba9ce..ed9bdf0c7 100644 --- a/console/src/assets/i18n/de.json +++ b/console/src/assets/i18n/de.json @@ -27,7 +27,8 @@ "USER": "Benutzer", "LOGOUT": "abmelden", "NEWORG":"Neue Organisation", - "IAMADMIN":"Sie sind ein IAM Administrator. Sie haben erweiterte Berechtigungen!" + "IAMADMIN":"Sie sind ein IAM Administrator. Sie haben erweiterte Berechtigungen!", + "SHOWORGS":"Alle organisationen anzeigen" }, "ACTIONS": { "SAVE": "speichern", @@ -355,17 +356,20 @@ "USERID":"User Id" }, "GRANT": { - "TITLE": "Grants", + "TITLE": "Berechtigte Organisationen", "DESCRIPTION": "Gewähren Sie einer anderen Organisation Zugriff (Grant) auf dieses Projekt", "CREATE": { - "TITLE": "Member Grant erstellen", + "TITLE": "Organisation berechtigen", "SEL_USERS": "Selektieren Sie die gewünschten User für das Erstellen des Grants!", "SEL_ROLES": "Selektieren Sie die gewünschten Rollen für das Erstellen des Grants!", "SEL_PROJECT": "Suchen Sie nach dem Projekt", + "SEL_USER":"Suchen Sie nach einem User", "SEL_ORG": "Suchen Sie nach der Domain", + "SEL_ORG_DESC":"Geben Sie die vollständige Domain ein um Resultate zu erhalten!", "ORG_TITLE":"Organisation", "ORG_DESCRIPTION":"Sie sind im Begriff einen Nutzer für die Organisation {{name}} zu berechtigen", "ORG_DESCRIPTION_DESC":"Wechseln Sie den Context um die Organisation zu wechseln!", + "SEL_ORG_FORMFIELD":"Vollständige Domain", "SEL_ORG_BUTTON": "Suche Organisation", "FOR_ORG":"The grant wird erstellt für:" }, @@ -377,7 +381,7 @@ "USER":"Benutzer", "MEMBERS":"Managers", "PROJECTNAME":"Projekt Name", - "GRANTEDORG": "Granted Organization", + "GRANTEDORG": "Granted Organisation", "GRANTEDORGDOMAIN": "Domain", "GRANTEDORGNAME":"Org Name", "CREATIONDATE": "Erstelldatum", diff --git a/console/src/assets/i18n/en.json b/console/src/assets/i18n/en.json index 518f99987..e6e63bada 100644 --- a/console/src/assets/i18n/en.json +++ b/console/src/assets/i18n/en.json @@ -27,7 +27,8 @@ "USER": "Users", "LOGOUT": "Log out", "NEWORG":"New Organization", - "IAMADMIN":"You are an IAM Administrator. Note that you have enhanced permissions!" + "IAMADMIN":"You are an IAM Administrator. Note that you have enhanced permissions!", + "SHOWORGS":"Show all organizations" }, "ACTIONS": { "SAVE": "Save", @@ -284,7 +285,7 @@ } }, "ORG_DETAIL": { - "TITLE": "Organisation", + "TITLE": "Organization", "DESCRIPTION": "Here you can edit your organization configuration and manage members", "DETAIL": { "TITLE": "Detail", @@ -356,18 +357,21 @@ "USERID":"User Id" }, "GRANT": { - "TITLE": "Grants", + "TITLE": "Granted organizations", "DESCRIPTION": "Allow an other organization to use your project", "CREATE": { - "TITLE": "Create Member Grant", + "TITLE": "Create organization grant", "SEL_USERS": "Select the users you wish to grant", "SEL_PROJECT": "Search for a project", "SEL_ROLES": "Select the roles you want to be added to the grant", - "SEL_ORG": "Search for the domain", + "SEL_USER":"Search for a user", + "SEL_ORG": "Set the domain", + "SEL_ORG_DESC":"Enter the complete domain to specify the organization to grant!", "ORG_TITLE":"Organization", "ORG_DESCRIPTION":"You are about to grant a user for the organization {{name}}", "ORG_DESCRIPTION_DESC":"Switch the context in the header above to grant a user for another organization", - "SEL_ORG_BUTTON": "Search Organization", + "SEL_ORG_FORMFIELD":"Complete Domain", + "SEL_ORG_BUTTON": "Set Organization", "FOR_ORG":"The grant is created for:" }, "DETAIL": { @@ -563,7 +567,7 @@ "org.domain.primary.set":"set primary domain", "org.domain.removed":"domain removed", "org.iam.policy.added":"IAM policy added", - "project.added": "added", + "project.added": "project added", "project.changed":"changed", "project.deactivated":"deactivated", "project.member.added":"added member",
{{'PROJECT.GRANT.CREATE.SEL_ORG_DESC' | translate}}