From caa98896aec45dd987791e09a4c3224335a1dcf7 Mon Sep 17 00:00:00 2001 From: Mia ZHOU Date: Tue, 31 Jul 2018 13:32:55 +0800 Subject: [PATCH] New group button should disabled when login without ldap Disable "New group" button when user does not login with ldap --- src/ui/views/index.html | 20 +++++++++---------- src/ui_ng/src/app/app-config.service.ts | 4 ++++ .../app/project/member/member.component.html | 2 +- .../app/project/member/member.component.ts | 6 ++++++ src/ui_ng/src/index.html | 2 +- src/ui_ng/src/styles.css | 17 ++++++++++------ 6 files changed, 32 insertions(+), 19 deletions(-) diff --git a/src/ui/views/index.html b/src/ui/views/index.html index 110a9f026..9564aba87 100644 --- a/src/ui/views/index.html +++ b/src/ui/views/index.html @@ -9,22 +9,20 @@ - +
Loading...
+ + + - - - - - - - - - + + + + - + \ No newline at end of file diff --git a/src/ui_ng/src/app/app-config.service.ts b/src/ui_ng/src/app/app-config.service.ts index 184b89a02..8b60e3e99 100644 --- a/src/ui_ng/src/app/app-config.service.ts +++ b/src/ui_ng/src/app/app-config.service.ts @@ -64,6 +64,10 @@ export class AppConfigService { this.configurations.admiral_endpoint.trim() !== ""; } + public isLdapMode(): boolean { + return this.configurations && this.configurations.auth_mode === 'ldap_auth'; + } + // Return the reconstructed admiral url public getAdmiralEndpoint(currentHref: string): string { let admiralUrl: string = this.configurations.admiral_endpoint; diff --git a/src/ui_ng/src/app/project/member/member.component.html b/src/ui_ng/src/app/project/member/member.component.html index 62f514b09..8f82754ca 100644 --- a/src/ui_ng/src/app/project/member/member.component.html +++ b/src/ui_ng/src/app/project/member/member.component.html @@ -16,7 +16,7 @@ - diff --git a/src/ui_ng/src/app/project/member/member.component.ts b/src/ui_ng/src/app/project/member/member.component.ts index ec1e654a4..94569401b 100644 --- a/src/ui_ng/src/app/project/member/member.component.ts +++ b/src/ui_ng/src/app/project/member/member.component.ts @@ -34,6 +34,7 @@ import { SessionUser } from "../../shared/session-user"; import { AddGroupComponent } from './add-group/add-group.component'; import { MemberService } from "./member.service"; import { AddMemberComponent } from "./add-member/add-member.component"; +import {AppConfigService} from "../../app-config.service"; @Component({ templateUrl: "member.component.html", @@ -57,6 +58,7 @@ export class MemberComponent implements OnInit, OnDestroy { isDelete = false; isChangeRole = false; loading = false; + isLdapMode: boolean = false; isChangingRole = false; batchChangeRoleInfos = {}; @@ -76,6 +78,7 @@ export class MemberComponent implements OnInit, OnDestroy { private OperateDialogService: ConfirmationDialogService, private session: SessionService, private operationService: OperationService, + private appConfigService: AppConfigService, private ref: ChangeDetectorRef) { this.delSub = OperateDialogService.confirmationConfirm$.subscribe(message => { @@ -107,6 +110,9 @@ export class MemberComponent implements OnInit, OnDestroy { this.hasProjectAdminRole = (resolverData["projectResolver"]).has_project_admin_role; } this.retrieve(this.projectId, ""); + if (this.appConfigService.isLdapMode()) { + this.isLdapMode = true; + } } doSearch(searchMember: string) { diff --git a/src/ui_ng/src/index.html b/src/ui_ng/src/index.html index 2a3bf2fe3..06985531d 100644 --- a/src/ui_ng/src/index.html +++ b/src/ui_ng/src/index.html @@ -9,7 +9,7 @@ - +
Loading... diff --git a/src/ui_ng/src/styles.css b/src/ui_ng/src/styles.css index 8f82ec77b..35ebf3b01 100644 --- a/src/ui_ng/src/styles.css +++ b/src/ui_ng/src/styles.css @@ -1,9 +1,13 @@ +body { + overflow-y: hidden; +} + .app-loading { position: absolute; - top: 50%; - left: 50%; - margin-top: -54px; - margin-left: -54px; + top: 0; + left: 0; + right:0; + bottom:0; width: 108px !important; height: 108px !important; } @@ -51,7 +55,8 @@ /* set overflow bar style */ ::-webkit-scrollbar { - width: 8px;background:transparent; + width: 8px; + background:transparent; } ::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 2px rgba(0,0,0,0.3); @@ -66,6 +71,6 @@ background: rgba(255,0,0,0.4); } .custom-h2 { - margin-top: 0px !important; + margin-top: 0 !important; line-height: 24px; } \ No newline at end of file