mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 10:11:03 +00:00
Fix ip column width in connections table, avoid truncating long ips
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user