Merge pull request #1808 from vmware/fix/merge_latest_ui_code_to_dev

merge latest ui code to dev
This commit is contained in:
Steven Zou 2017-03-27 13:47:16 +08:00 committed by GitHub
commit 5c4e17638f
11 changed files with 179 additions and 118 deletions

View File

@ -0,0 +1,65 @@
{
"project": {
"version": "1.0.0-beta.20-4",
"name": "clarity-seed"
},
"apps": [{
"root": "src",
"outDir": "dist",
"assets": [
"images",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"test": "test.ts",
"tsconfig": "tsconfig.json",
"prefix": "app",
"mobile": false,
"styles": [
"../node_modules/clarity-icons/clarity-icons.min.css",
"../node_modules/clarity-ui/clarity-ui.min.css",
"styles.css"
],
"scripts": [
"../node_modules/core-js/client/shim.min.js",
"../node_modules/mutationobserver-shim/dist/mutationobserver.min.js",
"../node_modules/@webcomponents/custom-elements/custom-elements.min.js",
"../node_modules/clarity-icons/clarity-icons.min.js",
"../node_modules/web-animations-js/web-animations.min.js"
],
"environments": {
"source": "environments/environment.ts",
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}],
"addons": [],
"packages": [],
"e2e": {
"protractor": {
"config": "./protractor.config.js"
}
},
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "scss",
"prefixInterfaces": false,
"inline": {
"style": false,
"template": false
},
"spec": {
"class": false,
"component": true,
"directive": true,
"module": false,
"pipe": true,
"service": true
}
}
}

View File

@ -1,63 +1,62 @@
{ {
"name": "clarity-seed", "name": "harbor",
"version": "0.8.0", "version": "0.6.0",
"description": "Angular-CLI starter for a Clarity project", "description": "Harbor UI with Clarity",
"angular-cli": {}, "angular-cli": {},
"scripts": { "scripts": {
"start": "ng serve --host 0.0.0.0 --proxy-config proxy.config.json", "start": "ng serve --ssl 1 --ssl-key --ssl-cert --host 0.0.0.0 --proxy-config proxy.config.json",
"lint": "tslint \"src/**/*.ts\"", "lint": "tslint \"src/**/*.ts\"",
"test": "ng test --single-run", "test": "ng test --single-run",
"pree2e": "webdriver-manager update", "pree2e": "webdriver-manager update",
"e2e": "protractor" "e2e": "protractor"
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/common": "^2.4.1", "@angular/common": "^2.4.1",
"@angular/compiler": "^2.4.1", "@angular/compiler": "^2.4.1",
"@angular/core": "^2.4.9", "@angular/core": "^2.4.1",
"@angular/forms": "^2.4.1", "@angular/forms": "^2.4.1",
"@angular/http": "^2.4.1", "@angular/http": "^2.4.1",
"@angular/platform-browser": "^2.4.1", "@angular/platform-browser": "^2.4.1",
"@angular/platform-browser-dynamic": "^2.4.1", "@angular/platform-browser-dynamic": "^2.4.1",
"@angular/router": "^3.4.1", "@angular/router": "^3.4.1",
"@ngx-translate/core": "^6.0.0", "@ngx-translate/core": "^6.0.0",
"@ngx-translate/http-loader": "0.0.3", "@ngx-translate/http-loader": "0.0.3",
"@webcomponents/custom-elements": "1.0.0-alpha.3", "@webcomponents/custom-elements": "1.0.0-alpha.3",
"angular2-cookie": "^1.2.6", "angular2-cookie": "^1.2.6",
"clarity-angular": "0.8.7", "clarity-angular": "0.8.7",
"clarity-icons": "0.8.7", "clarity-icons": "0.8.7",
"clarity-ui": "0.8.7", "clarity-ui": "0.8.7",
"core-js": "^2.4.1", "core-js": "^2.4.1",
"fs": "0.0.1-security", "fs": "0.0.1-security",
"mutationobserver-shim": "^0.3.2", "mutationobserver-shim": "^0.3.2",
"rxjs": "^5.0.1", "rxjs": "^5.0.1",
"ts-helpers": "^1.1.1", "ts-helpers": "^1.1.1",
"web-animations-js": "^2.2.1", "web-animations-js": "^2.2.1",
"zone.js": "^0.7.2" "zone.js": "^0.7.2"
}, },
"devDependencies": { "devDependencies": {
"@angular/cli": "^1.0.0-rc.1", "@angular/compiler-cli": "^2.4.1",
"@angular/compiler-cli": "^2.4.1", "@types/core-js": "^0.9.34",
"@types/core-js": "^0.9.34", "@types/jasmine": "^2.2.30",
"@types/jasmine": "^2.2.30", "@types/node": "^6.0.42",
"@types/node": "^6.0.42", "angular-cli": "^1.0.0-beta.24",
"@angular/cli": "^1.0.0-rc.2", "bootstrap": "4.0.0-alpha.5",
"bootstrap": "4.0.0-alpha.5", "codelyzer": "~1.0.0-beta.3",
"codelyzer": "~1.0.0-beta.3", "enhanced-resolve": "^3.0.0",
"enhanced-resolve": "^3.0.0", "jasmine-core": "2.4.1",
"jasmine-core": "2.4.1", "jasmine-spec-reporter": "2.5.0",
"jasmine-spec-reporter": "2.5.0", "karma": "1.2.0",
"karma": "1.2.0", "karma-cli": "^1.0.1",
"karma-cli": "^1.0.1", "karma-jasmine": "^1.0.2",
"karma-jasmine": "^1.0.2", "karma-mocha-reporter": "^2.2.1",
"karma-mocha-reporter": "^2.2.1", "karma-phantomjs-launcher": "^1.0.0",
"karma-phantomjs-launcher": "^1.0.0", "karma-remap-istanbul": "^0.2.1",
"karma-remap-istanbul": "^0.2.1", "protractor": "4.0.9",
"protractor": "4.0.9", "ts-node": "1.2.1",
"ts-node": "1.2.1", "tslint": "^4.1.1",
"tslint": "^4.1.1", "typescript": "~2.2.1",
"typescript": "~2.0.3", "typings": "^1.4.0",
"typings": "^1.4.0", "webdriver-manager": "10.2.5"
"webdriver-manager": "10.2.5" }
} }
}

View File

@ -2,12 +2,12 @@
<div class="branding"> <div class="branding">
<a href="javascript:void(0)" class="nav-link" (click)="homeAction()"> <a href="javascript:void(0)" class="nav-link" (click)="homeAction()">
<clr-icon shape="vm-bug"></clr-icon> <clr-icon shape="vm-bug"></clr-icon>
<span class="title">Harbor</span> <span class="title">{{ appTitle | translate}}</span>
</a> </a>
</div> </div>
<div class="header-nav"> <div class="header-nav">
<a href="{{admiralLink}}" class="nav-link" *ngIf="isIntegrationMode"><span class="nav-text">Management</span></a> <a href="{{admiralLink}}" class="nav-link" *ngIf="isIntegrationMode"><span class="nav-text">{{'APP_TITLE.MGMT' | translate}}</span></a>
<a href="javascript:void(0)" (click)="registryAction()" routerLink="/harbor" class="active nav-link" *ngIf="isIntegrationMode"><span class="nav-text">Registry</span></a> <a href="javascript:void(0)" (click)="registryAction()" routerLink="/harbor" class="active nav-link" *ngIf="isIntegrationMode"><span class="nav-text">{{'APP_TITLE.REG' | translate}}</span></a>
</div> </div>
<global-search></global-search> <global-search></global-search>
<div class="header-actions"> <div class="header-actions">

View File

@ -27,6 +27,7 @@ export class NavigatorComponent implements OnInit {
@Output() showPwdChangeModal = new EventEmitter<ModalEvent>(); @Output() showPwdChangeModal = new EventEmitter<ModalEvent>();
private selectedLang: string = enLang; private selectedLang: string = enLang;
private appTitle: string = 'APP_TITLE.HARBOR';
constructor( constructor(
private session: SessionService, private session: SessionService,
@ -44,6 +45,9 @@ export class NavigatorComponent implements OnInit {
//Keep in cookie for next use //Keep in cookie for next use
this.cookie.put("harbor-lang", langChange.lang); this.cookie.put("harbor-lang", langChange.lang);
}); });
if (this.appConfigService.isIntegrationMode()) {
this.appTitle = 'APP_TITLE.VIC';
}
} }
public get isSessionValid(): boolean { public get isSessionValid(): boolean {

View File

@ -25,7 +25,7 @@
} }
.log-select { .log-select {
width: 180px; width: 130px;
display: inline-block; display: inline-block;
top: 1px; top: 1px;
} }

