From 885d309b8fc85ef7d6363688c435586838aef1af Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Tue, 22 Jan 2019 10:59:13 -0800 Subject: [PATCH] Add Datacenters to the JobsListStub struct So it can be used for filtering the full list of jobs --- api/jobs.go | 1 + nomad/structs/structs.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/api/jobs.go b/api/jobs.go index 827ef124e..4f525e907 100644 --- a/api/jobs.go +++ b/api/jobs.go @@ -782,6 +782,7 @@ type JobListStub struct { ID string ParentID string Name string + Datacenters []string Type string Priority int Periodic bool diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index b735d6e37..22ae6d552 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -3419,6 +3419,7 @@ func (j *Job) Stub(summary *JobSummary) *JobListStub { ID: j.ID, ParentID: j.ParentID, Name: j.Name, + Datacenters: j.Datacenters, Type: j.Type, Priority: j.Priority, Periodic: j.IsPeriodic(), @@ -3561,6 +3562,7 @@ type JobListStub struct { ID string ParentID string Name string + Datacenters []string Type string Priority int Periodic bool