diff --git a/agent/ui/dashboard/components/header.go b/agent/ui/dashboard/components/header.go index 240c06c3f0..85dadd3c3b 100644 --- a/agent/ui/dashboard/components/header.go +++ b/agent/ui/dashboard/components/header.go @@ -153,7 +153,7 @@ func (h *Header) setupSensors() { h.data.Metrics.Uptime = uptime h.onDataChange() }) - + h.sensor.On(events.EnvironmentStart, func(e sensors.Event) { var environment models.EnvironmentInformation e.Unmarshal(&environment) diff --git a/agent/ui/dashboard/components/test_run_list.go b/agent/ui/dashboard/components/test_run_list.go index 8c30f584af..35bf7c9e50 100644 --- a/agent/ui/dashboard/components/test_run_list.go +++ b/agent/ui/dashboard/components/test_run_list.go @@ -23,7 +23,6 @@ type TestRunList struct { *tview.Table testRuns []models.TestRun - sensor sensors.Sensor renderScheduler RenderScheduler } diff --git a/agent/ui/dashboard/main/main.go b/agent/ui/dashboard/main/main.go index ffcd82679b..aa72ce105d 100644 --- a/agent/ui/dashboard/main/main.go +++ b/agent/ui/dashboard/main/main.go @@ -15,6 +15,7 @@ func main() { EnvironmentID: "Empregada", AgentVersion: "0.15.5", }, sensors.NewSensor()) + if err != nil { fmt.Println(err.Error()) } diff --git a/agent/ui/dashboard/sensors/sensor.go b/agent/ui/dashboard/sensors/sensor.go index ccceafbf1d..3f46a31c1e 100644 --- a/agent/ui/dashboard/sensors/sensor.go +++ b/agent/ui/dashboard/sensors/sensor.go @@ -63,9 +63,9 @@ func (r *sensor) Emit(eventName string, event interface{}) { Name: eventName, data: event, } - + r.lastEvent[eventName] = e - + for _, listener := range listeners { listener(e) }