Esri/air-c2-cop-python

Slack - Modify JSAPI setting in WAB to use Portal

Closed this issue · 20 comments

Make sure the WAB on AirC2.esri.com use a local copy of the latest version of the JSAPI's (3.16 and 4.0) instead of ArcGIS Online.

┆Issue is synchronized with this Asana task

Installed JSAPI 3.16 and 4.0 on AirC2, and referenced these versions in both stemapp/env.js and stemapp3d/env.js

[--- Commented from Asana.com
#commenter Kerry Robinson
---[aa]

Correction- I reverted the stemapp3d back to the JSAPI 4.0 hosted online. There are many references to ArcGIS Online in the stemapp3d, and dozens of references in the local copy of JSAPI 4.0. It doesn't look like either were built to work in an offline environment. Hopefully we can figure out a way around this or else Gigzy and I will just show the Scene Viewer in Portal for the 3D Air Plan...

OR I'm just missing something (which I hope is the case).

[--- Commented from Asana.com
#commenter Kerry Robinson
---[aa]

https://app.asana.com/0/22912127123495/22912127123495 https://app.asana.com/0/99575859018253/99575859018253 ; confirmed that WAB 2.0 3D needs to use a special JSAPI hosted by Esri. The final version in July should use JSAPI 4.0 final.
So for the demo we might just have to show the Web Scene of the air plan, not in WAB, unless we have internet working.

[--- Commented from Asana.com
#commenter Kerry Robinson
---[aa]

It might be possible to get an early copy of the JSAPI that's used online. https://app.asana.com/0/22677111984441/22677111984441 would you happen to know someone we could speak to?

[--- Commented from Asana.com
#commenter Avi Cueva
---[aa]

My guess is that what you need is a newer build of AWAB. You should see if you can just get a daily build of the version coming out in July.

[--- Commented from Asana.com
#commenter Ben Conklin
---[aa]

The problem with JSAPI 4.0 is that it also has a ton of references to arcgis online... too many for me to manually go in and fix without risk of breaking it. So that is our real issue here. I have posted to the JS group in chatter about this so we will see if they will fix this.

[--- Commented from Asana.com
#commenter Kerry Robinson
---[aa]

That is frustrating, they don't have the API call to set your portal url? Normally, that would fix all the references. I see the esri/portal class does that not set it to use Portal resources?

[--- Commented from Asana.com
#commenter Ben Conklin
---[aa]

To install the local JSAPI, normally you have to change URLs in two files (init.js and dojo.js). with JSAPI 4.0, you can change those two URLs, but then looking deeper I noticed that those files also reference the ArcGIS Online basemaps (tiled & vector) and utility services. I tried changing them to local Portal URLs but was sitll coming across issues and figured there might be other ArcGIS Online refernces I'm missing throughout. None of this is in the 3.x API, so someone on the JSAPI 4.0 team didn't get the memo about no referneces to Online resources. In my opinion, this looks pretty bad. It's a shame I didn't notice this when 4.0 was in beta...

[--- Commented from Asana.com
#commenter Kerry Robinson
---[aa]

Ok, Ben was right. There is an api call to fetch the basemap layers from your portal. If you don't do this, it will use ArcGIS Online by default. Which is what happened when I used WAB to build a 3D app (beta). So I agree we should pursue getting a build of WAB that will point to a local JSAPI and which will use the basemaps from Portal. https://app.asana.com/0/22912127123495/22912127123494 can you add a slack task for someone to do that?

[--- Commented from Asana.com
#commenter Kerry Robinson
---[aa]

\metro\WebAppBuilder
I don't have time to check it out right now, but if you don't, I will tomorrow.

[--- Commented from Asana.com
#commenter Joe Bayles
---[aa]

https://app.asana.com/0/22912127123495/22912127123495 were you able to install the new version of WAB? If not, I'll go ahead and do so tomorrow.

[--- Commented from Asana.com
#commenter Avi Cueva
---[aa]

https://app.asana.com/0/22945463227210/22945463227210 installed the new WAB. I moved over the NATO Theme and the two apps from my instance. Will test tomorrow.

[--- Commented from Asana.com
#commenter Joe Bayles
---[aa]

The new WAB 2.1 relies on two different JSAPI's: the 2D stemapp uses JSAPI 3.17 and the 3D stemapp uses JSAPI 4.0. I have changed the settings in the 3D app to point the the JSAPI 4.0 hosted on AirC2.esri.com.

However I don't know where to find 3.17 (it's not on metro or esri.com/software). Does anyone know?

[--- Commented from Asana.com
#commenter Kerry Robinson
---[aa]

https://jsdev.arcgis.com/3.17/ is where it's hosted online, haven't found an offline copy. They are targeting the week before UC for release.

[--- Commented from Asana.com
#commenter Joe Bayles
---[aa]

https://app.asana.com/0/23190756321479/23190756321479, I found a development version of 3.17 in our internal GitHub. I've copied the content of the repo into the c:\inetpub\wwwroot\arcgis_js_api\library\3.17

https://app.asana.com/0/23190756321479/23190756321479 I don't mind making the changes, just not sure of all the places I'd need to make them. Any info you could provide would be appreciated.

[--- Commented from Asana.com
#commenter Avi Cueva
---[aa]

Great, thanks Avi. I will make the changes tomorrow.

[--- Commented from Asana.com
#commenter Kerry Robinson
---[aa]

https://app.asana.com/0/22945463227210/22945463227210 , where did you download this from? It needs to be built first before we can use it, but I cannot build it because it is missing some files.

[--- Commented from Asana.com
#commenter Kerry Robinson
---[aa]

Well, that explains why I couldn't get it to work. ;)
I copied the exact content into the c:\inetpub directory. Can we build from there?

Sent from my Verizon, Samsung Galaxy smartphone

[--- Commented from Asana.com
#commenter Avi Cueva
---[aa]

yep, that's what i tried. it's missing some key files needed to build the release version. can you point me to where you found it?

[--- Commented from Asana.com
#commenter Kerry Robinson
---[aa]

Do you have access to devtopia?

Sent from my Verizon, Samsung Galaxy smartphone

[--- Commented from Asana.com
#commenter Avi Cueva
---[aa]