aodn / nrmn-application

A web application for collation, validation, and storage of all data obtained during surveys conducted by the NRMN
GNU General Public License v3.0
4 stars 3 forks source link

Private endpoint shared links #1224

Closed bpasquer closed 1 year ago

bpasquer commented 1 year ago

Data officer can create a shared link for selected private endpoint from a new screen in the UI. Shared links are diplayed in a table, with sorting enabled. Multiple links can be created at once Links have an expiry date, and are deleted form the list automatically after expiry Link are refreshed every night

LizziOh commented 1 year ago

Great feature. I think that the copy button is not working though?

nspool commented 1 year ago

The copy button will work in production, just not in verification because we don't have https enabled on that site.

atcooper1 commented 1 year ago

This is great, thanks all. Just been checking the views and wanted to clarify whether the UI endpoint links are being generated from Prod, rather than Verification? Currently the num rows are differing between the downloadable endpoints via the UI and what I can see in verification (via pgadmin), so just wanted to confirm this before I dig deeper into testing? Thanks!

nspool commented 1 year ago

@atcooper1 the endpoints are being generated from the verification database once per day (at around midnight) so if no changes have been made they should match.

atcooper1 commented 1 year ago

Hmmm.. weird. So for South Australia (as a sub-set example), I get 90693 rows from the UI endpoint download (and from Prod), but I get 89967 from Verification? The missing 727 rows all seem to be data from 2022 surveys loaded before Christmas?

nspool commented 1 year ago

@atcooper1 the verification db was restored from an older backup. We will organise a time to take it down and restore from the latest production backup instead.

LizziOh commented 1 year ago

It does seem that the csv links provide more data than expected rather than less though, suggesting they are generated from production? for the ep_m1_all endpoint the row numbers are:

Verification db (accessed thorough PGAdmin): 1541497 Prod (accessed thorough PGAdmin): 1543746 Csv link downloaded: 1543746

bpasquer commented 1 year ago

@LizziOh Checked today : The row number of data in ep_m1 in the verification DB (1543746) match the row numbers in Prod and in the csv extract.

nspool commented 1 year ago

I think the verification CSV files were sometimes being overwritten by another test app running on an older database.

I've created a new S3 bucket just for verification and regenerated the CSVs. Please try it out again.

atcooper1 commented 1 year ago

Hi @nspool i'm unable to access Verification UI - has it been shut down for the weekend?

nspool commented 1 year ago

Hi @atcooper1 the verification portal has been running and is accessible to me. Is the UI showing an error?

atcooper1 commented 1 year ago

I'm getting an "Unauthorized" error message when I try and log in to Verification using info@aodn.org.au

nspool commented 1 year ago

@atcooper1 can you try with your same username and password as production?

atcooper1 commented 1 year ago

Ok, yes, Verification is working with Prod usernames and passwords. @LizziOh tagging so you are aware of this change. Thanks Nathan

LizziOh commented 1 year ago

Ok, yes, Verification is working with Prod usernames and passwords. @LizziOh tagging so you are aware of this change. Thanks Nathan

Thanks for the information. I'm not having success logging in with either of these usernames/passwords currently

atcooper1 commented 1 year ago

@nspool I can confirm that I have been able to download available endpoints successfully using the links in the Verification UI and the views match what is currently in Verification DB. NB: I think Lizzie mentioned this, but the 'Copy link' feature is not working

nspool commented 1 year ago

Thanks @atcooper1. Unfortunately the copy button won't work in verification because we don't have https enabled. It will work in production.