Skip to content

Commit

Permalink
Merge pull request #1705 from alliance-genome/release/v0.35.0-rc2
Browse files Browse the repository at this point in the history
Release/v0.35.0 rc2
  • Loading branch information
VarunReddy1111 authored Nov 6, 2024
2 parents 14eb6bb + ad1e724 commit 2906fea
Show file tree
Hide file tree
Showing 506 changed files with 19,765 additions and 3,865 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ uirun:
make -B -C src/main/cliapp
make -B -C src/main/cliapp run

pretty:
make -B -C src/main/cliapp pretty

uirunalpha:
export API_URL=https://alpha-curation.alliancegenome.org; make -B -C src/main/cliapp run; unset API_URL

Expand Down
2 changes: 1 addition & 1 deletion docker/run_opensearch
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker run -d --net curation -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" -e "DISABLE_SECURITY_PLUGIN=true" --name opensearch opensearchproject/opensearch:1.2.4
docker run -d --net curation -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" -e "DISABLE_SECURITY_PLUGIN=true" --name opensearch opensearchproject/opensearch:2.16.0
7 changes: 6 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<okta.version>3.0.1</okta.version>
<okta.authn.version>2.0.0</okta.authn.version>
<okta-jwt.version>0.5.1</okta-jwt.version>
<quarkus.platform.version>3.5.0</quarkus.platform.version>
<quarkus.platform.version>3.13.3</quarkus.platform.version>
<surefire-plugin.version>3.0.0-M7</surefire-plugin.version>
<maven-checkstyle-plugin.version>3.3.1</maven-checkstyle-plugin.version>
<checkstyle.version>10.17.0</checkstyle.version>
Expand Down Expand Up @@ -247,6 +247,11 @@
<artifactId>commons-collections4</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.27.1</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
Expand Down
3 changes: 3 additions & 0 deletions src/main/cliapp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ all:
run:
npm start

pretty:
npx prettier --write .

runalpha:
export API_URL=https://alpha-curation.alliancegenome.org; make run; unset API_URL

