Skip to content

Commit

Permalink
implements issues #1533, #1622 (#472)
Browse files Browse the repository at this point in the history
* removed SGC column from target list

* #1540 added preferred alias functionality

* #1540 added edit column to target list and use target settings modal

* #1540 updated "Open" label and read only version of display name

* Squashed commit of the following:

commit c5bba58
Author: Boris Kovar <[email protected]>
Date:   Tue Dec 10 08:13:00 2024 +0100

    #1603 - fixes

* Squashed commit of the following:

commit 9d9bf8c
Author: Boris Kovar <[email protected]>
Date:   Wed Dec 11 15:20:54 2024 +0100

    fixed frontend part of the ticket. Now properly resolves target based on the target name and target access string

* - fixed issue when the template protein is missing

* Squashed commit of the following:

commit 2fd529e
Author: Boris Kovar <[email protected]>
Date:   Mon Dec 16 10:44:15 2024 +0100

    - changes labels in searchSettingsDialog

commit 12499a9
Author: Boris Kovar <[email protected]>
Date:   Mon Dec 16 09:47:05 2024 +0100

    -small fix

commit cbf95f1
Merge: 5bd7756 900d851
Author: Boris Kovar <[email protected]>
Date:   Thu Dec 12 13:34:14 2024 +0100

    Merge branch '#1563-LHS-search' of https://github.com/m2ms/fragalysis-frontend into #1563-LHS-search

commit 5bd7756
Author: Boris Kovar <[email protected]>
Date:   Thu Dec 12 13:30:00 2024 +0100

    - search aliases

commit 3e7540f
Author: Boris Kovar <[email protected]>
Date:   Tue Dec 10 12:12:03 2024 +0100

    - checkpoint

commit 6631373
Author: Boris Kovar <[email protected]>
Date:   Fri Dec 6 10:05:51 2024 +0100

    - #1563 - all the UI and infrastructure and search by shortcode and compound id is done

commit 900d851
Author: Boris Kovar <[email protected]>
Date:   Thu Dec 12 13:30:00 2024 +0100

    - search aliases

commit a72f427
Author: Boris Kovar <[email protected]>
Date:   Tue Dec 10 12:12:03 2024 +0100

    - checkpoint

commit 4b7d699
Merge: 4579a9d 32c837d
Author: Boris Kovar <[email protected]>
Date:   Tue Dec 10 10:26:34 2024 +0100

    Merge branch '#1563-LHS-search' of https://github.com/m2ms/fragalysis-frontend into #1563-LHS-search

commit 4579a9d
Author: Boris Kovar <[email protected]>
Date:   Fri Dec 6 10:05:51 2024 +0100

    - #1563 - all the UI and infrastructure and search by shortcode and compound id is done

commit 32c837d
Author: Boris Kovar <[email protected]>
Date:   Fri Dec 6 10:05:51 2024 +0100

    - #1563 - all the UI and infrastructure and search by shortcode and compound id is done

* - fixes #1622 and changes defaults for search settings

* Squashed commit of the following:

commit 021d6f2
Merge: a5fb901 182a10a
Author: boriskovar-m2ms <[email protected]>
Date:   Thu Dec 19 13:49:43 2024 +0100

    Merge branch '#1533-direct-links' of https://github.com/m2ms/fragalysis-frontend into #1533-direct-links

commit a5fb901
Author: Boris Kovar <[email protected]>
Date:   Tue Dec 17 16:56:49 2024 +0100

    - implements #1533

commit 182a10a
Author: Boris Kovar <[email protected]>
Date:   Tue Dec 17 16:56:49 2024 +0100

    - implements #1533

---------

Co-authored-by: matej <[email protected]>
  • Loading branch information
boriskovar-m2ms and matej-vavrek authored Dec 19, 2024
1 parent df73b81 commit 2beca6b
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 1,286 deletions.
3 changes: 2 additions & 1 deletion js/components/direct/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ export const URL_TOKENS = {
molecules: 'mols',
exact: 'exact',
tag: 'tag',
target_access_string: 'tas'
target_access_string: 'tas',
compound: 'compound'
};
20 changes: 16 additions & 4 deletions js/components/direct/directDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ export const DirectDisplay = memo(props => {
useEffect(() => {
// example url http://127.0.0.1:8080/viewer/react/preview/direct/target/MID2A/tas/lb00000/mols/X0301_0A/L/P/S/X0393_0B/L/P
// example url with 'exact' https://fragalysis-tibor-default.xchem-dev.diamond.ac.uk/viewer/react/preview/direct/target/NUDT7A_CRUDE/mols/NUDT7A_CRUDE-X0156_1/exact/L/P
// based on the issues #431, #448, #447
// in two cases above we are searching for molecules using shortcode
// Now the search term is looked up in the `shortcode`, `compound ID` and all of the `aliases` (I can change this pretty quickly)
// `http://127.0.0.1:8080/viewer/react/preview/direct/target/A71EV2A/tas/lb18145-1/compound/7516/L/S/nonsense-45/L/P/exact/Z4/L/C/A0853a/L/P`
// URL above shows `L` and `S` for observation which contains substring `7516`, `L` and `P` for observation which exactly has string `nonsense-45` as a shortcode,
// compound ID or one of the aliases, `L` and `C` for all observations which contain substring `Z4`, and `L` and `P` for observations which contains substring `A0853a`
const param = match.params[0];
if (!directAccessProcessed && param && param.startsWith(URL_TOKENS.target)) {
let withoutKeyword = param.split(URL_TOKENS.target);
Expand Down Expand Up @@ -63,7 +67,13 @@ export const DirectDisplay = memo(props => {
}
}
}
if (rest && rest.length > 1 && rest[0] === URL_TOKENS.molecules) {
if (rest && rest.length > 1 && (rest[0] === URL_TOKENS.molecules || rest[0] === URL_TOKENS.compound)) {
let searchSettings = { searchBy: {} };
if (rest[0] === URL_TOKENS.molecules) {
searchSettings = { searchBy: { shortcode: true, aliases: false, compoundId: false } };
} else if (rest[0] === URL_TOKENS.compound) {
searchSettings = { searchBy: { shortcode: true, aliases: true, compoundId: true } };
}
rest = rest.slice(1);
let i;
let currentMolecule;
Expand Down Expand Up @@ -105,7 +115,8 @@ export const DirectDisplay = memo(props => {
C: false,
S: false,
V: false,
exact: false
exact: false,
searchSettings: searchSettings
};
molecules.push(currentMolecule);
}
Expand All @@ -119,7 +130,8 @@ export const DirectDisplay = memo(props => {
C: false,
S: false,
V: false,
exact: false
exact: false,
searchSettings: searchSettings
};
molecules.push(currentMolecule);
}
Expand Down
2 changes: 1 addition & 1 deletion js/components/preview/Preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,5 +354,5 @@ const Preview = memo(({ isStateLoaded, hideProjects, isSnapshot = false }) => {
});

export default withLoadingJobSpecs(
withSnapshotManagement(withUpdatingTarget(withLoadingProtein(withLoadingProjects(Preview))))
withLoadingProjects(withSnapshotManagement(withUpdatingTarget(withLoadingProtein(Preview))))
);
1 change: 0 additions & 1 deletion js/components/preview/molecule/hitNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* Created by abradley on 14/03/2018.
*/
import React, { memo } from 'react';
import { MoleculeList } from './moleculeList';
import { ObservationCmpList } from './observationCmpList';

const HitNavigator = memo(({ hideProjects }) => {
Expand Down
Loading

0 comments on commit 2beca6b

Please sign in to comment.