mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-18 20:17:04 +00:00
Merge pull request #824 from zzxwill/issue-workloads
Add "description" field for each workload from ListWorkloads API
This commit is contained in:
@@ -47,9 +47,9 @@ type WorkloadRunBody struct {
|
||||
|
||||
// WorkloadMeta store workload metadata for dashboard restful API server
|
||||
type WorkloadMeta struct {
|
||||
Name string `json:"name"`
|
||||
Parameters []types.Parameter `json:"parameters,omitempty"`
|
||||
AppliesTo []string `json:"appliesTo,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Parameters []types.Parameter `json:"parameters,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// TraitBody used to present trait which is to be attached and, of which parameters are set
|
||||
|
||||
@@ -87,9 +87,9 @@ func (s *APIServer) ListWorkload(c *gin.Context) {
|
||||
}
|
||||
for _, w := range workloads {
|
||||
workloadDefinitionList = append(workloadDefinitionList, apis.WorkloadMeta{
|
||||
Name: w.Name,
|
||||
Parameters: w.Parameters,
|
||||
AppliesTo: w.AppliesTo,
|
||||
Name: w.Name,
|
||||
Parameters: w.Parameters,
|
||||
Description: w.Description,
|
||||
})
|
||||
}
|
||||
util.AssembleResponse(c, workloadDefinitionList, err)
|
||||
|
||||
Reference in New Issue
Block a user