Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deply redirect and error messages #5033

Merged
merged 1 commit into from
Mar 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/app/frontend/common/errors/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ const localizedErrors: {[key: string]: string} = {
MSG_ACCESS_DENIED: 'Access denied.',
MSG_DASHBOARD_EXCLUSIVE_RESOURCE_ERROR: 'Trying to access/modify dashboard exclusive resource.',
MSG_LOGIN_UNAUTHORIZED_ERROR: 'Invalid credentials provided',
MSG_DEPLOY_NAMESPACE_MISMATCH_ERROR:
'Cannot deploy to the namespace different than the currently selected one.',
MSG_DEPLOY_EMPTY_NAMESPACE_ERROR:
'Cannot deploy the content as the target namespace is not specified.',
};

/**
Expand Down
4 changes: 3 additions & 1 deletion src/app/frontend/common/services/create/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ export class CreateService {
this.reportError(i18n.MSG_DEPLOY_DIALOG_ERROR, error.error);
throw error;
} else {
this.router_.navigate(['overview']);
this.router_.navigate(['overview'], {
queryParams: {[NAMESPACE_STATE_PARAM]: this.namespace_.current()},
});
}

return response;
Expand Down