PecanProject / bety

Web-interface to the Biofuel Ecophysiological Traits and Yields Database (used by PEcAn and TERRA REF)
https://www.betydb.org
BSD 3-Clause "New" or "Revised" License
16 stars 38 forks source link

For some pages, limit search to records w/ local machine id. #534

Open ankurdesai opened 7 years ago

ankurdesai commented 7 years ago

With the large number of entries in many BETY tables with multiple synced machines, it would be nice on the web interface to only show entries belonging to the machine on which BETY is running. It can takes seconds sometimes to refresh screens when searching throughs 1000s of records for the 3 or 4 I entered somewhere and need to change.

dlebauer commented 7 years ago

@ankurdesai can you list the specific tables / pages where this is a priority?

ankurdesai commented 7 years ago

Inputs, dbfiles, runs, workflows, formats. Places where I often muck around things when debugging, adding new data types, fixing missing data issues on server.

ankurdesai commented 7 years ago

The other thing that might help is for "edit" or "view" record to default to open to a new tab/window, since pressing the back button tends to re-run search, and lose all sorting/# records per page options one has selected.

Or I could just learn to be a command line PSQL wizard. But more often than not, when I do that, I really break things.

dlebauer commented 7 years ago

@ankurdesai

I could just learn to be a command line PSQL wizard

You certainly don't have to be a wizard, and SQL select, update, insert, delete, and sorts are pretty straightforward.

The first feature - just returning results from the local machine - may be straightforward, but are there cases where you want to show all records? Should it be an option?

Is the 'open in new page' feature you mention in https://github.com/PecanProject/bety/issues/534#issuecomment-327878052 equivalent to right-click-open in new tab? Is that a sufficient workaround until this can be implemented?

ankurdesai commented 7 years ago

True right clicking is fine, just arguing it should be the default behavior. I'm pretty ok with the SQL statements, it's making sure I don't screw up the various associations, and also keeping track of all the table names, row names, appropriate IDs. When I do this in the 1-2 minute free time periods I have between other stuff, is when it gets dicey. Also I always play the guinea pig for your benefit, acting as a future new user trying to do stuff the simplest way possible first.

Definitely cases when all records are needed. For example, input and site records are often on other machines, while dbfiles that connect to those inputs are local.

dlebauer commented 7 years ago

Moved open in new tab feature to https://github.com/PecanProject/bety/issues/535