mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 14:29:40 +02:00
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 linie
This commit is contained in:
parent
68453482af
commit
c56c236e3a
2 changed files with 6 additions and 1 deletions
|
@ -18,6 +18,7 @@ angular.module('portainer.app').controller('StackDuplicationFormController', [
|
||||||
ctrl.duplicateStack = duplicateStack;
|
ctrl.duplicateStack = duplicateStack;
|
||||||
ctrl.migrateStack = migrateStack;
|
ctrl.migrateStack = migrateStack;
|
||||||
ctrl.isMigrationButtonDisabled = isMigrationButtonDisabled;
|
ctrl.isMigrationButtonDisabled = isMigrationButtonDisabled;
|
||||||
|
ctrl.isEndpointSelected = isEndpointSelected;
|
||||||
|
|
||||||
function isFormValidForMigration() {
|
function isFormValidForMigration() {
|
||||||
return ctrl.formValues.endpoint && ctrl.formValues.endpoint.Id;
|
return ctrl.formValues.endpoint && ctrl.formValues.endpoint.Id;
|
||||||
|
@ -62,5 +63,9 @@ angular.module('portainer.app').controller('StackDuplicationFormController', [
|
||||||
function isTargetEndpointAndCurrentEquals() {
|
function isTargetEndpointAndCurrentEquals() {
|
||||||
return ctrl.formValues.endpoint && ctrl.formValues.endpoint.Id === ctrl.currentEndpointId;
|
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-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>
|
<span ng-show="$ctrl.state.duplicationInProgress">Duplication in progress...</span>
|
||||||
</button>
|
</button>
|
||||||
<div ng-if="$ctrl.yamlError"
|
<div ng-if="$ctrl.yamlError && $ctrl.isEndpointSelected()"
|
||||||
><span class="text-danger small">{{ $ctrl.yamlError }}</span></div
|
><span class="text-danger small">{{ $ctrl.yamlError }}</span></div
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue