feat(dashboard): admin can now view task detailed steps
This commit is contained in:
@@ -30,6 +30,7 @@ type ListTaskResponse struct {
|
||||
type GetTaskResponse struct {
|
||||
*ent.Task
|
||||
UserHashID string `json:"user_hash_id,omitempty"`
|
||||
TaskHashID string `json:"task_hash_id,omitempty"`
|
||||
Summary *queue.Summary `json:"summary,omitempty"`
|
||||
Node *ent.Node `json:"node,omitempty"`
|
||||
}
|
||||
|
||||
@@ -178,6 +178,7 @@ func (s *AdminListService) Tasks(c *gin.Context) (*ListTaskResponse, error) {
|
||||
|
||||
return GetTaskResponse{
|
||||
Task: task,
|
||||
TaskHashID: hashid.EncodeTaskID(hasher, task.ID),
|
||||
UserHashID: uid,
|
||||
Node: node,
|
||||
Summary: summary,
|
||||
@@ -228,6 +229,7 @@ func (s *SingleTaskService) Get(c *gin.Context) (*GetTaskResponse, error) {
|
||||
Summary: summary,
|
||||
Node: node,
|
||||
UserHashID: userHashID,
|
||||
TaskHashID: hashid.EncodeTaskID(hasher, task.ID),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user