Git Product home page Git Product logo

kaotoio / kaoto-ui Goto Github PK

View Code? Open in Web Editor NEW
87.0 4.0 44.0 1.06 GB

Frontend for the Kaoto project to provide an easy-to-use integration framework based on Apache Camel.

Home Page: https://www.kaoto.io

License: Apache License 2.0

HTML 0.14% CSS 0.38% TypeScript 95.35% JavaScript 3.93% Dockerfile 0.02% MDX 0.19%
integration apache-camel hacktoberfest low-code patternfly react react-flow typescript module-federation cypress

kaoto-ui's Introduction

GitHub release (latest by date including pre-releases) GitHub license

GitHub code size in bytes GitHub commit activity GitHub contributors

🧪 Unit Tests (Jest) 🧪 codecov

Quality Gate Status Reliability Rating Maintainability Rating Security Rating

Twitter Follow YouTube Channel Subscribers

Kaoto UI

This is the user interface for Kaoto Backend. Kaoto is an easy-to-use visual integration framework based on Apache Camel.

Kaoto UI Screencapture

Running it with Docker

For trial purposes, there is a docker image that can be run as described on the quickstarter.

Installing with the operator in a kubernetes environment

Follow the instructions on https://github.com/KaotoIO/kaoto-operator/

Contributing

If you want to run Kaoto-ui in your machine, follow these instructions. Remember that you need a backend running.

Requirements

  • Node >= 16
  • Yarn (3.x)

Install & Setup

  1. Install dependencies:
yarn install
  1. From the packages/kaoto-ui folder, duplicate the .env.example file and name it .env.
  2. Update KAOTO_API in the file with the correct host for the API backend. If using Kaoto locally, this should be http://localhost:8081, but please check.

Development

Run the app in development mode:

# From the packages/kaoto-ui/
yarn start

alternatively from the root folder

# From the root folder
yarn workspace @kaoto/kaoto-ui run start

Open http://localhost:1337 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

Tests

Unit Tests

Run all Jest and React Testing Library unit tests:

# From the packages/kaoto-ui/
yarn test

alternatively from the root folder

# From the root folder
yarn workspace @kaoto/kaoto-ui run test

Launches the test runner in the interactive watch mode.
Tests are colocated and live as closely to corresponding code as possible.

End-to-End (E2E) Tests

E2E tests are located in the /cypress directory. Run all Cypress E2E tests headlessly:

// in the browser
yarn workspace @kaoto/kaoto-ui run e2e

// headlessly
yarn workspace @kaoto/kaoto-ui run e2e:headless

// with a specific browser
// options: chrome, chromium, edge, electron, firefox
// or specify a path: /usr/bin/chromium
yarn workspace @kaoto/kaoto-ui run e2e --browser firefox

See the Cypress docs for more information. There are also GitHub Actions workflows in .github/workflows that run the tests automatically on opening a pull request.

Storybook

Storybook builds are enabled for all non-Dependabot pull requests to kaoto-ui, thanks to Chromatic. It gives you the ability to view stories for each pull request, which makes it easy to share development of new UI components with team members. Storybook also makes it easy to keep presentational components isolated. You can learn more about how to create a story for your UI component here.

To run Storybook locally: yarn workspace @kaoto/kaoto-ui run storybook

To publish to Chromatic: yarn workspace @kaoto/kaoto-ui run chromatic

Build

yarn workspace @kaoto/kaoto-ui build

Builds the app for production to the dist folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

kaoto-ui's People

Contributors

aaj013 avatar almen-ng avatar apupier avatar delawen avatar dependabot[bot] avatar evanshortiss avatar helio-frota avatar igarashitm avatar javierlopezdeancos avatar kahboom avatar lordrip avatar mkralik3 avatar mmelko avatar mmuzikar avatar mohammadiiram avatar pnaik1 avatar pompette avatar renovate[bot] avatar thiagoelg avatar tplevko avatar unsortedhashsets avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kaoto-ui's Issues

Notification or Alert Setup

Users should be notified when things have happened, such as the data has successfully synced, or if there is an error.

Ability to Edit Detail/Configuration of Step

Add the ability to edit properties in the detail view of a particular Step.

  • Load properties
  • Add ability to save new properties
  • Populate fields with existing values
  • Validation

