mirror of https://github.com/portainer/portainer
fix(stack): show warning if endpoint is selected (#5234)
* fix/EE-916/Invalid warning in stack details * fix typo for isEndpointSelected function * check yarmlError is valid * combine yamlError and isEndpointSelected into one liniepull/5345/head
parent
68453482af
commit
c56c236e3a
|
@ -18,6 +18,7 @@ angular.module('portainer.app').controller('StackDuplicationFormController', [
|
|||
ctrl.duplicateStack = duplicateStack;
|
||||
ctrl.migrateStack = migrateStack;
|
||||
ctrl.isMigrationButtonDisabled = isMigrationButtonDisabled;
|
||||
ctrl.isEndpointSelected = isEndpointSelected;
|
||||
|
||||
function isFormValidForMigration() {
|
||||
return ctrl.formValues.endpoint && ctrl.formValues.endpoint.Id;
|
||||
|
@ -62,5 +63,9 @@ angular.module('portainer.app').controller('StackDuplicationFormController', [
|
|||
function isTargetEndpointAndCurrentEquals() {
|
||||
return ctrl.formValues.endpoint && ctrl.formValues.endpoint.Id === ctrl.currentEndpointId;
|
||||
}
|
||||
|
||||
function isEndpointSelected() {
|
||||
return ctrl.formValues.endpoint && ctrl.formValues.endpoint.Id;
|
||||
}
|
||||
},
|
||||
]);
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<span ng-hide="$ctrl.state.duplicationInProgress"> <i class="fa fa-clone space-right" aria-hidden="true"></i> Duplicate </span>
|
||||
<span ng-show="$ctrl.state.duplicationInProgress">Duplication in progress...</span>
|
||||
</button>
|
||||
<div ng-if="$ctrl.yamlError"
|
||||
<div ng-if="$ctrl.yamlError && $ctrl.isEndpointSelected()"
|
||||
><span class="text-danger small">{{ $ctrl.yamlError }}</span></div
|
||||
>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue