-
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
Merged
Merged
Changes from 16 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
6288fb2
Some changes
milindk8 a1d7899
Fixed auto node bug
milindk8 aa05135
Added terminated state
milindk8 3c44988
Fixed errorReason
milindk8 ff649e3
constant messaging
milindk8 0f0dfcd
Removed shell sh
milindk8 cd7b75a
Minor fix
milindk8 6afd9ca
Merge branch 'main' into cluster-terminal-enhancement
milindk8 0462ec4
Fixed race condition bug
milindk8 b873d44
fix polling when time out
milindk8 db03eca
fix sizing in edit mode
milindk8 0bdaa4c
Placeholder changes
milindk8 596d1ca
Fixed width issue
milindk8 d73b067
fixed socket resize issue
gireesh-naidu 5cfbb38
format code
gireesh-naidu 2c0c2d9
minor review changes
gireesh-naidu 4fb74f5
Merge branch 'main' into cluster-terminal-enhancement
milindk8 64471db
Added selected node label
milindk8 247f061
Merge branch 'main' into cluster-terminal-enhancement
milindk8 9f4b403
Merge branch 'main' into cluster-terminal-enhancement
milindk8 0c01dac
comment changes
milindk8 1022083
Merge branch 'main' into cluster-terminal-enhancement
milindk8 5684b26
Merge branch 'main' into cluster-terminal-enhancement
milindk8 baf4787
constants added
milindk8 6560c75
Merge branch 'main' into cluster-terminal-enhancement
milindk8 82385a0
Merge branch 'main' into cluster-terminal-enhancement
milindk8 a6b2714
Comment changes
milindk8 331f355
const changes
milindk8 e5fed32
Minor fix
milindk8 93f21db
Merge branch 'main' into cluster-terminal-enhancement
milindk8 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,11 +2,18 @@ import React, { useState, useEffect } from 'react' | |
| import { MESSAGING_UI } from '../../config' | ||
| import { showError } from '../common' | ||
| import { EventsTable } from '../v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/EventsTable' | ||
| import { PodEventsType } from '../v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/node.type' | ||
| import MessageUI from '../v2/common/message.ui' | ||
| import { getClusterEvents } from './clusterNodes.service' | ||
|
|
||
| export default function ClusterEvents({ terminalAccessId }: { terminalAccessId: number }) { | ||
| const [events, setEvents] = useState([]) | ||
| export default function ClusterEvents({ | ||
| terminalAccessId, | ||
| reconnectStart, | ||
| }: { | ||
| terminalAccessId: number | ||
| reconnectStart?: () => void | ||
| }) { | ||
| const [events, setEvents] = useState<PodEventsType>() | ||
| const [loading, setLoading] = useState<boolean>(true) | ||
| const [isResourceMissing, setResourceMissing] = useState(false) | ||
|
|
||
|
|
@@ -15,12 +22,13 @@ export default function ClusterEvents({ terminalAccessId }: { terminalAccessId: | |
| getClusterEvents(terminalAccessId) | ||
| .then((response) => { | ||
| setLoading(false) | ||
| const events = response.result?.events.items | ||
| const events = response.result | ||
| setEvents(events) | ||
|
||
| }) | ||
| .catch((error) => { | ||
| showError(error) | ||
| }).finally(() => { | ||
| }) | ||
| .finally(() => { | ||
| setLoading(false) | ||
| }) | ||
| } else { | ||
|
|
@@ -32,6 +40,11 @@ export default function ClusterEvents({ terminalAccessId }: { terminalAccessId: | |
| return isResourceMissing ? ( | ||
| <MessageUI msg={MESSAGING_UI.NO_EVENTS} size={24} /> | ||
| ) : ( | ||
| <EventsTable loading={loading} eventsList={events} /> | ||
| <EventsTable | ||
| loading={loading} | ||
| eventsList={events?.eventsResponse?.events.items} | ||
| errorValue={events} | ||
| reconnect={reconnectStart} | ||
| /> | ||
| ) | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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