mirror of https://github.com/portainer/portainer
fix(stacks): check properly if endpoint id is defined in the stacks object EE-6118 (#10302)
parent
2b47b84e5e
commit
dfce48cd5e
|
@ -1178,6 +1178,11 @@ class KubernetesCreateApplicationController {
|
|||
|
||||
if (this.state.isEdit) {
|
||||
this.nodesLimits.excludesPods(this.application.Pods, this.formValues.CpuLimit, KubernetesResourceReservationHelper.bytesValue(this.formValues.MemoryLimit));
|
||||
|
||||
// Workaround for EE-6118
|
||||
if (this.stack && !this.stack.EndpointId) {
|
||||
this.stack.EndpointId = this.endpoint.Id;
|
||||
}
|
||||
}
|
||||
|
||||
this.oldFormValues = angular.copy(this.formValues);
|
||||
|
|
|
@ -176,7 +176,7 @@ angular.module('portainer.app').controller('StackController', [
|
|||
// The EndpointID property is not available for these stacks, we can pass
|
||||
// the current endpoint identifier as a part of the migrate request. It will be used if
|
||||
// the EndpointID property is not defined on the stack.
|
||||
if (stack.EndpointId === 0) {
|
||||
if (!stack.EndpointId) {
|
||||
stack.EndpointId = endpoint.Id;
|
||||
}
|
||||
|
||||
|
@ -248,7 +248,7 @@ angular.module('portainer.app').controller('StackController', [
|
|||
// The EndpointID property is not available for these stacks, we can pass
|
||||
// the current endpoint identifier as a part of the update request. It will be used if
|
||||
// the EndpointID property is not defined on the stack.
|
||||
if (stack.EndpointId === 0) {
|
||||
if (!stack.EndpointId) {
|
||||
stack.EndpointId = endpoint.Id;
|
||||
}
|
||||
|
||||
|
@ -347,6 +347,11 @@ angular.module('portainer.app').controller('StackController', [
|
|||
resourcesPromise = stack.Type === 1 ? retrieveSwarmStackResources(stack.Name, agentProxy) : retrieveComposeStackResources(stack.Name);
|
||||
}
|
||||
|
||||
// Workaround for EE-6118
|
||||
if (!stack.EndpointId) {
|
||||
stack.EndpointId = endpoint.Id;
|
||||
}
|
||||
|
||||
return $q.all({
|
||||
stackFile: StackService.getStackFile(id),
|
||||
resources: resourcesPromise,
|
||||
|
|
Loading…
Reference in New Issue