mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-23 12:51:40 +02:00
Merge branch 'dev-job-archive-module' of github.com:ClusterCockpit/cc-backend into dev-job-archive-module
This commit is contained in:
@@ -133,7 +133,7 @@ const docTemplate = `{
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/schema.Job"
|
||||
"$ref": "#/definitions/schema.JobMeta"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -392,6 +392,21 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
<<<<<<< HEAD:internal/api/docs.go
|
||||
=======
|
||||
"api.TagJobApiRequest": {
|
||||
"description": "Request to tag a job.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"description": "Error Message",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"description": "Statustext of Errorcode",
|
||||
>>>>>>> 922e94e835e2fba068341645df50e7b42734dfb5:docs/docs.go
|
||||
"schema.Job": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -469,6 +484,107 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.JobMeta": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"arrayJobId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"cluster": {
|
||||
"type": "string"
|
||||
},
|
||||
"duration": {
|
||||
"type": "integer"
|
||||
},
|
||||
"exclusive": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"description": "never used in the job-archive, only available via REST-API",
|
||||
"type": "integer"
|
||||
},
|
||||
"jobId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"jobState": {
|
||||
"type": "string"
|
||||
},
|
||||
"metaData": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"monitoringStatus": {
|
||||
"type": "integer"
|
||||
},
|
||||
"numAcc": {
|
||||
"type": "integer"
|
||||
},
|
||||
"numHwthreads": {
|
||||
"type": "integer"
|
||||
},
|
||||
"numNodes": {
|
||||
"type": "integer"
|
||||
},
|
||||
"partition": {
|
||||
"type": "string"
|
||||
},
|
||||
"project": {
|
||||
"type": "string"
|
||||
},
|
||||
"resources": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schema.Resource"
|
||||
}
|
||||
},
|
||||
"smt": {
|
||||
"type": "integer"
|
||||
},
|
||||
"startTime": {
|
||||
"type": "integer"
|
||||
},
|
||||
"statistics": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/schema.JobStatistics"
|
||||
}
|
||||
},
|
||||
"subCluster": {
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schema.Tag"
|
||||
}
|
||||
},
|
||||
"user": {
|
||||
"type": "string"
|
||||
},
|
||||
"walltime": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.JobStatistics": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"avg": {
|
||||
"type": "number"
|
||||
},
|
||||
"max": {
|
||||
"type": "number"
|
||||
},
|
||||
"min": {
|
||||
"type": "number"
|
||||
},
|
||||
"unit": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema.Resource": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@@ -325,7 +325,7 @@ func (api *RestApi) tagJob(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Tags jobs
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param request body schema.Job true "Job to add"
|
||||
// @Param request body schema.JobMeta true "Job to add"
|
||||
// @Success 201 {object} api.StartJobApiResponse "Job added successfully"
|
||||
// @Failure 400 {object} api.ErrorResponse "Bad Request"
|
||||
// @Failure 422 {object} api.ErrorResponse "The combination of jobId, clusterId and startTime does already exist"
|
||||
@@ -505,7 +505,7 @@ func (api *RestApi) stopJobById(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param request body api.StopJobApiRequest true "All fields required"
|
||||
// @Success 201 {object} schema.Job "Job resource"
|
||||
// @Success 201 {object} schema.JobMeta "Job resource"
|
||||
// @Failure 400 {object} api.ErrorResponse "Bad Request"
|
||||
// @Failure 404 {object} api.ErrorResponse "Resource not found"
|
||||
// @Security ApiKeyAuth
|
||||
|
Reference in New Issue
Block a user