Support multiple DSL

As a user I want to be able to select the type of workflow I am generating (Camel route, Kamelet, Kamelet Binding,...).

Implementation details

The API can provide multiple DSL formats on the /integrations/customResources endpoint. There should be some way the user can select which one of all those source codes they want to use.

Swagger is a bit lazy, but the response is a Map that returns all possible source codes with a key that represents what the source code is for (on our current case, "Kamelet" or "KameletBinding").

Kaoto npm Package

As a user, I'd like to extend or embed Kaoto using a package published on the npm registry, and have access to the relevant typings (IKaoto).

Ability to Run Partial Integrations

As a user, I would like the ability to run part of an integration for testing and debugging purposes.

Relates to #12 , since using dummy data could be an option if the integration has not been deployed yet. However, we should consider options for deployed integrations as well.

Persist Opened/Closed Editor

As a user, I would like to have the ability to decide whether the code editor is visible. This should persist even when refreshing the page.

Right now if you close the editor and refresh the page, the editor reappears (src/components/YAMLEditor.tsx). We should persist these changes to localStorage or similar.

Validation Service for Visualization

As a user, I would like to know where I can drag and drop steps so that I can update the YAML integration from the visualization.

The UI should be "smart" enough to let users know what kind of step should be allowed in a specific area of the integration. Zimara's UI would benefit from a kind of validation service to help guide the user in planning and creating their integrations within the visualization.

Steps

  • Plan validation logic from user behavior perspective
  • Slot creation service
  • Create slots on building integration from YAML
  • Add validation logic
  • Presentation of validation

Add New Step

As a user, I would like to be able to add a new step to the visualization, in a new area currently not used by an existing step.

Ability to Reuse Fields from Steps in Others

As a user, I would like the ability to reuse fields from one Step in another, in order to be able to make more useful integrations.

ie new product listing -> create a banner with it or social media post

Example:
User creates a product on Shopify. News of product creation is automatically shared on Twitter and a Telegram channel with the message "Hey there, my design is now on a new product. Visit my {shop_name} to get this cool {product_name} and check out more {product_category}! {shop_link}". You can make the message even more appealing by adding a Bannerbear node that automatically creates template images for your new product announcements.

PoC of Step Extension

Create a PoC to demonstrate the Step Extension functionality of extending the UI with a partial view.

Existing Step Replacement

As a user, I would like the ability to replace an existing step in the visualization with either a step from the catalog or a temporary/freestanding step.

  • Ability to replace step with "temporary" step (Konva node)
  • Ability to replace step with catalog step (DOM element)
  • On select, bring group forward

This will probably need some additional aesthetic enhancements.

Depends on #117 .

Cluster integration and deployment from the UI

The API already supports deployment management. We need some way to start, stop, and list integrations after finishing the editing.

Implementation Details

The cluster configuration is taken from ~/.kube configuration.

Recommended quick setup for testing:

The user interface must implement the following:

Related backend task: KaotoIO/kaoto-backend#19 and KaotoIO/kaoto-backend#10

Ability to Combine Integrations into Workflows

As a user, I would like to be able to combine several smaller integrations from the visualization, into a single "parent workflow", in order to be able to reuse integrations as much as possible and to encourage creating smaller integrations.

Insert Step from Visualization

