mirror of
https://github.com/kubevela/kubevela.git
synced 2026-02-14 10:00:06 +00:00
Fix: top command abnormal render (#6174)
* Fix: top command abnormal render Signed-off-by: iyear <ljyngup@gmail.com> * Fix: imports Signed-off-by: iyear <ljyngup@gmail.com> * Fix: gomod Signed-off-by: iyear <ljyngup@gmail.com> --------- Signed-off-by: iyear <ljyngup@gmail.com>
This commit is contained in:
2
go.mod
2
go.mod
@@ -40,6 +40,7 @@ require (
|
|||||||
github.com/kubevela/workflow v0.5.1-0.20230412142834-be9e5a10baf0
|
github.com/kubevela/workflow v0.5.1-0.20230412142834-be9e5a10baf0
|
||||||
github.com/kyokomi/emoji v2.2.4+incompatible
|
github.com/kyokomi/emoji v2.2.4+incompatible
|
||||||
github.com/magiconair/properties v1.8.7
|
github.com/magiconair/properties v1.8.7
|
||||||
|
github.com/mattn/go-runewidth v0.0.14
|
||||||
github.com/mitchellh/hashstructure/v2 v2.0.2
|
github.com/mitchellh/hashstructure/v2 v2.0.2
|
||||||
github.com/nacos-group/nacos-sdk-go/v2 v2.2.2
|
github.com/nacos-group/nacos-sdk-go/v2 v2.2.2
|
||||||
github.com/oam-dev/cluster-gateway v1.9.0-alpha.2
|
github.com/oam-dev/cluster-gateway v1.9.0-alpha.2
|
||||||
@@ -207,7 +208,6 @@ require (
|
|||||||
github.com/mailru/easyjson v0.7.7 // indirect
|
github.com/mailru/easyjson v0.7.7 // indirect
|
||||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.17 // indirect
|
github.com/mattn/go-isatty v0.0.17 // indirect
|
||||||
github.com/mattn/go-runewidth v0.0.14 // indirect
|
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
||||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
|
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
|
||||||
github.com/mitchellh/copystructure v1.2.0 // indirect
|
github.com/mitchellh/copystructure v1.2.0 // indirect
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/go-logr/logr"
|
"github.com/go-logr/logr"
|
||||||
|
"github.com/mattn/go-runewidth"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"k8s.io/klog/v2"
|
"k8s.io/klog/v2"
|
||||||
"sigs.k8s.io/controller-runtime/pkg/log"
|
"sigs.k8s.io/controller-runtime/pkg/log"
|
||||||
@@ -46,6 +47,8 @@ func NewTopCommand(c common.Args, order string, ioStreams cmdutil.IOStreams) *co
|
|||||||
vela top -A
|
vela top -A
|
||||||
`,
|
`,
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
|
runewidth.DefaultCondition.EastAsianWidth = false // https://github.com/rivo/tview/issues/118
|
||||||
|
|
||||||
namespace, err := GetFlagNamespaceOrEnv(cmd, c)
|
namespace, err := GetFlagNamespaceOrEnv(cmd, c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user