Skip to content

Commit

Permalink
fix: add sandbox.open.login.url command disposable to subscriptions (#94
Browse files Browse the repository at this point in the history
)

Signed-off-by: Denis Golovin <[email protected]>
  • Loading branch information
dgolovin authored Mar 29, 2024
1 parent b4cb4ed commit 752f27a
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,17 @@ export async function activate(extensionContext: extensionApi.ExtensionContext):
'A free, private OpenShift environment including one project and a resource quota of 14 GB RAM, and 40 GB storage. It lasts 30 days.\n\nSign up at [https://developers.redhat.com/developer-sandbox](https://developers.redhat.com/developer-sandbox/?sc_cid=7013a000003SUmgAAG).',
};

extensionApi.commands.registerCommand('sandbox.open.login.url', () => {
extensionApi.env
.openExternal(
extensionApi.Uri.parse('https://developers.redhat.com/developer-sandbox/?sc_cid=7013a000003SUmgAAG'),
)
.then(successful => {
TelemetryLogger.logUsage('sandboxOpenLoginUrlRequest', { successful });
});
});
extensionContext.subscriptions.push(
extensionApi.commands.registerCommand('sandbox.open.login.url', () => {
extensionApi.env
.openExternal(
extensionApi.Uri.parse('https://developers.redhat.com/developer-sandbox/?sc_cid=7013a000003SUmgAAG'),
)
.then(successful => {
TelemetryLogger.logUsage('sandboxOpenLoginUrlRequest', { successful });
});
}),
);

provider = extensionApi.provider.createProvider(providerOptions);

Expand All @@ -260,7 +262,7 @@ export async function activate(extensionContext: extensionApi.ExtensionContext):

const kubeconfigUri = extensionApi.kubernetes.getKubeconfig();
const kubeconfigFile = kubeconfigUri.fsPath;
console.log('Configfile location', kubeconfigFile);
console.log('Config file location', kubeconfigFile);

const disposable = provider.setKubernetesProviderConnectionFactory({
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down

0 comments on commit 752f27a

Please sign in to comment.