Skip to content

Commit

Permalink
Merge branch 'master' of github.com:phac-nml/irida
Browse files Browse the repository at this point in the history
  • Loading branch information
zipho committed Aug 17, 2020
2 parents 2e49e48 + 8c19c88 commit 97667f2
Show file tree
Hide file tree
Showing 18 changed files with 368 additions and 80 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ Changes
--------------
* [UI]: Fixed bug when creating/modifying a metadata template the user could not search for a field. (20.05.1)
* [UI]: Fixed bug where managers could not load Users listing page. (20.05.1)
* [UI]: Fixed issue where analysis results pages would hang after running with remote synchronized data. (20.05.2)
* [Developer]: Updated chromedriver to version `latest`. (20.05.2)
* [UI]: Updated importing numbers through excel file. IRIDA will now check for excel formatted numeric cells and keep the formatting. (20.05.3);
* [UI]: Updated sample details metadata so that long values will be broken up over multiple lines. (20.05.3);
* [UI]: Fixed bug where import bulk metadata button was displayed on linelist page for project collaborators. (20.05.04)
* [UI]: Fixed bug where add member to project button was displayed on project members page for project collaborators. (20.05.04)

20.01 to 20.05
--------------
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>ca.corefacility.bioinformatics</groupId>
<artifactId>irida</artifactId>
<packaging>war</packaging>
<version>20.05.1</version>
<version>20.05.4</version>
<name>irida</name>
<url>http://www.irida.ca</url>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class RemoteStatus {
private Date lastUpdate;

