Skip to content

Tips for development of a new block #3

@ml-evs

Description

@ml-evs

There are a few steps that need to be undertaken to create a new block as of datalab 0.4, as we discussed. To summarise, I would say the best option is to copy the EIS block, both Python and JS code.

  • Copy the eis folder in from apps into the desired block name
  • The block can save keys under self.data: bokeh_plot_data will cause a bockeh plot to be shown in the UI, freeform_comment will render an HTML comment.
  • Add a link to the block in the blocks/__init__.py file where other blocks are registered

Then in the UI:

  • Copy the webapp/src/components/datablock/EISBlock.vue into the desired new file
  • Register the new component in resources.js with the desired names

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions