Skip to content

Commit

Permalink
Merge branch 'feat/agent-ui' into feat/agent-dashboard-start
Browse files Browse the repository at this point in the history
  • Loading branch information
mathnogueira authored Feb 13, 2024
2 parents 3d762a9 + 13f1a82 commit 6e347ff
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion agent/ui/dashboard/components/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion agent/ui/dashboard/components/test_run_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ type TestRunList struct {
*tview.Table

testRuns []models.TestRun

sensor sensors.Sensor
renderScheduler RenderScheduler
}
Expand Down
1 change: 1 addition & 0 deletions agent/ui/dashboard/main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ func main() {
EnvironmentID: "Empregada",
AgentVersion: "0.15.5",
}, sensors.NewSensor())

if err != nil {
fmt.Println(err.Error())
}
Expand Down
4 changes: 2 additions & 2 deletions agent/ui/dashboard/sensors/sensor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 6e347ff

Please sign in to comment.