Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: agent ui proporsions #3692

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 4 additions & 10 deletions agent/ui/dashboard/pages/test_runs_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,12 @@ func NewTestRunPage(renderScheduler components.RenderScheduler, sensor sensors.S
})

p.Grid.
// We gonna use 4 lines (it could be 2, but there's a limitation in tview that only allow
// lines of height 30 or less. So I had to convert the previous line of height 90 to 3 lines of height 30)
SetRows(10, 20, 30, 30).
// 3 rows, two columns of size 30 and the middle column fills the rest of the screen.
// Check the docs here: https://pkg.go.dev/github.com/rivo/tview#Grid
SetRows(-2, -10, -1).
SetColumns(30, 0, 30).

// TestRunList starts at (1,0) and fills 2 rows and 3 columns
AddItem(p.testRunList, 1, 0, 2, 3, 0, 0, true).
// Header starts at (row,column) (0,0) and fills 1 row and 3 columns
AddItem(p.header, 0, 0, 1, 3, 0, 0, false).
// Command panel starts at last row and just uses one row.
AddItem(p.commandsPanel, 3, 0, 1, 3, 0, 0, false)
AddItem(p.testRunList, 1, 0, 1, 3, 0, 0, true).
AddItem(p.commandsPanel, 2, 0, 1, 3, 0, 0, false)

sensor.On(events.NewTestRun, func(e sensors.Event) {
var testRun models.TestRun
Expand Down