-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add OC login copy commands #48
Conversation
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
Fwiw, the ingress certificate error from I don't know if we should expose |
@@ -46,7 +47,7 @@ export async function activate(extensionContext: extensionApi.ExtensionContext): | |||
|
|||
if (crcVersion) { | |||
status = 'installed'; | |||
connectToCrc(); | |||
await connectToCrc(); |
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.
👍
import { commander } from './daemon-commander'; | ||
import { isWindows } from './util'; | ||
|
||
let occommand = 'oc'; |
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 might need these commandnames somewhere less too, but for now, just leave them.
commandManager.addCommand({ | ||
id: 'crc.copy.login.admin', | ||
label: 'Copy OC login command (admin)', | ||
isEnabled: status => status.CrcStatus === 'Running', |
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.
👍
You would suggest not to have these clipboard options?
That would be the better option... ... however, we also try to stay close to the current tray we are offering. When functionality is more rounded and complete, we could decide to drop these options, although a 'copy password' to clipboard might take the place for use in the console. |
provider: extensionApi.Provider, | ||
extensionContext: extensionApi.ExtensionContext, | ||
): Promise<void> { | ||
const status = () => crcStatus.getConnectionStatus(); | ||
const apiURL = 'https://api.crc.testing:6443'; | ||
const kubernetesProviderConnection: extensionApi.KubernetesProviderConnection = { | ||
name: 'OpenShift', | ||
name, |
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.
So this now is recognized as 'OpenShift Local', right?
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.
Demo:
Screen.Recording.2023-04-18.at.10.39.21.mov
PR also fixes #46
Note:
Copy*
commands are shown only forOpenShift
preset asMicroShift
doesn’t provide necessary information