View File

@ -1,7 +1,5 @@
<div> <div>
<h2 class="h2-log-override">{{'SIDE_NAV.LOGS' | translate}} <h2 class="h2-log-override">{{'SIDE_NAV.LOGS' | translate}}</h2>
<span class="badge badge-info">{{logNumber}}</span>
</h2>
<div class="row flex-items-xs-between flex-items-xs-bottom"> <div class="row flex-items-xs-between flex-items-xs-bottom">
<div></div> <div></div>
<div class="action-head-pos"> <div class="action-head-pos">

View File

@ -2,36 +2,13 @@
margin-left: 24px !important; margin-left: 24px !important;
} }
.about-text-link {
font-family: "Proxima Nova Light";
font-size: 14px;
color: #007CBB;
line-height: 24px;
}
.about-copyright-text {
font-family: "Proxima Nova Light";
font-size: 13px;
color: #565656;
line-height: 16px;
}
.about-product-title {
font-family: "Metropolis Light";
font-size: 28px;
color: #000000;
line-height: 36px;
}
.about-version { .about-version {
font-family: "Metropolis";
font-size: 14px; font-size: 14px;
color: #565656; color: #565656;
font-weight: 500; font-weight: 500;
} }
.about-build { .about-build {
font-family: "Metropolis";
font-size: 14px; font-size: 14px;
color: #565656; color: #565656;
} }

