mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-16 23:35:20 +01:00
Modify read only mode position, fix other issue
This commit is contained in:
parent
1296a09034
commit
9c5cc58f41
@ -27,6 +27,15 @@ export const SYSTEM_SETTINGS_HTML: string = `
|
|||||||
<span class="tooltip-content">{{'CONFIG.TOOLTIP.ROOT_CERT_DOWNLOAD' | translate}}</span>
|
<span class="tooltip-content">{{'CONFIG.TOOLTIP.ROOT_CERT_DOWNLOAD' | translate}}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="repoReadOnly">{{'CONFIG.REPO_READ_ONLY' | translate}}</label>
|
||||||
|
<clr-checkbox name="repoReadOnly" id="repoReadOnly" [clrChecked]="systemSettings.read_only.value" (clrCheckedChange)="setRepoReadOnlyValue($event)">
|
||||||
|
<a href="javascript:void(0)" role="tooltip" aria-haspopup="true" class="tooltip tooltip-top-right" style="top:-7px;">
|
||||||
|
<clr-icon shape="info-circle" class="info-tips-icon" size="24"></clr-icon>
|
||||||
|
<span class="tooltip-content">{{'CONFIG.TOOLTIP.REPO_TOOLTIP' | translate}}</span>
|
||||||
|
</a>
|
||||||
|
</clr-checkbox>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</form>
|
</form>
|
||||||
`;
|
`;
|
@ -41,6 +41,10 @@ export class SystemSettingsComponent {
|
|||||||
return this.systemSettingsForm && this.systemSettingsForm.valid;
|
return this.systemSettingsForm && this.systemSettingsForm.valid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setRepoReadOnlyValue($event: any) {
|
||||||
|
this.systemSettings.read_only.value = $event;
|
||||||
|
}
|
||||||
|
|
||||||
get canDownloadCert(): boolean {
|
get canDownloadCert(): boolean {
|
||||||
return this.hasAdminRole && this.hasCAFile;
|
return this.hasAdminRole && this.hasCAFile;
|
||||||
}
|
}
|
||||||
|
@ -284,7 +284,7 @@ describe('CreateEditRuleComponent (inline template)', ()=>{
|
|||||||
|
|
||||||
it('Should open creation modal and load endpoints', async(()=>{
|
it('Should open creation modal and load endpoints', async(()=>{
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
comp.openModal();
|
compCreate.openCreateEditRule();
|
||||||
fixture.whenStable().then(()=>{
|
fixture.whenStable().then(()=>{
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
let de: DebugElement = fixture.debugElement.query(By.css('input'));
|
let de: DebugElement = fixture.debugElement.query(By.css('input'));
|
||||||
@ -299,7 +299,7 @@ describe('CreateEditRuleComponent (inline template)', ()=>{
|
|||||||
|
|
||||||
it('Should open modal to edit replication rule', async(()=>{
|
it('Should open modal to edit replication rule', async(()=>{
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
comp.openEditRule(mockRule);
|
compCreate.openCreateEditRule(mockRule.id);
|
||||||
fixture.whenStable().then(()=>{
|
fixture.whenStable().then(()=>{
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
let de: DebugElement = fixture.debugElement.query(By.css('input'));
|
let de: DebugElement = fixture.debugElement.query(By.css('input'));
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
export const LIST_REPLICATION_RULE_TEMPLATE: string = `
|
export const LIST_REPLICATION_RULE_TEMPLATE: string = `
|
||||||
<div style="padding-bottom: 15px;">
|
<div style="padding-bottom: 15px;">
|
||||||
<clr-datagrid [clrDgLoading]="loading" [(clrDgSingleSelected)]="selectedRow" [clDgRowSelection]="true">
|
<clr-datagrid [clrDgLoading]="loading" [(clrDgSingleSelected)]="selectedRow" [clDgRowSelection]="true">
|
||||||
<clr-dg-action-bar>
|
<clr-dg-action-bar style="height: 24px;">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" *ngIf="isSystemAdmin" (click)="openModal()"><clr-icon shape="plus" size="16"></clr-icon> {{'REPLICATION.NEW_REPLICATION_RULE' | translate}}</button>
|
<button type="button" class="btn btn-sm btn-secondary" *ngIf="isSystemAdmin" (click)="openModal()"><clr-icon shape="plus" size="16"></clr-icon> {{'REPLICATION.NEW_REPLICATION_RULE' | translate}}</button>
|
||||||
<button type="button" class="btn btn-sm btn-secondary" *ngIf="isSystemAdmin" [disabled]="!selectedRow" (click)="editRule(selectedRow)"><clr-icon shape="pencil" size="16"></clr-icon> {{'REPLICATION.EDIT_POLICY' | translate}}</button>
|
<button type="button" class="btn btn-sm btn-secondary" *ngIf="isSystemAdmin" [disabled]="!selectedRow" (click)="editRule(selectedRow)"><clr-icon shape="pencil" size="16"></clr-icon> {{'REPLICATION.EDIT_POLICY' | translate}}</button>
|
||||||
<button type="button" class="btn btn-sm btn-secondary" *ngIf="isSystemAdmin" [disabled]="!selectedRow" (click)="deleteRule(selectedRow)"><clr-icon shape="times" size="16"></clr-icon> {{'REPLICATION.DELETE_POLICY' | translate}}</button>
|
<button type="button" class="btn btn-sm btn-secondary" *ngIf="isSystemAdmin" [disabled]="!selectedRow" (click)="deleteRule(selectedRow)"><clr-icon shape="times" size="16"></clr-icon> {{'REPLICATION.DELETE_POLICY' | translate}}</button>
|
||||||
|
@ -7,7 +7,7 @@ export const LOG_TEMPLATE: string = `
|
|||||||
<h2 class="h2-log-override" *ngIf="withTitle">{{'SIDE_NAV.LOGS' | translate}}</h2>
|
<h2 class="h2-log-override" *ngIf="withTitle">{{'SIDE_NAV.LOGS' | translate}}</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 rightPos">
|
||||||
<hbr-filter [withDivider]="true" filterPlaceholder='{{"AUDIT_LOG.FILTER_PLACEHOLDER" | translate}}' (filter)="doFilter($event)" [currentValue]="currentTerm"></hbr-filter>
|
<hbr-filter [withDivider]="true" filterPlaceholder='{{"AUDIT_LOG.FILTER_PLACEHOLDER" | translate}}' (filter)="doFilter($event)" [currentValue]="currentTerm"></hbr-filter>
|
||||||
<span (click)="refresh()" class="refresh-btn">
|
<span (click)="refresh()" class="refresh-btn">
|
||||||
<clr-icon shape="refresh" [hidden]="inProgress" ng-disabled="inProgress"></clr-icon>
|
<clr-icon shape="refresh" [hidden]="inProgress" ng-disabled="inProgress"></clr-icon>
|
||||||
@ -84,4 +84,10 @@ export const LOG_STYLES: string = `
|
|||||||
top: 8px;
|
top: 8px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
.rightPos {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 100;
|
||||||
|
right: 35px;
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
`;
|
`;
|
@ -73,6 +73,6 @@ export const REPLICATION_TEMPLATE: string = `
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<job-log-viewer #replicationLogViewer></job-log-viewer>
|
<job-log-viewer #replicationLogViewer></job-log-viewer>
|
||||||
<hbr-create-edit-rule [projectId]="projectId" [projectName]="projectName" (goToRegistry)="goRegistry()" (reload)="reloadRules($event)"></hbr-create-edit-rule>
|
<hbr-create-edit-rule *ngIf="isSystemAdmin" [projectId]="projectId" [projectName]="projectName" (goToRegistry)="goRegistry()" (reload)="reloadRules($event)"></hbr-create-edit-rule>
|
||||||
<confirmation-dialog #replicationConfirmDialog [batchInfors]="batchDelectionInfos" (confirmAction)="confirmReplication($event)"></confirmation-dialog>
|
<confirmation-dialog #replicationConfirmDialog [batchInfors]="batchDelectionInfos" (confirmAction)="confirmReplication($event)"></confirmation-dialog>
|
||||||
</div>`;
|
</div>`;
|
@ -5,7 +5,7 @@ export const REPOSITORY_TEMPLATE = `
|
|||||||
<clr-icon class="rotate-90 arrow-back" shape="arrow" size="36" (click)="goBack()"></clr-icon>
|
<clr-icon class="rotate-90 arrow-back" shape="arrow" size="36" (click)="goBack()"></clr-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="title-block">
|
<div class="title-block">
|
||||||
<h2 sub-header-title>{{repoName}}</h2>
|
<h2 sub-header-title class="custom-h2">{{repoName}}</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
@ -10,10 +10,6 @@ export const TAG_DETAIL_STYLES: string = `
|
|||||||
padding-right: 24px;
|
padding-right: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-block {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title-wrapper {
|
.title-wrapper {
|
||||||
padding-top: 12px;
|
padding-top: 12px;
|
||||||
}
|
}
|
||||||
@ -52,6 +48,10 @@ export const TAG_DETAIL_STYLES: string = `
|
|||||||
padding: 6px 6px 6px 12px;
|
padding: 6px 6px 6px 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.title-block {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
.vulnerability-block {
|
.vulnerability-block {
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,7 @@ export const TAG_DETAIL_HTML: string = `
|
|||||||
<clr-icon class="rotate-90 arrow-back" shape="arrow" size="36" (click)="onBack()"></clr-icon>
|
<clr-icon class="rotate-90 arrow-back" shape="arrow" size="36" (click)="onBack()"></clr-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="title-block">
|
<div class="title-block">
|
||||||
<div class="tag-name">
|
<h2 class="custom-h2" sub-header-title>{{repositoryId}}:{{tagDetails.name}}</h2>
|
||||||
<h1>{{repositoryId}}:{{tagDetails.name}}</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="summary-block">
|
<div class="summary-block">
|
||||||
|
@ -128,7 +128,7 @@ describe('TagDetailComponent (inline template)', () => {
|
|||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
let el: HTMLElement = fixture.nativeElement.querySelector('.tag-name');
|
let el: HTMLElement = fixture.nativeElement.querySelector('.custom-h2');
|
||||||
expect(el).toBeTruthy();
|
expect(el).toBeTruthy();
|
||||||
expect(el.textContent.trim()).toEqual('mock_repo:nginx');
|
expect(el.textContent.trim()).toEqual('mock_repo:nginx');
|
||||||
});
|
});
|
||||||
|
@ -26,10 +26,9 @@ export const TAG_TEMPLATE = `
|
|||||||
<div class="form-group"><input type="text" placeholder="Filter labels" [(ngModel)]= "filterName" (keyup)="handleInputFilter()"></div>
|
<div class="form-group"><input type="text" placeholder="Filter labels" [(ngModel)]= "filterName" (keyup)="handleInputFilter()"></div>
|
||||||
<div [hidden]='imageFilterLabels.length' style="padding-left:10px;">{{'LABEL.NO_LABELS' | translate }}</div>
|
<div [hidden]='imageFilterLabels.length' style="padding-left:10px;">{{'LABEL.NO_LABELS' | translate }}</div>
|
||||||
<div [hidden]='!imageFilterLabels.length' style='max-height:300px;overflow-y: auto;'>
|
<div [hidden]='!imageFilterLabels.length' style='max-height:300px;overflow-y: auto;'>
|
||||||
<button type="button" class="dropdown-item" *ngFor='let label of imageFilterLabels' (click)="label.iconsShow = true; filterLabel(label)">
|
<button type="button" class="dropdown-item" *ngFor='let label of imageFilterLabels' (click)="rightFilterLabel(label)">
|
||||||
<clr-icon shape="check" class='pull-left' [hidden]='!label.iconsShow'></clr-icon>
|
<clr-icon shape="check" class='pull-left' [hidden]='!label.iconsShow'></clr-icon>
|
||||||
<div class='labelDiv'><hbr-label-piece [label]="label.label" [labelWidth]="130"></hbr-label-piece></div>
|
<div class='labelDiv'><hbr-label-piece [label]="label.label" [labelWidth]="130"></hbr-label-piece></div>
|
||||||
<clr-icon shape="times-circle" class='pull-right' [hidden]='!label.iconsShow' (click)="$event.stopPropagation(); label.iconsShow = false; unFilterLabel(label)"></clr-icon>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -52,10 +51,9 @@ export const TAG_TEMPLATE = `
|
|||||||
<div class="form-group"><input type="text" placeholder="Filter labels" [(ngModel)]="stickName" (keyup)="handleStickInputFilter()"></div>
|
<div class="form-group"><input type="text" placeholder="Filter labels" [(ngModel)]="stickName" (keyup)="handleStickInputFilter()"></div>
|
||||||
<div [hidden]='imageStickLabels.length' style="padding-left:10px;">{{'LABEL.NO_LABELS' | translate }}</div>
|
<div [hidden]='imageStickLabels.length' style="padding-left:10px;">{{'LABEL.NO_LABELS' | translate }}</div>
|
||||||
<div [hidden]='!imageStickLabels.length' style='max-height:300px;overflow-y: auto;'>
|
<div [hidden]='!imageStickLabels.length' style='max-height:300px;overflow-y: auto;'>
|
||||||
<button type="button" class="dropdown-item" *ngFor='let label of imageStickLabels' (click)="selectLabel(label); label.iconsShow = true">
|
<button type="button" class="dropdown-item" *ngFor='let label of imageStickLabels' (click)="stickLabel(label); label.iconsShow =(label.iconsShow== true?false: true)">
|
||||||
<clr-icon shape="check" class='pull-left' [hidden]='!label.iconsShow'></clr-icon>
|
<clr-icon shape="check" class='pull-left' [hidden]='!label.iconsShow'></clr-icon>
|
||||||
<div class='labelDiv'><hbr-label-piece [label]="label.label" [labelWidth]="130"></hbr-label-piece></div>
|
<div class='labelDiv'><hbr-label-piece [label]="label.label" [labelWidth]="130"></hbr-label-piece></div>
|
||||||
<clr-icon shape="times-circle" class='pull-right' [hidden]='!label.iconsShow' (click)="$event.stopPropagation(); unSelectLabel(label); label.iconsShow = false"></clr-icon>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -310,8 +310,17 @@ export class TagComponent implements OnInit, AfterViewInit {
|
|||||||
|
|
||||||
this.selectedChange(tag);
|
this.selectedChange(tag);
|
||||||
}
|
}
|
||||||
selectLabel(labelInfo: {[key: string]: any | string[]}): void {
|
|
||||||
|
stickLabel(labelInfo: {[key: string]: any | string[]}): void {
|
||||||
if (labelInfo && !labelInfo.iconsShow) {
|
if (labelInfo && !labelInfo.iconsShow) {
|
||||||
|
this.selectLabel(labelInfo);
|
||||||
|
}
|
||||||
|
if (labelInfo && labelInfo.iconsShow) {
|
||||||
|
this.unSelectLabel(labelInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
selectLabel(labelInfo: {[key: string]: any | string[]}): void {
|
||||||
let labelId = labelInfo.label.id;
|
let labelId = labelInfo.label.id;
|
||||||
this.selectedRow = this.selectedTag;
|
this.selectedRow = this.selectedTag;
|
||||||
toPromise<any>(this.tagService.addLabelToImages(this.repoName, this.selectedRow[0].name, labelId)).then(res => {
|
toPromise<any>(this.tagService.addLabelToImages(this.repoName, this.selectedRow[0].name, labelId)).then(res => {
|
||||||
@ -320,10 +329,8 @@ export class TagComponent implements OnInit, AfterViewInit {
|
|||||||
this.errorHandler.error(err);
|
this.errorHandler.error(err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
unSelectLabel(labelInfo: {[key: string]: any | string[]}): void {
|
unSelectLabel(labelInfo: {[key: string]: any | string[]}): void {
|
||||||
if (labelInfo && labelInfo.iconsShow) {
|
|
||||||
let labelId = labelInfo.label.id;
|
let labelId = labelInfo.label.id;
|
||||||
this.selectedRow = this.selectedTag;
|
this.selectedRow = this.selectedTag;
|
||||||
toPromise<any>(this.tagService.deleteLabelToImages(this.repoName, this.selectedRow[0].name, labelId)).then(res => {
|
toPromise<any>(this.tagService.deleteLabelToImages(this.repoName, this.selectedRow[0].name, labelId)).then(res => {
|
||||||
@ -332,10 +339,18 @@ export class TagComponent implements OnInit, AfterViewInit {
|
|||||||
this.errorHandler.error(err);
|
this.errorHandler.error(err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rightFilterLabel(labelInfo: {[key: string]: any | string[]}): void {
|
||||||
|
if (labelInfo) {
|
||||||
|
if (!labelInfo.iconsShow) {
|
||||||
|
this.filterLabel(labelInfo);
|
||||||
|
} else {
|
||||||
|
this.unFilterLabel(labelInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
filterLabel(labelInfo: {[key: string]: any | string[]}): void {
|
filterLabel(labelInfo: {[key: string]: any | string[]}): void {
|
||||||
if (labelInfo && labelInfo.iconsShow) {
|
|
||||||
let labelName = labelInfo.label.name;
|
let labelName = labelInfo.label.name;
|
||||||
this.imageFilterLabels.filter(data => {
|
this.imageFilterLabels.filter(data => {
|
||||||
if (data.label.name !== labelName) {
|
if (data.label.name !== labelName) {
|
||||||
@ -362,10 +377,8 @@ export class TagComponent implements OnInit, AfterViewInit {
|
|||||||
|
|
||||||
this.clrLoad(st);
|
this.clrLoad(st);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
unFilterLabel(labelInfo: {[key: string]: any | string[]}): void {
|
unFilterLabel(labelInfo: {[key: string]: any | string[]}): void {
|
||||||
if (labelInfo && !labelInfo.iconsShow) {
|
|
||||||
this.filterOneLabel = this.initFilter;
|
this.filterOneLabel = this.initFilter;
|
||||||
|
|
||||||
// reload datagu
|
// reload datagu
|
||||||
@ -384,7 +397,6 @@ export class TagComponent implements OnInit, AfterViewInit {
|
|||||||
}
|
}
|
||||||
this.clrLoad(st);
|
this.clrLoad(st);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
handleInputFilter() {
|
handleInputFilter() {
|
||||||
if (this.filterName.length) {
|
if (this.filterName.length) {
|
||||||
|
@ -27,11 +27,11 @@
|
|||||||
"@ngx-translate/http-loader": "0.0.3",
|
"@ngx-translate/http-loader": "0.0.3",
|
||||||
"@types/jquery": "^2.0.41",
|
"@types/jquery": "^2.0.41",
|
||||||
"@webcomponents/custom-elements": "^1.0.0",
|
"@webcomponents/custom-elements": "^1.0.0",
|
||||||
"clarity-angular": "^0.10.27",
|
"clarity-angular": "0.10.24",
|
||||||
"clarity-icons": "^0.10.17",
|
"clarity-icons": "0.10.24",
|
||||||
"clarity-ui": "^0.10.27",
|
"clarity-ui": "0.10.24",
|
||||||
"core-js": "^2.4.1",
|
"core-js": "^2.4.1",
|
||||||
"harbor-ui": "0.6.67",
|
"harbor-ui": "0.6.68",
|
||||||
"intl": "^1.2.5",
|
"intl": "^1.2.5",
|
||||||
"mutationobserver-shim": "^0.3.2",
|
"mutationobserver-shim": "^0.3.2",
|
||||||
"ngx-cookie": "^1.0.0",
|
"ngx-cookie": "^1.0.0",
|
||||||
|
@ -16,7 +16,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.content-area-override {
|
.content-area-override {
|
||||||
padding: 36px !important;
|
padding-left: 36px !important;
|
||||||
|
padding-bottom: 36px !important;
|
||||||
padding-right: 21px !important;
|
padding-right: 21px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
.custom-h2 {
|
|
||||||
margin-top: 0px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-tips-icon {
|
.info-tips-icon {
|
||||||
color: grey;
|
color: grey;
|
||||||
|
@ -18,9 +18,6 @@
|
|||||||
<li role="presentation" class="nav-item" *ngIf="withClair">
|
<li role="presentation" class="nav-item" *ngIf="withClair">
|
||||||
<button id="config-vulnerability" class="btn btn-link nav-link" aria-controls="vulnerability" [class.active]='isCurrentTabLink("config-vulnerability")' type="button" (click)='tabLinkClick("config-vulnerability")'>{{'CONFIG.VULNERABILITY' | translate}}</button>
|
<button id="config-vulnerability" class="btn btn-link nav-link" aria-controls="vulnerability" [class.active]='isCurrentTabLink("config-vulnerability")' type="button" (click)='tabLinkClick("config-vulnerability")'>{{'CONFIG.VULNERABILITY' | translate}}</button>
|
||||||
</li>
|
</li>
|
||||||
<li role="presentation" class="nav-item">
|
|
||||||
<button id="config-repo" class="btn btn-link nav-link" aria-controls="repoReadOnly" [class.active]='isCurrentTabLink("config-repo")' type="button" (click)='tabLinkClick("config-repo")'>{{'CONFIG.REPO_READ_ONLY' | translate}}</button>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
<section id="authentication" role="tabpanel" aria-labelledby="config-auth" [hidden]='!isCurrentTabContent("authentication")'>
|
<section id="authentication" role="tabpanel" aria-labelledby="config-auth" [hidden]='!isCurrentTabContent("authentication")'>
|
||||||
<config-auth [allConfig]="allConfig"></config-auth>
|
<config-auth [allConfig]="allConfig"></config-auth>
|
||||||
@ -37,9 +34,6 @@
|
|||||||
<section id="vulnerability" *ngIf="withClair" role="tabpanel" aria-labelledby="config-vulnerability" [hidden]='!isCurrentTabContent("vulnerability")'>
|
<section id="vulnerability" *ngIf="withClair" role="tabpanel" aria-labelledby="config-vulnerability" [hidden]='!isCurrentTabContent("vulnerability")'>
|
||||||
<vulnerability-config [(vulnerabilityConfig)]="allConfig"></vulnerability-config>
|
<vulnerability-config [(vulnerabilityConfig)]="allConfig"></vulnerability-config>
|
||||||
</section>
|
</section>
|
||||||
<section id="repoReadOnly" role="tabpanel" aria-labelledby="config-repo" [hidden]='!isCurrentTabContent("repoReadOnly")'>
|
|
||||||
<repo-read-only [(repoConfig)]="allConfig"></repo-read-only>
|
|
||||||
</section>
|
|
||||||
<div>
|
<div>
|
||||||
<button type="button" class="btn btn-primary" (click)="save()" [hidden]="hideBtn" [disabled]="!isValid() || !hasChanges()">{{'BUTTON.SAVE' | translate}}</button>
|
<button type="button" class="btn btn-primary" (click)="save()" [hidden]="hideBtn" [disabled]="!isValid() || !hasChanges()">{{'BUTTON.SAVE' | translate}}</button>
|
||||||
<button type="button" class="btn btn-outline" (click)="cancel()" [hidden]="hideBtn" [disabled]="!isValid() || !hasChanges()">{{'BUTTON.CANCEL' | translate}}</button>
|
<button type="button" class="btn btn-outline" (click)="cancel()" [hidden]="hideBtn" [disabled]="!isValid() || !hasChanges()">{{'BUTTON.CANCEL' | translate}}</button>
|
||||||
|
@ -31,7 +31,6 @@ import {
|
|||||||
SystemSettingsComponent,
|
SystemSettingsComponent,
|
||||||
VulnerabilityConfigComponent,
|
VulnerabilityConfigComponent,
|
||||||
} from 'harbor-ui';
|
} from 'harbor-ui';
|
||||||
import {RepoReadOnlyComponent} from "./repo/repo-read-only.component";
|
|
||||||
|
|
||||||
const fakePass = 'aWpLOSYkIzJTTU4wMDkx';
|
const fakePass = 'aWpLOSYkIzJTTU4wMDkx';
|
||||||
const TabLinkContentMap = {
|
const TabLinkContentMap = {
|
||||||
@ -41,7 +40,6 @@ const TabLinkContentMap = {
|
|||||||
'config-system': 'system_settings',
|
'config-system': 'system_settings',
|
||||||
'config-vulnerability': 'vulnerability',
|
'config-vulnerability': 'vulnerability',
|
||||||
'config-label': 'system_label',
|
'config-label': 'system_label',
|
||||||
'config-repo': 'repoReadOnly'
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -62,7 +60,6 @@ export class ConfigurationComponent implements OnInit, OnDestroy {
|
|||||||
@ViewChild(VulnerabilityConfigComponent) vulnerabilityConfig: VulnerabilityConfigComponent;
|
@ViewChild(VulnerabilityConfigComponent) vulnerabilityConfig: VulnerabilityConfigComponent;
|
||||||
@ViewChild(ConfigurationEmailComponent) mailConfig: ConfigurationEmailComponent;
|
@ViewChild(ConfigurationEmailComponent) mailConfig: ConfigurationEmailComponent;
|
||||||
@ViewChild(ConfigurationAuthComponent) authConfig: ConfigurationAuthComponent;
|
@ViewChild(ConfigurationAuthComponent) authConfig: ConfigurationAuthComponent;
|
||||||
@ViewChild(RepoReadOnlyComponent) repoConfig: RepoReadOnlyComponent;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private msgHandler: MessageHandlerService,
|
private msgHandler: MessageHandlerService,
|
||||||
@ -128,9 +125,6 @@ export class ConfigurationComponent implements OnInit, OnDestroy {
|
|||||||
case 'config-vulnerability':
|
case 'config-vulnerability':
|
||||||
properties = ['scan_all_policy'];
|
properties = ['scan_all_policy'];
|
||||||
break;
|
break;
|
||||||
case 'config-repo':
|
|
||||||
properties = ['read_only'];
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@ import { ConfigurationComponent } from './config.component';
|
|||||||
import { ConfigurationService } from './config.service';
|
import { ConfigurationService } from './config.service';
|
||||||
import { ConfigurationAuthComponent } from './auth/config-auth.component';
|
import { ConfigurationAuthComponent } from './auth/config-auth.component';
|
||||||
import { ConfigurationEmailComponent } from './email/config-email.component';
|
import { ConfigurationEmailComponent } from './email/config-email.component';
|
||||||
import {RepoReadOnlyComponent} from "./repo/repo-read-only.component";
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@ -30,7 +29,6 @@ import {RepoReadOnlyComponent} from "./repo/repo-read-only.component";
|
|||||||
ConfigurationComponent,
|
ConfigurationComponent,
|
||||||
ConfigurationAuthComponent,
|
ConfigurationAuthComponent,
|
||||||
ConfigurationEmailComponent,
|
ConfigurationEmailComponent,
|
||||||
RepoReadOnlyComponent
|
|
||||||
],
|
],
|
||||||
exports: [ConfigurationComponent],
|
exports: [ConfigurationComponent],
|
||||||
providers: [ConfigurationService]
|
providers: [ConfigurationService]
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
|
|
||||||
import {Component, Input, ViewChild} from "@angular/core";
|
|
||||||
import {Configuration} from "harbor-ui";
|
|
||||||
import {NgForm} from "@angular/forms";
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'repo-read-only',
|
|
||||||
templateUrl: 'repo-read-only.html',
|
|
||||||
})
|
|
||||||
export class RepoReadOnlyComponent {
|
|
||||||
|
|
||||||
@Input('repoConfig') currentConfig: Configuration = new Configuration();
|
|
||||||
|
|
||||||
@ViewChild('repoConfigFrom') repoForm: NgForm;
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
disabled(prop: any) {
|
|
||||||
return !(prop && prop.editable);
|
|
||||||
}
|
|
||||||
|
|
||||||
setInsecureReadOnlyValue($event: any) {
|
|
||||||
this.currentConfig.read_only.value = $event;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
<form #repoConfigFrom="ngForm" class="form">
|
|
||||||
<section class="form-block">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="repoReadOnly">{{'CONFIG.REPO_READ_ONLY' | translate}}</label>
|
|
||||||
<clr-checkbox name="repoReadOnly" id="repoReadOnly" [clrChecked]="currentConfig.read_only.value" [clrDisabled]="disabled(currentConfig.read_only)" (clrCheckedChange)="setInsecureReadOnlyValue($event)">
|
|
||||||
<a href="javascript:void(0)" role="tooltip" aria-haspopup="true" class="tooltip tooltip-top-right" style="top:-7px;">
|
|
||||||
<clr-icon shape="info-circle" class="info-tips-icon" size="24"></clr-icon>
|
|
||||||
<span class="tooltip-content">{{'CONFIG.REPO_TOOLTIP' | translate}}</span>
|
|
||||||
</a>
|
|
||||||
</clr-checkbox>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</form>
|
|
@ -1,4 +1,4 @@
|
|||||||
<div class="row" style="margin-top: 24px;position: relative;">
|
<div class="row" style="margin-top: 4px;position: relative;">
|
||||||
<div>
|
<div>
|
||||||
<div class="row flex-items-xs-between rightPos">
|
<div class="row flex-items-xs-between rightPos">
|
||||||
<div class="flex-xs-middle option-left" style="position: relative; top: 10px;">
|
<div class="flex-xs-middle option-left" style="position: relative; top: 10px;">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<a *ngIf="hasSignedIn" (click)="backToProject()" class="cursor">< {{'PROJECT_DETAIL.PROJECTS' | translate}}</a>
|
<a *ngIf="hasSignedIn" (click)="backToProject()" class="cursor">< {{'PROJECT_DETAIL.PROJECTS' | translate}}</a>
|
||||||
<a *ngIf="!hasSignedIn" [routerLink]="['/harbor', 'sign-in']">< {{'SEARCH.BACK' | translate}}</a>
|
<a *ngIf="!hasSignedIn" [routerLink]="['/harbor', 'sign-in']">< {{'SEARCH.BACK' | translate}}</a>
|
||||||
|
|
||||||
<h1 class="sub-header-title">{{currentProject.name}} <span class="role-label" *ngIf="isMember">{{roleName | translate}}</span></h1>
|
<h1 class="custom-h2" sub-header-title>{{currentProject.name}} <span class="role-label" *ngIf="isMember">{{roleName | translate}}</span></h1>
|
||||||
<nav class="subnav sub-nav-bg-color">
|
<nav class="subnav sub-nav-bg-color">
|
||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<h2 class="custom-h2">{{'SIDE_NAV.SYSTEM_MGMT.REGISTRY' | translate}}</h2>
|
<h2 class="custom-h2">{{'SIDE_NAV.SYSTEM_MGMT.REGISTRY' | translate}}</h2>
|
||||||
<div style="margin-top: 24px;">
|
<div style="margin-top: 4px;">
|
||||||
<hbr-endpoint></hbr-endpoint>
|
<hbr-endpoint></hbr-endpoint>
|
||||||
</div>
|
</div>
|
@ -1,3 +1,3 @@
|
|||||||
<div style="margin-top: 24px;">
|
<div style="margin-top: 4px;">
|
||||||
<hbr-replication #replicationView [projectId]="projectIdentify" [projectName]="projectName" [isSystemAdmin]="isSystemAdmin" [withReplicationJob]='true' ></hbr-replication>
|
<hbr-replication #replicationView [projectId]="projectIdentify" [projectName]="projectName" [isSystemAdmin]="isSystemAdmin" [withReplicationJob]='true' ></hbr-replication>
|
||||||
</div>
|
</div>
|
@ -1,4 +1,4 @@
|
|||||||
<h2 class="custom-h2">{{'SIDE_NAV.SYSTEM_MGMT.REPLICATION' | translate}}</h2>
|
<h2 class="custom-h2">{{'SIDE_NAV.SYSTEM_MGMT.REPLICATION' | translate}}</h2>
|
||||||
<div style="margin-top: 24px;">
|
<div style="margin-top: 4px;">
|
||||||
<hbr-replication [withReplicationJob]='true' [isSystemAdmin]="isSystemAdmin" (goToRegistry)="goRegistry()" (redirect)="customRedirect($event)"></hbr-replication>
|
<hbr-replication [withReplicationJob]='true' [isSystemAdmin]="isSystemAdmin" (goToRegistry)="goRegistry()" (redirect)="customRedirect($event)"></hbr-replication>
|
||||||
</div>
|
</div>
|
@ -3,6 +3,4 @@
|
|||||||
margin-top: 36px;
|
margin-top: 36px;
|
||||||
margin-bottom: 11px;
|
margin-bottom: 11px;
|
||||||
}
|
}
|
||||||
.custom-h2 {
|
|
||||||
margin-top: 0px !important;
|
|
||||||
}
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div style="margin-top: 24px;">
|
<div style="margin-top: 4px;">
|
||||||
<hbr-repository-gridview [projectId]="projectId" [projectName]="projectName" [hasSignedIn]="hasSignedIn"
|
<hbr-repository-gridview [projectId]="projectId" [projectName]="projectName" [hasSignedIn]="hasSignedIn"
|
||||||
[hasProjectAdminRole]="hasProjectAdminRole"
|
[hasProjectAdminRole]="hasProjectAdminRole"
|
||||||
(repoClickEvent)="watchRepoClickEvent($event)"></hbr-repository-gridview>
|
(repoClickEvent)="watchRepoClickEvent($event)"></hbr-repository-gridview>
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
.custom-h2 {
|
|
||||||
margin-top: 0px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-add-button {
|
.custom-add-button {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
@ -625,7 +625,9 @@
|
|||||||
"LEVEL_VULNERABILITIES": "Level Vulnerabilities",
|
"LEVEL_VULNERABILITIES": "Level Vulnerabilities",
|
||||||
"PLACEHOLDER": "We couldn't find any tags!",
|
"PLACEHOLDER": "We couldn't find any tags!",
|
||||||
"COPY_ERROR": "Copy failed, please try to manually copy.",
|
"COPY_ERROR": "Copy failed, please try to manually copy.",
|
||||||
"FILTER_FOR_TAGS": "Filter Tags"
|
"FILTER_FOR_TAGS": "Filter Tags",
|
||||||
|
"AUTHOR": "Author",
|
||||||
|
"LABELS": "LABELS"
|
||||||
},
|
},
|
||||||
"LABEL": {
|
"LABEL": {
|
||||||
"LABEL": "Label",
|
"LABEL": "Label",
|
||||||
@ -652,7 +654,7 @@
|
|||||||
},
|
},
|
||||||
"UNKNOWN_ERROR": "Unknown errors have occurred. Please try again later.",
|
"UNKNOWN_ERROR": "Unknown errors have occurred. Please try again later.",
|
||||||
"UNAUTHORIZED_ERROR": "Your session is invalid or has expired. You need to sign in to continue your action.",
|
"UNAUTHORIZED_ERROR": "Your session is invalid or has expired. You need to sign in to continue your action.",
|
||||||
"REPO_READ_ONLY": "Maintenance in Progress: During this period, you cannot delete repository, tag and push image.",
|
"REPO_READ_ONLY": "Harbor is set to read-only mode, Deleting repository, tag and pushing image will be disabled under read-only mode.",
|
||||||
"FORBIDDEN_ERROR": "You do not have the proper privileges to perform the action.",
|
"FORBIDDEN_ERROR": "You do not have the proper privileges to perform the action.",
|
||||||
"GENERAL_ERROR": "Errors have occurred when performing service call: {{param}}.",
|
"GENERAL_ERROR": "Errors have occurred when performing service call: {{param}}.",
|
||||||
"BAD_REQUEST_ERROR": "We are unable to perform your action because of a bad request.",
|
"BAD_REQUEST_ERROR": "We are unable to perform your action because of a bad request.",
|
||||||
|
@ -654,7 +654,7 @@
|
|||||||
},
|
},
|
||||||
"UNKNOWN_ERROR": "Ha ocurrido un error desconocido. Por favor, inténtelo de nuevo más tarde.",
|
"UNKNOWN_ERROR": "Ha ocurrido un error desconocido. Por favor, inténtelo de nuevo más tarde.",
|
||||||
"UNAUTHORIZED_ERROR": "La sesión no es válida o ha caducado. Necesita identificarse de nuevo para llevar a cabo esa acción.",
|
"UNAUTHORIZED_ERROR": "La sesión no es válida o ha caducado. Necesita identificarse de nuevo para llevar a cabo esa acción.",
|
||||||
"REPO_READ_ONLY": "Maintenance in Progress: During this period, you cannot delete repository, tag and push image.",
|
"REPO_READ_ONLY": "Harbor is set to read-only mode, Deleting repository, tag and pushing image will be disabled under read-only mode.",
|
||||||
"FORBIDDEN_ERROR": "No tienes permisos para llevar a cabo esa acción.",
|
"FORBIDDEN_ERROR": "No tienes permisos para llevar a cabo esa acción.",
|
||||||
"GENERAL_ERROR": "Han ocurrido errores cuando se llamaba al servicio: {{param}}.",
|
"GENERAL_ERROR": "Han ocurrido errores cuando se llamaba al servicio: {{param}}.",
|
||||||
"BAD_REQUEST_ERROR": "No hemos podido llevar la acción debido a una solicitud incorrecta.",
|
"BAD_REQUEST_ERROR": "No hemos podido llevar la acción debido a una solicitud incorrecta.",
|
||||||
|
@ -564,7 +564,10 @@
|
|||||||
"SCAN_COMPLETION_TIME": "Analyse Terminée",
|
"SCAN_COMPLETION_TIME": "Analyse Terminée",
|
||||||
"IMAGE_VULNERABILITIES": "Vulnérabilitées de l'Image",
|
"IMAGE_VULNERABILITIES": "Vulnérabilitées de l'Image",
|
||||||
"PLACEHOLDER": "Nous ne trouvons aucun tag !",
|
"PLACEHOLDER": "Nous ne trouvons aucun tag !",
|
||||||
"COPY_ERROR": "Copie échouée, veuillez essayer de copier manuellement."
|
"COPY_ERROR": "Copie échouée, veuillez essayer de copier manuellement.",
|
||||||
|
"FILTER_FOR_TAGS": "Filter Tags",
|
||||||
|
"AUTHOR": "Author",
|
||||||
|
"LABELS": "LABELS"
|
||||||
},
|
},
|
||||||
"LABEL": {
|
"LABEL": {
|
||||||
"LABEL": "Label",
|
"LABEL": "Label",
|
||||||
@ -591,7 +594,7 @@
|
|||||||
},
|
},
|
||||||
"UNKNOWN_ERROR": "Des erreurs inconnues sont survenues. Veuillez réessayer plus tard.",
|
"UNKNOWN_ERROR": "Des erreurs inconnues sont survenues. Veuillez réessayer plus tard.",
|
||||||
"UNAUTHORIZED_ERROR": "Votre session est invalide ou a expiré. Vous devez vous connecter pour continuer votre action.",
|
"UNAUTHORIZED_ERROR": "Votre session est invalide ou a expiré. Vous devez vous connecter pour continuer votre action.",
|
||||||
"REPO_READ_ONLY": "Maintenance in Progress: During this period, you cannot delete repository, tag and push image.",
|
"REPO_READ_ONLY": "Harbor is set to read-only mode, Deleting repository, tag and pushing image will be disabled under read-only mode.",
|
||||||
"FORBIDDEN_ERROR": "Vous n'avez pas les privilèges appropriés pour effectuer l'action.",
|
"FORBIDDEN_ERROR": "Vous n'avez pas les privilèges appropriés pour effectuer l'action.",
|
||||||
"GENERAL_ERROR": "Des erreurs sont survenues lors de l'appel à un service : {{param}}.",
|
"GENERAL_ERROR": "Des erreurs sont survenues lors de l'appel à un service : {{param}}.",
|
||||||
"BAD_REQUEST_ERROR": "Nous ne pouvons pas exécuter votre action à cause d'une mauvaise requête.",
|
"BAD_REQUEST_ERROR": "Nous ne pouvons pas exécuter votre action à cause d'une mauvaise requête.",
|
||||||
|
@ -654,7 +654,7 @@
|
|||||||
},
|
},
|
||||||
"UNKNOWN_ERROR": "发生未知错误,请稍后再试。",
|
"UNKNOWN_ERROR": "发生未知错误,请稍后再试。",
|
||||||
"UNAUTHORIZED_ERROR": "会话无效或者已经过期, 请重新登录以继续。",
|
"UNAUTHORIZED_ERROR": "会话无效或者已经过期, 请重新登录以继续。",
|
||||||
"REPO_READ_ONLY": "正在进行维护,在这期间,不能删除仓库、标签,也不能推送镜像。",
|
"REPO_READ_ONLY": "Harbor被设置为只读模式,在此模式下,不能删除仓库、标签及推送镜像。",
|
||||||
"FORBIDDEN_ERROR": "当前操作被禁止,请确认你有合法的权限。",
|
"FORBIDDEN_ERROR": "当前操作被禁止,请确认你有合法的权限。",
|
||||||
"GENERAL_ERROR": "调用后台服务时出现错误: {{param}}。",
|
"GENERAL_ERROR": "调用后台服务时出现错误: {{param}}。",
|
||||||
"BAD_REQUEST_ERROR": "错误请求, 操作无法完成。",
|
"BAD_REQUEST_ERROR": "错误请求, 操作无法完成。",
|
||||||
|
@ -65,3 +65,6 @@
|
|||||||
::-webkit-scrollbar-thumb:window-inactive {
|
::-webkit-scrollbar-thumb:window-inactive {
|
||||||
background: rgba(255,0,0,0.4);
|
background: rgba(255,0,0,0.4);
|
||||||
}
|
}
|
||||||
|
.custom-h2 {
|
||||||
|
margin-top: 0px !important;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user