1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 06:49:40 +02:00

fix(k8s/storage): missing endpoint id in storage patch request (#4174)

This commit is contained in:
Maxime Bajeux 2020-08-08 00:43:34 +02:00 committed by GitHub
parent 26ee78e1e7
commit e7a33347c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View file

@ -57,7 +57,7 @@ class KubernetesConfigureController {
const storagePromises = _.map(classes, (storageClass) => {
const oldStorageClass = _.find(this.oldStorageClasses, { Name: storageClass.Name });
if (oldStorageClass) {
return this.KubernetesStorageService.patch(oldStorageClass, storageClass);
return this.KubernetesStorageService.patch(this.state.endpointId, oldStorageClass, storageClass);
}
});
@ -89,6 +89,7 @@ class KubernetesConfigureController {
actionInProgress: false,
displayConfigureClassPanel: {},
viewReady: false,
endpointId: this.$stateParams.id,
};
this.formValues = {
@ -97,8 +98,7 @@ class KubernetesConfigureController {
};
try {
const endpointId = this.$stateParams.id;
[this.StorageClasses, this.endpoint] = await Promise.all([this.KubernetesStorageService.get(endpointId), this.EndpointService.endpoint(endpointId)]);
[this.StorageClasses, this.endpoint] = await Promise.all([this.KubernetesStorageService.get(this.state.endpointId), this.EndpointService.endpoint(this.state.endpointId)]);
_.forEach(this.StorageClasses, (item) => {
item.availableAccessModes = new KubernetesStorageClassAccessPolicies();
const storage = _.find(this.endpoint.Kubernetes.Configuration.StorageClasses, (sc) => sc.Name === item.Name);