View File

@ -1,20 +1,22 @@
<clr-modal [(clrModalOpen)]="opened" [clrModalClosable]="true" [clrModalStaticBackdrop]="false"> <clr-modal [(clrModalOpen)]="opened" [clrModalClosable]="true" [clrModalStaticBackdrop]="false">
<h3 class="modal-title margin-left-override">vmware</h3> <h3 class="modal-title margin-left-override">vmware</h3>
<div class="modal-body margin-left-override"> <div class="modal-body margin-left-override">
<div class="about-product-title">Harbor</div>
<div style="height: 12px;"></div>
<div> <div>
<span class="about-version">{{'ABOUT.VERSION' | translate}} {{version}}</span> <h2>Harbor</h2>
<span>|</span>
<span class="about-build">{{'ABOUT.BUILD' | translate}} {{build}}</span>
</div> </div>
<div style="height: 12px;"></div> <div style="height: 12px;"></div>
<div> <div>
<p class="about-copyright-text">{{'ABOUT.COPYRIGHT' | translate}} <a href="http://www.vmware.com/go/patents" target="_blank" class="about-text-link">http://www.vmware.com/go/patents</a></p> <span class="p5 about-version">{{'ABOUT.VERSION' | translate}} {{version}}</span>
<p class="about-copyright-text">{{'ABOUT.TRADEMARK' | translate}}</p> <span>|</span>
<p> <span class="p5 about-build">{{'ABOUT.BUILD' | translate}} {{build}}</span>
<a href="#" target="_blank" class="about-text-link">{{'ABOUT.END_USER_LICENSE' | translate}}</a><br> </div>
<a href="#" target="_blank" class="about-text-link">{{'ABOUT.OPEN_SOURCE_LICENSE' | translate}}</a> <div style="height: 12px;"></div>
<div>
<p class="p5">{{'ABOUT.COPYRIGHT' | translate}} <a href="http://www.vmware.com/go/patents" target="_blank" class="about-text-link">http://www.vmware.com/go/patents</a></p>
<p class="p5">{{'ABOUT.TRADEMARK' | translate}}</p>
<p class="p5">
<a href="#" target="_blank">{{'ABOUT.END_USER_LICENSE' | translate}}</a><br>
<a href="#" target="_blank">{{'ABOUT.OPEN_SOURCE_LICENSE' | translate}}</a>
</p> </p>
<div style="height: 24px;"></div> <div style="height: 24px;"></div>
</div> </div>

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.CANCEL' | translate}}</button> <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-primary" (click)="confirm()">{{'BUTTON.CONFIRM' | translate}}</button>
</div> </div>
</clr-modal> </clr-modal>

View File

