-
Notifications
You must be signed in to change notification settings - Fork 56
feat: Cluster terminal enhancement I2 #764
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
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| } | ||
| }) | ||
|
|
||
| return [{label: '',options: [AUTO_SELECT]},...groupList] |
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.
Format this file
| if (searchedTextMap.size !== matchedLabelCount) { | ||
| continue | ||
| } | ||
| } else if (selectedSearchTextType === 'nodeGroup') { |
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.
we should create some constant for nodeGroup as it is being used on multiple places
| terminalAccessId, | ||
| reconnectStart, | ||
| }: { | ||
| terminalAccessId: number |
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.
Please move this to type
| setLoading(false) | ||
| const events = response.result?.events.items | ||
| const events = response.result | ||
| setEvents(events) |
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.
we can directly set the data into setEvents no need to create the variable. also please accommodate events?.eventsResponse?.events.items it here only and and not at the time of passing the props on line no 45
| }) | ||
| } | ||
| toggleOptionChange() | ||
|
|
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.
This is supposed to be useEffect's clean up function. right? Please move it out from try catch block
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.
no, it's not. It's just setting the state
| value={selectedNodeName} | ||
| onChange={onChangeNodes} | ||
| styles={clusterSelectStyle} | ||
| styles={{ |
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.
move this out to const
| } | ||
|
|
||
| const renderErrorMessageStrip = (errorMessage) => { | ||
| if (errorMessage.message === 'timedOut') { |
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.
we should move this to const
| {TERMINAL_TEXT.CASE_OF_ERROR} | ||
| </div> | ||
| ) | ||
| } else if (errorMessage.message === 'Terminated') { |
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.
same here
| let sessionId = response.result.userTerminalSessionId | ||
| let status = response.result.status | ||
| if (!sessionId && count) { | ||
| if(status === 'Running' && !response.result?.isValidShell){ |
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.
we should move statuses to const
| if(status === 'Running' && !response.result?.isValidShell){ | ||
| preFetchData(status,'failed') | ||
| setErrorMessage({message: response.result?.errorReason, reason: ''}) | ||
| } else if (status === 'Terminated'){ |
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.
same here
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/terminal/constants.ts
Outdated
Show resolved
Hide resolved
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/EventsTable.tsx
Outdated
Show resolved
Hide resolved
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/terminal/Terminal.tsx
Outdated
Show resolved
Hide resolved
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/terminal/Terminal.tsx
Outdated
Show resolved
Hide resolved
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/terminal/Terminal.tsx
Outdated
Show resolved
Hide resolved
|
Kudos, SonarCloud Quality Gate passed!
|
Coverage report
Test suite run success67 tests passing in 12 suites. Report generated by 🧪jest coverage report action from 93f21db |








Description
Include cluster terminal FE-only fixes & enhancement
- Terminal > Node dropdown
- Categorize nodes by node groups
- Categorize ungrouped nodes in ‘Independent nodes’ category
- If no node group exists, show all nodes without any categorization
Fixes #(AB1893)
Type of change
How Has This Been Tested?
Checklist: