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">
<form #signInForm="ngForm" class="login">
<label class="title">
VMware Harbor<span class="trademark">&#8482;</span>
<label class="title">{{appTitle | translate}}<span class="trademark">&#8482;</span>
</label>
<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)">

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
public get isError(): boolean {
return this.signInStatus === signInStatusError;

View File

@ -11,7 +11,7 @@
</div>
<global-search></global-search>
<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;">
<clr-icon shape="world" style="left:-8px;"></clr-icon>
<span style="padding-right: 8px;">{{currentLang}}</span>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@
<h2 class="custom-h2">{{'SIDE_NAV.SYSTEM_MGMT.USER' | translate}}</h2>
<div class="action-panel-pos">
<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>
<grid-filter class="filter-pos" filterPlaceholder='{{"USER.FILTER_PLACEHOLDER" | translate}}' (filter)="doFilter($event)"></grid-filter>
<span class="refresh-btn" (click)="refreshUser()">

View File

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

View File

@ -1,5 +1,6 @@
{
"APP_TITLE": {
"VMW_HARBOR": "VMware Harbor",
"HARBOR": "Harbor",
"VIC": "vSphere Integrated Containers",
"MGMT": "Management",
@ -110,7 +111,7 @@
"COLUMN_REG_NAME": "Registration time",
"IS_ADMIN": "Yes",
"IS_NOT_ADMIN": "No",
"ADD_USER_TITLE": "Add User",
"ADD_USER_TITLE": "New User",
"SAVE_SUCCESS": "New user added successfully",
"DELETION_TITLE": "Confirm user deletion",
"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_LDAP_FAILED": "Failed to verify LDAP server with error: {{param}}",
"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": {
"MAIN_TITLE": "Page not found",

View File

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