@ -1,4 +1,10 @@
{ {
"APP_TITLE": {
"HARBOR": "Harbor",
"VIC": "vSphere Integrated Containers",
"MGMT": "Management",
"REG": "Registry"
},
"SIGN_IN": { "SIGN_IN": {
"REMEMBER": "Remember me", "REMEMBER": "Remember me",
"INVALID_MSG": "Invalid user name or password", "INVALID_MSG": "Invalid user name or password",
@ -22,7 +28,9 @@
"CLOSE": "CLOSE", "CLOSE": "CLOSE",
"TEST_LDAP": "TEST LDAP SERVER", "TEST_LDAP": "TEST LDAP SERVER",
"MORE_INFO": "More info...", "MORE_INFO": "More info...",
"YES": "YES" "YES": "YES",
"NO": "NO",
"NEGATIVE": "NEGATIVE"
}, },
"TOOLTIP": { "TOOLTIP": {
"EMAIL": "Email should be a valid email address like name@example.com", "EMAIL": "Email should be a valid email address like name@example.com",
@ -317,7 +325,7 @@
"RESET_OK": "Password has been successfully reset. Click OK to login with new password" "RESET_OK": "Password has been successfully reset. Click OK to login with new password"
}, },
"RECENT_LOG": { "RECENT_LOG": {
"SUB_TITLE": "Show recent", "SUB_TITLE": "Show",
"SUB_TITLE_SUFIX": "logs" "SUB_TITLE_SUFIX": "logs"
}, },
"CONFIG": { "CONFIG": {
@ -327,7 +335,7 @@
"EMAIL": "Email", "EMAIL": "Email",
"SYSTEM": "System Settings", "SYSTEM": "System Settings",
"CONFIRM_TITLE": "Confirm to cancel", "CONFIRM_TITLE": "Confirm to cancel",
"CONFIRM_SUMMARY": "Some changes are not saved yet, do you really want to discard?", "CONFIRM_SUMMARY": "Some changes have not been saved. Do you want to discard them?",
"SAVE_SUCCESS": "Configurations have been successfully saved", "SAVE_SUCCESS": "Configurations have been successfully saved",
"MAIL_SERVER": "Email Server", "MAIL_SERVER": "Email Server",
"MAIL_SERVER_PORT": "Email Server Port", "MAIL_SERVER_PORT": "Email Server Port",
@ -336,11 +344,11 @@
"MAIL_FROM": "Email From", "MAIL_FROM": "Email From",
"MAIL_SSL": "Email SSL", "MAIL_SSL": "Email SSL",
"SSL_TOOLTIP": "Enable SSL for email server connection", "SSL_TOOLTIP": "Enable SSL for email server connection",
"VERIFY_REMOTE_CERT": "Verify Remote Certificate", "VERIFY_REMOTE_CERT": "Verify Remote Cert",
"TOKEN_EXPIRATION": "Token Expiration (Minutes)", "TOKEN_EXPIRATION": "Token Expiration (Minutes)",
"AUTH_MODE": "Authentication", "AUTH_MODE": "Auth Mode",
"PRO_CREATION_RESTRICTION": "Project Creation Restriction", "PRO_CREATION_RESTRICTION": "Project Creation",
"SELF_REGISTRATION": "Self Registration", "SELF_REGISTRATION": "Allow Self-Registration",
"AUTH_MODE_DB": "Database", "AUTH_MODE_DB": "Database",
"AUTH_MODE_LDAP": "LDAP", "AUTH_MODE_LDAP": "LDAP",
"SCOPE_BASE": "Base", "SCOPE_BASE": "Base",
@ -351,7 +359,7 @@
"TOOLTIP": { "TOOLTIP": {
"SELF_REGISTRATION": "Enable sign up", "SELF_REGISTRATION": "Enable sign up",
"VERIFY_REMOTE_CERT": "Determine whether the image replication should verify the certificate of a remote Habor registry. Uncheck this box when the remote registry uses a self-signed or untrusted certificate.", "VERIFY_REMOTE_CERT": "Determine whether the image replication should verify the certificate of a remote Habor registry. Uncheck this box when the remote registry uses a self-signed or untrusted certificate.",
"AUTH_MODE": "By default the auth mode is db_auth, i.e. the credentials are stored in a local database. Set it to ldap_auth if you want to verify a user's credentials against an LDAP server.", "AUTH_MODE": "By default the auth mode is database, i.e. the credentials are stored in a local database. Set it to LDAP if you want to verify a user's credentials against an LDAP server.",
"LDAP_SEARCH_DN": "A user's DN who has the permission to search the LDAP/AD server. If your LDAP/AD server does not support anonymous search, you should configure this DN and ldap_search_pwd.", "LDAP_SEARCH_DN": "A user's DN who has the permission to search the LDAP/AD server. If your LDAP/AD server does not support anonymous search, you should configure this DN and ldap_search_pwd.",
"LDAP_BASE_DN": "The base DN from which to look up a user in LDAP/AD", "LDAP_BASE_DN": "The base DN from which to look up a user in LDAP/AD",
"LDAP_UID": "The attribute used in a search to match a user. It could be uid, cn, email, sAMAccountName or other attributes depending on your LDAP/AD", "LDAP_UID": "The attribute used in a search to match a user. It could be uid, cn, email, sAMAccountName or other attributes depending on your LDAP/AD",

View File

@ -1,4 +1,10 @@
{ {
"APP_TITLE": {
"HARBOR": "Harbor",
"VIC": "vSphere Integrated Containers",
"MGMT": "Management",
"REG": "Registry"
},
"SIGN_IN": { "SIGN_IN": {
"REMEMBER": "记住我", "REMEMBER": "记住我",
"INVALID_MSG": "用户名或者密码不正确", "INVALID_MSG": "用户名或者密码不正确",
@ -22,7 +28,9 @@
"CLOSE": "关闭", "CLOSE": "关闭",
"TEST_LDAP": "测试LDAP服务器", "TEST_LDAP": "测试LDAP服务器",
"MORE_INFO": "更多信息...", "MORE_INFO": "更多信息...",
"YES": "确定" "YES": "确定",
"NO": "否",
"NEGATIVE": "否"
}, },
"TOOLTIP": { "TOOLTIP": {
"EMAIL": "请使用正确的邮箱地址比如name@example.com", "EMAIL": "请使用正确的邮箱地址比如name@example.com",
@ -317,12 +325,12 @@
"RESET_OK": "密码重置成功,点击确定按钮前往登录页登录" "RESET_OK": "密码重置成功,点击确定按钮前往登录页登录"
}, },
"RECENT_LOG": { "RECENT_LOG": {
"SUB_TITLE": "显示最近", "SUB_TITLE": "显示",
"SUB_TITLE_SUFIX": "条日志记录" "SUB_TITLE_SUFIX": "条日志"
}, },
"CONFIG": { "CONFIG": {
"TITLE": "配置", "TITLE": "配置",
"AUTH": "认证", "AUTH": "认证模式",
"REPLICATION": "复制", "REPLICATION": "复制",
"EMAIL": "邮箱", "EMAIL": "邮箱",
"SYSTEM": "系统设置", "SYSTEM": "系统设置",
@ -339,8 +347,8 @@
"VERIFY_REMOTE_CERT": "验证远程证书", "VERIFY_REMOTE_CERT": "验证远程证书",
"TOKEN_EXPIRATION": "令牌过期时间(分钟)", "TOKEN_EXPIRATION": "令牌过期时间(分钟)",
"AUTH_MODE": "认证模式", "AUTH_MODE": "认证模式",
"PRO_CREATION_RESTRICTION": "项目创建限制", "PRO_CREATION_RESTRICTION": "项目创建",
"SELF_REGISTRATION": "自注册", "SELF_REGISTRATION": "允许自注册",
"AUTH_MODE_DB": "数据库", "AUTH_MODE_DB": "数据库",
"AUTH_MODE_LDAP": "LDAP", "AUTH_MODE_LDAP": "LDAP",
"SCOPE_BASE": "基础", "SCOPE_BASE": "基础",
@ -351,7 +359,7 @@
"TOOLTIP": { "TOOLTIP": {
"SELF_REGISTRATION": "激活注册功能", "SELF_REGISTRATION": "激活注册功能",
"VERIFY_REMOTE_CERT": "确定镜像复制是否要验证远程Harbor镜像库的证书。如果远程镜像库使用的是自签或者非信任证书不要勾选此选项。", "VERIFY_REMOTE_CERT": "确定镜像复制是否要验证远程Harbor镜像库的证书。如果远程镜像库使用的是自签或者非信任证书不要勾选此选项。",
"AUTH_MODE": "默认认证模式为本地认证比如用户凭证存储在本地数据库。如果使用LDAP服务来认证用户则设置为LDAP服务。", "AUTH_MODE": "默认认证模式为数据库认证比如用户凭证存储在本地数据库。如果使用LDAP服务来认证用户则设置为LDAP服务。",
"LDAP_SEARCH_DN": "有权搜索LDAP服务器的用户的DN。如果LDAP服务器不支持匿名搜索则需要配置此DN之和搜索密码。", "LDAP_SEARCH_DN": "有权搜索LDAP服务器的用户的DN。如果LDAP服务器不支持匿名搜索则需要配置此DN之和搜索密码。",
"LDAP_BASE_DN": "用来在LDAP和AD中搜寻用户的基础DN。", "LDAP_BASE_DN": "用来在LDAP和AD中搜寻用户的基础DN。",
"LDAP_UID": "在搜索中用来匹配用户的属性可以是uid,cn,email,sAMAccountName或者其它LDAP/AD服务器支持的属性。", "LDAP_UID": "在搜索中用来匹配用户的属性可以是uid,cn,email,sAMAccountName或者其它LDAP/AD服务器支持的属性。",