This commit is contained in:
alexcos20 2020-03-25 22:05:04 +02:00
parent 23db8160b9
commit 8822bf7f4f
2 changed files with 18 additions and 18 deletions

View File

@ -10,9 +10,9 @@ export default function Compute({ ocean, web3 }) {
const [agreementId, setAgreementId] = useState('') const [agreementId, setAgreementId] = useState('')
const [ddoAlgorithmId, setDdoAlgorithmId] = useState('') const [ddoAlgorithmId, setDdoAlgorithmId] = useState('')
const [divAlgoStyle, setdivAlgoStyle] = useState('') const [divAlgoStyle, setdivAlgoStyle] = useState('')
const [textRawAlgo, settextRawAlgo] = useState('') const [textRawAlgo, setTextRawAlgo] = useState('')
const [PublishLogState, setPublishLogState] = useState('') const [publishLogState, setPublishLogState] = useState('')
const [PublishOutputState, setPublishOutputState] = useState('') const [publishOutputState, setPublishOutputState] = useState('')
// publish a dataset and an algorithm // publish a dataset and an algorithm
async function publish() { async function publish() {
try { try {
@ -60,9 +60,9 @@ export default function Compute({ ocean, web3 }) {
const accounts = await ocean.accounts.list() const accounts = await ocean.accounts.list()
const ComputeOutput = { const ComputeOutput = {
publishAlgorithmLog: publishAlgorithmLog:
PublishLogState === '' || PublishLogState === false ? false : true, publishLogState === '' || publishLogState === false ? false : true,
publishOutput: publishOutput:
PublishOutputState === '' || PublishOutputState === false publishOutputState === '' || publishOutputState === false
? false ? false
: true, : true,
brizoAddress: ocean.config.brizoAddress, brizoAddress: ocean.config.brizoAddress,
@ -122,7 +122,7 @@ export default function Compute({ ocean, web3 }) {
} }
async function updateRawAlgoCode(event) { async function updateRawAlgoCode(event) {
settextRawAlgo(event.target.value) setTextRawAlgo(event.target.value)
} }
async function updateDdoAssetId(event) { async function updateDdoAssetId(event) {
@ -155,13 +155,13 @@ export default function Compute({ ocean, web3 }) {
<ComputeSection> <ComputeSection>
<input <input
type="checkbox" type="checkbox"
checked={PublishOutputState} checked={publishOutputState}
onChange={handlePublishOutputState} onChange={handlePublishOutputState}
/> />
Publish Output into the Marketplace Publish Output into the Marketplace
<input <input
type="checkbox" type="checkbox"
checked={PublishLogState} checked={publishLogState}
onChange={handlePublishLogState} onChange={handlePublishLogState}
/> />
Publish Algorithm Logs into the Marketplace Publish Algorithm Logs into the Marketplace

View File

@ -22,17 +22,17 @@ class App extends Component {
async componentDidMount() { async componentDidMount() {
const ocean = await new Ocean.getInstance({ const ocean = await new Ocean.getInstance({
web3Provider: web3, web3Provider: web3,
//nodeUri: 'https://nile.dev-ocean.com', nodeUri: 'https://nile.dev-ocean.com',
//aquariusUri: 'https://aquarius.marketplace.dev-ocean.com', aquariusUri: 'https://aquarius.marketplace.dev-ocean.com',
//brizoUri: 'https://brizo.marketplace.dev-ocean.com', brizoUri: 'https://brizo.marketplace.dev-ocean.com',
//brizoAddress: '0x4aaab179035dc57b35e2ce066919048686f82972', brizoAddress: '0x4aaab179035dc57b35e2ce066919048686f82972',
//secretStoreUri: 'https://secret-store.nile.dev-ocean.com', secretStoreUri: 'https://secret-store.nile.dev-ocean.com',
// local Spree connection // local Spree connection
nodeUri: 'http://localhost:8545', //nodeUri: 'http://localhost:8545',
aquariusUri: 'http://aquarius:5000', //aquariusUri: 'http://aquarius:5000',
brizoUri: 'http://localhost:8030', //brizoUri: 'http://localhost:8030',
brizoAddress: '0x068Ed00cF0441e4829D9784fCBe7b9e26D4BD8d0', //brizoAddress: '0x068Ed00cF0441e4829D9784fCBe7b9e26D4BD8d0',
secretStoreUri: 'http://localhost:12001', //secretStoreUri: 'http://localhost:12001',
verbose: true verbose: true
}) })
this.setState({ ocean }) this.setState({ ocean })