Commit Graph

51 Commits

Author SHA1 Message Date
mihaisc b505bddb4b Merge branch 'main' into feature/enforce-docker-containers 2022-10-07 12:17:41 +03:00
Luca Milanese 52eaee0ad5
Feat: autocomplete tags functionality (#1471)
* feat: add autocomplete tag component

* feat: pass tags aggregated list to autocomplete component

* feat: add initial styling to autocomplete tag component

* fix: autocomplete style types

* feat: move styling elements to module.css file

* feat: update placeholder text for tag input field

* feat: add default value to tags if present

* feat: add edit tags functionality

* fix: default tag value

* fix: style for automplete menu's keyboard navigation

* fix: tags aggregation query size

* feat: return sorted tags aggregated list suggestion in publish

* fix: set tags value touched state in edit mode

* add package back

* enhancement: autocomplete tag component config (#1679)

* fix publishing when connecting wallet on publish form

* fix reset pricing on tx execution

* removed changing steps

* cleanup

* Fix headers (#1663)

* test

* test

* test

* test

* test

* test

* test

* remove link

* enhancement: tag autocomplete settings

* feat: add cursor type text

* feat: tweak filter and sort for matched tags

* fix: tags input font color

* fix: tag autocomplete component input color

Co-authored-by: EnzoVezzaro <enzo-vezzaro@live.it>
Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
Co-authored-by: Ana <84312885+AnaLoznianu@users.noreply.github.com>

* fix lock

* test

* fix

* fix

* minor fixes

* fix cursor on remove item (x)

* style updates

* UX tweaks

* start suggestions upon first key stroke
* remove redundant help tooltip
* change placeholder copy
* remove input clear action

* edit updates

Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
Co-authored-by: EnzoVezzaro <enzo-vezzaro@live.it>
Co-authored-by: Ana <84312885+AnaLoznianu@users.noreply.github.com>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-10-05 15:40:00 +01:00
Bogdan Fazakas 9fbe671574 Merge branch 'main' into 'feature/enforce-docker-containers' 2022-09-27 16:54:39 +03:00
EnzoVezzaro 74a9d074ed
fix file validation on edit form (#1677)
* split validation / constants

* some minor refactor

* fix edit form (duplication ErrorMessage)

* fix Feedback UI

* remove logs

* fix empty space when loading total sales

* added isTrue to valid

* remove hardcoded FileInfo typing in publish and edit

* fix more FileInfo typing

* fix missing error message on inputs
2022-09-26 14:01:51 +01:00
Bogdan Fazakas fe4aa79ffb fix default images 2022-09-20 11:30:11 +03:00
Luca Milanese 52ad877b13
Dynamic token list support for publishing (#1516)
* feat: add approved tokens list query to subgraph

* feat: add base token selector

* feat: add placeholder tooltip message for base token

* feat: use user selected base token for publish

* fix: publish constants

* feat: update base token query to include digits and symbol

* feat: display correct token name and symbol in publish pricing tab

* fix: publish preview token name

* fix: query type

* feat: add balance fetch for all approved tokens

* fix: balance check for dynamic price with alternative base tokens

* feat: update balance to show baseToken instead of ocean

* fix: default baseToken in publish form

* feat: update text content for pricing publish step

* chore: update ocean.js

* add decimals to token

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix dt decimals

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* update ocean.js

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix: show correct basetoken symbol under button buy

* refactor: move baseToken selector to input label [WIP]

* refactor: preserve baseToken value value when switching tabs

* remove basetoken tooltip from content json

* fix: price props

* refactor: remove BaseToken component

* fix: baseToken name on first load

* fix: baseToken display name in dynamic price

* fix: conversion tooltip text

* fix: error box overlapping in Coin component

* feat: add token logo component

* feat: add basetoken logo to asset actions pool

* fix: token images size

* fix: add default appproved token list when disconnected or chainId not supported

* fix: datatoken logo on asset details meta

* refactor: balance fetch + move approved base tokens list in web3 provider

* feat: update all datatokens to display ocean logo in violet

* fix: show correct logos on polygon

* fix wallet, remove dynamic

* fix build

* fix: reset baseToken on chainId change during publish

* fix: price tabs selection indicator

* feat: set the ocean token as default in pricing

* add baseToken

* fix price

* remove firstPrice

* cleanup, more affordance for token dropdown

Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-08-03 13:48:57 +01:00
EnzoVezzaro eb29c4ce3b
Remove AMM Pools (#1614) 2022-08-02 10:53:22 +01:00
Bogdan Fazakas c1534f402b merge ordering logic PR and use fixed version till we merge the publish form updates 2022-07-22 06:48:58 +03:00
Bogdan Fazakas 2632e7ed0f merge main 2022-07-22 06:41:40 +03:00
Bogdan Fazakas 7902e13e59 container fixes 2022-07-20 10:11:02 +03:00
EnzoVezzaro 7788086bcc
removed dynamic price on publish, liquidity button and trade tab (#1593)
* removed dynamic price on publish, liquidity button and trade tab

* change label remove button

* removed dynamic pricing model references

* revert useEffects on pricing publish

* removed more references to dynamic pricing
2022-07-12 19:52:45 +03:00
Bogdan Fazakas fccf097126 use proper docker hub images 2022-07-05 09:22:16 +03:00
Bogdan Fazakas b49ba6fa45 change compute assets order calls order and add a default checksum for algo 2022-07-01 11:12:51 +03:00
Bogdan Fazakas 5387b9a3dd
Restore compute functionality (#1069)
* add balance check and check is consumable

* add isOrderable and other helpers

* finish start compute job

* removed unused methods

* add more comments

* add pool logic for order

* move asset selection to compute helper

* small fix

* fixed get algo list

* refactor start compute job and more fixes

* update order params

* use compute env and compute consumer address

* fix prices

* fix algorithms selection list on allowAllPublisher case

* fix edit compute settings

* update compute resources valid until logic

* fixes and cleanups

* wip compute jobs

* fix compute timeout value

* fixed compute jobs logic

* fix algo selection list name

* fixed compute jobs from profile loading

* update start compute flow messages

* update set algo access details

* update compute message logic

* added logs

* update package lock

* remove logs

* fix edit compute checksums for files and container

* Fix compute dataset algorithm list (#1194)

* fix query

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* remove comment

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* Fix previous order tx (#1197)

* rename nft update query

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix previous order

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix build

* handle order price, NaN and default 0

* optional value for all fee, prevent breaking when no value

* fix aquarius call and added logs

* update provider compute status call

* remove percentage fee from price sum, depends smart contract calculation (#1249)

Co-authored-by: Soon Huat <soon_huat.phan@daimler.com>

* fix display of compute datasets with free price

* removed to lowerCase on eth address

* fix compute jobs section and your jobs

* bumo ocean lib to 1.0.0-next.32

* c2d show price with fee, exclude provider fee

* wip get results

* include loading when calculating data + algo price, tooltip show order price

* update get compute url and use oceanjs helper for download

* update computeStatus signature to fix build and CI

* added logs

* refactor setting price and fees for assets

* update compute details and compute results UI and style

* update flex value

* update download buttons style

* update download buttons text

* bump ocean lib version and lint fixes

* get provier uri for compute results based on job input did

* use zero adress for price and fees order

* some fixes

* Add reuse order in start compute flow  (#1352)

* wip add reuse order logic

* add reuse order in start job

* added missing check if no jobs found

* update lib

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix lint

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* fix fixed rate

* fix build

* fix your compute jobs section when asset network not selected

* disable edit compute settings for algorithms

* fix compute jobs infinite loading when no jobs found

* fix compute form

* show token symbol for free assets also on compute price output

* removed swp file

* some decimal fixes

* partial fix for asset with pool fees, algo not working yet

* more decimal fixes

* fix algo with pool price and fees fetching

* fix selecting algorithms when on different network

* fix compute jobs table auto refresh and details  modal closing

* wip compute initialize

* order fixes

* fix lint

* fix conditions and cleanups

* fix compute status text display

* init prices and fees after starting a compute job

* start/order button tweaks

* kick in loader earlier

* update compute status feedback messages

* fixed initial price

* compute jobs refetch and reuse order

* remove logs

* removed logs and added some explanations

* use compute env max duration value in seconds

* error handling on intializeCompute and order

* removed console logs and added one new check

* use optional on initialized provider check

* remove toast from provider helper

* fix compute env issue on start order

* disable job selection during actions execution

* temporary fix publish algo with custom docker image

* fix provider fee display

* remove unnecessary condition

* fix alignment based button on action type (#1491)

* fix alignment based on action type

* moving to CSS modules

* send providerFeeAmount as string

* remove cast on providerFeeAmount

* removed some logs and added few comments

* update price output tooltip and total price logic

* set providerFee amount only when avaialable

* bump oceanlib to 1.1.2

* replace FIleMetadata to fix build

* used approveWei for approving provider fees

* fix free algo price selection and display

* fix provider fee load at first algo selection

* update compute help text

* fix provider fee approve for free assets

* cleanup

* remove commented out code
* remove unused state
* removed unused imports
* typos in comments, variables, props

* more typos

* shorten getAccessDetailsFromTokenPrice() a bit

* state & hooks access reordering

* Update src/@utils/ddo.ts

remove metadata from service type

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>

* effect dependency fixes

* state renaming

* effect dependency fixes

* compute jobs profile visual fixes

* effect dependency fixes

* more comments removal

* add accountId as a dependency in effect

* move isOwner to asset provider

* refactor handleComputeOrder for less complexity and more useful error reporting

* more proper error throwing

* provider fee statement tweak

* more obvious edit action

* empty array for `publisherTrustedAlgorithms` & `publisherTrustedAlgorithmPublishers` by default

* ref #1538
* ref #1539

* don t use initial tx values as valid order use subgraph value

* fix algo list fetching

* closes #1537
* addresses #1538

* fix disable compute button if algo is consumable

* move isOwner check to single effect

* Correctly display trusted algorithms in compute asset (#1541)

* fix allowed algo

* fix trusted algo filter

Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro>
Co-authored-by: Soon Huat <soon_huat.phan@daimler.com>
Co-authored-by: Soon Huat <soonhuat.phan@hotmail.com>
Co-authored-by: Enzo Vezzaro <enzo-vezzaro@live.it>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
Co-authored-by: mihaisc <mihai@oceanprotocol.com>
2022-06-23 16:53:05 +01:00
Matthias Kretschmann 967b869b02
Move auto-changing providerUrl (#1256)
* move auto-changing providerUrl

* remove comments

* new custom provider → change network interaction

* more interaction tweaks for custom provider → change network case

* fix adding custom provider

* add provider chainId check

* initialValues from form context

* user chainId fallback
2022-04-15 14:28:45 +01:00
Norbi 36a75e6736
Dynamic price publish input fields fixes (#1302)
* update ocean amount on price change

* add min ocean amount requirement

* add min ocean value when price is not grater than 0

* review fixes

* use min ocean and dataToken amounts from initialValues

* removed weightOnDataToken from useEffect and updated comments

* fix amountOcean bug

* remove min attribute from Coin, move logic to yup validation

* remove unused imports and change min amountOcean test name

* default amountDataToken from 50 → 100

* ref #1340

* change min datatoken and ocean amount to 100

* update ocean amount min validation and validation message

* replace data tokens with datatokens in min ocean amount message

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-04-14 13:48:56 +01:00
Matthias Kretschmann fc2681231b
fix transferable NFTs (#1309)
- send along `transferable` param when creating NFT
- new optional `transferable` param in our `generateNftCreateData()` helper, default to `true`. So we don't need to bother adding this to the publish tx fee component
- capture new key in form data, `metadata.transferable`, set to `true` by default. This prepares this to be added as a UI option later on
2022-04-04 20:13:39 +01:00
Norbi 822cec3753
Keep algorithm private checkbox fixes (#1174)
* fix set access inside publish form

* added initial value for service access to fix continue button disabled

* removed compute environment options field

* removed compute options from form.json

* update access and algorithmPrivacy fields based on asset type

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-03-16 12:52:05 +00:00
Matthias Kretschmann 3ea832d270
update compute service options (#1180)
* bump ocean.js to v1.0.0-next.26

* update compute service options
2022-03-11 11:26:04 +00:00
EnzoVezzaro 6c7a474136
Free pricing: added confirm checkbox (#1086)
* added confirm checkbox and connect logic to wizard

* add 'accessDetails' to displayed asset

* restore initial state

* adding 'freeAgreement' option to constants

* moved checkbox for free item aggreament

* improvement on amountDataToken validation

* change Field component with Input and improve UI

* change `onChange` property with `useField` hook

* switch back to Formik Field

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-02-18 11:55:46 +00:00
claudiaHash 77c4ed42cc
Pricing tab validation fix (#1015)
* pricing validation - visited tabs

* use step as number

* remove unused import

* use price empty field

* merge fixes

Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
2022-02-02 05:53:15 -08:00
Matthias Kretschmann 8a20552268 more styling, button disabling, hack in isContinueDisabled
* closes #978
2022-01-12 18:02:56 +00:00
Matthias Kretschmann 5f50379f63 tx link tweaks, output tx count beforehand 2022-01-12 18:02:56 +00:00
Matthias Kretschmann b139346b35 output transaction links 2022-01-12 18:02:56 +00:00
Matthias Kretschmann 82dce7e219 more UI elements and copy 2022-01-12 18:02:56 +00:00
Matthias Kretschmann 38ce25225f
Merge branch 'v4' into feature/publish 2022-01-11 19:49:11 +00:00
Matthias Kretschmann 64a25f3f3e
use Asset from ocean.js, adapt to new structure 2022-01-11 19:45:14 +00:00
Matthias Kretschmann c3301fb437
NFT metadata updates
* switch to `image_data` instead of `image` key
* add `external_url` & `background_color`
* make following OpenSea standard more clear
* ref #944
2022-01-11 14:52:01 +00:00
Matthias Kretschmann 9bd9156553
integrate compute options into form data, expose default option 2021-11-29 16:49:38 +00:00
Matthias Kretschmann 8a60aaf3f5
add default compute environment options 2021-11-29 15:57:12 +00:00
Matthias Kretschmann 3aa739fce0
add Docker image presets, populate algo Docker field from them 2021-11-29 13:25:30 +00:00
Matthias Kretschmann 06dca21d47
refactor all the URL inputs 2021-11-25 14:16:42 +00:00
Matthias Kretschmann 8e9cb3acad
prepare submission screen, nav layout updates 2021-11-24 14:46:10 +00:00
Matthias Kretschmann 5bf8543150
refactor all the URL inputs
* only act on user action, we were firing events left and right on every keystroke
* remove all local state management, the field has the value already
* add success state for provider input
2021-11-24 12:29:14 +00:00
Matthias Kretschmann 5fd97b11e4
pricing validation tweaks 2021-11-23 17:00:24 +00:00
Matthias Kretschmann c689ce5555
more validation tweaks 2021-11-23 15:45:27 +00:00
Matthias Kretschmann a313f39494
file input validation fixes 2021-11-23 15:34:43 +00:00
Matthias Kretschmann c484a5b40c
new publish preview (#947)
* refactor preview

* make preview render

* more preview elements, proper debug output

* make more elements work

* cleanup and fixes

* make asset actions preview work, kinda

* more fixes

* reorg

* make preview price display work

* fix timeout

* layout tweaks

* fixes

* another fix

* make file info preview work

* empty render fix
2021-11-23 12:53:09 +00:00
Matthias Kretschmann c387b27f23
validation fixes 2021-11-19 14:26:39 +00:00
Matthias Kretschmann 5bb7f327e3
hack in success state for first steps 2021-11-19 14:05:07 +00:00
Matthias Kretschmann 713de2eb94
data structure change 2021-11-19 13:49:29 +00:00
Matthias Kretschmann 08c42e8fa6
prepare NFT image creation 2021-11-15 20:47:59 +00:00
Matthias Kretschmann b41e15a92e
fix BoxSelection fields checked state 2021-11-15 15:19:50 +00:00
Matthias Kretschmann 94147026c0
prepare datatoken & NFT display 2021-11-15 15:04:26 +00:00
Matthias Kretschmann e79dcf2342
add in all conditional fields
* switch between dataset & algorithm fields
* switch between algo privacy & access type fields
* switch between docker image & custom docker image fields
2021-11-15 12:44:27 +00:00
Matthias Kretschmann 5285efd9c0
another render fix 2021-11-11 13:55:35 +00:00
Matthias Kretschmann 704b52a3c4
more publish flow preparation
* consolidate scattered methods into publish utils
* new encrypt method
* remove DDO File typings
2021-11-11 13:40:38 +00:00
Matthias Kretschmann 8ce573b2a0
prepare publish flow in code 2021-11-11 11:28:03 +00:00
Matthias Kretschmann 3d4b30c00f
new DDO (#941)
* type out new DDO

* remove all DDO ocean.js imports

* move over as much as possible to new DDO structure

* DDO/Asset split-up

* use Asset typing instead of DDO almost everywhere

* more typings

* more DDO refactor

* ddo typings updates

* more DDO updates

* updates

* ddo updates
2021-11-11 07:51:13 +00:00
Matthias Kretschmann 0fb4e630c1
metadata tweaks 2021-11-04 11:14:48 +01:00