Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion app/scripts/directives/oscAutoscaling.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -31,6 +34,7 @@ angular.module("openshiftConsole")
if( !('showRequestInput' in attrs) ) {
scope.showRequestInput = true;
}

}
};
});
2 changes: 1 addition & 1 deletion app/views/edit/autoscaler.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h1>
model="autoscaling"
show-name-input="true"
name-read-only="kind === 'HorizontalPodAutoscaler'"
show-request-input="autoscaling.targetCPU">
show-request-input="autoscaling.targetCPU && !(usesV2Metrics)">
</osc-autoscaling>

<label-editor
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -10269,7 +10269,7 @@ scope: {
autoscaling: "=model",
showNameInput: "=?",
nameReadOnly: "=?",
showRequestInput: "=?"
showRequestInput: "&"
},
templateUrl: "views/directives/osc-autoscaling.html",
link: function(t, r, a) {
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -9500,7 +9500,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<a href=\"command-line\" target=\"_blank\">command line tools</a>.\n" +
"</div>\n" +
"<fieldset ng-disabled=\"disableInputs\" class=\"gutter-top\">\n" +
"<osc-autoscaling model=\"autoscaling\" show-name-input=\"true\" name-read-only=\"kind === 'HorizontalPodAutoscaler'\" show-request-input=\"autoscaling.targetCPU\">\n" +
"<osc-autoscaling model=\"autoscaling\" show-name-input=\"true\" name-read-only=\"kind === 'HorizontalPodAutoscaler'\" show-request-input=\"autoscaling.targetCPU && !(usesV2Metrics)\">\n" +
"</osc-autoscaling>\n" +
"<label-editor labels=\"labels\" expand=\"true\" can-toggle=\"false\"></label-editor>\n" +
"<div class=\"buttons gutter-top gutter-bottom\">\n" +
Expand Down