Skip to content

Commit

Permalink
beta.8
Browse files Browse the repository at this point in the history
  • Loading branch information
DumpySquare committed Mar 26, 2021
1 parent 38cadad commit 078fe4b
Show file tree
Hide file tree
Showing 8 changed files with 127 additions and 49 deletions.
10 changes: 4 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,14 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
- [#92](https://github.com/f5devcentral/vscode-f5/issues/92) - [RFE] F5 Hosts view v2
- Extended Hosts view details that include ATC service management and UCS/QKVIEWS

- [#87](https://github.com/f5devcentral/vscode-f5/issues/87) - [RFE] ipv6 support (**PENDING**)

- [#60](https://github.com/f5devcentral/vscode-f5/issues/60) - [RFE] view x509 certificate details
- This enabled hovers to show details about certificates but also got expanded to show nexted details in json structures, like cert/iRules/config-objects

- [#88](https://github.com/f5devcentral/vscode-f5/issues/88) - [RFE] Examples Requests with web proxy support (**PENDING**)
- Provides configuration options for external proxy support
- This would be for all calls not destined for an F5

- [#118](https://github.com/f5devcentral/vscode-f5/issues/118) - [RFE] corkscrew v0.8.0 updates
- cert/key extraction (different depending on mini_ucs/ucs/qkview)
- stats extraction from qkview
- asyncrounous extraction
- (**PENDING - finish/fix certs from ucs**)

- [#109](https://github.com/f5devcentral/vscode-f5/issues/109) - [BUG] Fail to explore config on connected BIG-IP
- The new f5-conx-core fixed a bug that failed to download the mini_ucs if it was over a certain size
Expand All @@ -52,6 +47,9 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
- [#113](https://github.com/f5devcentral/vscode-f5/issues/113) - [RFE] bigiq view v1
- initial bigiq specific features for as3 templates, applications management, scripts, and devices

- [#122](https://github.com/f5devcentral/vscode-f5/issues/122) - [RFE] Ability to identify device as BIG-IQ/BIG-IP in the F5 Hosts
- Added icons and tooltip information for identifying bigiq vs bigip devices in the main hosts list

---

## [2.10.7] - (02-09-2021)
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 1 addition & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "The F5 Extension",
"description": "Supercharge your F5 automation development",
"publisher": "F5DevCentral",
"version": "3.0.0-beta.7",
"version": "3.0.0-beta.8",
"keywords": [
"F5",
"F5Networks",
Expand Down Expand Up @@ -206,21 +206,6 @@
"default": "[email protected]"
}
},
"f5.as3Post.async": {
"type": "boolean",
"default": true,
"description": "Make as3 posts async by default"
},
"f5.showAuthTokenTimer": {
"type": "boolean",
"default": false,
"description": "Displays a countdown of the auth token lifetime. Extension will refresh the token as needed with the next call. This is mainly for visibility/debugging purposes, or for those like a ton of feedback"
},
"f5.asyncInterval": {
"type": "number",
"default": 5,
"description": "Number of seconds to wait between checking POST task status"
},
"f5.timeoutinmilliseconds": {
"type": "integer",
"default": 0,
Expand All @@ -233,12 +218,6 @@
"scope": "resource",
"description": "Show everything in a new editor tab"
},
"f5.enableWebViews": {
"type": "boolean",
"default": false,
"scope": "resource",
"description": "*DEV-inProgress*"
},
"f5.newEditorColumn": {
"type": "string",
"enum": [
Expand Down Expand Up @@ -275,12 +254,6 @@
"scope": "resource",
"description": "Prevent new editor tab from taking focus when opened or updated\n So, by default(disabled), each new editor that is opened and/or updated with also take focus"
},
"f5.tcl": {
"type": "boolean",
"default": true,
"scope": "resource",
"description": "Enable tcl/irule/iapp functionality."
},
"f5.logLevel": {
"type": "string",
"enum": [
Expand Down
3 changes: 3 additions & 0 deletions src/cfgExploreCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ export function cfgExplore(context: ExtensionContext) {

cfgProvider.makeExplosion(filePath);

await new Promise(resolve => { setTimeout(resolve, 2000); });
commands.executeCommand('cfgTree.focus');

}));


Expand Down
22 changes: 19 additions & 3 deletions src/extensionVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@

import * as path from 'path';
import * as fs from 'fs';
import { ExtensionContext, StatusBarItem, workspace, ViewColumn, commands, TextDocument, window } from "vscode";
import {
ExtensionContext,
StatusBarItem,
workspace,
ViewColumn,
commands,
window
} from "vscode";
import * as keyTarType from "keytar";
// import { MgmtClient } from './utils/f5DeviceClient.ts.old';
import logger from "./utils/logger";
Expand Down Expand Up @@ -47,6 +54,7 @@ export namespace ext {
export let preserveEditorFocus: boolean;
export let newEditorTabForAll: boolean;
export let logLevel: string;
export let proxy: ProxyCfg | undefined;
}
}

Expand Down Expand Up @@ -112,6 +120,16 @@ export async function initSettings(context: ExtensionContext) {
});
}

type ProxyCfg = {
host?: string,
port?: number,
protocol?: string,
auth?: {
username?: string,
password?: string
}
};

/**
* load/reload vscode extension settings
*/
Expand All @@ -126,8 +144,6 @@ export async function loadSettings() {

ext.settings.logLevel = workspace.getConfiguration().get('f5.logLevel', 'error');



}


Expand Down
79 changes: 79 additions & 0 deletions src/proxy_issue#88.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@

# proxy configuration objects

this is just a placeholder for configuration/documentation for the external HTTP proxy support

issue details can be found here:

- [#88](https://github.com/f5devcentral/vscode-f5/issues/88) - [RFE] Examples Requests with web proxy support (**PENDING**)
- Provides configuration options for external proxy support
- This would be for all calls not destined for an F5


proxy "configuration" section for the package.json

```json
"f5.proxy": {
"type": "object",
"description": "external HTTP(s) proxy details",
"port": {
"type": "number"
},
"host": {
"type": "string"
},
"required": [
"host",
"port"
],
"examples": [
{
"protocol": "https",
"host": "127.0.0.1",
"port": 9000,
"auth": {
"username": "mikeymike",
"password": "rapunz3l"
}
}
]
},
"f5.proxyAuth": {
"type": "object",
"username": {
"type": "string"
},
"password": {
"type": "string"
}
}
```


extensionVariables.ts

```ts

// in the loadSettings function

// ext.settings.proxy = workspace.getConfiguration().get('f5.proxy');
const proxyCfg = workspace.getConfiguration('f5.proxy');
const proxyAuthCfg = workspace.getConfiguration('f5.proxyAuth');

if (proxyCfg) {

ext.settings.proxy = {
host: proxyCfg.get('host'),
port: proxyCfg.get('port'),
protocol: proxyCfg.get('protocol'),
};

if (proxyAuthCfg.has('username') && proxyAuthCfg.has('password')) {
ext.settings.proxy.auth = {
username: proxyAuthCfg.get('username'),
password: proxyAuthCfg.get('password')
};
}
const y = 'x';
}
```
17 changes: 10 additions & 7 deletions src/treeViewsProviders/bigiqTreeProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,16 @@ export class BigiqTreeProvider implements TreeDataProvider<IqTreeItem> {
const execScripts = this.scriptsExecuted.map(el => {
const desc = el.status || '';

// const output = el.userScriptTaskStatuses[0].output;
// output ? output : ''
const tooltip =
el.userScriptTaskStatuses[0] ? new MarkdownString(`# output\n \`\`\`yaml\n${el.userScriptTaskStatuses[0].output}\n\`\`\``) :
el.errorMessage ? new MarkdownString(`# error\n ${el.errorMessage}\n`)
: '';
// const tooltip2 = new MarkdownString()
const output = el.userScriptTaskStatuses?.[0]?.output || '';

const tooltip = output
? new MarkdownString()
.appendCodeblock(`startTime: ${el.startDateTime}\nendTime: ${el.endDateTime}\n`, 'yaml')
.appendMarkdown(`---\n## output`)
.appendCodeblock(output, 'yaml') :
el.errorMessage ? new MarkdownString(`# error\n${el.errorMessage}\n`)
: '';

return new IqTreeItem(el.name, desc, tooltip, 'iqExecScript', '', TreeItemCollapsibleState.None,
{ command: 'f5.iqViewShow', title: '', arguments: [el] });
});
Expand Down
14 changes: 10 additions & 4 deletions src/treeViewsProviders/cfgTreeProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export class CfgProvider implements TreeDataProvider<CfgApp> {
const allFileStore = this.bigipConfig.fileStore.filter((el: ConfigFile) => {
// only return the certs and keys for now
if (el.fileName.includes('/certificate_d/') || el.fileName.includes('/certificate_key_d/')) {
return;
return true;
}
})
.map((el: ConfigFile) => `\n### ${el.fileName}\n${el.content}\n\n`);
Expand Down Expand Up @@ -269,12 +269,18 @@ export class CfgProvider implements TreeDataProvider<CfgApp> {
docContent = JSON.stringify(items, undefined, 4);
}


editors.forEach(el => {
// this loop is syncronous
for (const el of editors) {
if (el.document.fileName === 'app.conf' || el.document.fileName === 'app.json') {
viewColumn = el.viewColumn;
}
});
};
// old way, not syncronous
// editors.forEach(el => {
// if (el.document.fileName === 'app.conf' || el.document.fileName === 'app.json') {
// viewColumn = el.viewColumn;
// }
// });

// if vClm has a value assign it, else set column 1
viewColumn = viewColumn ? viewColumn : newEditorColumn;
Expand Down

0 comments on commit 078fe4b

Please sign in to comment.