Add the ability to insert a new Step between two existing Steps from the Visualization. There are two ways the user should be able to do this:

  • The user clicks a "+" button on the last step, which inserts a slot between the two steps. The user can then drag a step from the Catalog onto the slot.
  • The user clicks a "+" button on the last step, which inserts a slot between the two steps. A mini catalog (#216 ) opens up, and the user can then choose the step to be aggregated/appended.

It's not entirely clear if both ways will be possible or intuitive to the user. A story should be created for each to see which option would be best to start with.

See this issue for more information: #218 <-- we should be following the same decision for both ways of adding a step


Steps

  • Add validation for inserting a step
  • Add custom edge
  • Implement changes onto Visualization

Visualization: Branching Support

Description

This is an EPIC to add support for branching in the Visualization.

Depends on #193 and #270 <- this must be complete before branching can be fully implemented, though development can start before then.

Business Requirements

  • Branches can be started from any step (e.g. START, MIDDLE, END)
  • There can be more than one branch from a single step
    • For example, with a CHOICE step, it's like if/else, so there will automatically be two branches, depending on the outcome of the condition
    • We don't yet support a "default flow" and "alternate flow", so the branches should each be equal weight in priority
  • Branches contain steps, and those steps can be type MIDDLE or END
  • If it's of type MIDDLE, then it should be merged back
    • Maria: It can merge back to any step, MIDDLE and END (well, I guess not START)
    • Just merged to the following step to that EIP unless it finishes in an END
    • Though not the most common scenario, it should be possible to have one branch that ends in END, and one branch that ends in MIDDLE and gets merged back

Tasks

Append Step from Visualization

Add the ability to append a step to the last step in the integration from the Visualization. There are two ways the user should be able to do this:

  • The user clicks a "+" button on the last step, which appends a slot onto it. The user can then drag a step from the Catalog onto the slot.
  • The user clicks a "+" button on the last step, which appends a slot onto it. A mini catalog (#216 ) opens up, and the user can then choose the step to be aggregated/appended.

It's not entirely clear if both ways will be possible or intuitive to the user. A story should be created for each to see which option would be best to start with.

There is also a third way that is dependent on support for temporary steps (steps on the canvas that are not a part of the integration):

  • The user drags and drops a step from the Catalog onto the canvas (not onto an existing step). The user then connects the arrow from the existing integration to the temporary step. The YAML syncs and the temporary step is now a part of the integration.

Since we've removed support for temporary steps for now, this option is not possible, but I'm leaving it on here for future reference anyway in case we add temporary steps again.

Relates to #219 <-- the same decision should be used for both

Start/Action/End Labeling for Steps

Steps should have a clear, separate label that indicate whether they are sources, sinks, or actions, possibly only showing the connector name in the main label.

Example:
Screen Shot 2021-10-28 at 15 31 28

Contextual Mini Catalog

Add support for a "mini catalog" that loads a list of steps. The idea is that when a user wants to add a new step to an existing step, they will click a + button that loads a searchable mini catalog of steps compatible with it. The user can then select the step, which will automatically be appended to the existing step.

Steps

Depends on KaotoIO/kaoto-backend#42 and either #218 or #219 for the final implementation, but development can start before then.

Integration Test Setup

Tasks:

  • Set up E2E framework, likely Cypress
  • Define happy path
  • Add tests for happy path

Templates for Integrations

As a user, I would like to have a list of common workflows that can be used as a template, which would save time in setting up integrations or getting more familiar with how to use Kaoto.

Similar to how most workflow processing apps work, like LucidChart.

Example: New order in Shopify -> create Salesforce contact -> create Trello card

Sort Catalog by Name

Users should either 1) see the steps available in the catalog in alphabetical order, or 2) be able to sort them as they choose to.

Add Detail View for Steps

Clicking on a step in the visualization canvas should display properties available for it. In the future, these properties will be editable.

Ability to Delete a Step

  • Ability to delete temporary step (not connected to an integration)
  • Ability to delete middle step of an integration

Unit Test Setup & Coverage

  • Set up unit test library with typings
  • Add coverage checks
  • Add linting
  • Add tests for primary components
  • Verify build
  • CI/CD

Improve Start -> End UX

It should be apparent to users that there is a start and and end of an integration in the visualization.

Guided Tour / Walk-Thru

We need some kind of tutorial/walk-thru that users could refer to when first using the app, that can also be referred to later on by just clicking a button.

Visual Step Editing

The user drags and drop steps from the catalog into the graphical editing canvas to add new steps.
The user then edits the properties of the step.
The user can reorder the steps.
The user can replace existing steps with others from the catalog.

Fix issue with Add Step slot replacement

There is a new bug with the slot replacement after Append Step was added.

Steps to reproduce:

  1. Create a multi-step integration using the YAML editor, or use the one loaded by default.
  2. Delete the first step (source).
  3. Open the catalog.
  4. Drag a source step onto the "Add Step" slot.

The UI breaks, see screenshot below.

Screen Shot 2022-03-01 at 4 12 43 pm

Also, we should add E2E tests to ensure this doesn't happen again.

Improve Step Extension Example

