From 033721e0cc1f027116a5596879a77f4aecce30cb Mon Sep 17 00:00:00 2001 From: Mohammed Diaa Date: Wed, 6 Dec 2023 13:39:27 +0200 Subject: [PATCH] Add and to workflow version definition --- cmd/execute/execute.go | 2 ++ types/download.go | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/cmd/execute/execute.go b/cmd/execute/execute.go index b52a663..5c5066b 100644 --- a/cmd/execute/execute.go +++ b/cmd/execute/execute.go @@ -837,6 +837,7 @@ func readWorkflowYAMLandCreateVersion(fileName string, workflowName string, obje Nodes map[string]*types.Node `json:"nodes"` Connections []types.Connection `json:"connections"` PrimitiveNodes map[string]*types.PrimitiveNode `json:"primitiveNodes"` + Annotations map[string]*types.Annotation `json:"annotations"` }{ Nodes: nodes, Connections: connections, @@ -965,6 +966,7 @@ func createToolWorkflow(wfName string, space *types.SpaceDetailed, project *type Nodes map[string]*types.Node `json:"nodes"` Connections []types.Connection `json:"connections"` PrimitiveNodes map[string]*types.PrimitiveNode `json:"primitiveNodes"` + Annotations map[string]*types.Annotation `json:"annotations"` }{ Nodes: map[string]*types.Node{ node.Name: node, diff --git a/types/download.go b/types/download.go index 016f936..5bb722e 100644 --- a/types/download.go +++ b/types/download.go @@ -50,9 +50,21 @@ type WorkflowVersionDetailed struct { Nodes map[string]*Node `json:"nodes"` Connections []Connection `json:"connections"` PrimitiveNodes map[string]*PrimitiveNode `json:"primitiveNodes"` + Annotations map[string]*Annotation `json:"annotations"` } `json:"data"` } +type Annotation struct { + Content string `json:"content"` + Width float64 `json:"width"` + Height float64 `json:"height"` + Name string `json:"name"` + Coordinates struct { + X float64 `json:"x"` + Y float64 `json:"y"` + } `json:"coordinates"` +} + type WorkflowVersionStripped struct { ID uuid.UUID `json:"id"` WorkflowInfo uuid.UUID `json:"workflow_info"` @@ -64,6 +76,7 @@ type WorkflowVersionStripped struct { Nodes map[string]*Node `json:"nodes"` Connections []Connection `json:"connections"` PrimitiveNodes map[string]*PrimitiveNode `json:"primitiveNodes"` + Annotations map[string]*Annotation `json:"annotations"` } `json:"data"` } @@ -139,4 +152,5 @@ type NodeInput struct { Description *string `json:"description,omitempty"` WorkerConnected *bool `json:"workerConnected,omitempty"` Multi *bool `json:"multi,omitempty"` + Visible *bool `json:"visible"` }