Add support for labels on automation functions

Idea for these labels is to give instructions which labels to copy
on step and on workflow when function step is added to the graph.

Labels are defined with "step,workflow", "workflow" or "step" for value.
UI should follow these instructions when copying labels to workflow
and/or step.
This commit is contained in:
Denis Arh
2021-03-12 13:12:07 +01:00
parent a0ecf0537f
commit cfe02be081
20 changed files with 208 additions and 75 deletions
+1
View File
@@ -32,6 +32,7 @@ type (
aFuncDef struct {
Name string
Kind string
Labels map[string]string
Meta *aFuncMetaDef
Params aFuncParamSet
Results aFuncResultSet
+1
View File
@@ -92,6 +92,7 @@ func (h {{ $.Name }}Handler) {{ export .Name }}() *atypes.Function {
return &atypes.Function{
Ref: {{ printf "%q" ( $REF ) }},
Kind: {{ printf "%q" .Kind }},
Labels: {{ printf "%#v" .Labels }},
{{- if .Meta }}
Meta: &atypes.FunctionMeta{
{{- if .Meta.Short }}