fix: truncate label selector input to max length (#3300)

mine
Ümüt Özalp 2025-04-25 08:01:04 +02:00 committed by GitHub
parent e4e3816185
commit d3f646aafb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -562,6 +562,8 @@ func (t *Table) styleTitle() string {
if internal.IsLabelSelector(buff) {
sel, err := TrimLabelSelector(buff)
if err != nil {
buff = render.Truncate(buff, maxTruncate)
} else if sel != nil {
buff = render.Truncate(sel.String(), maxTruncate)
}
} else if l := t.GetModel().GetLabelSelector(); l != nil && !l.Empty() {