-
Hi. In the documentation, it suggests the SDK and/or some tooling can be used to generated more complex graphs. Is there any additional guidance on this?
Also, can graphs be modified at runtime, i.e. by the first (or another) pipeline task? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Yes they absolutely can, we just added in some code to support that. It was quite a complex change, it's not merged into the main branch yet but you can find an example of a plugin which does that here. It's pretty undocumented at the momenet but you might be able to glean how it works from this code: https://github.com/Green-Software-Foundation/if/blob/functional-architecture/src/models/group-by.ts Specifically we've added a metadata part that the plugin needs to return and currently it's set to "groupby" and it needs to return child nodes rather than outputs. @jmcook1186 and @narekhovhannisyan I think for this type of plugin we need the metadata to be more about what it returns, currently the metadata says "groupby" but thats the name of the first plugin that uses this method of returning children rather than the kind of the plugin. Maybe the kind should be EDIT - Sorry @jcendava I can see the original discussion was from Jan 5th and I just got notified because it was closed. |
Beta Was this translation helpful? Give feedback.
-
So there are two ways to do this right now: 1 - Have your plugin return a flat array of everything and then use the group-by plugin to allow people to group them how they want. E.g. return a flat array of observations for every server for all regions and then use group by to group them under region > some-server-unique-id. The adv of that approach is that you are allowing others to group data however works for their use case and also so you don't have to implement any grouping on yourside. tree:
children:
application:
pipeline:
- your-plugin
- group-by
- some-other-plugin
2 - Create a plugin which queries you DS and returns components already grouped how you would like them to be represented in the tree. tree:
children:
application:
pipeline:
- your-plugin
- some-other-plugin
Does that make sense? |
Beta Was this translation helpful? Give feedback.
Yes they absolutely can, we just added in some code to support that. It was quite a complex change, it's not merged into the main branch yet but you can find an example of a plugin which does that here. It's pretty undocumented at the momenet but you might be able to glean how it works from this code: https://github.com/Green-Software-Foundation/if/blob/functional-architecture/src/models/group-by.ts
Specifically we've added a metadata part that the plugin needs to return and currently it's set to "groupby" and it needs to return child nodes rather than outputs.
@jmcook1186 and @narekhovhannisyan I think for this type of plugin we need the metadata to be more about what it returns, current…