fix(devices): show Connect button after disconnect and refresh auth token on reconnect#3159
Open
nmgaston wants to merge 2 commits intodevice-management-toolkit:mainfrom
Open
fix(devices): show Connect button after disconnect and refresh auth token on reconnect#3159nmgaston wants to merge 2 commits intodevice-management-toolkit:mainfrom
nmgaston wants to merge 2 commits intodevice-management-toolkit:mainfrom
Conversation
86e05bb to
c03cdf4
Compare
rsdmike
previously approved these changes
Mar 9, 2026
50e5fe5 to
7a5fa93
Compare
Member
|
Hey @nmgaston , were you able to give this a try with the cloud version to make sure this continues to work in both environments? If not, let me know and I can try it. |
7a5fa93 to
be11de5
Compare
Contributor
Author
Actually, I'll test it. I have a feeling I will also need to make changes in MPS/RPS for this as a bulk of the fix was actually in console. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
NOTE: Use with Console PR: device-management-toolkit/console#820
PR Checklist
What are you changing?
Fixes the KVM Connect button not reappearing after an unexpected AMT disconnect.
kvm.component.html: Updated the Connect button condition fromdeviceState() === 0to(deviceState() === 0 || !deviceKVMConnection()) && !isLoading()so the button is shown whenever the KVM is not connected, regardless of device state.kvm.component.ts:deviceKVMStatus(0): AddeddeviceKVMConnection.set(false)when AMT drops the connection unexpectedly, so the UI correctly reflects the disconnected state.connect(): ResetsreadyToLoadKvmanddeviceKVMConnectiontofalsebefore reconnecting, and refreshes the auth token viagetRedirectionExpirationTokenin case it expired.Anything the reviewer should know when reviewing this PR?
The root cause was that after an unexpected KVM disconnect (event
0not triggered by the user),deviceKVMConnectionremainedtrue, causing the Connect button to stay hidden. The fix ensures the signal is always in sync with the actual connection state.The Connect button condition also now covers the case where
deviceStatehasn't yet been set to0but the connection is known to be down.If the there are associated PRs in other repositories, please link them here (i.e. device-management-toolkit/repo#365 )
device-management-toolkit/console#820