Adding feature in Visualizations #1285
Replies: 4 comments 19 replies
-
Hi @HackPoint, it will depend on what you're trying to do. Could you describe the goal of this feature a bit more? For instance, is this something that you want to see in Kaoto or are you trying to base something else out of Kaoto? Thanks for opening this discussion |
Beta Was this translation helpful? Give feedback.
-
Hi All. Let me provide some context. We are in the process of customizing Kaoto for our domain and use case. This includes:
|
Beta Was this translation helpful? Give feedback.
-
@lordrip Hi, I have a question, I need to add to DSL another type of YAML template. Let's call it - "Workflows". FLOW: After I click the DSLSelectorToggle: it's changing the template to a "Workflows" instead of the existing ones: I need to extend I would like to understand which flows needed to be added to a current implementation to create a new View for |
Beta Was this translation helpful? Give feedback.
-
@lordrip Hi, I need some explanation, how do I add new schema in java? I need to generate "Workflow".json schema, it's pretty much similar to kamelet schema. But I'm not able to see where and how you generating the typescript for it. Can you tell me please how to add new schema: workflow so I would be able to add new features to it. I saw your code in java, hope at least you would be able to assist me here. package io.kaoto.camelcatalog.generator;
import com.fasterxml.jackson.databind.node.ObjectNode;
import java.util.List;
public class WorkflowProcessor {
private static final List<String> TO_STRING_TYPES = List.of("binary");
public static void process(ObjectNode workflow) {
var schema = workflow.withObject("/propertiesSchema");
var workflowDef = workflow.withObject("/spec")
.withObject("/definition");
schema.put("$schema", "http://json-schema.org/draft-07/schema#");
schema.put("type", "object");
if (workflowDef.has("title")) schema.set("title", workflowDef.get("title"));
if (workflowDef.has("description")) schema.set("description", workflowDef.get("description"));
if (workflowDef.has("required")) schema.set("required", workflowDef.get("required"));
if (workflowDef.has("properties") && !workflowDef.withObject("/properties").isEmpty()) {
var workflowProperties = workflowDef.withObject("/properties");
var schemaProperties = schema.withObject("/properties");
for (var entry : workflowProperties.properties()) {
var name = entry.getKey();
var property = entry.getValue();
var schemaProperty = schemaProperties.withObject("/" + name);
if (property.has("type")) schemaProperty.set("type", property.get("type"));
if (TO_STRING_TYPES.contains(property.get("type").asText())) {
schemaProperty.put("$comment", "type:" + property.get("type").asText());
schemaProperty.put("type", "string");
}
if (property.has("title")) schemaProperty.set("title", property.get("title"));
if (property.has("description")) schemaProperty.set("description", property.get("description"));
if (property.has("enum")) schemaProperty.set("enum", property.get("enum"));
if (property.has("default")) schemaProperty.set("default", property.get("default"));
if (property.has("format")) schemaProperty.set("format", property.get("format"));
}
}
}
} I've added new class and I would hope that you would be able to help me move forward from here. |
Beta Was this translation helpful? Give feedback.
-
Hi, I need to add a feature called:
Workspace
which will represent a folder with dependent files which are Kemletes.I've added a select and need to add new workspace button, the question is how to add a data structure and backend capabilities to this?
I would extend the question after I'll understand that this is possible at all.
Beta Was this translation helpful? Give feedback.
All reactions