Commit ce1ab0c2 authored by Maxime Chaillet's avatar Maxime Chaillet

Merge branch 'issue_110_bis' into 'master'

Issue 110 bis

See merge request !92
parents 80882615 da3640dc
Pipeline #8614 passed with stages
in 5 minutes and 56 seconds
......@@ -41,7 +41,7 @@ export class URL {
.replace("investigationId", investigationId);
}
/**
/**
* Get URL used to retrieve the file of an event which category is 'file'
* @param {string} sessionId session identifier
* @param {*} investigationId investigation identifier
......@@ -82,46 +82,31 @@ export class URL {
return ICATPLUS.server + "/doi/sessionId/mint"
.replace("sessionId", sessionId);
}
}
/** To be removed from here */
var IDS =
{
var IDS =
{
//server: "https://ovm-icat-test.esrf.fr:8181",
server: "https://ids.esrf.fr/ids",
connection : {
plugins :['esrf']
server: "https://ids.esrf.fr/ids",
connection: {
plugins: ['esrf']
}
};
};
export function getDownloadURLByDatasetId(sessionId, datasetIds) {
return IDS.server + "/getData?sessionId=" + sessionId + "&datasetIds=" + datasetIds;
}
export function getDownloadURLByDatasetId(sessionId, datasetIds) {
return IDS.server + "/getData?sessionId=" + sessionId + "&datasetIds=" + datasetIds;
}
export function getDownloadURLByDatafileId(sessionId, datafileIds) {
return IDS.server + "/getData?sessionId=" + sessionId + "&datafileIds=" + datafileIds;
}
export function getDownloadURLByDatafileId(sessionId, datafileIds) {
return IDS.server + "/getData?sessionId=" + sessionId + "&datafileIds=" + datafileIds;
}
export function getFilesByDatasetId(sessionId, datasetIds) {
return ICATPLUS.server + "/catalogue/sessionId/dataset/id/datasetIds/datafile"
export function getFilesByDatasetId(sessionId, datasetIds) {
return ICATPLUS.server + "/catalogue/sessionId/dataset/id/datasetIds/datafile"
.replace("sessionId", sessionId)
.replace("datasetIds", datasetIds);
}
/**
* Download the PDF file of the whole logbook for a given investigation
* @param {*} investigationId the given investigation ID
*/
export function getPDF(investigationId, sessionId) {
return ICATPLUS.server + "/logbook/sessionId/investigation/id/investigationId/event/pdf"
.replace("sessionId", sessionId)
.replace("investigationId", investigationId);
}
/**
......
......@@ -281,31 +281,31 @@ export default DatasetTable;
class DateWidget extends React.Component {
render(){
return <div style={{ 'margin': '2px', height: '20px', fontSize:'11px' }}>
<Glyphicon glyph='glyphicon glyphicon-time'></Glyphicon>
<span style={{ 'marginLeft': '12px' }}>
<Moment parse="YYYY-MM-DD HH:mm" format="HH:mm">{this.props.date}</Moment>
</span>
<br />
<span style={{ 'marginLeft': '12px', color: 'gray' }}>
<Moment parse="YYYY-MM-DD HH:mm" format="ll">{this.props.date}</Moment>
</span>
</div>;
render() {
return <div style={{ 'margin': '2px', height: '20px', fontSize: '11px' }}>
<Glyphicon glyph='glyphicon glyphicon-time'></Glyphicon>
<span style={{ 'marginLeft': '12px' }}>
<Moment parse="YYYY-MM-DD HH:mm" format="HH:mm">{this.props.date}</Moment>
</span>
<br />
<span style={{ 'marginLeft': '12px', color: 'gray' }}>
<Moment parse="YYYY-MM-DD HH:mm" format="ll">{this.props.date}</Moment>
</span>
</div>;
}
};
class DownloadButton extends React.Component {
constructor(props) {
super(props);
constructor(props) {
super(props);
this.state = {
status : "FETCHING",
fetching: false,
fetched: false
}
this.state = {
status: "FETCHING",
fetching: false,
fetched: false
}
}
getStatus(){
......
......@@ -213,7 +213,7 @@ class PDFButton extends React.Component {
]
}]
},
sort: { creationDate: -1 }
sort: { createdAt: -1 }
}
return (<OverlayTrigger placement="bottom" overlay={tooltip("Download the logbook as PDF")} >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment