diff --git a/app/scripts/directives/oscAutoscaling.js b/app/scripts/directives/oscAutoscaling.js index 91392611bf..df74888db2 100644 --- a/app/scripts/directives/oscAutoscaling.js +++ b/app/scripts/directives/oscAutoscaling.js @@ -14,7 +14,10 @@ angular.module("openshiftConsole") autoscaling: "=model", showNameInput: "=?", nameReadOnly: "=?", - showRequestInput: "=?" + // one way binding allows this field to be hidden if the + // autoscaler is not using cpuRequest, but the field should + // not disappear if a user edits it + showRequestInput: "&" }, templateUrl: 'views/directives/osc-autoscaling.html', link: function(scope, elem, attrs) { @@ -31,6 +34,7 @@ angular.module("openshiftConsole") if( !('showRequestInput' in attrs) ) { scope.showRequestInput = true; } + } }; }); diff --git a/app/views/edit/autoscaler.html b/app/views/edit/autoscaler.html index 3e262b98ef..45b367690e 100644 --- a/app/views/edit/autoscaler.html +++ b/app/views/edit/autoscaler.html @@ -52,7 +52,7 @@

model="autoscaling" show-name-input="true" name-read-only="kind === 'HorizontalPodAutoscaler'" - show-request-input="autoscaling.targetCPU"> + show-request-input="autoscaling.targetCPU && !(usesV2Metrics)"> command line tools.\n" + "\n" + "
\n" + - "\n" + + "\n" + "\n" + "\n" + "
\n" +