1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-15 01:34:57 +01:00

tweak job output

This commit is contained in:
Matthias Kretschmann 2020-10-22 14:31:34 +02:00
parent 12626d3924
commit 3c1e8f1e04
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 26 additions and 12 deletions

View File

@ -8,6 +8,7 @@ import Time from '../../atoms/Time'
import shortid from 'shortid'
import styles from './ComputeDetails.module.css'
import { Status } from './ComputeJobs'
import { ListItem } from 'components/atoms/Lists'
export default function ComputeDetailsModal({
computeJob,
@ -58,25 +59,39 @@ export default function ComputeDetailsModal({
<h3 className={styles.title}>{computeJob.assetName}</h3>
<p>
Created on <Time date={computeJob.dateCreated} isUnix />
{computeJob.dateFinished && (
<>
<br />
Finished on <Time date={computeJob.dateFinished} isUnix />
</>
)}
</p>
<Status>{computeJob.statusText}</Status>
{computeJob.dateFinished && (
<p>
Finished on <Time date={computeJob.dateFinished} isUnix />
</p>
)}
{isFinished &&
(isLoading ? (
<Loader />
) : (
<>
<p>{computeJob.algorithmLogUrl}</p>
<p>
{computeJob.resultsUrls?.map((url) => {
return <span key={shortid.generate()}>{url}</span>
})}{' '}
</p>
<ul>
<ListItem>
<a
href={computeJob.algorithmLogUrl}
target="_blank"
rel="noreferrer"
>
View Log
</a>
</ListItem>
{computeJob.resultsUrls?.map((url, i) => (
<ListItem key={shortid.generate()}>
<a href={url} target="_blank" rel="noreferrer">
View Result {i}
</a>
</ListItem>
))}
</ul>
</>
))}
</Modal>

View File

@ -4,7 +4,6 @@ import DataTable from 'react-data-table-component'
import Time from '../../atoms/Time'
import styles from './ComputeJobs.module.css'
import Loader from '../../atoms/Loader'
import Tooltip from '../../atoms/Tooltip'
import Button from '../../atoms/Button'
import ComputeDetails from './ComputeDetails'
import { ComputeJobMetaData } from '../../../@types/ComputeJobMetaData'