Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h3 class="header-title">创建 Ingress 模版</h3>
</div>
</section>
<section class="form-block wrap">
<div style="float: left;width: 60%">
<div style="float: left;">
<label class="label-level1">服务配置</label>
<div *ngFor="let rule of kubeResource.spec.rules; let i = index">
<div class="form-group form-group-padding" >
Expand All @@ -31,7 +31,7 @@ <h3 class="header-title">创建 Ingress 模版</h3>
<div *ngFor="let path of kubeResource.spec.rules[i].http.paths; let j = index">
<div class="form-group form-group-padding" >
<label class="clr-col-md-3 form-group-label-override required">负载均衡名称</label>
<wayne-select [direction]="bottom" inputable name="svc_name" [(ngModel)]="kubeResource.spec.rules[i].http.paths[j].backend.serviceName"
<wayne-select style="margin-top: 6px;" [direction]="bottom" inputable name="svc_name" [(ngModel)]="kubeResource.spec.rules[i].http.paths[j].backend.serviceName"
searchable
[placeholder]="'PLACEHOLDER.CHOOSE' | translate">
<wayne-option *ngFor="let svc of svcs" [value]="svc.name">{{svc.name}}</wayne-option>
Expand All @@ -50,15 +50,15 @@ <h3 class="header-title">创建 Ingress 模版</h3>
</div>
</section>
<section class="form-block wrap">
<div style="float: left;width: 60%">
<div style="float: left;">
<label class="label-level1">TLS 配置</label>
<button class="btn btn-sm btn-link" (click)="onAddTLS()" href="javascript:void(0)" *ngIf="kubeResource.spec.tls.length === 0"><clr-icon shape="add"></clr-icon>添加</button>
<div *ngFor="let tls of kubeResource.spec.tls; let i = index">
<div class="form-group form-group-padding" >
<label class="clr-col-md-2 form-group-label-override">主机</label>
<input class="clr-col-md-3" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="kubeResource.spec.tls[i].hosts[0]">
<label class="clr-col-md-2 form-group-label-override">加密字典名称</label>
<wayne-select inputable name="secret_name" [(ngModel)]="kubeResource.spec.tls[i].secretName"
<wayne-select style="margin-top: 6px;" inputable name="secret_name" [(ngModel)]="kubeResource.spec.tls[i].secretName"
searchable
[placeholder]="'PLACEHOLDER.CHOOSE' | translate">
<wayne-option *ngFor="let secret of secrets" [value]="secret.name">{{secret.name}}</wayne-option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ export class CreateEditPersistentVolumeClaimTplComponent implements OnInit, Afte
return this.currentForm &&
this.currentForm.valid &&
!this.isSubmitOnGoing &&
!this.checkOnGoing;
!this.checkOnGoing &&
this.accessModesValid;
}

buildLabels(labels: {}) {
Expand All @@ -259,6 +260,10 @@ export class CreateEditPersistentVolumeClaimTplComponent implements OnInit, Afte
return labels;
}

get accessModesValid(): boolean {
return this.currentForm.value.readWriteOnce || this.currentForm.value.readOnlyMany || this.currentForm.value.readWriteMany;
}

getKubePvcByForm() {
const formValue = this.currentForm.value;
this.pvcTpl.description = formValue.description;
Expand Down
3 changes: 2 additions & 1 deletion src/frontend/src/app/shared/input/input.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ $hover-color: #999;
color: #222;
letter-spacing: 0.54px;
min-width: auto !important;

margin-top: 0 !important;
margin-bottom: 0 !important;
&:hover {
border-color: $hover-color;
}
Expand Down