Ver Fonte

add defaults to all form items (#3719)

Co-authored-by: David Townley <davidtownley@Davids-MacBook-Air.local>
d-g-town há 2 anos atrás
pai
commit
ed4cc51566
1 ficheiros alterados com 5 adições e 5 exclusões
  1. 5 5
      dashboard/src/lib/porter-apps/values.ts

+ 5 - 5
dashboard/src/lib/porter-apps/values.ts

@@ -120,22 +120,22 @@ export function deserializeAutoscaling({
       enabled: ServiceField.boolean(autoscaling.enabled, override?.enabled),
       minInstances: autoscaling.minInstances
         ? ServiceField.number(autoscaling.minInstances, override?.minInstances)
-        : undefined,
+        : ServiceField.number(1, undefined),
       maxInstances: autoscaling.maxInstances
         ? ServiceField.number(autoscaling.maxInstances, override?.maxInstances)
-        : undefined,
+        : ServiceField.number(10, undefined),
       cpuThresholdPercent: autoscaling.cpuThresholdPercent
         ? ServiceField.number(
             autoscaling.cpuThresholdPercent,
             override?.cpuThresholdPercent
           )
-        : undefined,
+        : ServiceField.number(50, undefined),
       memoryThresholdPercent: autoscaling.memoryThresholdPercent
         ? ServiceField.number(
             autoscaling.memoryThresholdPercent,
             override?.memoryThresholdPercent
           )
-        : undefined,
+        : ServiceField.number(50, undefined),
     }
   );
 }
@@ -175,7 +175,7 @@ export function deserializeHealthCheck({
       enabled: ServiceField.boolean(health.enabled, override?.enabled),
       httpPath: health.httpPath
         ? ServiceField.string(health.httpPath, override?.httpPath)
-        : undefined,
+        :  ServiceField.string("", undefined),
     }
   );
 }