@SuppressWarnings("unused")
private RemoteStatus() {
protected RemoteStatus() {
}

public RemoteStatus(String url, RemoteAPI api) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,27 @@ public SampleMetadataStorage createProjectSampleMetadata(HttpSession session, @P
Iterator<Cell> cellIterator = row.cellIterator();
while (cellIterator.hasNext()) {
Cell cell = cellIterator.next();

int columnIndex = cell.getColumnIndex();
if (columnIndex < headers.size()) {
String header = headers.get(columnIndex);

if (!Strings.isNullOrEmpty(header)) {
// Need to ignore empty headers.
cell.setCellType(CellType.STRING);
rowMap.put(header, cell.getStringCellValue());
if(cell.getCellTypeEnum().equals(CellType.NUMERIC)) {
/*
This is a special handler for number cells. It was requested that numbers
keep their formatting from their excel files. E.g. 2.222222 with formatting
for 2 decimal places will be saved as 2.22.
*/
DataFormatter formatter = new DataFormatter();
String value = formatter.formatCellValue(cell);
rowMap.put(header, value);
}
else {
cell.setCellType(CellType.STRING);
rowMap.put(header, cell.getStringCellValue());
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"babel-loader": "^8.1.0",
"babel-plugin-import": "^1.13.0",
"bootstrap-sass": "^3.3.7",
"chromedriver": "^79.0.0",
"chromedriver": "latest",
"clean-webpack-plugin": "^3.0.0",
"css-loader": "^3.5.2",
"cssnano": "^4.1.10",
Expand Down
5 changes: 5 additions & 0 deletions src/main/webapp/pages/samples/sample.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
data-layout-decorate="~{samples/_base}">
<head>
<title th:text="#{samples.title(${sample.label})}">THIS IS SOMETHING WRONG</title>
<style>
dd {
word-wrap: break-word;
}
</style>
</head>
<body>
<main layout:fragment="main">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ export function ProjectMembersTable() {

return (
<PagedTable
buttons={[<AddMembersButton key="add-members-btn" />]}
buttons={[
window.PAGE.canManage ? (
<AddMembersButton key="add-members-btn" />
) : null,
]}
columns={columns}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { AddSamplesToCartButton } from "../AddToCartButton/AddSamplesToCart";
import { Button, Form, Input, Popover } from "antd";
import {
IconCloudUpload,
IconQuestion
IconQuestion,
} from "../../../../../components/icons/Icons";

const LineListTour = React.lazy(() => import("../Tour/LineListTour"));
Expand Down Expand Up @@ -72,20 +72,26 @@ export class ToolbarComponent extends Component {
</div>
<div className="toolbar-group">
<Form layout="inline">
<Form.Item>
<Button href={urls.import} tour="tour-import">
<IconCloudUpload />
{i18n("linelist.importBtn.text")}
</Button>
</Form.Item>
{window.project.canManage ? (
<Form.Item>
<Button
className="t-import-metadata-btn"
href={urls.import}
tour="tour-import"
>
<IconCloudUpload />
{i18n("linelist.importBtn.text")}
</Button>
</Form.Item>
) : null}
<Form.Item>
<Search
tour="tour-search"
onKeyUp={e => this.props.updateFilter(e.target.value)}
onKeyUp={(e) => this.props.updateFilter(e.target.value)}
id="js-table-filter"
className="table-filter t-table-filter"
style={{
width: 200
width: 200,
}}
/>
</Form.Item>
Expand All @@ -103,7 +109,7 @@ export class ToolbarComponent extends Component {
<strong
style={{
borderBottom: "2px solid orange",
cursor: "pointer"
cursor: "pointer",
}}
onClick={this.closePopover}
>
Expand Down Expand Up @@ -136,13 +142,13 @@ ToolbarComponent.propTypes = {
exportCSV: PropTypes.func.isRequired,
exportXLSX: PropTypes.func.isRequired,
scrollTableToTop: PropTypes.func.isRequired,
updateFilter: PropTypes.func.isRequired
updateFilter: PropTypes.func.isRequired,
};

const mapStateToProps = state => ({});
const mapStateToProps = (state) => ({});

const mapDispatchToProps = dispatch => ({
updateFilter: value => dispatch(entryActions.setGlobalFilter(value))
const mapDispatchToProps = (dispatch) => ({
updateFilter: (value) => dispatch(entryActions.setGlobalFilter(value)),
});

export const Toolbar = connect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const steps = [
<p>{i18n("linelist.tour.table.content")}</p>
</div>
);
}
},
},
{
selector: ".ag-header-cell:nth-of-type(2)",
Expand All @@ -32,7 +32,7 @@ export const steps = [
</ol>
</div>
);
}
},
},
{
selector: `[tour="tour-columns"]`,
Expand All @@ -48,7 +48,7 @@ export const steps = [
<p>{i18n("linelist.tour.columns.content.end")}</p>
</div>
);
}
},
},
{
selector: `.ag-body-viewport-wrapper .ag-row:nth-of-type(1) .ag-cell:nth-of-type(1)`,
Expand All @@ -61,7 +61,7 @@ export const steps = [
<p>{i18n("linelist.tour.edit.content.cancel")}</p>
</div>
);
}
},
},
{
selector: `[tour="tour-search"]`,
Expand All @@ -72,7 +72,7 @@ export const steps = [
<p>{i18n("linelist.tour.search.content")}</p>
</div>
);
}
},
},
{
selector: `[tour="tour-filter-counts"]`,
Expand All @@ -84,7 +84,7 @@ export const steps = [
<p>{i18n("linelist.tour.filterCounts.content.example")}</p>
</div>
);
}
},
},
{
selector: `[tour="tour-export"]`,
Expand All @@ -95,23 +95,32 @@ export const steps = [
<p>{i18n("linelist.tour.export.content")}</p>
</div>
);
}
},
},
{
selector: `[tour="tour-import"]`,
content() {
return (
<div>
<strong>{i18n("linelist.tour.import.title")}</strong>
<p>{i18n("linelist.tour.import.content.intro")}</p>
<ul>
<li>{i18n("linelist.tour.import.content.li1")}</li>
<li>{i18n("linelist.tour.import.content.li2")}</li>
</ul>
</div>
);
(function () {
/*
Since only managers can import metadata, we need to hide this step if a collaborator
is viewing the tour.
*/
if (window.project.canManage) {
return {
selector: `[tour="tour-import"]`,
content() {
return (
<div>
<strong>{i18n("linelist.tour.import.title")}</strong>
<p>{i18n("linelist.tour.import.content.intro")}</p>
<ul>
<li>{i18n("linelist.tour.import.content.li1")}</li>
<li>{i18n("linelist.tour.import.content.li2")}</li>
</ul>
</div>
);
},
};
}
},
return null;
})(),
{
selector: ".ag-row .ag-selection-checkbox:nth-of-type(1)",
content() {
Expand All @@ -121,7 +130,7 @@ export const steps = [
<p>{i18n("linelist.tour.select.content")}</p>
</div>
);
}
},
},
{
selector: `[tour="tour-counts"]`,
Expand All @@ -132,7 +141,7 @@ export const steps = [
<p>{i18n("linelist.tour.selectCounts.content")}</p>
</div>
);
}
},
},
{
selector: `[tour="tour-cart"]`,
Expand All @@ -143,7 +152,7 @@ export const steps = [
<p>{i18n("linelist.tour.cart.content")}</p>
</div>
);
}
},
},
{
selector: ".js-tour-button",
Expand All @@ -153,6 +162,6 @@ export const steps = [
<strong>{i18n("linelist.tour.end")}</strong>
</div>
);
}
}
];
},
},
].filter((i) => i); // Need to filter out any nulled out values.
Loading

0 comments on commit 97667f2

Please sign in to comment.