Browse Source

add defaults to all form items (#3719)

Co-authored-by: David Townley <davidtownley@Davids-MacBook-Air.local>
d-g-town 2 years ago
parent
commit
ed4cc51566
1 changed files with 5 additions and 5 deletions
  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),
       enabled: ServiceField.boolean(autoscaling.enabled, override?.enabled),
       minInstances: autoscaling.minInstances
       minInstances: autoscaling.minInstances
         ? ServiceField.number(autoscaling.minInstances, override?.minInstances)
         ? ServiceField.number(autoscaling.minInstances, override?.minInstances)
-        : undefined,
+        : ServiceField.number(1, undefined),
       maxInstances: autoscaling.maxInstances
       maxInstances: autoscaling.maxInstances
         ? ServiceField.number(autoscaling.maxInstances, override?.maxInstances)
         ? ServiceField.number(autoscaling.maxInstances, override?.maxInstances)
-        : undefined,
+        : ServiceField.number(10, undefined),
       cpuThresholdPercent: autoscaling.cpuThresholdPercent
       cpuThresholdPercent: autoscaling.cpuThresholdPercent
         ? ServiceField.number(
         ? ServiceField.number(
             autoscaling.cpuThresholdPercent,
             autoscaling.cpuThresholdPercent,
             override?.cpuThresholdPercent
             override?.cpuThresholdPercent
           )
           )
-        : undefined,
+        : ServiceField.number(50, undefined),
       memoryThresholdPercent: autoscaling.memoryThresholdPercent
       memoryThresholdPercent: autoscaling.memoryThresholdPercent
         ? ServiceField.number(
         ? ServiceField.number(
             autoscaling.memoryThresholdPercent,
             autoscaling.memoryThresholdPercent,
             override?.memoryThresholdPercent
             override?.memoryThresholdPercent
           )
           )
-        : undefined,
+        : ServiceField.number(50, undefined),
     }
     }
   );
   );
 }
 }
@@ -175,7 +175,7 @@ export function deserializeHealthCheck({
       enabled: ServiceField.boolean(health.enabled, override?.enabled),
       enabled: ServiceField.boolean(health.enabled, override?.enabled),
       httpPath: health.httpPath
       httpPath: health.httpPath
         ? ServiceField.string(health.httpPath, override?.httpPath)
         ? ServiceField.string(health.httpPath, override?.httpPath)
-        : undefined,
+        :  ServiceField.string("", undefined),
     }
     }
   );
   );
 }
 }