Skip to content

Commit

Permalink
Bug: fix SIGSEGV of envd top (#726)
Browse files Browse the repository at this point in the history
Bug: fix the debug commit

Signed-off-by: nullday <aseaday@hotmail.com>
  • Loading branch information
aseaday committed Aug 5, 2022
1 parent 8c83cad commit 8f19748
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/app/top.go
Expand Up @@ -86,7 +86,9 @@ func top(clicontext *cli.Context) error {
}

func initGrid(ctx context.Context, envs []types.EnvdEnvironment, collector metrics.Collector) []ui.Drawable {
rows := make([]*metrics.WidgetRow, 2)
// There will be a header
rowNumber := len(envs) + 1
rows := make([]*metrics.WidgetRow, rowNumber)
header := metrics.NewWidgetRow(0)
header.Add(metrics.NewNameCol("Name"))
header.Add(metrics.NewNameCol("ID"))
Expand Down

0 comments on commit 8f19748

Please sign in to comment.