From d11817f773bfc1f810caacaec330d1460495c4c3 Mon Sep 17 00:00:00 2001 From: Yevhen Vydolob Date: Mon, 8 May 2023 09:40:11 +0300 Subject: [PATCH] Add crc links to dashboard Signed-off-by: Yevhen Vydolob --- src/extension.ts | 24 ++++++++++++++++++++++++ src/install/crc-install.ts | 1 + 2 files changed, 25 insertions(+) diff --git a/src/extension.ts b/src/extension.ts index ead820b8..63bbcb66 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -64,6 +64,29 @@ export async function activate(extensionContext: extensionApi.ExtensionContext): detectionChecks.push(...getCrcDetectionChecks(crcVersion)); + const links: extensionApi.Link[] = [ + { + title: 'Website', + url: 'https://developers.redhat.com/products/openshift-local/overview', + }, + { + title: 'Installation guide', + url: 'https://access.redhat.com/documentation/en-us/red_hat_openshift_local/2.18/html/getting_started_guide/installation_gsg', + }, + { + title: 'Obtain pull-secret', + url: 'https://cloud.redhat.com/openshift/create/local', + }, + { + title: 'Troubleshooting', + url: 'https://access.redhat.com/documentation/en-us/red_hat_openshift_local/2.18/html/getting_started_guide/troubleshooting_gsg', + }, + { + title: 'Repository', + url: 'https://github.com/crc-org/crc-extension', + }, + ]; + // create CRC provider const provider = extensionApi.provider.createProvider({ name: productName, @@ -75,6 +98,7 @@ export async function activate(extensionContext: extensionApi.ExtensionContext): icon: './icon.png', logo: './icon.png', }, + links, }); extensionContext.subscriptions.push(provider); diff --git a/src/install/crc-install.ts b/src/install/crc-install.ts index bff9e7d8..bc0d325d 100644 --- a/src/install/crc-install.ts +++ b/src/install/crc-install.ts @@ -78,6 +78,7 @@ export class CrcInstall { // update detections checks provider.updateDetectionChecks(getCrcDetectionChecks(newInstalledCrc)); + provider.updateVersion(newInstalledCrc.version); let setupResult = false; if (await needSetup()) { setupResult = await setUpCrc(logger, true);