From 315370573171547a156dc03551ff570aafaf666a Mon Sep 17 00:00:00 2001 From: yixingj Date: Wed, 22 Nov 2017 22:33:20 +0800 Subject: [PATCH 1/4] Harbor resource requirement doc Add harbor resource requirement for Harbor installation guide --- docs/installation_guide.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/installation_guide.md b/docs/installation_guide.md index 1e11f5208..280a137dc 100644 --- a/docs/installation_guide.md +++ b/docs/installation_guide.md @@ -16,9 +16,25 @@ In addition, the deployment instructions on Kubernetes has been created by the c ## Prerequisites for the target host Harbor is deployed as several Docker containers, and, therefore, can be deployed on any Linux distribution that supports Docker. The target host requires Python, Docker, and Docker Compose to be installed. -* Python should be version 2.7 or higher. Note that you may have to install Python on Linux distributions (Gentoo, Arch) that do not come with a Python interpreter installed by default -* Docker engine should be version 1.10 or higher. For installation instructions, please refer to: https://docs.docker.com/engine/installation/ -* Docker Compose needs to be version 1.6.0 or higher. For installation instructions, please refer to: https://docs.docker.com/compose/install/ +### Hardware +|Resource|Capacity|Description| +|---|---|---| +|CPU|minimal 2 CPU|4 CPU is prefered| +|Mem|minimal 4GB|8GB is prefered| +|Disk|minimal 40GB|160GB is prefered| +### Software +|Software|Version|Description| +|---|---|---| +|Python|version 2.7 or higher|Note that you may have to install Python on Linux distributions (Gentoo, Arch) that do not come with a Python interpreter installed by default| +|Docker engine|version 1.10 or higher|For installation instructions, please refer to: https://docs.docker.com/engine/installation/| +|Docker Compose|version 1.6.0 or higher|For installation instructions, please refer to: https://docs.docker.com/compose/install/| +|Openssl|latest is prefered|Generate certificate and keys for Harbor| +### Network ports +|Port|Protocol|Description| +|---|---|---| +|443|HTTPS|Harbor UI and API will accept requests on this port for https protocol| +|4443|HTTS|Connections to the Docker Content Trust service for Harbor, only needed when Notary is enabled| +|80|HTTP|Harbor UI and API will accept requests on this port for http protocol| ## Installation Steps From 86dac8bbb9421db45b285a288165c8cdd84a851b Mon Sep 17 00:00:00 2001 From: "Deng, Qian" Date: Fri, 26 Jan 2018 18:10:39 +0800 Subject: [PATCH 2/4] Fix relication description too long to display --- src/ui_ng/lib/package.json | 2 +- .../list-replication-rule.component.html.ts | 10 +++++++++- .../list-replication-rule.component.ts | 10 ++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/ui_ng/lib/package.json b/src/ui_ng/lib/package.json index bba58816b..f12055fe0 100644 --- a/src/ui_ng/lib/package.json +++ b/src/ui_ng/lib/package.json @@ -1,6 +1,6 @@ { "name": "harbor-ui", - "version": "0.6.30", + "version": "0.6.34-dev.3", "description": "Harbor shared UI components based on Clarity and Angular4", "scripts": { "start": "ng serve --host 0.0.0.0 --port 4500 --proxy-config proxy.config.json", diff --git a/src/ui_ng/lib/src/list-replication-rule/list-replication-rule.component.html.ts b/src/ui_ng/lib/src/list-replication-rule/list-replication-rule.component.html.ts index c9e3d4312..f5e4f9af0 100644 --- a/src/ui_ng/lib/src/list-replication-rule/list-replication-rule.component.html.ts +++ b/src/ui_ng/lib/src/list-replication-rule/list-replication-rule.component.html.ts @@ -18,7 +18,15 @@ export const LIST_REPLICATION_RULE_TEMPLATE: string = ` {{p.projects?.length>0 ? p.projects[0].name : ''}} - {{p.description ? p.description : '-'}} + + {{p.description ? trancatedDescription(p.description) : '-'}} + + + + {{p.description}} + + + {{p.targets?.length>0 ? p.targets[0].name : ''}} {{p.trigger ? p.trigger.kind : ''}} diff --git a/src/ui_ng/lib/src/list-replication-rule/list-replication-rule.component.ts b/src/ui_ng/lib/src/list-replication-rule/list-replication-rule.component.ts index 135a843f9..c4ec239e3 100644 --- a/src/ui_ng/lib/src/list-replication-rule/list-replication-rule.component.ts +++ b/src/ui_ng/lib/src/list-replication-rule/list-replication-rule.component.ts @@ -42,12 +42,14 @@ import { toPromise, CustomComparator } from '../utils'; import { State, Comparator } from 'clarity-angular'; import { LIST_REPLICATION_RULE_TEMPLATE } from './list-replication-rule.component.html'; +import { LIST_REPLICATION_RULE_CSS } from './list-replication-rule.component.css'; import {BatchInfo, BathInfoChanges} from "../confirmation-dialog/confirmation-batch-message"; import {Observable} from "rxjs/Observable"; @Component({ selector: 'hbr-list-replication-rule', template: LIST_REPLICATION_RULE_TEMPLATE, + styles: [LIST_REPLICATION_RULE_CSS], changeDetection: ChangeDetectionStrategy.OnPush }) export class ListReplicationRuleComponent implements OnInit, OnChanges { @@ -101,6 +103,14 @@ export class ListReplicationRuleComponent implements OnInit, OnChanges { return !this.readonly && !this.projectId ? true : false; } + trancatedDescription(desc: string): string { + if (desc.length > 35 ) { + return desc.substr(0, 35); + } else { + return desc; + } + } + ngOnInit(): void { //Global scope if (!this.projectScope) { From 8f1fa387c2df8d99a9b0796aba88d75867763152 Mon Sep 17 00:00:00 2001 From: "Deng, Qian" Date: Fri, 26 Jan 2018 18:11:15 +0800 Subject: [PATCH 3/4] Fix admin rename tooltip --- src/ui_ng/lib/package.json | 2 +- src/ui_ng/lib/pkg/package.json | 2 +- .../list-replication-rule.component.css.ts | 2 ++ src/ui_ng/package.json | 2 +- .../account-settings/account-settings-modal.component.html | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 src/ui_ng/lib/src/list-replication-rule/list-replication-rule.component.css.ts diff --git a/src/ui_ng/lib/package.json b/src/ui_ng/lib/package.json index f12055fe0..90749f512 100644 --- a/src/ui_ng/lib/package.json +++ b/src/ui_ng/lib/package.json @@ -1,6 +1,6 @@ { "name": "harbor-ui", - "version": "0.6.34-dev.3", + "version": "0.6.37", "description": "Harbor shared UI components based on Clarity and Angular4", "scripts": { "start": "ng serve --host 0.0.0.0 --port 4500 --proxy-config proxy.config.json", diff --git a/src/ui_ng/lib/pkg/package.json b/src/ui_ng/lib/pkg/package.json index f85d0b751..c34b70587 100644 --- a/src/ui_ng/lib/pkg/package.json +++ b/src/ui_ng/lib/pkg/package.json @@ -1,6 +1,6 @@ { "name": "harbor-ui", - "version": "0.6.30", + "version": "0.6.37", "description": "Harbor shared UI components based on Clarity and Angular4", "author": "VMware", "module": "index.js", diff --git a/src/ui_ng/lib/src/list-replication-rule/list-replication-rule.component.css.ts b/src/ui_ng/lib/src/list-replication-rule/list-replication-rule.component.css.ts new file mode 100644 index 000000000..67157fd6c --- /dev/null +++ b/src/ui_ng/lib/src/list-replication-rule/list-replication-rule.component.css.ts @@ -0,0 +1,2 @@ +export const LIST_REPLICATION_RULE_CSS = ` +` \ No newline at end of file diff --git a/src/ui_ng/package.json b/src/ui_ng/package.json index 03bb05a35..e356c01e6 100644 --- a/src/ui_ng/package.json +++ b/src/ui_ng/package.json @@ -31,7 +31,7 @@ "clarity-icons": "^0.10.17", "clarity-ui": "^0.10.17", "core-js": "^2.4.1", - "harbor-ui": "0.6.34", + "harbor-ui": "0.6.37", "intl": "^1.2.5", "mutationobserver-shim": "^0.3.2", "ngx-cookie": "^1.0.0", diff --git a/src/ui_ng/src/app/account/account-settings/account-settings-modal.component.html b/src/ui_ng/src/app/account/account-settings/account-settings-modal.component.html index 36d754823..2790c71bf 100644 --- a/src/ui_ng/src/app/account/account-settings/account-settings-modal.component.html +++ b/src/ui_ng/src/app/account/account-settings/account-settings-modal.component.html @@ -12,7 +12,7 @@ - {{'PROFILE.ADMIN_RENAME_TIP'}} + {{'PROFILE.ADMIN_RENAME_TIP' | translate}} From b31a91b64a09f008a286581dc0e8784236063d61 Mon Sep 17 00:00:00 2001 From: "Deng, Qian" Date: Mon, 29 Jan 2018 21:54:59 +0800 Subject: [PATCH 4/4] Fix UI bugs Add deleting confirmation dialog back Change buttons' style on tag component --- src/ui_ng/lib/package.json | 2 +- src/ui_ng/lib/pkg/package.json | 2 +- src/ui_ng/lib/src/tag/tag.component.html.ts | 8 +++---- src/ui_ng/lib/tslint.json | 5 ----- src/ui_ng/package.json | 2 +- .../list-project/list-project.component.ts | 10 ++++++++- .../app/project/member/member.component.ts | 21 +++++++++++++------ src/ui_ng/tslint.json | 5 ----- 8 files changed, 30 insertions(+), 25 deletions(-) diff --git a/src/ui_ng/lib/package.json b/src/ui_ng/lib/package.json index 90749f512..e5ea1c350 100644 --- a/src/ui_ng/lib/package.json +++ b/src/ui_ng/lib/package.json @@ -1,6 +1,6 @@ { "name": "harbor-ui", - "version": "0.6.37", + "version": "0.6.41", "description": "Harbor shared UI components based on Clarity and Angular4", "scripts": { "start": "ng serve --host 0.0.0.0 --port 4500 --proxy-config proxy.config.json", diff --git a/src/ui_ng/lib/pkg/package.json b/src/ui_ng/lib/pkg/package.json index c34b70587..1a5e8cbff 100644 --- a/src/ui_ng/lib/pkg/package.json +++ b/src/ui_ng/lib/pkg/package.json @@ -1,6 +1,6 @@ { "name": "harbor-ui", - "version": "0.6.37", + "version": "0.6.41", "description": "Harbor shared UI components based on Clarity and Angular4", "author": "VMware", "module": "index.js", diff --git a/src/ui_ng/lib/src/tag/tag.component.html.ts b/src/ui_ng/lib/src/tag/tag.component.html.ts index ecedbd9e3..34e4dc753 100644 --- a/src/ui_ng/lib/src/tag/tag.component.html.ts +++ b/src/ui_ng/lib/src/tag/tag.component.html.ts @@ -24,11 +24,9 @@ export const TAG_TEMPLATE = `
-
- - - -
+ + +
{{'REPOSITORY.TAG' | translate}} {{'REPOSITORY.SIZE' | translate}} diff --git a/src/ui_ng/lib/tslint.json b/src/ui_ng/lib/tslint.json index 283c238ec..59ffa4e02 100644 --- a/src/ui_ng/lib/tslint.json +++ b/src/ui_ng/lib/tslint.json @@ -69,11 +69,6 @@ "check-else", "check-whitespace" ], - "quotemark": [ - true, - "double", - "avoid-escape" - ], "radix": true, "semicolon": [ "always" diff --git a/src/ui_ng/package.json b/src/ui_ng/package.json index e356c01e6..04c4ae315 100644 --- a/src/ui_ng/package.json +++ b/src/ui_ng/package.json @@ -31,7 +31,7 @@ "clarity-icons": "^0.10.17", "clarity-ui": "^0.10.17", "core-js": "^2.4.1", - "harbor-ui": "0.6.37", + "harbor-ui": "0.6.41", "intl": "^1.2.5", "mutationobserver-shim": "^0.3.2", "ngx-cookie": "^1.0.0", diff --git a/src/ui_ng/src/app/project/list-project/list-project.component.ts b/src/ui_ng/src/app/project/list-project/list-project.component.ts index 7fc109958..a893e47c9 100644 --- a/src/ui_ng/src/app/project/list-project/list-project.component.ts +++ b/src/ui_ng/src/app/project/list-project/list-project.component.ts @@ -221,7 +221,15 @@ export class ListProjectComponent implements OnDestroy { this.batchDelectionInfos.push(initBatchMessage); }); this.deletionDialogService.addBatchInfoList(this.batchDelectionInfos); - this.delProjects(p); + let deletionMessage = new ConfirmationMessage( + "PROJECT.DELETION_TITLE", + "PROJECT.DELETION_SUMMARY", + nameArr.join(","), + p, + ConfirmationTargets.PROJECT, + ConfirmationButtons.DELETE_CANCEL + ); + this.deletionDialogService.openComfirmDialog(deletionMessage); } } delProjects(projects: Project[]) { 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 0c9b1a457..e4330b88d 100644 --- a/src/ui_ng/src/app/project/member/member.component.ts +++ b/src/ui_ng/src/app/project/member/member.component.ts @@ -63,6 +63,7 @@ export class MemberComponent implements OnInit, OnDestroy { isDelete = false; isChangeRole = false; batchActionInfos: BatchInfo[] = []; + batchDeletionInfos: BatchInfo[] = []; constructor( private route: ActivatedRoute, @@ -206,17 +207,25 @@ export class MemberComponent implements OnInit, OnDestroy { this.isDelete = true; this.isChangeRole = false; let nameArr: string[] = []; - this.batchActionInfos = []; + this.batchDeletionInfos = []; if (m && m.length) { m.forEach(data => { nameArr.push(data.username); let initBatchMessage = new BatchInfo (); initBatchMessage.name = data.username; - this.batchActionInfos.push(initBatchMessage); + this.batchDeletionInfos.push(initBatchMessage); }); - this.OperateDialogService.addBatchInfoList(this.batchActionInfos); + this.OperateDialogService.addBatchInfoList(this.batchDeletionInfos); - this.deleteMem(m); + let deletionMessage = new ConfirmationMessage( + "MEMBER.DELETION_TITLE", + "MEMBER.DELETION_SUMMARY", + nameArr.join(","), + m, + ConfirmationTargets.PROJECT_MEMBER, + ConfirmationButtons.DELETE_CANCEL + ); + this.OperateDialogService.openComfirmDialog(deletionMessage); } } @@ -225,7 +234,7 @@ export class MemberComponent implements OnInit, OnDestroy { let promiseLists: any[] = []; members.forEach(member => { if (member.user_id === this.currentUser.user_id) { - let findedList = this.batchActionInfos.find(data => data.name === member.username); + let findedList = this.batchDeletionInfos.find(data => data.name === member.username); this.translate.get("BATCH.DELETED_FAILURE").subscribe(res => { findedList = BathInfoChanges(findedList, res, false, true); }); @@ -243,7 +252,7 @@ export class MemberComponent implements OnInit, OnDestroy { } delOperate(projectId: number, memberId: number, username: string) { - let findedList = this.batchActionInfos.find(data => data.name === username); + let findedList = this.batchDeletionInfos.find(data => data.name === username); return this.memberService .deleteMember(projectId, memberId) .then( diff --git a/src/ui_ng/tslint.json b/src/ui_ng/tslint.json index 90fd0a727..c1cc66953 100644 --- a/src/ui_ng/tslint.json +++ b/src/ui_ng/tslint.json @@ -69,11 +69,6 @@ "check-else", "check-whitespace" ], - "quotemark": [ - true, - "double", - "avoid-escape" - ], "radix": true, "semicolon": [ true