Skip to content

Commit

Permalink
better login error handling (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
DumpySquare authored Jul 27, 2020
1 parent 36a867a commit 7bd6697
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 342 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ atc_ilx_rpm_cache
*.zip
/fastTemplateUpload/
/fastTemplateFolderUploadTemp/
*.http
*.http
/restTests/
1 change: 1 addition & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
Expand Down
10 changes: 2 additions & 8 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ import { chuckJoke1 } from './chuckJoke';

const fast = require('@f5devcentral/f5-fast-core');

// import { MemFS } from './treeViewsProviders/fileSystemProvider';
// import { HttpResponseWebview } from './responseWebview';

export function activate(context: vscode.ExtensionContext) {

console.log('Congratulations, your extension "vscode-f5-fast" is now active!');
Expand Down Expand Up @@ -89,7 +86,7 @@ export function activate(context: vscode.ExtensionContext) {
vscode.commands.registerCommand('f5.refreshHostsTree', () => hostsTreeProvider.refresh());

context.subscriptions.push(vscode.commands.registerCommand('f5.connectDevice', async (device) => {
console.log('selected device', device);
// console.log('selected device', device);

if(ext.mgmtClient) {
ext.mgmtClient.disconnect();
Expand Down Expand Up @@ -124,7 +121,7 @@ export function activate(context: vscode.ExtensionContext) {
}
}

console.log('device-connect', device);
console.log('device-connect:', JSON.stringify(device));

var [user, host] = device.device.split('@');
var [host, port] = host.split(':');
Expand All @@ -145,10 +142,7 @@ export function activate(context: vscode.ExtensionContext) {
}));

context.subscriptions.push(vscode.commands.registerCommand('f5.getProvider', async () => {

await ext.mgmtClient.getToken();
const resp: any = await ext.mgmtClient.makeRequest('/mgmt/tm/auth/source');

utils.displayJsonInEditor(resp.data);
}));

Expand Down
Loading

0 comments on commit 7bd6697

Please sign in to comment.