The current step extension example is pretty awful, it would be good to see this improved a bit, maybe with a form or something.

Make Step Catalog Collapsible

Something like a + button hidden away on the side, and when the user presses it, it opens up the catalog. The idea behind this is that the user won't be using the catalog very much once their integrations are set up. Can follow up with some UX designs if it'd help.

Generate Dummy Data for Step Based on Specification

As a user, I would like to be able to predict the output of an integration up to a particular Step or series of Steps by seeing their output using dummy data based on their specification, which would help test the execution of those Steps as a form of debugging.

Use cases:

  • Improving the general developer experience, debugging assistance
  • Easier planning of integrations
  • Generating data for previewing custom views, or Step Extensions
  • Generating data to be used for testing

Toggle Catalog and Code Editor

Description

When the YAMLEditor (code editor) is selected, the Catalog should be collapsed, and vice versa. This would prevent them from being overlapped, which makes the YAMLEditor unusable when the Catalog is opened.

2022-03-02 at 13 34 29 - Lime Weasel

We can't move the Catalog to the right side of the screen, because that's where the StepDetail panel is.

This could also be a good opportunity to move the YAMLEditor into the PatternFly Drawer, instead of being part of the Grid system it's in now. This is what the Catalog does--it opens up as an overlay above the Visualization. This allows you to open the Catalog without it moving the Visualization canvas.

The YAMLEditor, using the Grid system now:

2022-03-02 at 13 49 40 - Harlequin Grasshopper

By contrast, when using a Drawer like the Catalog does, it's an overlay and doesn't alter the position of the Visualization canvas when it's opened.

2022-03-02 at 13 43 10 - Amaranth Orangutan

Steps

  • Add conditional to DrawerContent to show either the catalog or code editor
  • Move the code editor into the conditional
  • Adjust the Grid for the Visualization, or remove it altogether if it's not necessary.

References

Create Layout w/ Constraints

In theory, it may be beneficial to have only a set of pre-defined Steps that are constrained, which is what would determine whether or not it's part of an Integration and make it easier to have validation.

Improve UX for handling invalid Steps

When the Step in the YAML is not valid, the API begins to return an empty array for the Views. The visualization, as a result, does not update the integration. The UI should do the following:

  • Show the user a warning about there being an issue with a Step they selected (in the YAML editor)
  • Update the integration in the visualization and show a Step placeholder where the Step is null

Step Order Editing

As a user, I would like the ability to change the order of steps by "swapping" positions with one another. This would mean that I would not have to re-configure each step if I decided to change the ordering.

Depends on #117

EDIT: Moving this to be a feature idea, as it seems like an uncommon behavior.

Integrator Uploads a Deployment File (YAML) to Edit

As a user, I would like to be able to upload a YAML file either directly from my computer, or specify a URL to fetch the YAML file from. This would save having to open a YAML file, and copying and pasting the contents in the code editor.

Activity History / Snapshot of Integration

As a user, I would like to be able to view an activity list for a particular integration which shows the state at the moment it was executed. This would be an additional form in debugging in addition to #16 and #12 . NOTE: This is not the same as showing logs for deployments (#311 ).

Support for Backend-Driven Views

We want the user to be able to interact with the cluster with the following features:

  • List available integrations already running in the cluster
  • #55
  • Deploy an integration created on the editor
  • Stop an existing running integration.
  • #19
  • #192

All these leveraged through Camel-K to simplify the implementation.

Ability to Show/Hide Views

Ability to show/hide a particular view (e.g. YAML editor) with configuration settings? For example, if they don't want to override it with a custom view, they just want to hide it. We can use localStorage for this, doesn't have to be some persisted setting in metadata.

EDIT: Considering hiding the YAML Editor by default as well.

Support for Generic Extensions

As a user, I would like to be able to provide a custom view that would appear in the dropdown App menu as another link (displayed in a modal as shown below).

This generic extension can help developers customize Kaoto to show relevant information outside of the integration. For example, it can show some tutorial or guidelines to help users create an integration, a list of available databases and what to use them for, a list of potential services to connect to,...

Screen Shot 2022-06-27 at 2 26 47 pm

Which would open in a modal like this:

Screen Shot 2022-06-27 at 2 28 45 pm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.