Fix ip column width in connections table, avoid truncating long ips

This commit is contained in:
Simon Howe
2016-09-19 15:08:51 +02:00
parent c64dfa6f55
commit fc3fc72205
2 changed files with 11 additions and 8 deletions

View File

@@ -11,11 +11,13 @@ import (
)
const (
portKey = "port"
portLabel = "Port"
countKey = "count"
countLabel = "Count"
number = "number"
portKey = "port"
portLabel = "Port"
countKey = "count"
countLabel = "Count"
remoteKey = "remote"
remoteLabel = "Remote"
number = "number"
)
// Exported for testing
@@ -25,7 +27,7 @@ var (
{ID: countKey, Label: countLabel, DefaultSort: true},
}
InternetColumns = []Column{
{ID: "foo", Label: "Remote"},
{ID: remoteKey, Label: remoteLabel},
{ID: portKey, Label: portLabel},
{ID: countKey, Label: countLabel, DefaultSort: true},
}
@@ -140,7 +142,7 @@ func (c *connectionCounters) rows(r report.Report, ns report.Nodes, includeLocal
if includeLocal {
connection.Metadata = append(connection.Metadata,
report.MetadataRow{
ID: "foo",
ID: remoteKey,
Value: row.localAddr,
Datatype: number,
})