diff --git a/app/scripts/directives/editEnvironmentFrom.js b/app/scripts/directives/editEnvironmentFrom.js index 709ca35835..73f3e2ac96 100644 --- a/app/scripts/directives/editEnvironmentFrom.js +++ b/app/scripts/directives/editEnvironmentFrom.js @@ -50,11 +50,12 @@ ctrl.editEnvironmentFromForm.$setDirty(); }; + ctrl.isEnvFromSelectable = function() { + return !_.isEmpty(ctrl.envFromSelectorOptions); + }; + ctrl.isEnvFromReadonly = function(entry) { - return ctrl.isReadonlyAny || - entry.isReadonlyValue === true || - ((entry.secretRef || entry.configMapRef) && !entry.selectedEnvFrom) || - _.isEmpty(ctrl.envFromSelectorOptions); + return ctrl.isReadonlyAny || entry.isReadonlyValue === true || ((entry.secretRef || entry.configMapRef) && !entry.selectedEnvFrom); }; ctrl.groupByKind = function(object) { diff --git a/app/views/directives/edit-environment-from.html b/app/views/directives/edit-environment-from.html index 2b607be32b..61e3dca374 100644 --- a/app/views/directives/edit-environment-from.html +++ b/app/views/directives/edit-environment-from.html @@ -20,7 +20,7 @@