Commit 1fd8db1c authored by Alejandro De Maria Antolinos's avatar Alejandro De Maria Antolinos
Browse files

It fixes !526

parent 6fd6abf7
Pipeline #48829 passed with stage
in 3 minutes and 3 seconds
...@@ -88,7 +88,7 @@ export function beamlineFormatter(investigation) { ...@@ -88,7 +88,7 @@ export function beamlineFormatter(investigation) {
return (investigation?.instrument.name || '').toUpperCase(); return (investigation?.instrument.name || '').toUpperCase();
} }
export function nameFormatter(investigation, showLink) { export function nameFormatter(investigation, showLink, section = 'datasets') {
const { id, name } = investigation; const { id, name } = investigation;
if (!showLink) { if (!showLink) {
...@@ -96,7 +96,7 @@ export function nameFormatter(investigation, showLink) { ...@@ -96,7 +96,7 @@ export function nameFormatter(investigation, showLink) {
} }
return ( return (
<Link to={`/investigation/${id}/datasets`}> <Link to={`/investigation/${id}/${section}`}>
<Button bsSize="xsmall" style={{ width: 120, textAlign: 'left' }}> <Button bsSize="xsmall" style={{ width: 120, textAlign: 'left' }}>
<Glyphicon glyph="circle-arrow-right" /> <Glyphicon glyph="circle-arrow-right" />
<span style={{ marginLeft: 10 }}>{name}</span> <span style={{ marginLeft: 10 }}>{name}</span>
......
...@@ -41,7 +41,8 @@ function LogbookStatsResponsiveTable(props) { ...@@ -41,7 +41,8 @@ function LogbookStatsResponsiveTable(props) {
id: record.investigationId, id: record.investigationId,
name: record.name, name: record.name,
}, },
true true,
'events'
), ),
}, },
{ {
......
...@@ -10,7 +10,6 @@ function LogbookStatisticsPage() { ...@@ -10,7 +10,6 @@ function LogbookStatisticsPage() {
const dispatch = useDispatch(); const dispatch = useDispatch();
const query = useQuery(); const query = useQuery();
const instrumentName = query.get('instrumentName') || '';
const startDate = const startDate =
query.get('startDate') || query.get('startDate') ||
moment().subtract(30, 'days').format(moment.HTML5_FMT.DATE); moment().subtract(30, 'days').format(moment.HTML5_FMT.DATE);
...@@ -22,11 +21,11 @@ function LogbookStatisticsPage() { ...@@ -22,11 +21,11 @@ function LogbookStatisticsPage() {
dispatch( dispatch(
setBreadCrumbs([ setBreadCrumbs([
{ {
name: `Data Statistics ${instrumentName}`, name: `Logbook Statistics `,
}, },
]) ])
); );
}, [dispatch, instrumentName]); }, [dispatch]);
return ( return (
<div className="app__inner"> <div className="app__inner">
......
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