New WAB DE Video: Hardcoding a Widget's Configurable Parameters

1674
7
08-28-2018 08:19 AM
JasonHine
Esri Contributor
2 7 1,674

Photo by Denys Nevozhai on Unsplash

Continuing the series that began with the Introduction to Web AppBuilder for ArcGIS Developer Edition training seminar, Esri Training Services has just released another video for Users and Tinkerers. This 9 minute video presents a workflow that can help standardize and streamline the way your organization configures widgets. Use this link to access this and all the videos in the series:

 

www.esri.com/training/Bookmark/FKRAQTELZ

 

If you have feedback on the video, or would like to suggest topics for future videos, please leave a comment! When new videos get added to this series, I'll let you know about them here on GeoNet.

7 Comments
BobWheeler
Occasional Contributor

Excellent video - any tips or tricks as you migrate up to another version of WAB?  I have several changes that I make for the attribute table, coordinate and select widgets that I use in a template - only to have them revert back to defaults when I update the webmap.

JasonHine
Esri Contributor

Thanks Bob! If you use the steps here to upgrade your WAB apps, any widget customizations *should* get carried over:

Upgrade apps—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers 

Or maybe you're asking about something a little different?

BobWheeler
Occasional Contributor

We've had some success with it.  Guess I was thinking if a widget was updated in the new install that you'd still have to manually update the defaults.  I guess we'll find out since 2.10 is out!

JuliaHarrell1
New Contributor II

This is useful info - thanks for making the video. It doesn't go quite as far as we'd like to go - we're trying to set up a CI/CD process where all the configurations & settings of all our web apps (not just WAB / Portal) can be controlled via scripting.

Is there any way to truly "lock down" the widget settings (other than basic r/w access to the config file itself)? Is there a developer level API available that is granular enough to control all of a widget's parameters & settings so scripts to reset everything the way they're supposed to be can be run periodically? I haven't been able to find any good examples, so maybe it doesn't exist at that level yet.

We're thinking maybe the only automated way to keep everything consistent across all widgets in many Portal Apps would be to put a 'gold' copy of the config files under source control and then script a process where the files would be checked periodically and be replaced every time we detect a diff between what's on the portal server and what's in the 'gold' file in source control. That's a bit cumbersome & heavy handed, so we'd appreciate any other ideas you might have.

JasonHine
Esri Contributor

Hi Julia,

Thanks for the great question! I understand the Web AppBuilder team here at Esri uses Jenkins as its CI solution for widget development; maybe Jenkins could help in your scenario, too:

https://jenkins.io 

Your "gold copy" approach sounds reasonable to me, and if you decide to take that approach, Jenkins should be able to help.

Lastly, it's probably not what you're looking for, but here's some documentation for using Intern to perform unit testing on WAB apps, widgets, and utilities:

https://developers.arcgis.com/web-appbuilder/guide/best-practices-unit-test.htm

JuliaHarrell1
New Contributor II

Thanks so much for the response.  I dont know if the unit testing methods would work, but good info for future use in the CI/CD process development.

If possible, could you reach out to the WAB development team and ask if there is  currently any way to (or future plans to, if not)  get at granular widget parameters/settings so they can be controlled/managed via scripting ?

JasonHine
Esri Contributor

Hi Julia,

After asking around, it seems there isn’t currently a built-in way to access or manage widget parameters/settings via scripting. The WAB Dev Team has been made aware that you’re interested in doing this, and to help make sure this gets given due process, I strongly recommend you either (a) contact Esri Support to log an enhancement request, or (b) submit your request via the ArcGIS Ideas portal. Both approaches will generate a trackable item to help us better understand the details of your request and keep it on our radar.