Closed lsetiawan closed 7 years ago
It's probably fine, I won't be able to take a look until later next week I'm heading out of town for a conference on Sunday until Wednesday.
Hi @lsetiawan I applied the changes here http://dev-odm2admin.cuahsi.org/ODM2-Admintest/ none of the sites are showing up on the map though for some reason. I pointed this to the CZIMEA test database. I'm also not getting an error.
@lsetiawan by the changes I mean your branch update_cz.
@miguelcleon I get clustersites is not defined
error in the Javascript Console. Is this setting set on the settings?
It seems like you have an old Map.js
?
huh, ok it should be defined, this is the map_config in development.py
I thought I updated it let me double check
Oh, it is probably using a cached version.
I hard reloaded the cache but I'm still getting the same thing.
Ok, I forgot I have to put Map.js in a different location. Looks like it is working now.
Ok, I switched it to point to the LCZO test database and I'm getting an error: http://dev-odm2admin.cuahsi.org/ODM2-Admintest/features/type=all&datasets=all
@lsetiawan I'm guessing the error is because some of the sampling features don't have IGSNs? We can't assume that sampling features will have them.
Ah I see. Okay. I'll fix that thanks.
@miguelcleon I've encountered a problem where Samplingfeature
type Site
doesn't have a Site
object in your sample database. Here's the code that fails:
# Get Site Attr
if sf.sampling_feature_type.name == 'Site':
site = Sites.objects.get(samplingfeatureid=sf.samplingfeatureid)
feat.update({
'sitetype': site.sitetypecv.name,
'sitetypeurl': site.sitetypecv.sourcevocabularyuri
})
I've talked with @emiliom and the expectation here from ODM2 is that a Samplingfeature
type Site
, should have a site object. I don't think my code is wrong, but I'm afraid it will fail for your data. Thanks.
Yes. it's reasonable for a samplingfeature
of type site
to require a related site object. In my test db, I setup a dummy site for one samplingfeature
of type site
and deleted the rest. We will need a form to manage the sites
table and the spatialreferences
table. I could add those if you like.
@lsetiawan so my test database should no longer have a samplingfeature
of type site
without a related site record.
That is the test db pointing here http://dev-odm2admin.cuahsi.org/ODM2-Admintest/ We will probably need to add some logic the the samplingfeature admin form to enforce the creation of a site. Maybe it can just do it automatically if you select a sampling feature type of site.
@miguelcleon Please let me know if that works. Thanks.
@lsetiawan it's getting closer. I'm still getting an error though. An initial look at this and I'm not certain what is going on. http://dev-odm2admin.cuahsi.org/ODM2-Admintest/mapdata.html
None of the Excavation
, Transect
, or Stream gage
samplingfeatures are showing up.
Also, it's probably not going to be useful to show Parent, siblings or children for something like an Observation well
, which in our case are wells with two pressure transducers in them. Maybe they can be hidden if they are empty? This should be very useful for many of our Excavation
, Transect
and Field area
features although I'll need to populate the database tables.
Many of the sampling features shown here should be displayed on test http://odm2admin.cuahsi.org/LCZO/mapdata.html This has more then is in the test db though.
@miguelcleon Could I have an updated db
for me to test on? It's difficult for me to develop without your database. Thanks.
Best, Don
I'm out to dinner at the moment. Could you give the other sample db a try? https://github.com/miguelcleon/ODM2-Admin/blob/master/ODM2AdminExamplePostgresqlDB It should be basically the same as my test db. If you don't see the same thing let me know.
My 2 cents here:
Also, it's probably not going to be useful to show Parent, siblings or children for something like an Observation well, which in our case are wells with two pressure transducers in them. Maybe they can be hidden if they are empty?
I agree. The new sampling feature hierarchy stuff should not get in the way (should be hidden) if there are no relevant sampling features.
Don is back and Miguel leaves on vacation on Wednesday. What's the status of these enhancements/PR -- is it likely to be merged/completed by Wednesday (and the new master ODM2-Admin version rolled out and deployed to the odm2admin/cuahsi cloud) by tomorrow, without requiring all of Don's time?
@lsetiawan you have a local copy of the LCZO database that is working for testing? I'm about to be in meetings for the next 3 hours and I'm getting an error on test that I don't think I should be getting http://dev-odm2admin.cuahsi.org/ODM2-Admintest/mapdata.html
@miguelcleon It looks like the error occurs because the code is looking for table cv_datasettype
but you have cv_datasettypecv
in the database instead.
I've renamed the table to cv_datasettype
since this is what the original ODM2 table name is, and that seems to fix your error.
For some reasons my commits are not showing up here. Going to open another PR and close this one.
This PR adds some improvements to the Popup. Now has a hierarchy structure for Site > Profiles > Specimen. Adds SiteTypeCV to Sites, SpecimenTypeCV and SpecimenMediumCV to Specimens. Also fix some links to method and action in popup.
Hopefully this won't mess up any other functionality for your data @miguelcleon.
cc @emiliom