0

I'm trying to create a custom build of noflo-ui that is effectively only a graph editor. Don't need it to connect to any runtimes.

I'm struggling to find where I can inject this code as it appears part of noflo-ui is written in noflo itself and I cannot find the scripts for those pieces.

For example, in graphs/main.fbp, there is this line: 'user,main,project,github,runtime,context' -> ROUTES Dispatch

Three questions on this:

  1. Where is the source behind the Dispatch component?

  2. If I add my own interface elements to Load data from an external api, where would be the best place to inject that data?

I see a lot of event driven code, so I'm guessing I would add a new polymer element, do my ajax call, the emit or fire something. I believe this is what happens when connecting to a noflo-nodejs runtime; I've traced the connection to line 51312 in a built noflo-ui.js

return port.send({
    componentDefinition: definition
});

... but I can't figure out where it goes past here. A port on the main.fbp graph? As per my 1st question, I cannot find the source behind these core graphs.

And this leads to my last question

  1. The code I pasted above from noflo-ui, I cannot find this code anywhere pre-build. I even searched the entire project tree for "componentDefinition: definition". Where is this coming from?

Any pointers on this would be greatly appreciated! Thanks

Alex Stanciu
  • 23
  • 1
  • 3

1 Answers1

0

The FBP runtime protocol is the primary extension point of noflo-ui. You can implement a "runtime" which just provides components and graphs (for instance from a database), without a way to run these.

A network:persist message to let the UI indicate that "this is a good point to save the graphs" has been specced but is currently not implemented. For now you can just autosave latest state.

Jon Nordby
  • 5,494
  • 1
  • 21
  • 50