Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit multiple services #42

Merged
merged 31 commits into from
Sep 17, 2024
Merged

Edit multiple services #42

merged 31 commits into from
Sep 17, 2024

Conversation

FilipMasar
Copy link

@FilipMasar FilipMasar commented Sep 5, 2024

Fixes editing multiple services #16

Proposed Changes

  • create a new tab for editing services
    • editing asset is done in 2 tabs (Edit Metadata and Edit Services)
    • service related fields moved from EditMetadata to EditServices tab
    • EditComputeDataset tab removed and fields moved to EditServices tab
    • ability to add a new service
  • move defaultDatatokenCap to app.config from publish flow. It is used also in edit flow (add service).
  • view asset type in Edit Metadata - just for viewing, not editable
  • fetch price details in accessDetails from blockchain instead of offchain record which is not ready yet - ocean-node issue
  • store paymentCollector in accessDetails
  • remove unused getPaymentCollector function
  • removed weird setMinterToPublisher and setMinterToDispenser functions
  • small UI changes
    • disable scroll on InputElement type number
    • fix BoxSelection checked value when multiple of them on a same page

image

TODOs

TODOs (not related to editing services)

  • check datatoken templateIndex - do we work with the correct one? Do we want to support all? fixed here Fix publishing #44
  • check links editing in Edit Metadata whether it works as it should.
  • ability to edit algorithm field in metadata (MetadataAlgorithm). Also have a look into consumerParameters. They are editable on service level. But should they be editable on metadata level as well (in MetadataAlgorithm type there are actually 2 places for consumerParameters)? I don't understand the use there.
  • market is working only with 1 fixed rate exchange specified in config. If the asset price is setup using different FixedRateExchange contract it won't work. Is this expected behaviour? Maybe the same thing is also true for other contracts.

@FilipMasar FilipMasar marked this pull request as ready for review September 11, 2024 14:29
@FilipMasar FilipMasar requested a review from a team as a code owner September 11, 2024 14:29

return (
<Form style={{ margin: 20 }}>
<Field {...getFieldContent('name', data)} component={Input} name="name" />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can do a funtion renderField(fieldname)
and in Form do somenthing like:

{renderFiled(name)} {renderField(description} ...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather keep it like this because the same way it is done in publish flow

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

]

return (
<Form style={{ margin: 20 }}>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also here like in formAddService
you can do a
cont renderField = (filed) => {
<Field.../>
}

@FilipMasar FilipMasar mentioned this pull request Sep 16, 2024
@FilipMasar FilipMasar merged commit 5b3011c into ocean-node Sep 17, 2024
@FilipMasar FilipMasar deleted the edit-multiple-services branch September 17, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants