@maap-jupyterlab/dps-jupyter-extension
Version:
A JupyterLab extension for submitting and viewing jobs.
26 lines (25 loc) • 1.22 kB
JavaScript
import React from 'react';
import { useSelector } from 'react-redux';
import { getProducts } from '../utils/utils';
import { selectJobs } from '../redux/slices/jobsSlice';
import { OUTPUTS_JOBS_INFO } from '../templates/OutputsJobInfoTable';
import { EMPTY_FIELD_CHAR } from '../constants';
export const OutputsJobInfoTable = () => {
// Redux
const { selectedJob } = useSelector(selectJobs);
return (React.createElement("table", { className: 'table' },
React.createElement("tbody", null, OUTPUTS_JOBS_INFO.map((field) => {
{
if (selectedJob['jobInfo'][field.accessor]) {
return React.createElement("tr", { key: field.header },
React.createElement("th", null, field.header),
React.createElement("td", { style: { whiteSpace: 'pre' } }, getProducts(selectedJob['jobInfo'][field.accessor])));
}
else {
return React.createElement("tr", { key: field.header },
React.createElement("th", null, field.header),
React.createElement("td", null, EMPTY_FIELD_CHAR));
}
}
}))));
};