2021-11-01 15:42:55 +01:00
|
|
|
import React from 'react'
|
2022-08-02 11:53:22 +02:00
|
|
|
import { allowFixedPricing } from '../../../app.config.js'
|
|
|
|
import {
|
|
|
|
FormPublishData,
|
|
|
|
MetadataAlgorithmContainer,
|
|
|
|
PublishFeedback,
|
|
|
|
StepContent
|
|
|
|
} from './_types'
|
2021-11-01 15:42:55 +01:00
|
|
|
import content from '../../../content/publish/form.json'
|
|
|
|
import PricingFields from './Pricing'
|
|
|
|
import MetadataFields from './Metadata'
|
|
|
|
import ServicesFields from './Services'
|
|
|
|
import Preview from './Preview'
|
2021-11-24 15:46:10 +01:00
|
|
|
import Submission from './Submission'
|
2022-01-11 20:45:14 +01:00
|
|
|
import { ServiceComputeOptions } from '@oceanprotocol/lib'
|
2022-01-12 17:22:52 +01:00
|
|
|
import contentFeedback from '../../../content/publish/feedback.json'
|
2021-11-01 15:42:55 +01:00
|
|
|
|
|
|
|
export const wizardSteps: StepContent[] = [
|
|
|
|
{
|
|
|
|
step: 1,
|
|
|
|
title: content.metadata.title,
|
|
|
|
component: <MetadataFields />
|
|
|
|
},
|
|
|
|
{
|
|
|
|
step: 2,
|
|
|
|
title: content.services.title,
|
|
|
|
component: <ServicesFields />
|
|
|
|
},
|
|
|
|
{
|
|
|
|
step: 3,
|
|
|
|
title: content.pricing.title,
|
|
|
|
component: <PricingFields />
|
|
|
|
},
|
|
|
|
{
|
|
|
|
step: 4,
|
|
|
|
title: content.preview.title,
|
|
|
|
component: <Preview />
|
2021-11-24 15:46:10 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
step: 5,
|
|
|
|
title: content.submission.title,
|
|
|
|
component: <Submission />
|
2021-11-01 15:42:55 +01:00
|
|
|
}
|
|
|
|
]
|
2021-02-16 10:27:02 +01:00
|
|
|
|
2022-03-11 12:26:04 +01:00
|
|
|
const computeOptions: ServiceComputeOptions = {
|
2021-11-29 17:49:38 +01:00
|
|
|
allowRawAlgorithm: false,
|
|
|
|
allowNetworkAccess: true,
|
2022-06-23 17:53:05 +02:00
|
|
|
publisherTrustedAlgorithmPublishers: [],
|
|
|
|
publisherTrustedAlgorithms: []
|
2021-11-29 17:49:38 +01:00
|
|
|
}
|
|
|
|
|
2021-11-11 12:26:29 +01:00
|
|
|
export const initialValues: FormPublishData = {
|
2021-11-19 14:47:58 +01:00
|
|
|
user: {
|
|
|
|
stepCurrent: 1,
|
|
|
|
chainId: 1,
|
|
|
|
accountId: ''
|
|
|
|
},
|
2021-10-21 20:58:55 +02:00
|
|
|
metadata: {
|
2022-01-11 15:52:01 +01:00
|
|
|
nft: { name: '', symbol: '', description: '', image_data: '' },
|
2022-04-04 21:13:39 +02:00
|
|
|
transferable: true,
|
2021-11-15 16:19:50 +01:00
|
|
|
type: 'dataset',
|
2021-10-13 18:48:59 +02:00
|
|
|
name: '',
|
2021-10-21 20:58:55 +02:00
|
|
|
author: '',
|
|
|
|
description: '',
|
2022-10-05 16:40:00 +02:00
|
|
|
tags: [],
|
2021-11-15 13:44:27 +01:00
|
|
|
termsAndConditions: false,
|
|
|
|
dockerImage: '',
|
|
|
|
dockerImageCustom: '',
|
|
|
|
dockerImageCustomTag: '',
|
|
|
|
dockerImageCustomEntrypoint: ''
|
2021-10-13 18:48:59 +02:00
|
|
|
},
|
2021-10-21 20:58:55 +02:00
|
|
|
services: [
|
|
|
|
{
|
2022-09-26 15:01:51 +02:00
|
|
|
files: [{ url: '', type: '' }],
|
|
|
|
links: [{ url: '', type: '' }],
|
2021-10-21 20:58:55 +02:00
|
|
|
dataTokenOptions: { name: '', symbol: '' },
|
2021-11-11 14:40:38 +01:00
|
|
|
timeout: '',
|
2022-03-16 13:52:05 +01:00
|
|
|
access: 'access',
|
2021-11-25 15:16:42 +01:00
|
|
|
providerUrl: {
|
|
|
|
url: 'https://provider.mainnet.oceanprotocol.com',
|
2022-04-15 15:28:45 +02:00
|
|
|
valid: true,
|
|
|
|
custom: false
|
2021-11-29 17:49:38 +01:00
|
|
|
},
|
2022-03-11 12:26:04 +01:00
|
|
|
computeOptions
|
2021-10-21 20:58:55 +02:00
|
|
|
}
|
|
|
|
],
|
|
|
|
pricing: {
|
2022-08-03 14:48:57 +02:00
|
|
|
baseToken: { address: '', name: '', symbol: 'OCEAN', decimals: 18 },
|
2022-02-02 14:53:15 +01:00
|
|
|
price: 0,
|
2022-07-12 18:52:45 +02:00
|
|
|
type: allowFixedPricing === 'true' ? 'fixed' : 'free',
|
2022-02-18 12:55:46 +01:00
|
|
|
freeAgreement: false
|
2021-10-21 20:58:55 +02:00
|
|
|
}
|
2021-10-13 18:48:59 +02:00
|
|
|
}
|
|
|
|
|
2021-11-29 14:25:30 +01:00
|
|
|
export const algorithmContainerPresets: MetadataAlgorithmContainer[] = [
|
|
|
|
{
|
|
|
|
image: 'node',
|
2022-09-20 10:30:11 +02:00
|
|
|
tag: 'latest',
|
2021-11-29 14:25:30 +01:00
|
|
|
entrypoint: 'node $ALGO',
|
2022-09-20 10:30:11 +02:00
|
|
|
checksum: ''
|
2021-11-29 14:25:30 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
image: 'python',
|
2022-09-20 10:30:11 +02:00
|
|
|
tag: 'latest',
|
2021-11-29 14:25:30 +01:00
|
|
|
entrypoint: 'python $ALGO',
|
2022-09-20 10:30:11 +02:00
|
|
|
checksum: ''
|
2021-11-29 14:25:30 +01:00
|
|
|
}
|
|
|
|
]
|
2022-01-12 12:47:03 +01:00
|
|
|
|
2022-01-12 17:22:52 +01:00
|
|
|
export const initialPublishFeedback: PublishFeedback = contentFeedback
|