CoastalResilienceNetwork / future_habitat_v2

Future Habitat Explorer Version 2 for the updated framework
1 stars 0 forks source link

functionality issues with maine prod rebuild #2

Closed erikmartin88 closed 6 years ago

erikmartin88 commented 6 years ago

Hi Jacob @lesserj ,

I am getting ready to rebuild the Maine prod site to launch the barrier-prioritization-v3 app. I did a test build against --region-branch=master and am having more problems with future-habitat-v2. I updated the master region.json file (which you had added to the development branch last week) and the app now initializes and draws properly. But had to make the following changes to get some things working, which I've committed to development. These include:

I thought these were the extent of the issues, but as I looked closer I realized that some of the query functionality (when you click on a parcel) isn't working as it does in the current Prod map. I'm not familiar enough with the functionality to get into editing / troubleshooting it. Could you take a look if you would? I'm around today if you want to call. Thanks -Erik

erikmartin88 commented 6 years ago

I rebuilt the maine-dev site so you can see the current state of the future-habitat-v2 after my commits described above. Thanks

lesserj commented 6 years ago

@erikmartin88 I made some changes in a6cdda6. I added back the road_stream_crossing check back into the template, and made sure it will return true if the layer exists. North Carolina doesn't have that (or most) of the layers we have in Maine, which is why those checks now exist. I also made sure the current_conservation_lands pulls the layer id out of region, again, because North Carolina is substantially different from Maine.

The other edits look fine.

Looks like the parcel id and labels get set correctly when clicking on a parcel. The part that doesn't update are the stats. Is that the behavior you are seeing? We have a bunch more and different stats for North Carolina, so I had to make them more dynamic. The code that updates the stats with information from the parcels is still static and dependent on those original hard coded stats. It's going to take me some time to figure out how to refactor that.

erikmartin88 commented 6 years ago

Thanks @lesserj . I'm interested to track down why that road_stream_crossing check wasn't working for me. I spent a while going through the code but couldn't figure it out. I'll look closely at the changes you made.

Yes, the parcel click behavior you describe is what I noticed -- the stats don't update. I spoke with the Maine team here and we decided to pull future-habitat-v2 from Prod until this is fixed so that I can rebuild the site to get barrier-prioritization-v3 up (which needs to happen for a grant deadline). I'll add a note to the custom launch pad saying that future-habitat-v2 is down for maintenance for X weeks. Does that sounds OK from your end? Then when it's ready we can rebuild and add it back in? Other alternatives? I supposed I could manually add it in on Prod without rebuilding, but I know that's not a best practice.

lesserj commented 6 years ago

@erikmartin88 The service layer id for the road_stream_crossings was 0, which is falsey. I checked that it was an integer rather than checking for a truthy value, which solved the problem.

Both of those solutions sound fine to me. I will look at it as soon as I can, hopefully by early next week.

erikmartin88 commented 6 years ago

@lesserj Ah, got it. It was driving me crazy this morning for longer than I'd like to admit.

Maybe what I'll do is a test on my local machine-- retaining the current Prod version of future-habitat-v2 and manually patching it in to overwrite the version that the executable pulls down from GitHub. If that works OK, I'll do it on Prod so that I don't have to take the app down. Then when fixed, we can do a clean rebuild. If it doesn't work smoothly, I'll just take the app down and put a "down for maintenance" note on the custom launchpad.

Thanks again

lesserj commented 6 years ago

That sounds like a reasonable plan to me.

erikmartin88 commented 6 years ago

OK, plan A worked... Maine Prod now includes both apps, both in working order. Let me know when you get around to revising the future-habitat-v2 so I can be on standby when you rebuild.

lesserj commented 6 years ago

Can do. I don’t have the ability to build dev or prod though, so you, Laura, or Zach will have to do it

erikmartin88 commented 6 years ago

OK-- I'm happy to-- just let me know. Thanks again