feat!(backend): unify script run and ad-hoc job run
This commit is contained in:
+4
-30
@@ -1651,7 +1651,7 @@ const docTemplate = `{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Loads a script from storage, resolves interpreter command, and executes on the specified agent",
|
||||
"description": "Loads a script from storage, resolves interpreter command, and submits it to the agent",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -1671,7 +1671,7 @@ const docTemplate = `{
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "Agent token and optional stdin",
|
||||
"description": "Agent ID and optional stdin",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
@@ -1684,7 +1684,7 @@ const docTemplate = `{
|
||||
"201": {
|
||||
"description": "Created",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/internal_handlers.RunScriptOut"
|
||||
"$ref": "#/definitions/internal_handlers.AddJobOut"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
@@ -2118,7 +2118,7 @@ const docTemplate = `{
|
||||
"201": {
|
||||
"description": "Created",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/internal_handlers.RunScriptOut"
|
||||
"$ref": "#/definitions/internal_handlers.AddJobOut"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2904,32 +2904,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"internal_handlers.RunScriptOut": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"command": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"status": {
|
||||
"type": "integer"
|
||||
},
|
||||
"stderr": {
|
||||
"type": "string"
|
||||
},
|
||||
"stdin": {
|
||||
"type": "string"
|
||||
},
|
||||
"stdout": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"internal_handlers.RunStoredScriptIn": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
Reference in New Issue
Block a user