mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-26 10:38:00 +01:00
Fix some UI bugs (#15486)
Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
parent
9aab74d382
commit
b58158c30f
@ -214,7 +214,10 @@ export class CreateEditEndpointComponent
|
||||
this.endpointService.getEndpoint(targetId).subscribe(
|
||||
target => {
|
||||
this.target = target;
|
||||
this.urlDisabled = this.target.type === 'docker-hub';
|
||||
this.urlDisabled = this.adapterInfo &&
|
||||
this.adapterInfo[this.target.type] &&
|
||||
this.adapterInfo[this.target.type].endpoint_pattern &&
|
||||
this.adapterInfo[this.target.type].endpoint_pattern.endpoint_type === FIXED_PATTERN_TYPE;
|
||||
// Keep data cache
|
||||
this.initVal = clone(target);
|
||||
this.initVal.credential.access_secret = this.target.type === 'google-gcr' ? FAKE_JSON_KEY : FAKE_PASSWORD;
|
||||
|
@ -207,7 +207,7 @@ export class CreateEditRuleComponent implements OnInit, OnDestroy {
|
||||
|
||||
get isValid() {
|
||||
if (this.ruleForm.controls["dest_namespace"].value) {
|
||||
if (this.ruleForm.controls["dest_namespace"].invalid) {
|
||||
if (this.ruleForm.controls["dest_namespace"].invalid) {this.ruleForm.get('trigger').get('trigger_settings').get('cron').value
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -567,6 +567,7 @@ export class CreateEditRuleComponent implements OnInit, OnDestroy {
|
||||
&& this.ruleForm.get('trigger').get('trigger_settings').get('cron')
|
||||
&& (this.ruleForm.get('trigger').get('trigger_settings').get('cron').touched
|
||||
|| this.ruleForm.get('trigger').get('trigger_settings').get('cron').dirty)
|
||||
&& this.ruleForm.get('trigger').get('trigger_settings').get('cron').value
|
||||
&& !cronRegex(this.ruleForm.get('trigger').get('trigger_settings').get('cron').value);
|
||||
}
|
||||
stickLabel(value, index) {
|
||||
|
@ -77,7 +77,7 @@
|
||||
<button class="btn btn-link" (click)="goToRepos()">{{'SUMMARY.SEE_ALL' | translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card clickable" *ngIf="hasReadChartPermission">
|
||||
<div class="card clickable" *ngIf="hasReadChartPermission && withHelmChart">
|
||||
<div class="card-header">
|
||||
<div>{{"PROJECT_DETAIL.HELMCHART" | translate}}</div>
|
||||
<div class="clr-row number">{{summaryInformation?.chart_count ? summaryInformation?.chart_count : 0}}</div>
|
||||
|
@ -132,13 +132,13 @@ describe('SummaryComponent', () => {
|
||||
expect(container).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should show three cards', async () => {
|
||||
it('should show two cards', async () => {
|
||||
component.summaryInformation = mockedSummaryInformation;
|
||||
component.isCardView = true;
|
||||
component.hasReadChartPermission = true;
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
const cards = fixture.nativeElement.querySelectorAll(".card");
|
||||
expect(cards.length).toEqual(3);
|
||||
expect(cards.length).toEqual(2);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user