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.", "help": "Give proper attribution for your data set.",
"required": true "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", "name": "tags",
"label": "Tags", "label": "Tags",
"placeholder": "e.g. logistics, ai", "placeholder": "e.g. logistics, ai",
"help": "Separate tags with comma." "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", "name": "termsAndConditions",
"label": "Terms & Conditions", "label": "Terms & Conditions",

View File

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

View File

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

View File

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

View File

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