fix issues

This commit is contained in:
Steven Zou 2017-03-30 12:33:42 +08:00 committed by kunw
parent 052bc429a7
commit 791aaa0724
12 changed files with 34 additions and 12 deletions

View File

@ -1,7 +1,6 @@
<div class="login-wrapper login-wrapper-override"> <div class="login-wrapper login-wrapper-override">
<form #signInForm="ngForm" class="login"> <form #signInForm="ngForm" class="login">
<label class="title"> <label class="title">{{appTitle | translate}}<span class="trademark">&#8482;</span>
VMware Harbor<span class="trademark">&#8482;</span>
</label> </label>
<div class="login-group"> <div class="login-group">
<label for="username" aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-top-left" [class.invalid]="userNameInput.invalid && (userNameInput.dirty || userNameInput.touched)"> <label for="username" aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-top-left" [class.invalid]="userNameInput.invalid && (userNameInput.dirty || userNameInput.touched)">

View File

@ -80,6 +80,15 @@ export class SignInComponent implements AfterViewChecked, OnInit {
} }
} }
//App title
public get appTitle(): string {
if(this.appConfig && this.appConfig.with_admiral){
return "APP_TITLE.VIC";
}
return "APP_TITLE.VMW_HARBOR";
}
//For template accessing //For template accessing
public get isError(): boolean { public get isError(): boolean {
return this.signInStatus === signInStatusError; return this.signInStatus === signInStatusError;

View File

@ -11,7 +11,7 @@
</div> </div>
<global-search></global-search> <global-search></global-search>
<div class="header-actions"> <div class="header-actions">
<clr-dropdown class="dropdown bottom-left"> <clr-dropdown class="dropdown bottom-left" *ngIf="!isIntegrationMode">
<button class="nav-icon" clrDropdownToggle style="width: 98px;"> <button class="nav-icon" clrDropdownToggle style="width: 98px;">
<clr-icon shape="world" style="left:-8px;"></clr-icon> <clr-icon shape="world" style="left:-8px;"></clr-icon>
<span style="padding-right: 8px;">{{currentLang}}</span> <span style="padding-right: 8px;">{{currentLang}}</span>

View File

@ -15,5 +15,5 @@
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
width: 80%; width: 80%;
white-space: pre; white-space: pre-wrap;
} }

View File

@ -7,7 +7,7 @@
<div class="confirmation-content">{{dialogContent}}</div> <div class="confirmation-content">{{dialogContent}}</div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-outline" (click)="cancel()">{{'BUTTON.NEGATIVE' | translate}}</button> <button type="button" class="btn btn-outline" (click)="cancel()">{{'BUTTON.NO' | translate}}</button>
<button type="button" class="btn btn-primary" (click)="confirm()">{{'BUTTON.CONFIRM' | translate}}</button> <button type="button" class="btn btn-primary" (click)="confirm()">{{'BUTTON.YES' | translate}}</button>
</div> </div>
</clr-modal> </clr-modal>

View File

@ -1,4 +1,9 @@
.alert-text-blink { .alert-text-blink {
color: red; color: red;
font-weight: bolder; font-weight: bolder;
}
.alert-btn-link {
padding: 0px !important;
min-width: 30px !important;
} }

View File

@ -4,8 +4,8 @@
{{errorMessage}} {{errorMessage}}
</span> </span>
<div class="alert-actions" *ngIf="showCancelAction"> <div class="alert-actions" *ngIf="showCancelAction">
<button class="btn alert-action" (click)="close()">{{'BUTTON.NO' | translate}}</button> <button class="btn btn-sm btn-link alert-btn-link" (click)="close()">{{'BUTTON.NO' | translate}}</button>
<button class="btn alert-action" (click)="confirmCancel()">{{'BUTTON.YES' | translate}}</button> <button class="btn btn-sm btn-link alert-btn-link" (click)="confirmCancel()">{{'BUTTON.YES' | translate}}</button>
</div> </div>
</div> </div>
</clr-alert> </clr-alert>

View File

@ -30,4 +30,8 @@
right: 2px; right: 2px;
top: 12px; top: 12px;
cursor: pointer; cursor: pointer;
}
.hide-create {
visibility: hidden !important;
} }

View File

