45 Commits

Author SHA1 Message Date
Roland Schilter
0d381a34d6 Link scope-ui graphs clickable to prometheus queries (#2664)
scope-app:
* Adds `-app.metrics-graph` cli flag for configuring the base url to
use for graph links; supports :orgID and :query placeholders
* Assigns query URLs to existing metrics and appends empty metrics if missing

scope-ui:
* Extends <CloudFeature /> with option alwaysShow
* Adds <CloudLink /> to simplify routing when in cloud vs not in cloud
* Links metric graphs in the ui's node details view for all k8s
toplogies and containers so far
* Tracks metric graph click in mixpanel `scope.node.metric.click`
* Uses percentages and MB for CPU/Memory urls
* Passes timetravel timestamp to cortex in deeplink
2017-08-15 18:56:23 +01:00
Matthias Radestock
0f4d17d868 don't show container count in host detail panel image list
The figure is inaccurate since it counts containers across all
hosts. Getting the count correct is non-trivial, so it's better to not
show the figure at all.

NB: the count still shows up on mouse-over of the link, but that is
defensible and not (very) confusing since the link represents the
image, not the image on a particular host, and it's the same count
that show up as the minor label in the container images view.

Fixes #2681.
2017-07-05 14:03:44 +01:00
Matthias Radestock
a0fb2e1d73 cosmetic(ish) 2017-07-05 12:49:23 +01:00
Mike Lang
ef2b6f6c55 Remove replica sets
Use a special kind of selector renderer to elide replica sets from pod nodes
and directly reference deployment parents instead.
Do the inverse (replace replica sets with pods) during the mapping from pod to deployment.

Note we can no longer use renderParents since we're using a non-standard Selector
2017-06-29 10:13:15 -07:00
Matthias Radestock
ae2a5edc18 make nodeSummaryGroupSpecs only include what's needed 2017-06-21 18:24:14 +01:00
Matthias Radestock
b6c886e0d1 cosmetic 2017-06-21 18:19:10 +01:00
Mike Lang
9f0f120bc5 Remove explicit listing of api topologies in render/detailed/node specs
Instead, we can infer them from the render topology and the primaryAPITopology map
2017-04-10 15:06:38 -07:00
Mike Lang
c16becc148 render/detailed: When summarising children, add fallback for unlisted topologies
Currently, if a topology does not have any specific info in nodeSummariesByID,
any children of the node that belong to that topology will be silently omitted.

This change adds a default behaviour for such topologies, with no special columns
but at least it is displayed at all.
Unlisted topologies are displayed after all listed ones, in arbitrary order.

Note that completely bogus or other special cases (eg. topology = Pseudo) still will not
be displayed as report.Topology() will fail.
2017-04-10 14:30:52 -07:00
Mike Lang
eb44e95922 render.detailed: Teach detailed node view how to display ECS topologies as children
Previously, they were omitted.
2017-01-20 18:07:54 -08:00
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
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
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
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
Simon Howe
d0b99969ea Grid-mode tuning!
- Change scrolling behaviour to lock headers in place
- Enable filtering (hitting enter in the search bar) in grid-mode
- Little more top-margin for k8s (can have 3 topos) + taller rows.
- Trying out rank-color + node.relatives in the grid-mode
- First pass at selecting rows.
  - Needs a bit more a fiddle, colors + click areas
- Store grid sort direction (asc/desc) in url state
- Simplify node selection to one method. (over-ride existing card)
  - Remove clicking on name directly (links) to overlay new cards for now.
- Playing w/ grid-mode-toggle icons and labels
- Improves rendering in ff, change of shortcut keys for grid-mode-toggle
- Playing w/ clearer selection colors for grid-mode
- Slight change to selection-ui
- Fixes showNodeInTopology button visibility on the details-panel
  - Was using an old heuristic. Table-mode allows you to open child cards
    before the parent.
- Make it clear what the default sort is in tables
  - E.g. always show a sorting caret
- Sort grid-mode columns, first meta then metrics
- dancing-nodes rememdy #1: pause updates onRowHover
- Splits relatives out into their own columns
- Take into account scrollbar width for grid-mode col header position
- Tooltips on table column headers
- grid-mode: fixes first column headers (proc/container/c-by-image)
- Disable pause-on-hover, too aggresive
- reduce label column width a bit (33pc -> 25pc) for big tables
- Filter grid-mode onSearchChange
  - Rather than previous behaviour of waiting for an <enter>
- Show label_minor on pseudo nodes, that might not have much other info
- grid-mode: further reduce width of id column.
- Fixes go tests, properly moves parents into node-summary
- Fixes sorting of string columns w/ missing fields.
  - E.g. uptime. Where -1e-10 > '3days' doesn't work.
2016-08-03 08:50:37 +02:00
Alfonso Acosta
5d857d05d6 Remove and optimize more Copy()s 2016-08-02 13:29:35 +00:00
Paul Bellamy
5d8b1c003e Add pod status to summary table (#1523)
Had to shorten the title of # Containers, as it was being truncated.
2016-05-19 10:59:58 +01:00
Paul Bellamy
d0633d0d80 Render replica set and deployment parents 2016-05-09 09:19:11 +01:00
Paul Bellamy
541699d193 Review Feedback 2016-05-09 09:19:11 +01:00
Tom Wilkie
55069609e1 Show Pod IP and # container in the children table in details panel. 2016-05-05 13:33:49 +01:00
Tom Wilkie
8b06f6c0d8 Add rank field to controls. 2016-04-21 18:05:48 +01:00
Paul Bellamy
6b0795a027 removing render/detailed/labels, as its not a good fit anymore 2016-04-12 17:22:35 +01:00
Paul Bellamy
7632e0b3c5 Adding support for plugins, with basic example of iowait, and ebpf
Squash of:
* Include plugins in the report
* show plugin list in the UI
* moving metric and metadata templates into the probe reports
* update js for prime -> priority
* added retry to plugin handshake
* added iowait plugin
* review feedback
* plugin documentation
2016-04-12 17:22:14 +01:00
Tom Wilkie
d237f52a90 Ensure connection rows have unique IDs. (#1245)
* Ensure connection rows have unique IDs.

This adds new types for connections tables.

* UI support for new connection table rows

* Parameterized node Id key for connections table

* also s/node_id/nodeId, and s/topology_id/topologyId in connections
* table

* Added comment about nodeIdKey

* Review feedback:
2016-04-11 14:40:50 +01:00
Paul Bellamy
fe6203fd3f Review Feedback
Squash of:
- including children in topologies_test.go
- report.Node.Prune should prune children also
- rewrote ShortLivedInternetConnections test to express its intent
- adding tests for detail Summary rendering
2016-03-29 14:13:20 +01:00
Paul Bellamy
2c6b6e6707 Refactoring rendering to remove RenderableNode
Squash of:
- use detailed.Summaries to render topology nodes
- ban merging nodes of different topologies (they should be mapped)
- need to prune parents when mapping node types
- render container images by id if they have no name
- remove separate render ids and prune parents in NewDerived*
- don't render metrics/metadata for groups of nodes
- fixing up tests
- removing pending unit tests (for mapping.go, for now)
- updating experimental dir for RenderableNode removal
2016-03-29 14:13:03 +01:00
Paul Bellamy
80dc714c1e rename LabelMajor to Label 2016-03-29 14:00:11 +01:00
Tom Wilkie
60f5a5e36f Treat pid as numeric and sort by #containers 2016-03-04 17:10:24 +00:00
Tom Wilkie
09de883bc6 Review feedback 2016-03-03 17:46:35 +00:00
Tom Wilkie
f154e7a483 Add connection tables to details panel 2016-03-03 16:17:55 +00:00
Alfonso Acosta
a559a23dba Distinguish between reporting probes and controlling probes 2016-02-26 01:46:18 +00:00
Alfonso Acosta
ddf5fff5c2 Inline encoding of previously embedded fields
To avoid impacting the client's code with implementation details.
2016-02-18 12:49:31 +00:00
Alfonso Acosta
6ac176a492 Remove github.com/2opremio/go-1/codec
* Bump github.com/ugorji/go/codec, to get fixes which make
  github.com/2opremio/go-1/codec unnecessary

* Remove github.com/2opremio/go-1/codec

* Remove type embeddings to avoid the problem explained at
  https://github.com/ugorji/go/issues/141#issuecomment-185450157
2016-02-18 12:47:06 +00:00
Paul Bellamy
89d7ebe977 show nice column labels when no children have metrics 2016-02-10 11:42:03 +00:00
Paul Bellamy
1b554baa91 Reorder the children tables in the details panel
The Container images was first on hosts, but is probably the least
useful, so this moves it to the bottom.

In general, it needs more thought put into the detail panel contents,
but this is a quick fix to re-prioritize the data.
2016-02-09 15:35:54 +00:00
Paul Bellamy
a403917875 Add "# Containers" column to container images as children
Side effect is that it also adds it to the container image details panel
2016-02-05 11:13:37 +00:00
Paul Bellamy
55ee62d343 add test for render/detailed/parents and fixed bug 2016-02-04 17:55:06 +00:00
Paul Bellamy
9876140bfe moving render/detailed/parents to it's own file 2016-02-04 14:46:13 +00:00
Tom Wilkie
6f9fdaa27e Rename applications -> processes in experimental and render/detailed. 2016-02-01 06:54:19 -08:00
Paul Bellamy
66790f4436 use immutability for the NodeSet 2016-01-27 11:10:51 +00:00
Tom Wilkie
6b56475766 Use ps.Map for Counters and Sets, remove Metadata in favour of Latest.
Also
- Add more complicated report.json for benchmark
- Break up report/topology.go
- Implement our own DeepEqual for ps.Map
2016-01-22 15:10:32 -08:00
Paul Bellamy
bf57aeb8d9 Rename the various metric keys so they don't accidentally overlap 2016-01-20 16:14:32 +00:00
Paul Bellamy
cb9d558665 Review feedback refactoring 2016-01-19 16:47:48 +01:00
Paul Bellamy
e30c9dc264 use constants for the topology names in Parents/metadata/metrics 2016-01-19 16:47:48 +01:00
Paul Bellamy
56122dd0cc Details panel backend redesign
Megasquish:
  [app] remove unused edge endpoint
  [WIP] refactoring node details api endpoint
  [WIP] plumbing the children through the rendering process
  adding IDList.Remove and StringSet.Remove
  [WIP] working on adding parents to detailed node renderings
  WIP UI components with mock backend data for new details
  grouping children by type
  UI components for node details health and info
  metric formatters for details panel
  Column headers and links for details table
  [WIP] started on rendering node metadata and metrics in the detail view
  DetailedNode.LabelMajor -> DetailedNode.Label
  rendering decent labels for parents of detailed nodes
  render metrics onto the top-level detailed node
  removing dead code
  Links to relatives
  metrics have a Format not Unit
  Show more/less actions for tables and relatives
  adjusted metric formatter
  TopologyTagger should tag k8s topology nodes
  make renderablenode ids more consistent, e.g. container:abcd1234
  working on rendering correct summaries for each node
  adding report.Node.Rank, so that merging is independent of order
  rendering children and parents correctly
  output child renderableNode ids, so we can link to them
  add group field to metrics, so they can be grouped
  Refactored details health items to prepare for grouping
  add metrics to processNodeSummaries
  hide summary section if there is no data for it
  fixing up tests
  moving detailed node rendering into a separate package
  Node ID/Topology are fields not metadata
    - This way I think we don't have to care about Metadata being non-commutative.
    - ID and topology are still non-commutative, as I'm not sure how to sanely
  merge them, but it's possible we don't care.
  host memory usage is a filesize, not a percent
  working on fixing some tests
  adding children to hosts detail panel
    - Had to redo how parents are calculated, so that children wouldn't interfere with it
    - have to have the host at the end because it is non-commutative
  only render links for linkable children (i.e. not unconnected processes)
  resolving TODOs
  fixing up lint errors
  make nil a valid value for render.Children so tests are cleaner
  working on backend tests
  make client handle missing metrics property
  Stop rendering container image nodes with process summaries/parents
  fix parent link to container images
  Calculate parents as a set on report.Node (except k8s)
  refactoring detailed.NodeSummary stuff
  removing RenderableNode.Summary*, we already track it on report.Node
  working on tests
  add Columns field to NodeSummaryGroup
  fixing up render/topologies_test
  fix children links to container images
  get children of hosts rendering right
  working on host renderer tests
  Change container report.Node.ID to a1b2c3;<container>
  The id should be globally unique, so we don't need the host id.
    This lets the kubernetes probe return a container node with the pod id,
    which will get merged into the real containers with other reports. The
    catch is that the kubernetes api doesn't tell us which hostname the
    container is running on, so we can't populate the old-style node ids.
  change terminology of system pods and services
  Fix kubernetes services with no selector
  Fixes handling of kubernetes service, which has no pods
  fix parent links for pods/services
  refactor detailed metadata to include sets and latest data
  fixing up host rendering tests
  fleshing out tests for node metadata and metrics
  don't render container pseudo-nodes as processes
  Update test for id format change.
2016-01-19 16:39:37 +01:00