Skip to content

Commit

Permalink
fix(app): redirect to app after edit [EE-6385] (#11772)
Browse files Browse the repository at this point in the history
Co-authored-by: testa113 <testa113>
  • Loading branch information
testA113 committed May 14, 2024
1 parent b6daee2 commit 9dd9ffd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,12 @@ class KubernetesCreateApplicationController {
{ stackFile: this.stackFileContent, stackName: this.formValues.StackName }
);
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) {
this.Notifications.error('Failure', err, 'Failed redeploying application');
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ class KubernetesRedeployAppGitFormController {

this.state.redeployInProgress = true;
await this.StackService.updateKubeGit(this.stack.Id, this.stack.EndpointId, this.namespace, this.formValues);
this.Notifications.success('Success', 'Pulled and redeployed stack successfully');
await this.$state.reload();
this.Notifications.success('Success', 'Pulled and redeployed application successfully');
this.$state.go('kubernetes.applications.application', { name: this.appName, namespace: this.namespace, endpointId: this.endpointId }, { inherit: false });
} catch (err) {
this.Notifications.error('Failure', err, 'Failed redeploying application');
} finally {
Expand Down Expand Up @@ -170,6 +170,8 @@ class KubernetesRedeployAppGitFormController {
}

$onInit() {
this.endpointId = this.$state.params.endpointId;
this.appName = this.$state.params.name;
this.formValues.RefName = this.stack.GitConfig.ReferenceName;
this.formValues.TLSSkipVerify = this.stack.GitConfig.TLSSkipVerify;

Expand Down

0 comments on commit 9dd9ffd

Please sign in to comment.