-
Notifications
You must be signed in to change notification settings - Fork 647
OCPBUGS-57715: Fix Made - Clicking Cancel on YAML Creation now redirects to Secrets Page #15253
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
base: main
Are you sure you want to change the base?
Conversation
@krishagarwal278: This pull request references Jira Issue OCPBUGS-57715, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: krishagarwal278 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
… Page modified: frontend/public/components/edit-yaml.jsx
94c8c03
to
0316624
Compare
/test frontend |
@krishagarwal278: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually let's keep the changes in this PR instead
const navigateToResourceList = () => { | ||
const model = getModel(props.obj) || props.model; | ||
if (model) { | ||
const namespace = | ||
model.namespaced && props.activeNamespace !== ALL_NAMESPACES_KEY | ||
? props.activeNamespace | ||
: undefined; | ||
navigate(resourceListPathFromModel(model, namespace)); | ||
} else { | ||
navigate(-1); // fallback to previous page if no model available | ||
} | ||
}; | ||
|
||
const displayedVersion = React.useRef('0'); | ||
const onCancel = 'onCancel' in props ? props.onCancel : navigateToResourceList; | ||
|
||
/** @return {import('monaco-editor').editor.IStandaloneCodeEditor | null} */ | ||
const getEditor = () => { | ||
return monacoRef.current?.editor; | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to reduce merge conflicts, can you move this block above getModel
? so that the code for getEditor
, onCancel
, etc. remains unchanged
No description provided.