AtlasOfLivingAustralia / spatial-hub

New spatial portal front end using AngularJS
https://spatial.ala.org.au/
7 stars 16 forks source link

Add download reason code for CSDM to logger #265

Closed chrisala closed 1 year ago

chrisala commented 5 years ago

Adding a specific download reason to the logger would enable CSDM downloads / usage to be easily visible. It also frees the user from an extra step of having to use that reason.

ansell commented 5 years ago

Based on the description, the title for this could be changed to Add download source code for CSDM to logger, ie, add a row to the logger.log_source_type table on ala-simon, rather than the logger.log_reason_type table that is the list that users need to explicitly choose.

ansell commented 5 years ago

The current contents of logger.log_source_type is the following:

mysql> select * from log_source_type;
+-------+----------------+
| id    | name           |
+-------+----------------+
|     0 | ALA            |
|     1 | OZCAM          |
|     2 | AVH            |
|     3 | OBIS           |
|     4 | ASBP           |
|     5 | AMRIN          |
|     6 | BVP            |
|     7 | TEPAPA         |
| 10000 | Spatial Portal |
| 10001 | List Tool      |
|  2001 | ALA4R          |
|  2002 | BCCVL          |
|  2003 | AODN           |
+-------+----------------+
13 rows in set (0.00 sec)
temi commented 5 years ago

code review: https://github.com/AtlasOfLivingAustralia/ala-install/commit/04a9420a1938a777c75bbe61284aba516f19d84f https://github.com/AtlasOfLivingAustralia/ansible-inventories/commit/78a8b68942dc091c277c3cd2d7b429ae836cec74

ansell commented 5 years ago

Works for me:

https://logger-test.ala.org.au/service/logger/sources

https://logger-test.ala.org.au/service/logger/reasons

Appears in the download reason list on biocache-test:

Screen Shot 2019-11-04 at 10 13 52 am

ansell commented 5 years ago

I added this to Ready for CAB on the operations project board as it will need work from the infrastructure team to logger and biocache to release this even though it is tracked in spatial-hub issue tracker currently.

temi commented 5 years ago

Collectory statistics view - https://collections-test.ala.org.au/public/show/dr1097

ansell commented 5 years ago

Also verified this on lists-test.ala.org.au when downloading lists the new reason shows up and there was a request to logger-test.ala.org.au to show it was accessing the expected URL:

Screen Shot 2019-11-04 at 11 43 40 am

203.101.227.110 - - [04/Nov/2019:11:42:40 +1100] "GET /service/logger/reasons HTTP/1.1" 200 1483 "-" "-" "-" request_time=0.036 upstream_response_time=0.036 upstream_connect_time=0.004 upstream_header_time=0.036 upstream_cache_status=-
nickdos commented 4 years ago

Waiting for commit for flow through for code review

adam-collins commented 4 years ago

https://github.com/AtlasOfLivingAustralia/spatial-hub/commit/745331355c4fe56ac4a655797c06b2c112428912