Genesys Website issueshttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues2019-03-27T11:37:42+01:00https://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/260StringArrFilter: Indented categories2019-03-27T11:37:42+01:00Matija ObrezaStringArrFilter: Indented categories`sampStat`, ~~`collSrc`~~ and `storage` filters have entries that are actually categories with sub-categories:
Example for "TYPE OF GERMPLASM STORAGE": "Long term seed collection" is a subcategory of "Seed collection":
```
"10": "Seed ...`sampStat`, ~~`collSrc`~~ and `storage` filters have entries that are actually categories with sub-categories:
Example for "TYPE OF GERMPLASM STORAGE": "Long term seed collection" is a subcategory of "Seed collection":
```
"10": "Seed collection",
"11": "Short term seed collection",
"12": "Medium term seed collection",
"13": "Long term seed collection",
"20": "Field collection",
```
![image](/uploads/f55474c8fdb47126c88d48742400b40d/image.png)
By checking the "super" category, all sub-categories should be automatically ticked. On un-ticking, no changes are needed.
Example for "SAMPSTAT":
```json
"100": "Wild",
"110": "Natural",
"120": "Semi-natural/wild",
"130": "Semi-natural/sown",
"200": "Weedy",
"300": "Traditional cultivar/Landrace",
"400": "Breeding/Research Material",
"410": "Breeders Line",
"411": "Synthetic population",
"412": "Hybrid",
"413": "Founder stock/base population",
"414": "Inbred line",
"415": "Segregating population",
"416": "Clonal selection",
"420": "Genetic stock",
"421": "Mutant",
"422": "Cytogenetic stocks",
"423": "Other genetic stocks",
"500": "Advanced/improved cultivar",
"600": "GMO",
"999": "Other"
```
## Identifying categories and their sub-categories
Regexp `^(\d+)(0+)$` should identify potential "parents". Child records are those that start with regexp match group `$1`.
For `"100": "Wild"`, `^(\d+)(0+)$` on "100" matches and gives two groups: "1" and "00". Children are those that start with "1".
For `"410": "Breeders Line"`, `^(\d+)(0+)$` on "410" matches and gives two groups: "41" and "0". Children are those categories that start with "41".
If supplying `<StringArrFilter indented` flag, the component should operate in "indented mode" as described here.0.1Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/259Decode ISO3166 and WIEWS codes2019-05-14T14:08:19+02:00Matija ObrezaDecode ISO3166 and WIEWS codesThe Overview page now displays ISO3166 and WIEWS codes. At this moment, there are about 420 active WIEWS codes and a fixed number of ISO3166 codes.
Load the minimum required information `{ "key1": "value1", "key2": "value2" }` from the ...The Overview page now displays ISO3166 and WIEWS codes. At this moment, there are about 420 active WIEWS codes and a fixed number of ISO3166 codes.
Load the minimum required information `{ "key1": "value1", "key2": "value2" }` from the server and use them to display decoded names for country codes and WIEWES codes.
The country names must be in the currently selected language. Institute names are not translated to other languages.
Questions: do we need to refresh these? Maybe. How often? 10min?
Implementation: Use redux state? Maybe. Is this required in SSR? No.0.1Viacheslav PavlovViacheslav Pavlovhttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/258Tiny UI updates2019-03-27T18:13:00+01:00Matija ObrezaTiny UI updates1. Remove menu item **Explore / Genebanks**, the route can stay.
1. Remove rows displaying `createdDate` and `lastModifiedDate` from: crop details page, network details page, partner list ("Registered 8 June 2018")
1. Change "Institute d...1. Remove menu item **Explore / Genebanks**, the route can stay.
1. Remove rows displaying `createdDate` and `lastModifiedDate` from: crop details page, network details page, partner list ("Registered 8 June 2018")
1. Change "Institute details" to "Genebank details" on institute details page
1. Change "X institutes registered in WIEWS" to "X genebanks registered in FAO WIEWS database" on country display page
1. On network details page, the map should not display markers if `(latitude,longitude) === (0,0)`.0.1Oleksii SavranOleksii Savranhttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/257ExpressJS and SSR2019-04-15T12:45:22+02:00Matija ObrezaExpressJS and SSRThere are a number of issues with code currently executed by the ExpressJS server (think SSR).
First, the code cannot be executed in async mode and is executed synchronously, meaning that the API server responses add up until all reques...There are a number of issues with code currently executed by the ExpressJS server (think SSR).
First, the code cannot be executed in async mode and is executed synchronously, meaning that the API server responses add up until all requests are done.
We already minimized the static `needs` for pages where filters are used (BrowsePages), but some pages require full SSR: that's the details pages. These are primarily generated for robots that can't handle `javascript` and for users who don't like seeing `Loading` indicator when they hit a page.
We explored load times in genesys-pgr/genesys-ui#167:
```
Auth token checked. Check took 595ms
Need function(){return c.serverInfoRequest()} took 760
Need function(){return u.loadCrops()} took 1726
Fetched all component data. Fetch took 1729ms
Render took 115ms
Server render time: 1547118744385 1547118746832 2447ms
```
## Updates
We generate a Docker image for this project (see https://gitlab.croptrust.org/genesys-pgr/genesys-ui/tree/master/docker) and each docker image then starts 3 instances of the server.
There is no need to reload most of these requests every time a request is made. We should keep some of this data stored in each instance so that it can immediately reuse the data:
1. `checkToken` is handled in genesys-pgr/genesys-ui#249. That saves 600ms.
1. Each `expressJs` service should maintain its own instance of the OAuth token. It should obtain an access token on startup and then use `setTimeout` to refresh it's copy of the access token before it actually expires.
1. list of `crops` should be maintained by each `expressJs` service and it should be refreshed every now and then.
1. same for `serverInfoRequest`.
**Objective:** Minimize the number of API calls the `server.ts` has to make before sending the response to the client.
Should we bring **memcached** into play for our expressjs services?
Explore https://expressjs.com/en/advanced/best-practice-performance.html and see if we can adjust our server-side code.0.1Viacheslav PavlovViacheslav Pavlovhttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/256Massive subsets/datasets2021-02-15T10:24:16+01:00Matija ObrezaMassive subsets/datasetsCreating subsets (or datasets) with 100,000s accession refs is a performance issue for the backend and a UI issue for the frontend: The frontend will time out before the backend responds with results, causing the user to "reupload" the 1...Creating subsets (or datasets) with 100,000s accession refs is a performance issue for the backend and a UI issue for the frontend: The frontend will time out before the backend responds with results, causing the user to "reupload" the 100,000 refs, using even more backend resources.
Update frontend to send `accessionRef` data to backend in batches of 10,000 (or 20,000). It should wait until the server responds and then send the next batch.
```sql
select instCode, acceNumb, genus from accession limit 200000;
```
Also test performance of "Create new version".1.0Viacheslav PavlovViacheslav Pavlovhttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/255Display scientific and genera names using italics2019-03-21T09:33:49+01:00Nora Castaneda-AlvarezDisplay scientific and genera names using italicsCards displaying 'Most represented Genera' and 'Most represented Species' need to display scientific names in _italics_. In red the cases where this applies:
![Screen_Shot_2019-03-18_at_11.36.23](/uploads/cc95173f5daa9ec1e825b4c9603297d...Cards displaying 'Most represented Genera' and 'Most represented Species' need to display scientific names in _italics_. In red the cases where this applies:
![Screen_Shot_2019-03-18_at_11.36.23](/uploads/cc95173f5daa9ec1e825b4c9603297d6/Screen_Shot_2019-03-18_at_11.36.23.png)Viacheslav PavlovViacheslav Pavlovhttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/254Add axis labels and text to PDCI graphs2019-03-27T17:44:06+01:00Nora Castaneda-AlvarezAdd axis labels and text to PDCI graphsPlease add:
* [x] Change graph title to: **Passport Data Completeness Index (PDCI)**
* [x] Add introductory text to PDCI graph, right after the title: Genesys uses the PDCI as an indicator of the completeness of published passport data....Please add:
* [x] Change graph title to: **Passport Data Completeness Index (PDCI)**
* [x] Add introductory text to PDCI graph, right after the title: Genesys uses the PDCI as an indicator of the completeness of published passport data. The PDCI uses the presence or absence of data points in the documentation of a genebank accession, taking into account the presence or value of other data points [(van Hintum et al. 2011)](https://www.cambridge.org/core/journals/plant-genetic-resources/article/quality-indicators-for-passport-data-in-ex-situ-genebanks/AD391E5CF32DD41BFB49C1FE1D457E2C). For example, a wild accession should have a well-defined collection site but no variety name. The PDCI ranges from 0 to 10, where 0 is the minimum score assigned to rather incomplete passport records and 10 is the maximum score assigned to very complete passport records. Any type of accession, wild, landrace, breeding material or modern variety, can attain the PDCI’s maximal score.
* [x] Add axis labels: X axis: 'Passport Data Completeness Index (PDCI)', Y axis:'Number of passport records'.
* [x] Remove last line: 'Read about Passport Data Completeness Index'
## UI update
![image](/uploads/80484857c8776077e598a1c86a44915b/image.png)
Mock version (all fonts in black please):
![Screen_Shot_2019-03-18_at_11.31.01](/uploads/78c51f01b67124e9c356b8ffe48bf21b/Screen_Shot_2019-03-18_at_11.31.01.png)Oleksii SavranOleksii Savranhttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/253RTL layouts2019-04-30T11:35:04+02:00Matija ObrezaRTL layoutsPlease ensure that all components are right-to-left compliant (languages `fa` and `ar`). We don't need to wait for translations.
Make sure that margins, paddings and text-alignment is set up for RTL.Please ensure that all components are right-to-left compliant (languages `fa` and `ar`). We don't need to wait for translations.
Make sure that margins, paddings and text-alignment is set up for RTL.0.1Oleksii SavranOleksii Savranhttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/252Explore: Filter suggestions2019-03-25T19:02:03+01:00Matija ObrezaExplore: Filter suggestionsThe JSP version of accession Explorer features suggestions (shows numbers next to Historic or In MLS) and makes use of "filtered" autocomplete (it will suggest only ISO3 codes where data exists). Look at "Biological status of accession" ...The JSP version of accession Explorer features suggestions (shows numbers next to Historic or In MLS) and makes use of "filtered" autocomplete (it will suggest only ISO3 codes where data exists). Look at "Biological status of accession" at https://www.genesys-pgr.org/explore?filter=%7B%22crops%22%3A%5B%22barley%22%5D%7D:
![image](/uploads/85397af02b2041ffa26f2f27648bcf78/image.png)
The options in `SAMPSTAT` are presented with numbers that match all other applied filters (in this case *barley*). Even if one filter option is selected, all other options remain visible to help with `OR` filtering.
## UI Update
Where we have checkboxes or radio boxes, the number of accessions for each option should be included:
![image](/uploads/52e2554d55a6943c9e2d233d53b7978b/image.png)
The components need upgrading so that the "count" for each term can be passed from the parent component.
## API update
We require a new API call that extends the `/list` accessions (by filter) that includes a `suggestions` object. Because this comes from ES, we can try using the same data types as for the "Overview" page.
`suggestions` should return options for a limited set of accession fields: `sampStat`, all booleans, `crop`.
The `suggestions` must be loaded from ES, but in a way that when aggregating for term numbers the actual filtering on that field is excluded.Viacheslav PavlovViacheslav Pavlovhttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/251Banner on the home page is shifted2019-05-14T15:10:07+02:00Aleksandr KirichenkoBanner on the home page is shifted**Tested on iMac(Retina 4K, 21,5-inch, Late 2015) Safari and macOS Mojave version 10.14.3**
![SCR_2](/uploads/ce9b90aecce7ad388e8410e7830048f1/SCR_2.png)
Steps:
1. Go to the System preferences > Displays and setup scaled resolution. S...**Tested on iMac(Retina 4K, 21,5-inch, Late 2015) Safari and macOS Mojave version 10.14.3**
![SCR_2](/uploads/ce9b90aecce7ad388e8410e7830048f1/SCR_2.png)
Steps:
1. Go to the System preferences > Displays and setup scaled resolution. See screen:
![SCR_1](/uploads/a46c58be63982438182cc7b8de647d7e/SCR_1.png)
2. Go to the "https://sandbox.genesys-pgr.org/"
**Actual result:** See attached screen:
![SCR_3](/uploads/3d7ae0dce48855c65c06dee3f65a555d/SCR_3.png)Viacheslav PavlovViacheslav Pavlovhttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/250Bug: removing institute from partner2019-03-14T18:19:14+01:00Matija ObrezaBug: removing institute from partnerTrying to remove an institute when editing existing Partner record results in
```
react-dom.development.js:240 Uncaught TypeError: Cannot read property 'includes' of undefined
at dashboard.ts:48
at Array.filter (<anonymous>)
...Trying to remove an institute when editing existing Partner record results in
```
react-dom.development.js:240 Uncaught TypeError: Cannot read property 'includes' of undefined
at dashboard.ts:48
at Array.filter (<anonymous>)
at partner (dashboard.ts:48)
at combination (redux.js:435)
at combination (redux.js:435)
at dispatch (redux.js:213)
at middleware.js:13
at index.js:11
at dispatch (redux.js:563)
at ApiCall.ts:25
```0.1Oleksii SavranOleksii Savranhttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/249OAuth token check2019-04-15T12:45:22+02:00Matija ObrezaOAuth token checkOur code now sends the token on every request through `/proxy`.
Because we use JWT, the token should be valid if it has not expired. Please check the token expiry date instead of sending the token to the backend for validation.Our code now sends the token on every request through `/proxy`.
Because we use JWT, the token should be valid if it has not expired. Please check the token expiry date instead of sending the token to the backend for validation.0.1Viacheslav PavlovViacheslav Pavlovhttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/248Summary pie charts2019-03-15T17:39:20+01:00Matija ObrezaSummary pie chartsWe now display pie charts using all available ES term results, but we list only the top 5 terms (`.slice(0, 5)`):
![image](/uploads/e986cabc73720292decc3dbd9f3c44ed/image.png)
Notice the many different parts of the chart!
## Update `<...We now display pie charts using all available ES term results, but we list only the top 5 terms (`.slice(0, 5)`):
![image](/uploads/e986cabc73720292decc3dbd9f3c44ed/image.png)
Notice the many different parts of the chart!
## Update `<PieChart` component
```
<PieChart
data={
taxonomyGenusSpeciesOverview.terms.slice(0, 5).map(
(term) => ({
value: term.count,
label: term.term,
}),
)} />
```
1. Passing data to PieChart is O.K.
1. Add option to declare `maxTerms={ 8 }` (default value is `5`).
1. Add option to set `total` (sum of all values)
1. Add option to set `missing`
The updated PieChart should calculate the sum of `other` terms (`total - missing - sum_of_topX_terms`).
It should automatically add two sections to each pie:
1. The `{ label: t('...other'), value: other }`
1. The `{ label: t('...missing'), value: missing }`
A PieChart with `maxTerms === 5` would potentially show the 5 top terms (using `.slice(0, 5)`) plus 2 generated entries (other + missing).
## Update all piecharts
We use piecharts on various pages. Add `total` and `missing` attributes to all.0.1Viacheslav PavlovViacheslav Pavlovhttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/247Wording2019-03-08T15:08:26+01:00Matija ObrezaWording- ~~Partner~~ &rarr; **Data provider**
- ~~Origin~~ &rarr; **Provenance**
- ~~Order~~ &rarr; **Request**- ~~Partner~~ → **Data provider**
- ~~Origin~~ → **Provenance**
- ~~Order~~ → **Request**0.1Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/246Logo underline2019-03-11T12:08:00+01:00Matija ObrezaLogo underlineRemove the custom light-gray underline below Genesys logo (also mobile), use one color below the header bar.
![image](/uploads/7790e3e838d586e2f187160001f8bae2/image.png)
Also on admin and dashboard pages.Remove the custom light-gray underline below Genesys logo (also mobile), use one color below the header bar.
![image](/uploads/7790e3e838d586e2f187160001f8bae2/image.png)
Also on admin and dashboard pages.0.1Oleksii SavranOleksii Savranhttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/245Genesys partners2019-03-12T15:28:12+01:00Matija ObrezaGenesys partnersPlease update "Data providers" page https://beta.genesys-pgr.org/partners
1. List data providers in alphabetical order (title)
1. Remove filters
1. infinite load must stay
No changes to backend are required.Please update "Data providers" page https://beta.genesys-pgr.org/partners
1. List data providers in alphabetical order (title)
1. Remove filters
1. infinite load must stay
No changes to backend are required.0.1Oleksii SavranOleksii Savranhttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/244Network routes2019-03-20T08:27:13+01:00Matija ObrezaNetwork routesImplement original `/org` routes as `/network` routes in Genesys website. For i18n please use the term **Network** and not ~~Organization~~.
1. List of networks at `/networks` should list the `<NetworkCard compact` (similar to list of P...Implement original `/org` routes as `/network` routes in Genesys website. For i18n please use the term **Network** and not ~~Organization~~.
1. List of networks at `/networks` should list the `<NetworkCard compact` (similar to list of Partners). Order by title, no filtering support required.
1. Opening a Network navigates to `/network/{shortName}` and displays `<DisplayPage` with network information (e.g. https://www.genesys-pgr.org/org/COGENT)
1. Layout based on Institute page
1. Display the info card
1. Map of members (https://www.genesys-pgr.org/org/COGENT/map) should use currently configured map
1. No grouping by country
1. Use existing institute `InstituteCard compact`
1. infiniteLoad members only if necessary
![image](/uploads/2949a359456af8081499721fe6f28de4/image.png)0.1Viacheslav PavlovViacheslav Pavlovhttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/243Error message "Bad credentials" isn't shown2019-03-15T15:25:09+01:00Aleksandr KirichenkoError message "Bad credentials" isn't shownLogin with incorrect credentials doesn't lead to the error message
Steps:
1. Go to the login page
2. Enter invalid credentials
3. Click "LOGIN" button
See attached video:
![recording_0018](/uploads/7e4c9fadb470656aaa2bab464bfd66e8/rec...Login with incorrect credentials doesn't lead to the error message
Steps:
1. Go to the login page
2. Enter invalid credentials
3. Click "LOGIN" button
See attached video:
![recording_0018](/uploads/7e4c9fadb470656aaa2bab464bfd66e8/recording_0018.gif)Oleksii SavranOleksii Savranhttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/242Entry page2019-05-03T15:35:16+02:00Matija ObrezaEntry pageWe wish to minimize the amount of information on the entry page, keeping the tagline, search from and info boxes, recent activity headings and a limited list of crops.
**Tagline:** Genesys is an online platform where you can find inform...We wish to minimize the amount of information on the entry page, keeping the tagline, search from and info boxes, recent activity headings and a limited list of crops.
**Tagline:** Genesys is an online platform where you can find information about Plant Genetic Resources for Food and Agriculture (PGRFA) conserved in genebanks worldwide.
Display only activity headings + link to all (not full content)
Display top crops (as names): wheat, rice, barley, forages, sorghum, maize, beans, chickpea + all crops link
Here is a mock up of the page:
![image](/uploads/4ed6e9597845d6eb51f01e780962e79d/image.png)
With minor changes how do we **section out** the "Recent activity" and "Crops"?
Any suggestions on colors and font size are welcome.0.1Gregor FrasGregor Frashttps://gitlab.croptrust.org/genesys-pgr/genesys-ui/-/issues/241Login redirects2019-03-07T12:17:57+01:00Matija ObrezaLogin redirectsAfter any user logs into Genesys they are redirected to `/dashboard`.
- Please make the redirect after login to entry page
- Allow only users with role `VETTEDUSER` (or `ADMINISTRATOR`) access to **Catalog** and **Subsets** routes
- Sh...After any user logs into Genesys they are redirected to `/dashboard`.
- Please make the redirect after login to entry page
- Allow only users with role `VETTEDUSER` (or `ADMINISTRATOR`) access to **Catalog** and **Subsets** routes
- Show menus **Catalog** and **Subsets** only to users with role `VETTEDUSER` (or `ADMINISTRATOR`)0.1Viacheslav PavlovViacheslav Pavlov