diff --git a/src/ui_ng/lib/src/endpoint/endpoint.component.html.ts b/src/ui_ng/lib/src/endpoint/endpoint.component.html.ts index 4b7071ba9..d1ad201dd 100644 --- a/src/ui_ng/lib/src/endpoint/endpoint.component.html.ts +++ b/src/ui_ng/lib/src/endpoint/endpoint.component.html.ts @@ -25,7 +25,7 @@ export const ENDPOINT_TEMPLATE: string = ` {{'CONFIG.VERIFY_REMOTE_CERT' | translate }} {{'DESTINATION.CREATION_TIME' | translate}} {{'DESTINATION.PLACEHOLDER' | translate }} - + {{t.name}} {{t.endpoint}} diff --git a/src/ui_ng/lib/src/endpoint/endpoint.component.ts b/src/ui_ng/lib/src/endpoint/endpoint.component.ts index 26350b4dd..f15917f4c 100644 --- a/src/ui_ng/lib/src/endpoint/endpoint.component.ts +++ b/src/ui_ng/lib/src/endpoint/endpoint.component.ts @@ -102,6 +102,7 @@ export class EndpointComponent implements OnInit, OnDestroy { retrieve(): void { this.loading = true; + this.selectedRow = []; toPromise(this.endpointService .getEndpoints(this.targetName)) .then( diff --git a/src/ui_ng/lib/src/inline-alert/inline-alert.component.css.ts b/src/ui_ng/lib/src/inline-alert/inline-alert.component.css.ts index 089b188c8..4c459b707 100644 --- a/src/ui_ng/lib/src/inline-alert/inline-alert.component.css.ts +++ b/src/ui_ng/lib/src/inline-alert/inline-alert.component.css.ts @@ -7,4 +7,11 @@ export const INLINE_ALERT_STYLE: string = ` padding: 0px !important; min-width: 30px !important; } + .alert-item { + display: inline-block; + text-align: center; +} +:host >>> .alert-icon-wrapper{ + display: inline; +} `; \ No newline at end of file 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 f62870012..86a112481 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 @@ -1,7 +1,7 @@ export const LIST_REPLICATION_RULE_TEMPLATE: string = ` -
+
- +
diff --git a/src/ui_ng/lib/src/replication/replication.component.html.ts b/src/ui_ng/lib/src/replication/replication.component.html.ts index 81994aa06..4c5b34a92 100644 --- a/src/ui_ng/lib/src/replication/replication.component.html.ts +++ b/src/ui_ng/lib/src/replication/replication.component.html.ts @@ -13,7 +13,6 @@ export const REPLICATION_TEMPLATE: string = `
-

{{'REPLICATION.REPLICATION_JOBS' | translate}}
diff --git a/src/ui_ng/lib/src/repository-listview/repository-listview.component.html.ts b/src/ui_ng/lib/src/repository-listview/repository-listview.component.html.ts index a3ef4bf1e..b3ede66f9 100644 --- a/src/ui_ng/lib/src/repository-listview/repository-listview.component.html.ts +++ b/src/ui_ng/lib/src/repository-listview/repository-listview.component.html.ts @@ -21,7 +21,7 @@ export const REPOSITORY_LISTVIEW_TEMPLATE = ` {{'REPOSITORY.TAGS_COUNT' | translate}} {{'REPOSITORY.PULL_COUNT' | translate}} {{'REPOSITORY.PLACEHOLDER' | translate }} - + {{r.name}} {{r.tags_count}} {{r.pull_count}} diff --git a/src/ui_ng/lib/src/repository-listview/repository-listview.component.ts b/src/ui_ng/lib/src/repository-listview/repository-listview.component.ts index 65ee37cf2..6c73dc700 100644 --- a/src/ui_ng/lib/src/repository-listview/repository-listview.component.ts +++ b/src/ui_ng/lib/src/repository-listview/repository-listview.component.ts @@ -283,6 +283,7 @@ export class RepositoryListviewComponent implements OnChanges, OnInit { } clrLoad(state: State): void { + this.selectedRow = []; //Keep it for future filtering and sorting this.currentState = state; diff --git a/src/ui_ng/lib/src/repository/repository.component.ts b/src/ui_ng/lib/src/repository/repository.component.ts index c5d44dd88..730ea5736 100644 --- a/src/ui_ng/lib/src/repository/repository.component.ts +++ b/src/ui_ng/lib/src/repository/repository.component.ts @@ -51,13 +51,12 @@ export class RepositoryComponent implements OnInit { @Input() repoName: string; @Input() hasSignedIn: boolean; @Input() hasProjectAdminRole: boolean; - + @Input() withNotary: boolean; + @Input() withClair: boolean; @Output() tagClickEvent = new EventEmitter(); @Output() backEvt: EventEmitter = new EventEmitter(); onGoing = false; - withNotary = false; - withClair = true; editing = false; inProgress = true; currentTabID = 'repo-image'; diff --git a/src/ui_ng/lib/src/tag/tag.component.css.ts b/src/ui_ng/lib/src/tag/tag.component.css.ts index 73cd177e1..f0a84b6b1 100644 --- a/src/ui_ng/lib/src/tag/tag.component.css.ts +++ b/src/ui_ng/lib/src/tag/tag.component.css.ts @@ -25,10 +25,6 @@ export const TAG_STYLE = ` display: block; height: 0; } -:host >>> .datagrid { - margin: 0; -} - :host >>> .datagrid-placeholder { display: none; } 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 35752288e..878cf182d 100644 --- a/src/ui_ng/lib/src/tag/tag.component.html.ts +++ b/src/ui_ng/lib/src/tag/tag.component.html.ts @@ -23,24 +23,24 @@ export const TAG_TEMPLATE = `
- +
- +
- {{'REPOSITORY.TAG' | translate}} + {{'REPOSITORY.TAG' | translate}} {{'REPOSITORY.SIZE' | translate}} {{'REPOSITORY.PULL_COMMAND' | translate}} {{'REPOSITORY.VULNERABILITY' | translate}} {{'REPOSITORY.SIGNED' | translate}} - {{'REPOSITORY.AUTHOR' | translate}} + {{'REPOSITORY.AUTHOR' | translate}} {{'REPOSITORY.CREATED' | translate}} {{'REPOSITORY.DOCKER_VERSION' | translate}} {{'TGA.PLACEHOLDER' | translate }} - - + + {{t.name}} {{t.name}} @@ -59,7 +59,7 @@ export const TAG_TEMPLATE = ` {{'REPOSITORY.NOTARY_IS_UNDETERMINED' | translate}} - {{t.author}} + {{t.author}} {{t.created | date: 'short'}} {{t.docker_version}} diff --git a/src/ui_ng/lib/src/tag/tag.component.ts b/src/ui_ng/lib/src/tag/tag.component.ts index b0c939225..f99fd07e5 100644 --- a/src/ui_ng/lib/src/tag/tag.component.ts +++ b/src/ui_ng/lib/src/tag/tag.component.ts @@ -152,6 +152,7 @@ export class TagComponent implements OnInit { } clrLoad(state: State): void { + this.selectedRow = []; // Keep it for future filtering and sorting this.currentState = state; diff --git a/src/ui_ng/package.json b/src/ui_ng/package.json index 7ee2c24de..724ed8d2f 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.9", + "harbor-ui": "0.6.13", "intl": "^1.2.5", "mutationobserver-shim": "^0.3.2", "ngx-cookie": "^1.0.0", diff --git a/src/ui_ng/src/app/global-message/message.component.css b/src/ui_ng/src/app/global-message/message.component.css index 85adf4635..4f4e7bbe8 100644 --- a/src/ui_ng/src/app/global-message/message.component.css +++ b/src/ui_ng/src/app/global-message/message.component.css @@ -4,4 +4,11 @@ left: 0px; width: 100%; z-index: 999; +} +.alert-item { + display: inline-block; + text-align: center; +} +:host >>> .alert-icon-wrapper{ + display: inline; } \ No newline at end of file diff --git a/src/ui_ng/src/app/project/list-project/list-project.component.html b/src/ui_ng/src/app/project/list-project/list-project.component.html index b0bd4dd37..823c5c203 100644 --- a/src/ui_ng/src/app/project/list-project/list-project.component.html +++ b/src/ui_ng/src/app/project/list-project/list-project.component.html @@ -10,7 +10,7 @@ {{'PROJECT.ROLE' | translate}} {{'PROJECT.REPO_COUNT'| translate}} {{'PROJECT.CREATION_TIME' | translate}} - + {{p.name}} {{ (p.metadata.public === 'true' ? 'PROJECT.PUBLIC' : 'PROJECT.PRIVATE') | translate}} {{roleInfo[p.current_user_role_id] | translate}} 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 f8462ca7b..74f8c6cf6 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 @@ -141,6 +141,8 @@ export class ListProjectComponent implements OnDestroy { } clrLoad(state: State) { + this.selectedRow = []; + //Keep state for future filtering and sorting this.currentState = state; 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 1f002f58f..ddd9fcf30 100644 --- a/src/ui_ng/src/app/project/member/member.component.html +++ b/src/ui_ng/src/app/project/member/member.component.html @@ -26,7 +26,7 @@
{{'MEMBER.NAME' | translate}} {{'MEMBER.ROLE' | translate}} - + {{m.username}} {{roleInfo[m.role_id] | translate}} 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 cbcca9728..d24ab6fd9 100644 --- a/src/ui_ng/src/app/project/member/member.component.ts +++ b/src/ui_ng/src/app/project/member/member.component.ts @@ -93,6 +93,7 @@ export class MemberComponent implements OnInit, OnDestroy { } retrieve(projectId: number, username: string) { + this.selectedRow = []; this.memberService .listMembers(projectId, username) .subscribe( @@ -165,7 +166,7 @@ export class MemberComponent implements OnInit, OnDestroy { if (members && members.length) { let promiseList: any[] = []; members.forEach(member => { - if (member.user_id === this.currentUser.user_id || member.role_id >= this.roleNum) { + if (member.user_id === this.currentUser.user_id) { let findedList = this.batchDelectionInfos.find(data => data.name === member.username); this.translate.get('BATCH.SWITCH_FAILURE').subscribe(res => { findedList = BathInfoChanges(findedList, res, false, true); diff --git a/src/ui_ng/src/app/replication/replication-rule/list-project-model/list-project-model.component.html b/src/ui_ng/src/app/replication/replication-rule/list-project-model/list-project-model.component.html index f4642b90f..be5fba8c6 100644 --- a/src/ui_ng/src/app/replication/replication-rule/list-project-model/list-project-model.component.html +++ b/src/ui_ng/src/app/replication/replication-rule/list-project-model/list-project-model.component.html @@ -17,7 +17,7 @@
- + {{project.name}} diff --git a/src/ui_ng/src/app/replication/replication-rule/list-project-model/list-project-model.component.ts b/src/ui_ng/src/app/replication/replication-rule/list-project-model/list-project-model.component.ts index a858b49c3..bf9738c99 100644 --- a/src/ui_ng/src/app/replication/replication-rule/list-project-model/list-project-model.component.ts +++ b/src/ui_ng/src/app/replication/replication-rule/list-project-model/list-project-model.component.ts @@ -87,6 +87,7 @@ export class ListProjectModelComponent { clrLoad(state: State) { + this.selectedProject = null; //Keep state for future filtering and sorting this.currentState = state; diff --git a/src/ui_ng/src/app/repository/tag-repository/tag-repository.component.html b/src/ui_ng/src/app/repository/tag-repository/tag-repository.component.html index 45772b591..619932341 100644 --- a/src/ui_ng/src/app/repository/tag-repository/tag-repository.component.html +++ b/src/ui_ng/src/app/repository/tag-repository/tag-repository.component.html @@ -1,3 +1,3 @@
- +
\ No newline at end of file diff --git a/src/ui_ng/src/app/shared/confirmation-dialog/confirmation-dialog.component.html b/src/ui_ng/src/app/shared/confirmation-dialog/confirmation-dialog.component.html index 5af5b73b8..4524636a6 100644 --- a/src/ui_ng/src/app/shared/confirmation-dialog/confirmation-dialog.component.html +++ b/src/ui_ng/src/app/shared/confirmation-dialog/confirmation-dialog.component.html @@ -29,7 +29,7 @@ - + diff --git a/src/ui_ng/src/app/shared/confirmation-dialog/confirmation-dialog.component.ts b/src/ui_ng/src/app/shared/confirmation-dialog/confirmation-dialog.component.ts index 9182f66cb..760cac058 100644 --- a/src/ui_ng/src/app/shared/confirmation-dialog/confirmation-dialog.component.ts +++ b/src/ui_ng/src/app/shared/confirmation-dialog/confirmation-dialog.component.ts @@ -45,6 +45,13 @@ export class ConfirmationDialogComponent implements OnDestroy { return false; } + get isSwitch(): boolean { + if (this.dialogTitle && (this.dialogTitle.includes('SWITCH') || this.dialogTitle.includes('switch'))) { + return true; + } + return false; + } + colorChange(list: BatchInfo) { if (!list.loading && !list.errorState) { return 'green'; diff --git a/src/ui_ng/src/app/user/user.component.html b/src/ui_ng/src/app/user/user.component.html index 5fc622a39..c7697d4d5 100644 --- a/src/ui_ng/src/app/user/user.component.html +++ b/src/ui_ng/src/app/user/user.component.html @@ -21,7 +21,7 @@ {{'USER.COLUMN_ADMIN' | translate}} {{'USER.COLUMN_EMAIL' | translate}} {{'USER.COLUMN_REG_NAME' | translate}} - + {{user.username}} {{isSystemAdmin(user)}} {{user.email}} diff --git a/src/ui_ng/src/app/user/user.component.ts b/src/ui_ng/src/app/user/user.component.ts index c858dd190..cdfae9eab 100644 --- a/src/ui_ng/src/app/user/user.component.ts +++ b/src/ui_ng/src/app/user/user.component.ts @@ -317,6 +317,7 @@ export class UserComponent implements OnInit, OnDestroy { //Data loading load(state: any): void { + this.selectedRow = []; if (state && state.page) { if (this.originalUsers) { this.originalUsers.then(users => { diff --git a/src/ui_ng/src/i18n/lang/en-us-lang.json b/src/ui_ng/src/i18n/lang/en-us-lang.json index a9121db86..1765dbbaf 100644 --- a/src/ui_ng/src/i18n/lang/en-us-lang.json +++ b/src/ui_ng/src/i18n/lang/en-us-lang.json @@ -33,7 +33,8 @@ "NO": "NO", "NEGATIVE": "NEGATIVE", "COPY": "COPY", - "EDIT": "EDIT" + "EDIT": "EDIT", + "SWITCH": "SWITCH" }, "BATCH": { "DELETED_SUCCESS": "Deleted successfully", diff --git a/src/ui_ng/src/i18n/lang/es-es-lang.json b/src/ui_ng/src/i18n/lang/es-es-lang.json index 152bbe373..324030d26 100644 --- a/src/ui_ng/src/i18n/lang/es-es-lang.json +++ b/src/ui_ng/src/i18n/lang/es-es-lang.json @@ -33,7 +33,8 @@ "NO": "NO", "NEGATIVE": "NEGATIVO", "COPY": "COPY", - "EDIT": "EDITAR" + "EDIT": "EDITAR", + "SWITCH": "SWITCH" }, "BATCH": { "DELETED_SUCCESS": "Deleted successfully", diff --git a/src/ui_ng/src/i18n/lang/zh-cn-lang.json b/src/ui_ng/src/i18n/lang/zh-cn-lang.json index eded564d7..4f998bc9d 100644 --- a/src/ui_ng/src/i18n/lang/zh-cn-lang.json +++ b/src/ui_ng/src/i18n/lang/zh-cn-lang.json @@ -33,7 +33,8 @@ "NO": "否", "NEGATIVE": "否", "COPY": "拷贝", - "EDIT": "编辑" + "EDIT": "编辑", + "SWITCH": "切换" }, "BATCH": { "DELETED_SUCCESS": "删除成功", diff --git a/tests/resources/Harbor-Pages/Project-Members.robot b/tests/resources/Harbor-Pages/Project-Members.robot index 2125086dd..bf379e971 100644 --- a/tests/resources/Harbor-Pages/Project-Members.robot +++ b/tests/resources/Harbor-Pages/Project-Members.robot @@ -70,9 +70,9 @@ Change Project Member Role Click Element //button[@class='btn dropdown-toggle'] Click Element //button[contains(.,'${role}')] sleep 1 - Click Element xpath=//clr-modal//button[contains(.,'SWITCH')]; + Click Element xpath=//clr-modal//button[contains(.,'SWITCH')] sleep 1 - Click Element xpath=//clr-modal//button[contains(.,'CLOSE')]; + Click Element xpath=//clr-modal//button[contains(.,'CLOSE')] Sleep 2 Wait Until Page Contains ${role}