@@ -6,7 +6,12 @@ import { Button, Descriptions, Popover, Table, Tooltip, Typography } from "antd"
66import { BarsOutlined , EyeOutlined , FileTextOutlined , ProfileOutlined } from "@ant-design/icons" ;
77
88import { EM_DASH } from "@/constants" ;
9- import { experimentPropTypesShape , experimentResultPropTypesShape , individualPropTypesShape } from "@/propTypes" ;
9+ import {
10+ experimentPropTypesShape ,
11+ experimentResultPropTypesShape ,
12+ individualPropTypesShape ,
13+ ontologyShape ,
14+ } from "@/propTypes" ;
1015import { getFileDownloadUrlsFromDrs } from "@/modules/drs/actions" ;
1116import { useAppDispatch , useAppSelector } from "@/store" ;
1217import { guessFileType } from "@/utils/files" ;
@@ -136,6 +141,35 @@ const EXPERIMENT_RESULTS_COLUMNS = [
136141 } ,
137142] ;
138143
144+ const Device = ( { device, deviceOntology } ) => {
145+ if ( device && deviceOntology ) {
146+ return (
147+ < div >
148+ < strong > Device:</ strong > { device } (< OntologyTerm term = { deviceOntology } /> )
149+ </ div >
150+ ) ;
151+ } else if ( ! device && deviceOntology ) {
152+ return (
153+ < div >
154+ < strong > Device:</ strong >
155+ < OntologyTerm term = { deviceOntology } />
156+ </ div >
157+ ) ;
158+ } else if ( device && ! deviceOntology ) {
159+ return (
160+ < div >
161+ < strong > Device:</ strong > { device }
162+ </ div >
163+ ) ;
164+ } else {
165+ return null ;
166+ }
167+ } ;
168+ Device . propTypes = {
169+ device : PropTypes . string ,
170+ deviceOntology : ontologyShape ,
171+ } ;
172+
139173export const ExperimentDetail = ( { experiment } ) => {
140174 const {
141175 id,
@@ -208,12 +242,15 @@ export const ExperimentDetail = ({ experiment }) => {
208242 </ Descriptions . Item >
209243 < Descriptions . Item span = { 2 } label = "Instrument" >
210244 < div style = { { display : "flex" , gap : 16 } } >
211- < div >
212- < strong > Platform:</ strong > { instrument . platform }
213- </ div >
214- < div >
215- < strong > ID:</ strong > < MonospaceText > { instrument . identifier } </ MonospaceText >
216- </ div >
245+ < Device device = { instrument . device } deviceOntology = { instrument . device_ontology } />
246+ { instrument . description && (
247+ < div >
248+ < strong > Description:</ strong > { instrument . description }
249+ </ div >
250+ ) }
251+ { Object . keys ( instrument . extra_properties ?? { } ) . length ? (
252+ < ExtraProperties extraProperties = { extraProperties } />
253+ ) : null }
217254 </ div >
218255 </ Descriptions . Item >
219256 < Descriptions . Item span = { 2 } label = "Extra Properties" >
0 commit comments