Closed epacke closed 3 years ago
Found a bug with the search function. WIP.
Ready for testing sir.
Got a bit more energy so I'll take that back and will have a go at starting to break up the script into modules too. :)
So far I can't get it to build the js files. I'm in the middle of our broadcast, so not spending too much time on it yet.
I added some fixes. The target files should not be in version control, correct? I show differences in the .js files after running a tsc build in vscode (Ctrl-Shift-B)
$ git checkout
M underlay/js/MemberPolling/IPollingResponse.js
M underlay/js/SiteDataInterfaces/IASMPolicy.js
M underlay/js/SiteDataInterfaces/ICertificate.js
M underlay/js/SiteDataInterfaces/IDataGroup.js
M underlay/js/SiteDataInterfaces/IDeviceGroup.js
M underlay/js/SiteDataInterfaces/IIrule.js
M underlay/js/SiteDataInterfaces/IKnowndevice.js
M underlay/js/SiteDataInterfaces/ILoadbalancer.js
M underlay/js/SiteDataInterfaces/ILoggedErrors.js
M underlay/js/SiteDataInterfaces/IMemberStates.js
M underlay/js/SiteDataInterfaces/IMonitor.js
M underlay/js/SiteDataInterfaces/INAT.js
M underlay/js/SiteDataInterfaces/IPool.js
M underlay/js/SiteDataInterfaces/IPreferences.js
M underlay/js/SiteDataInterfaces/IReportMetadata.js
M underlay/js/SiteDataInterfaces/IVirtualServer.js
M underlay/js/bigipreport.js
Your branch is up to date with 'origin/feature/break-out-modules-and-typescript'.
I would put the build info in preferences, or preferences in the buildinfo instead of two files. Each file is more overhead. Might as well have just one that's not an array of data.
I was thinking that the js-src is just for developers and that there should be a ready-made package available in the repo in case someone clones it instead of downloading the zip file. It'd also make making the release easier since there's no build step involved. I also let typescript handle the dependencies since I liked the idea of having all js files in the js-src. Not sure if typescript moves the excluded files during a build, but I can test.
Merging the files sounds good to me.
I'd prefer not having the .js files. If we're building anyway, we should eventually build combined minimized files for deploy to load faster.
The "Refresh" button coloring is broken. It's looking at the datestamp of index.html which might not get updated. I run my testing in underlay/ so changes are instant.
I now have vscode looking at .ts changes and rebuilding the .js output when I do edits. I've not checked the .vscode/ directory in.
Did you pull down my line ending and syntax fixes?
Hi Tim Could you please elaborate on your idea for the directory structure? Yes, I pulled them. Heads up, I will do some squashing when I work the next time so you might want to keep an extra eye on the branch or hold changes to avoid conflicts. :)
Will look at the problems you highlighted too. Still have issues with the query string parameters and the search.
This is your branch, I'll do whatever I need to keep my view up to date, pull, fetch, etc. Do what you like. :)
Eventually in a production environment it would be nice to just have one .js file and one .css file. Both of those would be minimized. This gets us the fastest load times. It also makes it a pain to debug when there are issues, so we'd want a non-minimized build option for debugging. In a production environment it might be nice to minimize the json files too. Right now they are pretty printed when verbose logging is set. I have not tested non-verbose logging in quite a while so I'm not sure it still works to get more compressed json in non-verbose mode.
Ideally I'd like to have something like underlay/js/bundle.js with everything in it.
Of course if we have two modes, we're back to rebuilding index.html so the right javascript gets included.
This is probably easiest to do with webpack:
Fixes:
195
197
200