1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

remove license

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
This commit is contained in:
mihaisc 2020-10-27 13:56:43 +02:00
parent a3c7e7abe7
commit be005e0936
No known key found for this signature in database
GPG Key ID: 4FB0C2329B4C6E29
5 changed files with 2 additions and 46 deletions

View File

@ -54,40 +54,12 @@
"help": "Give proper attribution for your data set.",
"required": true
},
{
"name": "copyrightHolder",
"label": "Copyright Holder",
"placeholder": "e.g. Marine Institute of Jellyfish",
"help": "Add this if the holder of the copyright is different from the author."
},
{
"name": "tags",
"label": "Tags",
"placeholder": "e.g. logistics, ai",
"help": "Separate tags with comma."
},
{
"name": "license",
"label": "License",
"type": "select",
"options": [
"Public Domain",
"PDDL: Public Domain Dedication and License",
"ODC-By: Attribution License",
"ODC-ODbL: Open Database License",
"CDLA-Sharing: Community Data License Agreement",
"CDLA-Permissive: Community Data License Agreement",
"CC0: Public Domain Dedication",
"CC BY: Attribution 4.0 International",
"CC BY-SA: Attribution-ShareAlike 4.0 International",
"CC BY-ND: Attribution-NoDerivatives 4.0 International",
"CC BY-NC: Attribution-NonCommercial 4.0 International",
"CC BY-NC-SA: Attribution-NonCommercial-ShareAlike 4.0 International",
"CC BY-NC-ND: Attribution-NonCommercial-NoDerivatives 4.0 International",
"No License Specified"
],
"required": true
},
{
"name": "termsAndConditions",
"label": "Terms & Conditions",

View File

@ -30,12 +30,10 @@ export interface MetadataPublishForm {
description: string
files: string | File[]
author: string
license: string
dataTokenOptions: DataTokenOptions
access: 'Download' | 'Compute' | string
termsAndConditions: boolean
// ---- optional fields ----
copyrightHolder?: string
tags?: string
links?: string | File[]
}

View File

@ -13,19 +13,11 @@ export default function MetaFull({
metadata: MetadataMarket
}): ReactElement {
const { id } = ddo
const { dateCreated, datePublished, license } = metadata.main
const { dateCreated, datePublished } = metadata.main
return (
<div className={styles.metaFull}>
<MetaItem title="Author" content={metadata?.main.author} />
{metadata?.additionalInformation?.copyrightHolder && (
<MetaItem
title="Copyright Holder"
content={metadata?.additionalInformation?.copyrightHolder}
/>
)}
<MetaItem title="License" content={license} />
{metadata?.additionalInformation?.categories && (
<MetaItem

View File

@ -17,9 +17,7 @@ export function transformPublishFormToMetadata(
const {
name,
author,
license,
description,
copyrightHolder,
tags,
links,
termsAndConditions,
@ -34,12 +32,11 @@ export function transformPublishFormToMetadata(
dateCreated: currentTime,
datePublished: currentTime,
files: typeof files !== 'string' && files,
license
license: 'https://market.oceanprotocol.com/terms'
},
additionalInformation: {
...AssetModel.additionalInformation,
description,
copyrightHolder,
tags: transformTags(tags),
links: typeof links !== 'string' && links,
termsAndConditions

View File

@ -14,14 +14,12 @@ export const validationSchema = Yup.object().shape<MetadataPublishForm>({
.required('Required'),
files: Yup.array<FileMetadata>().required('Required').nullable(),
description: Yup.string().required('Required'),
license: Yup.string().required('Required'),
access: Yup.string()
.matches(/Compute|Download/g)
.required('Required'),
termsAndConditions: Yup.boolean().required('Required'),
// ---- optional fields ----
copyrightHolder: Yup.string().nullable(),
tags: Yup.string().nullable(),
links: Yup.object<FileMetadata[]>().nullable()
})
@ -35,7 +33,6 @@ export const initialValues: Partial<MetadataPublishForm> = {
},
files: '',
description: '',
license: '',
access: '',
termsAndConditions: false
}