From b51a111eddf91df472d78886af8e564d838276ac Mon Sep 17 00:00:00 2001 From: FlyTOmeLight <41530068+FlyTOmeLight@users.noreply.github.com> Date: Fri, 8 Nov 2024 20:54:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=B4=E9=9C=B2ComponentView=E7=9A=84id=20(#?= =?UTF-8?q?1354)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/common/schema/schema.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/common/schema/schema.go b/pkg/common/schema/schema.go index 56bc2c684..07a93a626 100644 --- a/pkg/common/schema/schema.go +++ b/pkg/common/schema/schema.go @@ -22,6 +22,7 @@ import ( ) type ComponentView interface { + GetID() string GetComponentName() string GetParentDagID() string GetStatus() JobStatus @@ -60,6 +61,10 @@ type JobView struct { CacheJobID string `json:"cacheJobID"` } +func (j JobView) GetID() string { + return j.JobID +} + func (j JobView) GetComponentName() string { return j.StepName } @@ -118,6 +123,10 @@ type DagView struct { EntryPoints map[string][]ComponentView `json:"entryPoints"` } +func (d DagView) GetID() string { + return d.DagID +} + func (d DagView) GetComponentName() string { return d.DagName }