Expand Down
41 changes: 27 additions & 14 deletions src/main/cliapp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/main/cliapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"immer": "^9.0.15",
"jose": "^4.10.0",
"moment": "^2.29.1",
"moment-timezone": "^0.5.45",
"primeflex": "3.1.0",
"primeicons": "^5.0.0",
"primereact": "^10.0.9",
Expand All @@ -45,6 +46,7 @@
"react-use-websocket": "^3.0.0",
"react18-json-view": "^0.2.8",
"sass": "^1.32.8",
"update-browserslist-db": "^1.1.0",
"use-immer": "^0.7.0"
},
"scripts": {
Expand All @@ -56,7 +58,7 @@
"eslintConfig": {
"extends": [
"react-app",
"prettier"
"prettier"
]
},
"browserslist": [
Expand Down
71 changes: 62 additions & 9 deletions src/main/cliapp/src/components/EntityCountsComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { DataTable } from 'primereact/datatable';
import { Column } from 'primereact/column';
import { SystemService } from '../service/SystemService';
import { CLASSES } from '../constants/Classes';
import { NumberTemplate } from './Templates/NumberTemplate';

export const EntityCountsComponent = () => {
const [tableData, setTableData] = useState({});
Expand Down Expand Up @@ -44,28 +45,80 @@ export const EntityCountsComponent = () => {
return <a href={rowData.link}>{rowData.name}</a>;
};

const ROW_HIGHLIGHT_IGNORE = ['Disease Annotations', 'Literature References', 'Bulk Loads / Failed Loads'];

const getRowClass = (rowData) => {
if (ROW_HIGHLIGHT_IGNORE.includes(rowData.name)) return;

if (rowData?.dbCount !== rowData.esCount) {
return 'bg-gray-500 text-white';
}
};

return (
<>
<div className="grid nested dashboard">
<div className="col-4">
<DataTable header="Entities" value={tableData.entity} sortField="name" sortOrder={1}>
<DataTable
header="Entities"
value={tableData.entity}
sortField="name"
sortOrder={1}
rowClassName={(rowData) => getRowClass(rowData)}
>
<Column field="name" header="Entity Name" body={nameHyperlinkTemplate} />
<Column field="dbCount" header="Database Entity Count" />
<Column field="esCount" header="Search index Entity Count" />
<Column
field="dbCount"
header="Database Entity Count"
body={(rowData) => <NumberTemplate number={rowData.dbCount} />}
/>
<Column
field="esCount"
header="Search index Entity Count"
body={(rowData) => <NumberTemplate number={rowData.esCount} />}
/>
</DataTable>
</div>
<div className="col-4">
<DataTable header="Ontologies" value={tableData.ontology} sortField="name" sortOrder={1}>
<DataTable
header="Ontologies"
value={tableData.ontology}
sortField="name"
sortOrder={1}
rowClassName={(rowData) => getRowClass(rowData)}
>
<Column field="name" header="Ontology Name" body={nameHyperlinkTemplate} />
<Column field="dbCount" header="Database Term Count" />
<Column field="esCount" header="Search index Term Count" />
<Column
field="dbCount"
header="Database Term Count"
body={(rowData) => <NumberTemplate number={rowData.dbCount} />}
/>
<Column
field="esCount"
header="Search index Term Count"
body={(rowData) => <NumberTemplate number={rowData.esCount} />}
/>
</DataTable>
</div>
<div className="col-4">
<DataTable header="System" value={tableData.system} sortField="name" sortOrder={1}>
<DataTable
header="System"
value={tableData.system}
sortField="name"
sortOrder={1}
rowClassName={(rowData) => getRowClass(rowData)}
>
<Column field="name" header="System Name" body={nameHyperlinkTemplate} />
<Column field="dbCount" header="Database Object Count" />
<Column field="esCount" header="Search index Object Count" />
<Column
field="dbCount"
header="Database Object Count"
body={(rowData) => <NumberTemplate number={rowData.dbCount} />}
/>
<Column
field="esCount"
header="Search index Object Count"
body={(rowData) => <NumberTemplate number={rowData.esCount} />}
/>
</DataTable>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import { getIdentifier } from '../../utils/utils';

export function GeneticModifierAgmsAdditionalFieldData({ fieldData }) {
let ret = [];
if (fieldData && fieldData.length > 0) {
for (let i = 0; i < fieldData.length; i++) {
if (getIdentifier(fieldData[i]) !== '') {
ret.push(<div key={i} className="p-info" dangerouslySetInnerHTML={{ __html: fieldData[i]['name'] }}></div>);
}
}
}
return ret;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react';
import { getIdentifier } from '../../utils/utils';

export function GeneticModifierAllelesAdditionalFieldData({ fieldData }) {
let ret = [];
if (fieldData && fieldData.length > 0) {
for (let i = 0; i < fieldData.length; i++) {
if (getIdentifier(fieldData[i]) !== '') {
ret.push(
<div
key={i}
className="p-info"
dangerouslySetInnerHTML={{ __html: fieldData[i]['alleleSymbol']['displayText'] }}
></div>
);
}
}
}
return ret;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react';
import { getIdentifier } from '../../utils/utils';

export function GeneticModifierGenesAdditionalFieldData({ fieldData }) {
let ret = [];
if (fieldData && fieldData.length > 0) {
for (let i = 0; i < fieldData.length; i++) {
if (getIdentifier(fieldData[i]) !== '') {
ret.push(
<div
key={i}
className="p-info"
dangerouslySetInnerHTML={{ __html: fieldData[i]['geneSymbol']['displayText'] }}
></div>
);
}
}
}
return ret;
}

This file was deleted.

40 changes: 40 additions & 0 deletions src/main/cliapp/src/components/GenericDataTable/DataTableFooter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import React from 'react';
import { Paginator } from 'primereact/paginator';
import { NumberTemplate } from '../Templates/NumberTemplate';

export const DataTableFooter = ({ first, rows, totalRecords, onLazyLoad, isInEditMode }) => {
return (
!isInEditMode && (
<Paginator
data-testid="datatable-footer"
first={first}
rows={rows}
totalRecords={totalRecords}
rowsPerPageOptions={[10, 20, 50, 100, 250, 1000]}
onPageChange={onLazyLoad}
template={{
layout:
'CurrentPageReport FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown',
CurrentPageReport: (options) => {
const totalRecordsDisplay = <NumberTemplate number={options.totalRecords} />;
const firstDisplay = <NumberTemplate number={options.first} />;
const lastDisplay = <NumberTemplate number={options.last} />;
return (
<>
Showing {firstDisplay} to {lastDisplay} of {totalRecordsDisplay}
</>
);
},
PageLinks: (options) => {
const pageDisplay = <NumberTemplate number={options.page + 1} />;
return (
<button type="button" className={options.className} onClick={options.onClick}>
{pageDisplay}
</button>
);
},
}}
/>
)
);
};
Loading

0 comments on commit 2906fea

Please sign in to comment.