Commit Graph

23 Commits

Author SHA1 Message Date
Matthias Radestock
36ea7907e4 export less & comment more
to make the linter happy
2018-04-12 17:24:29 +01:00
Matthias Radestock
24672ed046 do not truncate tables
Limiting env vars, docker&k8s labels, and weave net connection entries
to 20 is problematic because

- the truncation is arbitrary - there is a good chance that if you
care about a specific entry it won't be there

- the truncation is not consistent - different entries get truncated
at different times

- some of the rendering logic depends on specific labels, for example
namespace filtering of containers depends on the
`io.kubernetes.pod.namespace` label.

In practice, there should never be a huge number of labels, or Weave
Net connection entries. So there is no need to truncate them.

That leaves env vars. These are of limited use, so we now omit them by
default. If they are included they are included in full, so they are
actually useful.

Fixes #3127
2018-04-12 17:13:58 +01:00
Matthias Radestock
38e389e519 optimisation of Copy()ing/Merge()ing some report data structures
We consistently

- pre-allocate in Copy()
- merge the smaller into a copy of the larger in Merge()

This doesn't make much of a difference overall, since there are
comparatively few instances of these structures. But it costs little
in the code, and the consistency alone is worth it.
2017-12-25 14:16:20 +00:00
Matthias Radestock
3de04685f8 optimisation: pre-allocate, and fewer slices during summarisation
Pre-allocating slices really pays dividends when we create loads of
them and they don't grow very large.

We take special care to return nil rather than 0-length slices. This
a) saves further on allocation, and b) is required for some crude
tests to pass that match on nil rather than length.

Also, a bunch of code in templates/tables used slices as Maybe's,
i.e. returning nil or a single-element slice, which is horrendously
inefficient. Eliminating these saves a lot of allocations.
2017-12-25 12:33:43 +00:00
Matthias Radestock
4dbb913ca2 refactor: remove dead Copy() code 2017-07-04 07:35:30 +01:00
Matthias Radestock
17b88b4110 eliminate excessive calls to mtime.Now()
This isn't going to noticeably improve performance, but enables future
optimisations, e.g. more compact representations of LatestMaps where
many/all entries share the same timestamp.
2017-04-28 23:54:24 +01:00
Matthias Radestock
911f456a18 make Node.WithTableTruncationInformation private
It is not used elsewhere and is rather specialised.
2017-04-28 23:43:35 +01:00
Filip Barl
d3466b5454 Refactored the table component/model and wrote the tests
Backward-compatibility fix
2017-01-16 17:05:36 +01:00
Filip Barl
e475a09ee6 Rendering sortable generic tables in the UI
Rendering generic table columns

Made Type a required attribute for TableTemplate

Made generic table sortable on the UI
2017-01-16 12:22:10 +01:00
Filip Barl
31be525bd2 Created generic table model on backend
Replaced MetadataRow with generic Row in Table model

Sending through multicolumn tables from the backend
2017-01-16 12:22:10 +01:00
Jonathan Lange
e8085b01b6 Use 'common' library 2016-12-07 11:22:38 +00:00
Alfonso Acosta
375ce6b33c Review feedback 2016-11-02 13:16:13 +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
9367d95cb0 Allow providing fixed entries in tables 2016-11-02 13:00:15 +00:00
Krzesimir Nowak
7f46b90e27 Make LatestMap "generic"
This commit makes the LatestMap type a sort of a base class, that
should not be used directly. This also adds a generator for LatestMap
"concrete" types with a specific data type in the LatestEntry.
2016-08-12 17:03:42 +02:00
Matthias Radestock
15cf1e16b2 micro optimisation: avoid some unnecessary copying 2016-07-29 18:56:06 +01:00
Matthias Radestock
17fe25d8c3 shallow-copy instead of (deep) Copy() in Merge()
Merge() must not modify self or other; shallow-copying is sufficient
to achieve that.
2016-07-29 10:00:01 +01:00
David Kaltschmidt
645f2ca9f4 Add hint that a section may be truncated 2016-05-11 13:05:19 +02:00
Alfonso Acosta
100f78d771 Provide truncation counts to the UI 2016-05-11 01:22:33 +00:00
Alfonso Acosta
7a8e61454f Limit tables to 20 rows 2016-05-10 14:46:24 +00:00
Paul Bellamy
4bd3832219 move counting sublabel definition to the topologies 2016-04-20 12:17:46 +01:00
Tom Wilkie
9eda27822c Show k8s labels and container env vars in the details panel. (#1342)
* Show k8s labels and container env vars in the details panel.

* Add show more bar to the env vars and labels

* React key was in the wrong place; empty tables render section labels.
2016-04-20 08:18:03 +01:00