This commit is contained in:
@@ -19,6 +19,9 @@ import (
|
||||
// swagger:model postParamsBody
|
||||
type PostParamsBody struct {
|
||||
|
||||
// json input to convert to spreadsheet
|
||||
InData interface{} `json:"in-data,omitempty"`
|
||||
|
||||
// Name of the json input file to utilise
|
||||
Infile string `json:"infile,omitempty"`
|
||||
|
||||
|
@@ -72,6 +72,10 @@ func init() {
|
||||
"out-filename"
|
||||
],
|
||||
"properties": {
|
||||
"in-data": {
|
||||
"description": "json input to convert to spreadsheet",
|
||||
"type": "object"
|
||||
},
|
||||
"infile": {
|
||||
"description": "Name of the json input file to utilise",
|
||||
"type": "string"
|
||||
@@ -137,7 +141,7 @@ func init() {
|
||||
},
|
||||
{
|
||||
"action": "exec",
|
||||
"exec": "ls -la /tmp",
|
||||
"exec": "/bin/bash -c \"echo '{{ .InData | toJson }}' \u003e /tmp/input.json\"",
|
||||
"print": true,
|
||||
"silent": false
|
||||
},
|
||||
@@ -320,7 +324,7 @@ func init() {
|
||||
},
|
||||
{
|
||||
"action": "exec",
|
||||
"exec": "ls -la /tmp",
|
||||
"exec": "/bin/bash -c \"echo '{{ .InData | toJson }}' \u003e /tmp/input.json\"",
|
||||
"print": true,
|
||||
"silent": false
|
||||
},
|
||||
@@ -424,6 +428,10 @@ func init() {
|
||||
"out-filename"
|
||||
],
|
||||
"properties": {
|
||||
"in-data": {
|
||||
"description": "json input to convert to spreadsheet",
|
||||
"type": "object"
|
||||
},
|
||||
"infile": {
|
||||
"description": "Name of the json input file to utilise",
|
||||
"type": "string"
|
||||
|
@@ -366,7 +366,7 @@ func runCommand2(ctx context.Context,
|
||||
params.DirektivDir,
|
||||
}
|
||||
|
||||
cmd, err := templateString(`ls -la /tmp`, at)
|
||||
cmd, err := templateString(`/bin/bash -c "echo '{{ .InData | toJson }}' > /tmp/input.json"`, at)
|
||||
if err != nil {
|
||||
ri.Logger().Infof("error executing command: %v", err)
|
||||
ir[resultKey] = err.Error()
|
||||
|
Reference in New Issue
Block a user