Commit Graph

392 Commits

Author SHA1 Message Date
Filip Barl
d15e884cb1 Table-mode: sort ips numerically (#2007)
Fix #1746 - sort IPs numerically in the table mode
2016-11-22 11:05:59 +01:00
CarltonSemple
9833a854b1 Added container filters as CLI arguments
gofmt load_container_filters.go

removed the environment variable for container label filters

Added the --app.container-label-filter command line argument, and load_container_filters.go now uses the results from that

Changed init() to InitializeTopologies()

Changed init() to InitializeTopologies() so that it can be called after the container filters are loaded from the command line argument. init() executes before main() in prog/main.go, so the flag parsing isn't finished before init() is called

Applied lint fixes

fixed lint issues

brought back the init function for api_topologies.go

Addressed many of the PR comments, except escaping colons

Renamed IsDesired to HasLabel in render/filters.go

Allows for the user to escape colons

added registry function for modifying the container filters

created a separate function that parses the container filter flags

simplified registry.addContainerFilters()

addressed review comments

switched API Topology Description IDs to constants

addressed review comments

joined constants

added test functions

addressed most of the review comments

Changed containerLabelFilters to an array of APItopologyOptions, placing the parsing in the Set() function. Removed parsing from HasLabel in render/filters.go

refactored code

added test that applies to the container filtering by labels

applied golint

made Registry items private and added a MakeRegistry() function

fixed usage of topologyRegistry.RendererForTopology

Added container label filters by exclusion

minor update to report_fixture

Modified container labels test to use existing report

I added labels to the existing containers in the fixed report for testing.

refactored code

refactored code

further code refactoring

addressed @ijsnellf's review comments

unexported Registry, and reduced duplicate code

addressed @ijsnellf's review comments

Addressed review comments

Addressed final review comments
2016-11-15 19:13:35 +00:00
Alfonso Acosta
3af7076f30 Review feedback 2016-11-02 14:46:56 +00:00
Alfonso Acosta
d0e022050e Fix and extend tests 2016-11-02 13:16:12 +00:00
Alfonso Acosta
216cc0d605 Add image table to container nodes
Also, extend metadata of images with sizes
2016-11-02 13:16:11 +00:00
Alfonso Acosta
b458c4c0c8 Merge pull request #1182 from weaveworks/1132-weave-topology
Add the basics for a Weave-specific topology.
2016-10-28 12:23:55 +02:00
Alfonso Acosta
f906511ded Add initial metadata in details panel and clarification comments 2016-10-26 09:09:01 +00:00
Alfonso Acosta
3023f4be80 Add Weave summary generator and fix Weave renderer 2016-10-26 07:40:14 +00:00
Alfonso Acosta
e80a01aab9 Filter out docker overlay peers 2016-10-24 17:37:53 +00:00
Alfonso Acosta
8e4dfd7987 Add Weave peers view 2016-10-24 15:33:30 +00:00
Alfonso Acosta
529759b603 Discard short-lived connections to/from Pods in the host net 2016-10-21 14:42:44 +00:00
Alfonso Acosta
16ae11da77 Merge pull request #1922 from kinvolk/lorenzo/lint-untyped-keys
Fix linter errors on unkeyed fields
2016-10-20 11:32:59 +02:00
Simon
f6e81cf4d6 Merge pull request #1912 from weaveworks/1844-visually-duplicate-rows
Add label_minor to tooltips in connections table
2016-10-19 15:03:38 +02:00
Simon Howe
2ca23507de label_minor -> labelMinor, closer to all camelCase api 2016-10-19 10:50:11 +02:00
Lorenzo Manacorda
7ed139b15b fix linter errors on unkeyed fields 2016-10-14 12:53:48 +02:00
Simon Howe
bec4d281c3 Add label_minor to tooltips in connections table
Sometimes label is not enough to distinguish between rows.
2016-10-10 15:15:31 +02:00
Alfonso Acosta
5eabf5436c Make linter happy 2016-10-05 13:07:17 +00:00
Alfonso Acosta
3f27d5f6cc Do not filter out the target nodes when obtaining the details panel 2016-10-05 12:22:50 +00:00
Simon Howe
70681e4694 Fixes BE tests after exposing Truncate to the FE. 2016-09-28 12:18:12 +02:00
Matthias Radestock
5ce5d541d3 show forward DNS name for internet addresses
...if available.

Follow-up to #1863.
2016-09-22 21:01:44 +01:00
Simon Howe
685a895dd5 gofmt the go 2016-09-22 16:05:37 +02:00
Simon Howe
fe1ba9cc4d Tidying up connectionrow.dataType
- Rename DataType -> Datatype for consisitency
- Remove Datatype from connection.metadata
- Change UI to read dataType from connection.columns rather than from
  connection.metadata (col header rather than "cell")
2016-09-22 15:36:36 +02:00
Simon Howe
ac741a034e Fixes tests after numberifying columns 2016-09-21 16:38:01 +02:00
Simon Howe
7c4654d45c Fixes left alignment of numbers in the details panel tables
- By declaring more things to be numbers
- Also fixes initial sort direction of number columns from asc to desc.
2016-09-21 16:18:26 +02:00
Simon Howe
517110ba09 Keep "count" as tooltip for new mini "#" column header 2016-09-21 15:24:59 +02:00
Simon Howe
52362496b3 Rename connections."Count" => "#", flex remote column 2016-09-21 15:13:01 +02:00
Simon Howe
fc3fc72205 Fix ip column width in connections table, avoid truncating long ips 2016-09-21 10:01:42 +02:00
Alfonso Acosta
c64dfa6f55 Merge pull request #1863 from weaveworks/1082-nodes-for-known-services
Add pseudo-nodes for known services
2016-09-20 23:00:52 +02:00
Alfonso Acosta
c5ac315b38 Review feedback 2016-09-20 16:50:29 +00:00
Alfonso Acosta
193bfec50b Exclude ec2 since it's too generic 2016-09-19 14:45:22 +00:00
Alfonso Acosta
028ed32b6f Simplify service node matching 2016-09-19 14:38:59 +00:00
Alfonso Acosta
5c080ec062 Add pseudo-nodes for known services
AWS S3 and Dynamo to start with
2016-09-19 14:38:58 +00:00
Matthias Radestock
c455f048e2 comment on arbitrariness of displayed dns name 2016-09-19 15:31:26 +01:00
Matthias Radestock
bcf21b1966 show more details of a node's internet connections
in the details panel, instead of showing connections to/from the
internet as "TheInternet <port>", we now show "<dns-name>(<ip_addr>)
<port>" (or just "<ip_addr> <port>" if we don't have a dns name).

Fixes #1713.
2016-09-19 14:10:35 +01:00
Matthias Radestock
591e72e702 fix unit tests 2016-09-19 11:15:00 +01:00
Matthias Radestock
463681dcdd refactor: inline 2016-09-15 16:04:44 +01:00
Matthias Radestock
0e1aeec6ae key internet node connection counts differently
Instead of including the localEndpointID in the key, use the
address, so the port is excluded. That way we don't end up with multiple
rows for inbound connections from the same internet address.

We also augment the address with the DNS info here, which saves us from
having to look it up later on.

Fixes #1867
2016-09-15 15:23:12 +01:00
Matthias Radestock
e009548ace refactor: shrink connection count key
- remoteAddr was never being set
- localAddr is part of the localNodeID in all the cases it was set, so
  it effectively was part of the key twice
2016-09-15 11:45:16 +01:00
Matthias Radestock
94cd73c72b tiny simplifying refactor 2016-09-14 12:19:09 +01:00
Matthias Radestock
69735217ac pick a unique destination endpoint for each connection 2016-09-14 09:13:21 +01:00
Matthias Radestock
58b22f0710 in details panel, count connections only once
Fixes #1842
2016-09-14 09:12:51 +01:00
Matthias Radestock
bb4007e3cb refactor: extract a couple of map "constants" 2016-09-09 17:35:37 +01:00
Matthias Radestock
26cb5d53fc refactor: extract pluralization function
This preserves the existing behaviour of showing count=0 as a plural
rather than empty. However, I rather suspect we cannot actually
encounter that case in the current code.

In the "no count found" case we now *set* the base.LabelMinor to empty
instead of leaving it alone. This is ok since it is empty to begin with.
2016-09-09 17:35:33 +01:00
Matthias Radestock
7f7766425e refactor: dedup pod group summary functions 2016-09-09 17:33:14 +01:00
Matthias Radestock
5bc3a9d5ac correctly reverse-resolve source of inbound connections
There were two problems:
- the renderer was looking for reverse names on the destination
- the probe was not annotating source nodes with reverse-resolved names

Fixes #1847
2016-09-02 20:31:03 +01:00
Matthias Radestock
abd59fda2d lookup localNodeID in r.Endpoint.Nodes
and refactor the connection{} construction so we can add some
explanation of what is going on here.
2016-09-02 11:38:44 +01:00
Matthias Radestock
cf4eee11a7 fix internet connection counts
For counting we were using a table keyed on a struct containing Node
pointers. For connections between ordinary nodes this works just
fine. But for connections to/from the Internet node we want to track
individual address/port combinations, which involves an extra
lookup. Since our data structures generally contain values, not
pointers, this produces aliases. As a result n connections from/to a
node to/from a specific Internet IP+port would result in n rows in the
count table, each with a count of 1, instead of one row with a count of
n.

Things wouldn't be so bad if it was actually rendered like that -
annoying, but at least accurate - but...

Each row has an ID which is computed from the node IDs and ports. Not
Node references. The ID must be unique - the frontend will only
render *one* thing per ID. Since the row IDs of our n rows are all the
same, we see one row with a count of 1 instead of n rows with a count of
1.

Furthermore, since the frontend's table row limiting is counting rows,
not unique row IDs, a) fewer rows would be rendered than expected, and
b) the displayed count of the number of extra rows would be too high.

The fix is to replace the Node pointers in the key with Node IDs. This
does require an extra table lookup when we come to produce the rows, but
that is just a fairly cheap map lookup.

Fixes #1495.
2016-09-01 21:51:20 +01:00
Krzesimir Nowak
9e092f1a4a Switch to LatestMap-style node controls
This allows plugins to add controls to nodes that already have some
controls set by other plugin. Previously only the last plugin that
sets the controls in the node would have its controls visible. That
was because of NodeControls' Merge function that actually weren't
merging data from two inputs, but rather returning data that was newer
and discarding the older one.
2016-08-12 17:15:43 +02:00
Matthias Radestock
21c188d600 Merge pull request #1739 from weaveworks/1730-no-node-copy
Remove and optimize more Copy()s
2016-08-12 12:30:54 +01:00
Alfonso Acosta
cfb686b546 Merge pull request #1774 from weaveworks/1759-remove-k8s-id-col
Remove kubernetes_id column from the grid view.
2016-08-11 17:43:21 +01:00