@ -3,7 +3,7 @@
<h2 class="custom-h2">{{'SIDE_NAV.SYSTEM_MGMT.USER' | translate}}</h2> <h2 class="custom-h2">{{'SIDE_NAV.SYSTEM_MGMT.USER' | translate}}</h2>
<div class="action-panel-pos"> <div class="action-panel-pos">
<span> <span>
<button *ngIf="canCreateUser" type="submit" class="btn btn-link custom-add-button" (click)="addNewUser()"><clr-icon shape="add"></clr-icon> {{'USER.ADD_ACTION' | translate}}</button> <button [class.hide-create]="!canCreateUser" type="submit" class="btn btn-link custom-add-button" (click)="addNewUser()"><clr-icon shape="add"></clr-icon> {{'USER.ADD_ACTION' | translate}}</button>
</span> </span>
<grid-filter class="filter-pos" filterPlaceholder='{{"USER.FILTER_PLACEHOLDER" | translate}}' (filter)="doFilter($event)"></grid-filter> <grid-filter class="filter-pos" filterPlaceholder='{{"USER.FILTER_PLACEHOLDER" | translate}}' (filter)="doFilter($event)"></grid-filter>
<span class="refresh-btn" (click)="refreshUser()"> <span class="refresh-btn" (click)="refreshUser()">

View File

@ -206,6 +206,9 @@ export class UserComponent implements OnInit, OnDestroy {
//Add new user //Add new user
addNewUser(): void { addNewUser(): void {
if (!this.canCreateUser) {
return;// No response to this hacking action
}
this.newUserDialog.open(); this.newUserDialog.open();
} }

View File

@ -1,5 +1,6 @@
{ {
"APP_TITLE": { "APP_TITLE": {
"VMW_HARBOR": "VMware Harbor",
"HARBOR": "Harbor", "HARBOR": "Harbor",
"VIC": "vSphere Integrated Containers", "VIC": "vSphere Integrated Containers",
"MGMT": "Management", "MGMT": "Management",
@ -110,7 +111,7 @@
"COLUMN_REG_NAME": "Registration time", "COLUMN_REG_NAME": "Registration time",
"IS_ADMIN": "Yes", "IS_ADMIN": "Yes",
"IS_NOT_ADMIN": "No", "IS_NOT_ADMIN": "No",
"ADD_USER_TITLE": "Add User", "ADD_USER_TITLE": "New User",
"SAVE_SUCCESS": "New user added successfully", "SAVE_SUCCESS": "New user added successfully",
"DELETION_TITLE": "Confirm user deletion", "DELETION_TITLE": "Confirm user deletion",
"DELETION_SUMMARY": "Do you want to delete user {{param}}?", "DELETION_SUMMARY": "Do you want to delete user {{param}}?",
@ -391,7 +392,7 @@
"TEST_MAIL_FAILED": "Failed to verify mail server with error: {{param}}", "TEST_MAIL_FAILED": "Failed to verify mail server with error: {{param}}",
"TEST_LDAP_FAILED": "Failed to verify LDAP server with error: {{param}}", "TEST_LDAP_FAILED": "Failed to verify LDAP server with error: {{param}}",
"LEAVING_CONFIRMATION_TITLE": "Confirm to leave", "LEAVING_CONFIRMATION_TITLE": "Confirm to leave",
"LEAVING_CONFIRMATION_SUMMARY": "Changes have not been saved yet, do you really want to leave currnet page?" "LEAVING_CONFIRMATION_SUMMARY": "Changes have not been saved yet,do you really want to leave currnet page?"
}, },
"PAGE_NOT_FOUND": { "PAGE_NOT_FOUND": {
"MAIN_TITLE": "Page not found", "MAIN_TITLE": "Page not found",

View File

@ -1,5 +1,6 @@
{ {
"APP_TITLE": { "APP_TITLE": {
"VMW_HARBOR": "VMware Harbor",
"HARBOR": "Harbor", "HARBOR": "Harbor",
"VIC": "vSphere Integrated Containers", "VIC": "vSphere Integrated Containers",
"MGMT": "Management", "MGMT": "Management",
@ -110,7 +111,7 @@
"COLUMN_REG_NAME": "注册时间", "COLUMN_REG_NAME": "注册时间",
"IS_ADMIN": "是", "IS_ADMIN": "是",
"IS_NOT_ADMIN": "否", "IS_NOT_ADMIN": "否",
"ADD_USER_TITLE": "添加用户", "ADD_USER_TITLE": "创建用户",
"SAVE_SUCCESS": "添加用户成功", "SAVE_SUCCESS": "添加用户成功",
"DELETION_TITLE": "删除用户确认", "DELETION_TITLE": "删除用户确认",
"DELETION_SUMMARY": "你确认删除用户 {{param}}?", "DELETION_SUMMARY": "你确认删除用户 {{param}}?",