frontend: handle protocol names with dash

This commit is contained in:
Lan Tian
2025-07-01 17:45:12 -07:00
parent ffdeeac06e
commit d40dd3a4d3
2 changed files with 12 additions and 1 deletions

View File

@@ -76,7 +76,7 @@ func (r SummaryRowData) ProtocolMatches(protocols []string) bool {
}
// pre-compiled regexp and constant statemap for summary rendering
var splitSummaryLine = regexp.MustCompile(`(\w+)\s+(\w+)\s+([\w-]+)\s+(\w+)\s+([0-9\-\. :]+)(.*)`)
var splitSummaryLine = regexp.MustCompile(`^([\w-]+)\s+(\w+)\s+([\w-]+)\s+(\w+)\s+([0-9\-\. :]+)(.*)$`)
var summaryStateMap = map[string]string{
"up": "success",
"down": "secondary",