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

@@ -20,13 +20,14 @@ const CW = {
const COLUMN_WIDTHS = {
count: '70px',
count: '60px',
docker_container_created: CW.XL,
docker_container_restart_count: CW.M,
docker_container_state_human: CW.XXL,
docker_container_uptime: '85px',
docker_cpu_total_usage: CW.M,
docker_memory_usage: CW.M,
remote: CW.L,
open_files_count: CW.M,
pid: CW.M,
port: CW.S,

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,
})