Skip to content

Commit

Permalink
Fix layout of progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
nakabonne committed Oct 1, 2020
1 parent cf71cc6 commit 3f96a4d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gui/gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,20 @@ func run(t *termbox.Terminal, r runner, targetURL string, opts *attacker.Options
}

func gridLayout(w *widgets) ([]container.Option, error) {
raw1 := grid.RowHeightPerc(65, grid.Widget(w.latencyChart, container.Border(linestyle.Light), container.BorderTitle("Latency (ms)")))
raw2 := grid.RowHeightPerc(30,
grid.ColWidthPerc(10, grid.Widget(w.paramsText, container.Border(linestyle.Light), container.BorderTitle("Parameters"))),
raw1 := grid.RowHeightPerc(70, grid.Widget(w.latencyChart, container.Border(linestyle.Light), container.BorderTitle("Latency (ms)")))
raw2 := grid.RowHeightPerc(25,
grid.ColWidthPerc(15, grid.Widget(w.paramsText, container.Border(linestyle.Light), container.BorderTitle("Parameters"))),
grid.ColWidthPerc(15, grid.Widget(w.latenciesText, container.Border(linestyle.Light), container.BorderTitle("Latencies"))),
grid.ColWidthPerc(15, grid.Widget(w.bytesText, container.Border(linestyle.Light), container.BorderTitle("Bytes"))),
grid.ColWidthPerc(15,
grid.RowHeightPerc(50, grid.Widget(w.statusCodesText, container.Border(linestyle.Light), container.BorderTitle("Status Codes"))),
grid.RowHeightPerc(50, grid.Widget(w.errorsText, container.Border(linestyle.Light), container.BorderTitle("Errors"))),
),
grid.ColWidthPerc(45, grid.Widget(w.othersText, container.Border(linestyle.Light), container.BorderTitle("Others"))),
grid.ColWidthPerc(40, grid.Widget(w.othersText, container.Border(linestyle.Light), container.BorderTitle("Others"))),
)
raw3 := grid.RowHeightPerc(4,
grid.ColWidthPerc(50, grid.Widget(w.progressGauge, container.Border(linestyle.Light), container.BorderTitle("Progress"))),
grid.ColWidthPerc(50, grid.Widget(w.navi, container.Border(linestyle.Light))),
grid.ColWidthPerc(60, grid.Widget(w.progressGauge, container.Border(linestyle.Light), container.BorderTitle("Progress"))),
grid.ColWidthPerc(40, grid.Widget(w.navi, container.Border(linestyle.Light))),
)

builder := grid.New()
Expand Down

0 comments on commit 3f96a4d

Please sign in to comment.