Skip to content

Commit

Permalink
Make chart titles and lines bold
Browse files Browse the repository at this point in the history
  • Loading branch information
bakks committed Oct 28, 2022
1 parent 8f5731f commit 2c2dbc5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions charts.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ func newLoadChart(ctx context.Context, config *PoptopConfig) ([]container.Option
})

title := cell.NewRichTextString(ColorWidgetTitle).
AddOpt(cell.Bold()).
AddText(" CPU Load (").
SetFgColor(ColorHot1).
AddText("1min").
Expand Down Expand Up @@ -263,6 +264,7 @@ func newCpuChart(ctx context.Context, config *PoptopConfig) ([]container.Option,
})

title := cell.NewRichTextString(ColorWidgetTitle).
AddOpt(cell.Bold()).
AddText(" CPU (%) (").
SetFgColor(ColorHot3).
AddText("min").
Expand Down Expand Up @@ -342,6 +344,7 @@ func newNetChart(ctx context.Context, config *PoptopConfig) ([]container.Option,
})

title := cell.NewRichTextString(ColorWidgetTitle).
AddOpt(cell.Bold()).
AddText(" Network IO (KiB/s) (").
SetFgColor(ColorWrite).
AddText("send").
Expand Down Expand Up @@ -414,6 +417,7 @@ func newDiskIOPSChart(ctx context.Context, config *PoptopConfig) ([]container.Op
})

title := cell.NewRichTextString(ColorWidgetTitle).
AddOpt(cell.Bold()).
AddText(" Disk IOPS (").
SetFgColor(ColorRead).
AddText("read").
Expand Down Expand Up @@ -483,6 +487,7 @@ func newDiskIOChart(ctx context.Context, config *PoptopConfig) ([]container.Opti
})

title := cell.NewRichTextString(ColorWidgetTitle).
AddOpt(cell.Bold()).
AddText(" Disk IO (KiB/s) (").
SetFgColor(ColorRead).
AddText("read").
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ require (
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e // indirect
)

replace github.com/mum4k/termdash => github.com/bakks/termdash v0.17.0-forked
replace github.com/mum4k/termdash => github.com/bakks/termdash v0.17.0-forked-2
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ github.com/alecthomas/kong v0.6.1 h1:1kNhcFepkR+HmasQpbiKDLylIL8yh5B5y1zPp5bJimA
github.com/alecthomas/kong v0.6.1/go.mod h1:JfHWDzLmbh/puW6I3V7uWenoh56YNVONW+w8eKeUr9I=
github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48=
github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8=
github.com/bakks/termdash v0.17.0-forked h1:oj2qJu7zCdszcVROAgGhdclrHytQizNSY56trAn+BtM=
github.com/bakks/termdash v0.17.0-forked/go.mod h1:inGde56cgA4QXe1Sb3eQIJQnN5CLDsmDjzda7TnNaxg=
github.com/bakks/termdash v0.17.0-forked-2 h1:PTCKwCu3/h2uqvpUZ/pH/4JohUWDRTJzMMKFzFEFohs=
github.com/bakks/termdash v0.17.0-forked-2/go.mod h1:inGde56cgA4QXe1Sb3eQIJQnN5CLDsmDjzda7TnNaxg=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
2 changes: 2 additions & 0 deletions top.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ func newTopBoxes(ctx context.Context, config *PoptopConfig) ([]container.Option,
})

cpuTitle := cell.NewRichTextString(ColorWidgetTitle).
AddOpt(cell.Bold()).
AddText(" Top CPU Processes (%, pid, command) ")

memTitle := cell.NewRichTextString(ColorWidgetTitle).
AddOpt(cell.Bold()).
AddText(" Top Memory Processes (%, pid, command) ")

cpuOpts := makeContainer(cpuTextBox, cpuTitle)
Expand Down

0 comments on commit 2c2dbc5

Please sign in to comment.