Skip to content

Commit

Permalink
Merge pull request #1198 from alliance-genome/release/v0.23.0-rc1
Browse files Browse the repository at this point in the history
Release/v0.23.0-rc1
  • Loading branch information
markquintontulloch authored Aug 17, 2023
2 parents 0d4a8ac + 345225a commit 543e363
Show file tree
Hide file tree
Showing 104 changed files with 1,455 additions and 287 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ the new version of the application can function in a consistent state upon and a
```
3. Check the logs for errors after app-server restart, which could indicate a DB restore failure
and troubleshoot accordingly if necessary to fix any errors.
3. Connect to the Environment's search domain and delete all indexes. A link to the Cerebro view into each environment's search indexes is available in the curation interface under `Other Links` > `Elastic Search UI` (VPN connection required).
3. Connect to the Environment's search domain and delete all indexes. A link to the Cerebro view into each environment's search indexes is available in the curation interface under `Developer Links` > `Search index UI (cerebro)` (VPN connection required).
Alternatively, you can reach this UI manually by browsing to the [AGR Cerebro interface](http://cerebro.alliancegenome.org:9000) and entering the environment's domain endpoint manually. The domain endpoint URL can be found through the [Amazon OpenSearch console](https://us-east-1.console.aws.amazon.com/aos/home?region=us-east-1#opensearch/domains).
4. Tag and create the release in git and gitHub, as described in the [Release creation](#release-creation) section.
5. Check the logs for the environment that you're releasing to and ensure the application started successfully
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import React from 'react';
import { AutocompleteFormEditor } from '../../Autocomplete/AutocompleteFormEditor';
import { inCollectionSearch } from './utils';
import { FormErrorMessageComponent } from '../../Error/FormErrorMessageComponent';
import { InCollectionAdditionalFieldData } from '../../FieldData/InCollectionAdditionalFieldData';
import { VocabTermAutocompleteTemplate } from '../../Autocomplete/VocabTermAutocompleteTemplate';

export const InCollectionFormEditor = ({
inCollection,
onInCollectionValueChange,
widgetColumnSize,
labelColumnSize,
fieldDetailsColumnSize,
errorMessages
}) => {

return (
<div className="grid">
<div className={labelColumnSize}>
<label htmlFor="inCollection">In Collection</label>
</div>
<div className={widgetColumnSize}>
<AutocompleteFormEditor
name="inCollection-input"
search={inCollectionSearch}
initialValue={inCollection}
fieldName='inCollection'
subField='name'
onValueChangeHandler={onInCollectionValueChange}
valueDisplay={(item, setAutocompleteSelectedItem, op, query) =>
<VocabTermAutocompleteTemplate item={item} op={op} query={query} setAutocompleteSelectedItem={setAutocompleteSelectedItem}/>}
/>
<FormErrorMessageComponent errorMessages={errorMessages} errorField={"inCollection"}/>
</div>
<div className={fieldDetailsColumnSize}>
<InCollectionAdditionalFieldData name={inCollection?.name}/>
</div>
</div>
)
}
19 changes: 19 additions & 0 deletions src/main/cliapp/src/components/Editors/inCollection/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { buildAutocompleteFilter, autocompleteSearch } from "../../../utils/utils";
import { SearchService } from "../../../service/SearchService";

export const inCollectionSearch = (event, setFiltered, setQuery) => {
const searchService = new SearchService();
const autocompleteFields = ["name"];
const endpoint = "vocabularyterm";
const filterName = "taxonFilter";
const otherFilters = {
vocabularyFilter: {
"vocabulary.name": {
queryString: "Allele collection vocabulary"
}
}
}
setQuery(event.query);
const filter = buildAutocompleteFilter(event, autocompleteFields);
autocompleteSearch(searchService, endpoint, filterName, filter, setFiltered, otherFilters);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import React from 'react';
import { FormErrorMessageComponent } from '../../Error/FormErrorMessageComponent';
import { Dropdown } from 'primereact/dropdown';
import { InternalAdditionalFieldData } from '../../FieldData/InternalAdditionalFieldData';

export const InternalFormEditor = ({
internal,
onInternalValueChange,
booleanTerms,
widgetColumnSize,
labelColumnSize,
fieldDetailsColumnSize,
errorMessages
}) => {

return (
<div className="grid">
<div className={labelColumnSize}>
<label htmlFor="internal">Internal</label>
</div>
<div className={widgetColumnSize}>
<Dropdown
name="internal"
value={internal}
options={booleanTerms}
optionLabel='text'
optionValue='name'
onChange={onInternalValueChange}
/>
<FormErrorMessageComponent errorMessages={errorMessages} errorField={"internal"}/>
</div>
<div className={fieldDetailsColumnSize}>
<InternalAdditionalFieldData internal={internal?.toString()}/>
</div>
</div>

)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from 'react';
import { FormErrorMessageComponent } from '../../Error/FormErrorMessageComponent';
import { IsExtinctAdditionalFieldData } from '../../FieldData/IsExtinctAdditionalFieldData';
import { Dropdown } from 'primereact/dropdown';

export const IsExtinctFormEditor = ({
isExtinct,
onIsExtinctValueChange,
booleanTerms,
widgetColumnSize,
labelColumnSize,
fieldDetailsColumnSize,
errorMessages
}) => {

return (
<div className="grid">
<div className={labelColumnSize}>
<label htmlFor="isExtinct">Is Extinct</label>
</div>
<div className={widgetColumnSize}>
<Dropdown
name="isExtinct"
value={isExtinct}
options={booleanTerms}
optionLabel='text'
optionValue='name'
onChange={onIsExtinctValueChange}
/>
<FormErrorMessageComponent errorMessages={errorMessages} errorField={"isExtinct"}/>
</div>
<div className={fieldDetailsColumnSize}>
<IsExtinctAdditionalFieldData isExtinct={isExtinct?.toString()}/>
</div>
</div>
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import React from 'react';
import { FormErrorMessageComponent } from '../../Error/FormErrorMessageComponent';
import { Dropdown } from 'primereact/dropdown';
import { ObsoleteAdditionalFieldData } from '../../FieldData/ObsoleteAdditionalFieldData';

export const ObsoleteFormEditor = ({
obsolete,
onObsoleteValueChange,
booleanTerms,
widgetColumnSize,
labelColumnSize,
fieldDetailsColumnSize,
errorMessages
}) => {

return (
<div className="grid">
<div className={labelColumnSize}>
<label htmlFor="obsolete">Obsolete</label>
</div>
<div className={widgetColumnSize}>
<Dropdown
name="obsolete"
value={obsolete}
options={booleanTerms}
optionLabel='text'
optionValue='name'
onChange={onObsoleteValueChange}
/>
<FormErrorMessageComponent errorMessages={errorMessages} errorField={"obsolete"}/>
</div>
<div className={fieldDetailsColumnSize}>
<ObsoleteAdditionalFieldData obsolete={obsolete?.toString()}/>
</div>
</div>

)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from "react"
import { AutocompleteFormMultiEditor } from '../../Autocomplete/AutocompleteFormMultiEditor';
import { LiteratureAutocompleteTemplate } from "../../Autocomplete/LiteratureAutocompleteTemplate";
import { FormErrorMessageComponent } from "../../Error/FormErrorMessageComponent";
import { ReferencesAdditionalFieldData } from "../../FieldData/ReferencesAdditionalFieldData";
import { referenceSearch } from "./utils";

export const ReferencesFormEditor = ({
references,
onReferencesValueChange,
widgetColumnSize,
labelColumnSize,
fieldDetailsColumnSize,
errorMessages
}) => {

return (
<div className="grid">
<div className={labelColumnSize}>
<label htmlFor="referenes">References</label>
</div>
<div className={widgetColumnSize}>
<AutocompleteFormMultiEditor
search={referenceSearch}
initialValue={references}
fieldName='references'
valueDisplay={(item, setAutocompleteHoverItem, op, query) =>
<LiteratureAutocompleteTemplate item={item} setAutocompleteHoverItem={setAutocompleteHoverItem} op={op} query={query}/>}
onValueChangeHandler={onReferencesValueChange}
/>
<FormErrorMessageComponent errorMessages={errorMessages} errorField={"references"}/>
</div>
<div className={fieldDetailsColumnSize}>
<ReferencesAdditionalFieldData references={references}/>
</div>
</div>

)
}
13 changes: 13 additions & 0 deletions src/main/cliapp/src/components/Editors/references/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { buildAutocompleteFilter, autocompleteSearch } from "../../../utils/utils";
import { SearchService } from "../../../service/SearchService";

export const referenceSearch = (event, setFiltered, setInputValue) => {
const searchService = new SearchService();
const autocompleteFields = ["curie", "cross_references.curie"];
const endpoint = "literature-reference";
const filterName = "curieFilter";
const filter = buildAutocompleteFilter(event, autocompleteFields);

setInputValue(event.query);
autocompleteSearch(searchService, endpoint, filterName, filter, setFiltered);
}
36 changes: 36 additions & 0 deletions src/main/cliapp/src/components/Editors/taxon/TaxonFormEditor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React from 'react';
import { AutocompleteFormEditor } from '../../Autocomplete/AutocompleteFormEditor';
import { taxonSearch } from './utils';
import { FormErrorMessageComponent } from '../../Error/FormErrorMessageComponent';
import { TaxonAdditionalFieldData } from '../../FieldData/TaxonAdditionalFieldData';

export const TaxonFormEditor = ({
taxon,
onTaxonValueChange,
widgetColumnSize,
labelColumnSize,
fieldDetailsColumnSize,
errorMessages
}) => {

return (
<div className="grid">
<div className={labelColumnSize}>
<label htmlFor="taxon">Taxon</label>
</div>
<div className={widgetColumnSize}>
<AutocompleteFormEditor
name="taxon-input"
search={taxonSearch}
initialValue={taxon}
fieldName='taxon'
onValueChangeHandler={onTaxonValueChange}
/>
<FormErrorMessageComponent errorMessages={errorMessages} errorField={"taxon"}/>
</div>
<div className={fieldDetailsColumnSize}>
<TaxonAdditionalFieldData curie={taxon?.curie}/>
</div>
</div>
)
}
13 changes: 13 additions & 0 deletions src/main/cliapp/src/components/Editors/taxon/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { buildAutocompleteFilter, autocompleteSearch } from "../../../utils/utils";
import { SearchService } from "../../../service/SearchService";


export const taxonSearch = (event, setFiltered, setQuery) => {
const searchService = new SearchService();
const autocompleteFields = ["curie", "name", "crossReferences.referencedCurie", "secondaryIdentifiers", "synonyms.name"];
const endpoint = "ncbitaxonterm";
const filterName = "taxonFilter";
setQuery(event.query);
const filter = buildAutocompleteFilter(event, autocompleteFields);
autocompleteSearch(searchService, endpoint, filterName, filter, setFiltered);
}
17 changes: 17 additions & 0 deletions src/main/cliapp/src/components/EntityDetailsAction.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Link } from 'react-router-dom/cjs/react-router-dom.min';
import { Tooltip } from 'primereact/tooltip';

export const EntityDetailsAction = ({ curie, disabled }) =>{
const disabledClasses = disabled ? "pointer-events-none opacity-50" : "";

if (!curie) return null;

return (
<>
<Link to={`allele/${curie}`} target="_blank" className={`${curie.replace(':', '')} ${disabledClasses}`}>
<i className="pi pi-info"></i>
</Link>
<Tooltip target={`.${curie.replace(':', '')}`} content= {"Open Details"} />
</>
);
};
2 changes: 1 addition & 1 deletion src/main/cliapp/src/components/EvidenceComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import { EllipsisTableCell } from './EllipsisTableCell';
import { ListTableCell } from './ListTableCell';
import { AutocompleteMultiEditor } from './Autocomplete/AutocompleteMultiEditor';
import { DialogErrorMessageComponent } from './DialogErrorMessageComponent';
import { DialogErrorMessageComponent } from './Error/DialogErrorMessageComponent';
import { SearchService } from '../service/SearchService';
import { autocompleteSearch, buildAutocompleteFilter, multipleAutocompleteOnChange, getRefStrings } from '../utils/utils';
import { LiteratureAutocompleteTemplate } from './Autocomplete/LiteratureAutocompleteTemplate';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';

export const InCollectionAdditionalFieldData = ({ name }) => {
if(!name) return null;
return <div className="p-info">{name}</div>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';

export const InternalAdditionalFieldData = ({ internal }) => {
if(!internal) return null;
return <div className="p-info">{internal}</div>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';

export const IsExtinctAdditionalFieldData = ({ isExtinct }) => {
if(!isExtinct) return null;
return <div className="p-info">{isExtinct}</div>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';

export const ObsoleteAdditionalFieldData = ({ obsolete }) => {
if(!obsolete) return null;
return <div className="p-info">{obsolete}</div>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react';
import { SingleReferenceAdditionalFieldData } from "./SingleReferenceAdditionalFieldData";

export const ReferencesAdditionalFieldData = ({ references }) => {

const referencesDivs = references?.map((reference) => {
return (
<div key={reference.curie}>
<SingleReferenceAdditionalFieldData key={reference.curie} fieldData={reference} />
</div>
)
})

return referencesDivs || null;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from "react";

export const TaxonAdditionalFieldData = ({ curie }) => {
if(!curie) return null;
return <div className="p-info">{curie}</div>;
}
Loading

0 comments on commit 543e363

Please sign in to comment.