mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 14:59:41 +02:00
fix(application): hpa breaks application edit (#4166)
This commit is contained in:
parent
2158cc5157
commit
e4ca58a042
1 changed files with 4 additions and 2 deletions
|
@ -276,8 +276,10 @@ class KubernetesApplicationService {
|
||||||
|
|
||||||
const newKind = KubernetesHorizontalPodAutoScalerHelper.getApplicationTypeString(newApp);
|
const newKind = KubernetesHorizontalPodAutoScalerHelper.getApplicationTypeString(newApp);
|
||||||
const newAutoScaler = KubernetesHorizontalPodAutoScalerConverter.applicationFormValuesToModel(newFormValues, newKind);
|
const newAutoScaler = KubernetesHorizontalPodAutoScalerConverter.applicationFormValuesToModel(newFormValues, newKind);
|
||||||
if (_.isEmpty(oldFormValues.AutoScaler)) {
|
if (!oldFormValues.AutoScaler.IsUsed) {
|
||||||
|
if (newFormValues.AutoScaler.IsUsed) {
|
||||||
await this.KubernetesHorizontalPodAutoScalerService.create(newAutoScaler);
|
await this.KubernetesHorizontalPodAutoScalerService.create(newAutoScaler);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
const oldKind = KubernetesHorizontalPodAutoScalerHelper.getApplicationTypeString(oldApp);
|
const oldKind = KubernetesHorizontalPodAutoScalerHelper.getApplicationTypeString(oldApp);
|
||||||
const oldAutoScaler = KubernetesHorizontalPodAutoScalerConverter.applicationFormValuesToModel(oldFormValues, oldKind);
|
const oldAutoScaler = KubernetesHorizontalPodAutoScalerConverter.applicationFormValuesToModel(oldFormValues, oldKind);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue