Skip to content

Commit

Permalink
v2.0.1 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DumpySquare committed Jul 28, 2020
1 parent 7bd6697 commit 6426c44
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 42 deletions.
3 changes: 3 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ vsc-extension-quickstart.md
**/*.map
**/*.ts
# **/*.gif
atc_ilx_rpm_cache/**
fastTemplateFolderUploadTemp/**
restTests/**
15 changes: 12 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,31 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how

---

## [2.0.1] - (7-28-2020)

### Added
- Function to migration legacy devices config to new devices config

---

## [2.0.0] - (7-28-2020)

### Added
- ATC rpm install/un-install/upgrade
- will download and cache rpm from official github repo
- cache is located in %USERPROFILE%\.vscode\extensions\%extensionInstall%\atc_ilx_rpm_cache
- Also right click rpm in folder to install
- *** LOCAL CACHE LOCATION? ***
- json <-> yaml conversion (highlight -> right-click)
- base64 encode/decode (highlight -> right-click)
- right-click template/folder in explorer view to upload FAST template/template Set
- Added 'F5-FAST -> Connect!' status bar to provide another way to connect
- This is especially useful when working in a repo, which is outside the main F5-Fast extension view
- Added, highlight declaration in editor -> right-click, options for posting AS3/DO/TS declarations
- support remote authentication via logonProvider - PENDING
- Added options for posting AS3/DO/TS declarations (highlight declaration in editor -> right-click)
- support for remote authentication via logonProvider
- Updated config structure (what stores devices details)
- Includes right-click option on device to update logonProvider
- This provides a list of default options for BIGIP and an option to provide a custom provider for BIGIQ
- Also added function to show configured logon provider (right-click device in list)

### Modified
- Combined AS3 Tenant and Tasks views
Expand All @@ -34,6 +42,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
- Now includes item counts
- This also resulted in more efficient data storage and retrieval
- Provided feedback and cancellation when connecting to devices
- including better feedback of auth errors and network timeout/errors
- Updated examples to include DO github examples
- Added placeholder for AS3 and linked to AS3 repo issue with pending "examples" folder
- Auth token now utilized for entire token lifetime
Expand Down
37 changes: 0 additions & 37 deletions mst_snippets.json

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "F5 Networks FAST",
"description": "(F)5 Networks (A)pplication (S)ervices (T)emplate engine extension",
"publisher": "DumpySquare",
"version": "1.0.2",
"version": "2.0.1",
"keywords": [
"f5",
"f5networks",
Expand Down
33 changes: 32 additions & 1 deletion src/treeViewsProviders/hostsTreeProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,44 @@ export class F5TreeProvider implements vscode.TreeDataProvider<F5Host> {

getChildren(element?: F5Host): Thenable<F5Host[]> {

const bigipHosts: any | undefined = vscode.workspace.getConfiguration().get('f5.hosts');
var bigipHosts: any | undefined = vscode.workspace.getConfiguration().get('f5.hosts');
// console.log(`bigips: ${JSON.stringify(bigipHosts)}`);

if ( bigipHosts === undefined) {
throw new Error('No configured hosts - from hostTreeProvider');
}

console.log('checking for legacy hosts config');


/**
* 7.27.2020
* the following code bloc detects the legacy device configuration structure of an array of strings
* then converts it to the new structure for the new devices view, which is an array of objects.
*
* Should only run once when it detects the legacy config the first time.
*
* Should be able remove this down the road
*/

// if devices in list and first list item is a string, not an object
if(bigipHosts.length > 0 && typeof(bigipHosts[0]) === 'string') {

console.log('devices are type of:', typeof(bigipHosts[0]));
bigipHosts = bigipHosts.map( (el: any) => {
let newObj: { device: string } = { device: el };
console.log(`device coverted from: ${el} -> ${JSON.stringify(newObj)}`);
return newObj;
});

console.log('conversion complete, saving new devices list:', bigipHosts);
// save config
vscode.workspace.getConfiguration().update('f5.hosts', bigipHosts, vscode.ConfigurationTarget.Global);
vscode.window.showWarningMessage('Legacy device config list converted!!!');
} else {
console.log('New device configuration list detected -> no conversion');
}

const treeItems = bigipHosts.map( (item: {
device: string;
provider: string;
Expand Down

0 comments on commit 6426c44

Please sign in to comment.