|
|
|
@ -40,8 +40,10 @@ export class DeployDialogComponent implements OnInit {
|
|
|
|
window: new FormControl(''),
|
|
|
|
window: new FormControl(''),
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
endpoint_mode: new FormControl(''),
|
|
|
|
endpoint_mode: new FormControl(''),
|
|
|
|
placement: new FormControl(''),
|
|
|
|
placement: this.formBuilder.group({
|
|
|
|
max_replicas_per_node: new FormControl('', [Validators.pattern('^[0-9]+$')]),
|
|
|
|
constraints: new FormControl(''),
|
|
|
|
|
|
|
|
max_replicas_per_node: new FormControl('', [Validators.pattern('^[0-9]+$')])
|
|
|
|
|
|
|
|
}),
|
|
|
|
resources: this.formBuilder.group({
|
|
|
|
resources: this.formBuilder.group({
|
|
|
|
limits: this.formBuilder.group({
|
|
|
|
limits: this.formBuilder.group({
|
|
|
|
cpus: new FormControl(''),
|
|
|
|
cpus: new FormControl(''),
|
|
|
|
@ -60,7 +62,10 @@ export class DeployDialogComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
this.formGeneral.patchValue({
|
|
|
|
this.formGeneral.patchValue({
|
|
|
|
...this.data.deploy,
|
|
|
|
...this.data.deploy,
|
|
|
|
placement: this.data.deploy.placement.constraints.join(',')
|
|
|
|
placement: {
|
|
|
|
|
|
|
|
max_replicas_per_node: this.data.deploy.placement.max_replicas_per_node,
|
|
|
|
|
|
|
|
constraints: this.data.deploy.placement.constraints.join(',')
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -69,7 +74,8 @@ export class DeployDialogComponent implements OnInit {
|
|
|
|
const fields: ServiceDeploy = {
|
|
|
|
const fields: ServiceDeploy = {
|
|
|
|
...this.formGeneral.getRawValue(),
|
|
|
|
...this.formGeneral.getRawValue(),
|
|
|
|
placement: {
|
|
|
|
placement: {
|
|
|
|
constraints: this.formGeneral.get('placement').value.split(','),
|
|
|
|
max_replicas_per_node: this.formGeneral.get('placement').value.max_replicas_per_node,
|
|
|
|
|
|
|
|
constraints: this.formGeneral.get('placement').value.constraints.split(','),
|
|
|
|
preferences: this.preferences.getKeyValuePaies()
|
|
|
|
preferences: this.preferences.getKeyValuePaies()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
labels: this.labels.getKeyValuePaies(),
|
|
|
|
labels: this.labels.getKeyValuePaies(),
|
|
|
|
|