mirror of https://github.com/portainer/portainer
fix(app): redirect to app after edit [EE-6385] (#11772)
Co-authored-by: testa113 <testa113>pull/10848/head
parent
b6daee2850
commit
9dd9ffdb3b
|
@ -263,7 +263,12 @@ class KubernetesCreateApplicationController {
|
||||||
{ stackFile: this.stackFileContent, stackName: this.formValues.StackName }
|
{ stackFile: this.stackFileContent, stackName: this.formValues.StackName }
|
||||||
);
|
);
|
||||||
this.state.isEditorDirty = false;
|
this.state.isEditorDirty = false;
|
||||||
this.$window.location.reload();
|
this.Notifications.success('Success', 'Request to update application successfully submitted');
|
||||||
|
this.$state.go(
|
||||||
|
'kubernetes.applications.application',
|
||||||
|
{ name: this.application.Name, namespace: this.application.ResourcePool, endpointId: this.endpoint.Id },
|
||||||
|
{ inherit: false }
|
||||||
|
);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.Notifications.error('Failure', err, 'Failed redeploying application');
|
this.Notifications.error('Failure', err, 'Failed redeploying application');
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -132,8 +132,8 @@ class KubernetesRedeployAppGitFormController {
|
||||||
|
|
||||||
this.state.redeployInProgress = true;
|
this.state.redeployInProgress = true;
|
||||||
await this.StackService.updateKubeGit(this.stack.Id, this.stack.EndpointId, this.namespace, this.formValues);
|
await this.StackService.updateKubeGit(this.stack.Id, this.stack.EndpointId, this.namespace, this.formValues);
|
||||||
this.Notifications.success('Success', 'Pulled and redeployed stack successfully');
|
this.Notifications.success('Success', 'Pulled and redeployed application successfully');
|
||||||
await this.$state.reload();
|
this.$state.go('kubernetes.applications.application', { name: this.appName, namespace: this.namespace, endpointId: this.endpointId }, { inherit: false });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.Notifications.error('Failure', err, 'Failed redeploying application');
|
this.Notifications.error('Failure', err, 'Failed redeploying application');
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -170,6 +170,8 @@ class KubernetesRedeployAppGitFormController {
|
||||||
}
|
}
|
||||||
|
|
||||||
$onInit() {
|
$onInit() {
|
||||||
|
this.endpointId = this.$state.params.endpointId;
|
||||||
|
this.appName = this.$state.params.name;
|
||||||
this.formValues.RefName = this.stack.GitConfig.ReferenceName;
|
this.formValues.RefName = this.stack.GitConfig.ReferenceName;
|
||||||
this.formValues.TLSSkipVerify = this.stack.GitConfig.TLSSkipVerify;
|
this.formValues.TLSSkipVerify = this.stack.GitConfig.TLSSkipVerify;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue