mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
test fixes
This commit is contained in:
parent
aff63caf9a
commit
55bf9f314f
@ -47,7 +47,7 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
fill: currentColor;
|
fill: currentColor;
|
||||||
margin-right: $spacer / 8;
|
margin-right: $spacer / 8;
|
||||||
transition: 0.2s ease-out;
|
transition: .2s ease-out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
.header {
|
.header {
|
||||||
// stylelint-disable value-keyword-case
|
// stylelint-disable value-keyword-case
|
||||||
composes: categoryImage;
|
composes: categoryimage;
|
||||||
// stylelint-enable value-keyword-case
|
// stylelint-enable value-keyword-case
|
||||||
height: 8rem;
|
height: 8rem;
|
||||||
margin-top: $spacer / $line-height;
|
margin-top: $spacer / $line-height;
|
||||||
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
.dimmed {
|
.dimmed {
|
||||||
// stylelint-disable value-keyword-case
|
// stylelint-disable value-keyword-case
|
||||||
composes: categoryImage;
|
composes: categoryimage;
|
||||||
// stylelint-enable value-keyword-case
|
// stylelint-enable value-keyword-case
|
||||||
opacity: .6;
|
opacity: .6;
|
||||||
}
|
}
|
||||||
|
@ -33,8 +33,8 @@
|
|||||||
width: 1.25rem;
|
width: 1.25rem;
|
||||||
height: 1.25rem;
|
height: 1.25rem;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
margin-top: -0.6rem;
|
margin-top: -.6rem;
|
||||||
fill: rgba($brand-grey-light, 0.7);
|
fill: rgba($brand-grey-light, .7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,7 +50,7 @@
|
|||||||
padding: $spacer / 3;
|
padding: $spacer / 3;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
transition: 0.2s ease-out;
|
transition: .2s ease-out;
|
||||||
min-height: 43px;
|
min-height: 43px;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
|
|
||||||
@ -65,8 +65,8 @@
|
|||||||
font-size: $font-size-base;
|
font-size: $font-size-base;
|
||||||
color: $brand-grey-light;
|
color: $brand-grey-light;
|
||||||
font-weight: $font-weight-base;
|
font-weight: $font-weight-base;
|
||||||
transition: 0.2s ease-out;
|
transition: .2s ease-out;
|
||||||
opacity: 0.7;
|
opacity: .7;
|
||||||
}
|
}
|
||||||
|
|
||||||
&[readonly],
|
&[readonly],
|
||||||
@ -155,7 +155,7 @@
|
|||||||
font-size: $font-size-small;
|
font-size: $font-size-small;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
border: 2px solid $brand-grey-lighter;
|
border: 2px solid $brand-grey-lighter;
|
||||||
border-radius: 0.2rem;
|
border-radius: .2rem;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
/* yellow triangle */
|
/* yellow triangle */
|
||||||
.statusIndicatorCloseEnough {
|
.statusIndicatorCloseEnough {
|
||||||
// stylelint-disable value-keyword-case
|
// stylelint-disable value-keyword-case
|
||||||
composes: statusIndicator;
|
composes: statusindicator;
|
||||||
// stylelint-enable value-keyword-case
|
// stylelint-enable value-keyword-case
|
||||||
background: none;
|
background: none;
|
||||||
width: 0;
|
width: 0;
|
||||||
@ -31,7 +31,7 @@
|
|||||||
/* green circle */
|
/* green circle */
|
||||||
.statusIndicatorActive {
|
.statusIndicatorActive {
|
||||||
// stylelint-disable value-keyword-case
|
// stylelint-disable value-keyword-case
|
||||||
composes: statusIndicator;
|
composes: statusindicator;
|
||||||
// stylelint-enable value-keyword-case
|
// stylelint-enable value-keyword-case
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: $green;
|
background: $green;
|
||||||
|
@ -7,12 +7,12 @@ $popoverWidth: 18rem;
|
|||||||
width: $popoverWidth;
|
width: $popoverWidth;
|
||||||
padding: $spacer / 2;
|
padding: $spacer / 2;
|
||||||
background: $brand-black;
|
background: $brand-black;
|
||||||
border-radius: 0.1rem;
|
border-radius: .1rem;
|
||||||
border: 0.1rem solid $brand-grey-light;
|
border: .1rem solid $brand-grey-light;
|
||||||
box-shadow: 0 6px 16px 0 rgba($brand-black, 0.3);
|
box-shadow: 0 6px 16px 0 rgba($brand-black, .3);
|
||||||
color: $brand-grey-light;
|
color: $brand-grey-light;
|
||||||
font-size: $font-size-small;
|
font-size: $font-size-small;
|
||||||
animation: showPopup 0.2s ease-in forwards;
|
animation: showPopup .2s ease-in forwards;
|
||||||
white-space: initial;
|
white-space: initial;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
@ -28,7 +28,7 @@ $popoverWidth: 18rem;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.popoverInfoline {
|
.popoverInfoline {
|
||||||
border-bottom: 0.05rem solid $brand-grey;
|
border-bottom: .05rem solid $brand-grey;
|
||||||
padding: $spacer / 3 0;
|
padding: $spacer / 3 0;
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
|
@ -3,6 +3,7 @@ import { User } from '../../context'
|
|||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import styles from './JobTeaser.module.scss'
|
import styles from './JobTeaser.module.scss'
|
||||||
import Dotdotdot from 'react-dotdotdot'
|
import Dotdotdot from 'react-dotdotdot'
|
||||||
|
import shortid from 'shortid'
|
||||||
|
|
||||||
export default function JobTeaser({ job }: { job: any }) {
|
export default function JobTeaser({ job }: { job: any }) {
|
||||||
const { ocean } = useContext(User)
|
const { ocean } = useContext(User)
|
||||||
@ -54,7 +55,10 @@ export default function JobTeaser({ job }: { job: any }) {
|
|||||||
<>
|
<>
|
||||||
<div>Output URL</div>
|
<div>Output URL</div>
|
||||||
{job.resultsUrl.map((result: string) => (
|
{job.resultsUrl.map((result: string) => (
|
||||||
<a href={result}> {result.substring(0, 52)}...</a>
|
<a href={result} key={shortid.generate()}>
|
||||||
|
{' '}
|
||||||
|
{result.substring(0, 52)}...
|
||||||
|
</a>
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: border 0.2s ease-out;
|
transition: border .2s ease-out;
|
||||||
margin-bottom: $spacer;
|
margin-bottom: $spacer;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ export default function AssetsJobs({ ddo, ocean }: JobsProps) {
|
|||||||
{isPublished ? (
|
{isPublished ? (
|
||||||
<div className={styles.success}>
|
<div className={styles.success}>
|
||||||
<p>Your job started!</p>
|
<p>Your job started!</p>
|
||||||
<Button link to={'/history/'}>
|
<Button link to="/history/">
|
||||||
Watch the progress in the history page.
|
Watch the progress in the history page.
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,47 +1,43 @@
|
|||||||
const tempList =
|
const tempList = [
|
||||||
[{
|
{
|
||||||
"agreementId": "a40d4fbddf7c45fb988b3f47e7fb8d50386ee8c968c94a0db6909cd96582e6cd",
|
agreementId:
|
||||||
"algorithmLogUrl": null,
|
'a40d4fbddf7c45fb988b3f47e7fb8d50386ee8c968c94a0db6909cd96582e6cd',
|
||||||
"dateCreated": 1585581794.73346,
|
algorithmLogUrl: null,
|
||||||
"dateFinished": null,
|
dateCreated: 1585581794.73346,
|
||||||
"jobId": "5e67cdffc2224907b10cdb802820033ee",
|
dateFinished: null,
|
||||||
"owner": "0x4D156A2ef69ffdDC55838176C6712C90f60a2285",
|
jobId: '5e67cdffc2224907b10cdb802820033ee',
|
||||||
"removed": 0,
|
owner: '0x4D156A2ef69ffdDC55838176C6712C90f60a2285',
|
||||||
"resultsDid": "",
|
removed: 0,
|
||||||
"resultsUrl": "",
|
resultsDid: '',
|
||||||
"status": 10,
|
resultsUrl: '',
|
||||||
"statusText": "Job started",
|
status: 10,
|
||||||
"stopreq": 0
|
statusText: 'Job started',
|
||||||
|
stopreq: 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"agreementId": "a40d4fbddf7c45fb988b3f47e7fb8d50386ee8c968c94a0db6909cd96582e6cd",
|
agreementId:
|
||||||
"algorithmLogUrl": null,
|
'a40d4fbddf7c45fb988b3f47e7fb8d50386ee8c968c94a0db6909cd96582e6cd',
|
||||||
"dateCreated": 1585581794.73346,
|
algorithmLogUrl: null,
|
||||||
"dateFinished": null,
|
dateCreated: 1585581794.73346,
|
||||||
"jobId": "5e67cdffc2224907b10cdb80820033ee",
|
dateFinished: null,
|
||||||
"owner": "0x4D156A2ef69ffdDC55838176C6712C90f60a2285",
|
jobId: '5e67cdffc2224907b10cdb80820033ee',
|
||||||
"removed": 0,
|
owner: '0x4D156A2ef69ffdDC55838176C6712C90f60a2285',
|
||||||
"resultsDid": "",
|
removed: 0,
|
||||||
"resultsUrl": "",
|
resultsDid: '',
|
||||||
"status": 10,
|
resultsUrl: '',
|
||||||
"statusText": "Job started",
|
status: 10,
|
||||||
"stopreq": 0
|
statusText: 'Job started',
|
||||||
|
stopreq: 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export async function getUserJobs(ocean: any, account: string) {
|
export async function getUserJobs(ocean: any, account: string) {
|
||||||
try {
|
try {
|
||||||
const accounts = await ocean.accounts.list()
|
const accounts = await ocean.accounts.list()
|
||||||
//const jobList = await ocean.compute.status(account)
|
// const jobList = await ocean.compute.status(account)
|
||||||
// const jobList = await ocean.compute.status(accounts[0])
|
// const jobList = await ocean.compute.status(accounts[0])
|
||||||
|
|
||||||
return tempList;
|
|
||||||
|
|
||||||
|
|
||||||
|
return tempList
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error.message)
|
console.error(error.message)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user