4645 Commits

Author SHA1 Message Date
Roberto Bruggemann
889fbea83e Update Scope version in docs to 1.7.0 v1.7.0 2018-01-17 13:55:40 +00:00
Roberto Bruggemann
ae46d8c186 Add release 1.7.0 to CHANGELOG 2018-01-17 13:55:35 +00:00
Roberto Bruggemann
c00ab5e9e7 Set a timeout to Terminal animation
If the animation has no effect, `onTransitionEnd`'s handler is not be called.
Since `onTransitionEnd`'s handler controls whether the terminal is shown or not (by passing `connect=true` as a Terminal prop), set the `animated` variable to true after a timeout.

Please see:
* https://stackoverflow.com/questions/2087510/callback-on-css-transition/11354026#11354026
* https://github.com/scttnlsn/backbone.viewkit/issues/4
* https://forums.xamarin.com/discussion/58456/why-isnt-my-transitionlistener-getting-called
2018-01-15 14:28:03 +00:00
Roberto Bruggemann
f42e22098e Merge pull request #3014 from weaveworks/stop-fetching-replicasets
Stop fetching ReplicaSets and ReplicationControllers
2018-01-15 10:33:30 +00:00
Roberto Bruggemann
50b182bff5 Rename CaptureResource -> CaptureDeployment
The function now only takes Deployments into account.
2018-01-11 17:01:03 +00:00
Filip Barl
bad20b6137 Merge pull request #3019 from weaveworks/2018-01-10-bump-ui-components-version
Bump ui-components to v0.4.18
2018-01-10 12:36:49 +01:00
Matthias Radestock
601a6b4369 Merge pull request #3016 from weaveworks/extract-endpoint-render
refactor: extract common code in endpoint mapping
2018-01-10 11:10:43 +00:00
Filip Barl
6264b0b296 Bump ui-components to v0.4.18 2018-01-10 11:38:02 +01:00
Matthias Radestock
f2bdbbde22 tiny tidy-up / refactor 2018-01-10 10:37:29 +00:00
Roberto Bruggemann
5a2e214140 Merge pull request #3013 from weaveworks/multi-container-log
Reading pod logs returns all container logs
2018-01-09 11:33:32 +00:00
Roberto Bruggemann
37ca2833f6 Merge pull request #3017 from weaveworks/namespace-fix
'updateKubeFilters` returns early if there are no namespaces
2018-01-08 18:13:47 +00:00
Roberto Bruggemann
00639d9476 logReaderCloser: remove stopChannels
Replace them with sync.WaitGroup.
2018-01-08 18:11:44 +00:00
Roberto Bruggemann
d3c53bacd6 'updateKubeFilters` returns early if there are no namespaces
This change makes sure an empty `APITopologyOptionGroup` struct is not created for namespaces, if there are no namespaces to report.
2018-01-08 17:37:49 +00:00
Matthias Radestock
fd5fa7a962 refactor: extract common code in endpoint mapping
This isn't quite as neat as we'd want to make it, because two of the
three call sites still require a closure, but it's still an
improvement.

Note that every instance of MapEndpoints only ever maps to one
topology, which, furthermore, is a core report topology. Hence we can
just parameterise MapEndpoints with that topology, and then the map
functions can return just the node ids.
2018-01-07 08:20:06 +00:00
bianca cheng costanzo
53793717d5 Merge pull request #3011 from weaveworks/lightgray-standardisation
Simplifying backgrounds to match lightgray in service-ui and ui-compo…
2018-01-05 18:29:29 +01:00
Bianca Cheng Costanzo
715ff54263 Row alteration coloring 2018-01-05 17:46:45 +01:00
Roberto Bruggemann
b4e3f85e89 LogReadCloser interleaves 'by line' for each container
Also, prepend each line with '[ContainerName]'.
2018-01-05 14:40:52 +00:00
Roberto Bruggemann
cf6e0ffdc6 Stop fetching ReplicaSets and ReplicationControllers
They are not reported back to the scope app.
2018-01-04 10:54:26 +00:00
Roberto Bruggemann
e2e0496be4 Merge pull request #2985 from weaveworks/report-namespaces
Probe reports namespaces
2018-01-03 14:52:59 +00:00
Roberto Bruggemann
0b86c65e66 Reading pod logs returns all container logs
This is achieved by issuing an http request for each container to kubernetes' API, which yields one Reader for the corresponding container.
`logReadCloser' then reads from the above readers in parallel as data is available, buffering when necessary, forwarding it to clients by implementing the io.ReadCloser interface.
2018-01-03 14:13:17 +00:00
Roberto Bruggemann
1fb23dd8f9 Extract namespaces from report.Namespace
This avoids unnecessary loops.
2018-01-03 13:55:27 +00:00
Roberto Bruggemann
4233b75528 report.Upgrade: reconstruct namespaces
Old probes do not report namespace topologies.
`report.upgradeNamespaces()` recontructs namespace topologies using the data available from other kubernetes resources.

Also, add a test.
2018-01-03 13:55:27 +00:00
Roberto Bruggemann
2c60d50f10 Remove unused WalkNodes function 2018-01-03 13:55:27 +00:00
Roberto Bruggemann
ccfcc61042 The probe reports namespaces 2018-01-03 13:55:27 +00:00
Bianca Cheng Costanzo
fcaa622578 Shifting highlight colours darker for more contrast 2018-01-03 10:20:16 +01:00
Matthias Radestock
90cbd8defe Merge pull request #3012 from weaveworks/permit-zero-resync
permit setting `probe.kubernetes.interval` to 0
2018-01-03 09:00:32 +00:00
Matthias Radestock
5dad27cf7e permit setting probe.kubernetes.interval to 0
...which is useful if we want to disable periodic fetching of all
objects.

Previously the interval was also used to set the initial backoff of
the reconnect logic. A zero value there would result in _no_
backoff. So instead we now just use the default, which is 10s which
also happens to be the default probe.kubernetes.interval, so there is
no change in behaviour for the stock settings.
2018-01-03 00:38:17 +00:00
Bianca Cheng Costanzo
df7f2ef340 Simplifying backgrounds to match lightgray in service-ui and ui-components 2018-01-02 20:42:32 +01:00
Roberto Bruggemann
f9f0487fdc Fix erroneous comments 2018-01-02 18:02:08 +00:00
Matthias Radestock
5404d4c2af Merge pull request #3009 from weaveworks/991-show-unconnected-processes
show unconnected processes

Fixes #991.
2018-01-02 17:26:46 +00:00
Matthias Radestock
d1bb4aa45e refactor: remove APITopologyDesc.filter
It's always set to render.FilterUnconnectedPseudo, so we can simply
use that constant in the one function (RendererForTopology) that
looked at that value.
2018-01-02 10:33:57 +00:00
Matthias Radestock
dd41956d60 refactor: remove support for non-linkable connections
Connections have always been linkable, so this is dead code.
2018-01-02 10:20:01 +00:00
Matthias Radestock
9754bf2385 refactor: remove support for non-linkable nodes
since they are now always linkable.
2018-01-02 10:19:22 +00:00
Matthias Radestock
3582c221fe processes are now always linkable 2018-01-02 09:47:15 +00:00
Matthias Radestock
ec7c468758 make it possible for users to see unconnected processes
We prevented this because rendering them was expensive. It still is,
but less so and actually works well, especially in table mode.
2018-01-02 09:40:18 +00:00
Matthias Radestock
74c72945ef optimisation: no need to prune adjacencies in filterUnconnected
since, by definition, unconnected nodes do not appear in adjacencies
of other nodes
2018-01-02 06:41:19 +00:00
Matthias Radestock
915535e0a2 Merge pull request #3007 from weaveworks/less-derived-node-metadata
remove unnecessary metadata propagation
2017-12-29 15:10:48 +00:00
Matthias Radestock
c8ea7ba49e refactor: simplify joinResults.add*
After dropping extra metadata in the rest of this PR, our usage of
joinResults.add* only ever ends creating minimal nodes, from just an
id and topology. Hence joinResults.add* can be invoked with simply an
id and topology instead of a generic node creation function.
2017-12-29 14:40:18 +00:00
Matthias Radestock
a7b6bb09a1 refactor: lift closures and extract constants 2017-12-29 14:40:18 +00:00
Matthias Radestock
2d6badba79 cope with processes that have no HostNodeID metadata
Some process nodes may not have a HostNodeID metadata, e.g. when an
endpoint references a pid that we know nothing about. When mapping
processes to containers, we therefore shouldn't rely on
HostNodeID. Instead we can obtain the hostID from the process node ID.

This has been broken for a while, possibly forever.
2017-12-29 14:40:16 +00:00
Matthias Radestock
ff03d7d86e Merge pull request #3008 from weaveworks/propagate-single-metrics-renderer
refactor: make PropagateSingleMetrics a renderer
2017-12-29 14:18:09 +00:00
Matthias Radestock
ecf1cf43f6 Merge pull request #3005 from weaveworks/move-rendercontext
refactor: move RenderContext where it belongs
2017-12-29 14:16:59 +00:00
Matthias Radestock
4984da6f04 fly-by optimisation
save a few allocations
2017-12-28 20:04:01 +00:00
Matthias Radestock
30bef738c0 refactor: make PropagateSingleMetrics a renderer
instead of a Map, since it's not really a map as it just updates the
given node.

This is more efficient and also matches what we do in similar
situations elsewhere, e.g. in ContainerWithImageNameRenderer and
ProcessWithContainerNameRenderer.
2017-12-28 20:04:01 +00:00
Matthias Radestock
4c1d5640ae don't propagate IsConnectedMark in MapProcess2Container
...when creating Uncontained pseudo nodes. IsConnectedMark only
affects summarisation of genuine process nodes.
2017-12-28 12:56:52 +00:00
Matthias Radestock
5d06f90f10 don't propagate HostNodeID in MapProcess2Container
...when creating Uncontained pseudo nodes. Summarisation of
Uncontained/Umanaged only looks at the ID, which includes the
HostNodeID.

We adjust the promotion of Uncontained to Unmanaged, to operate on the
ID instead of (re)extracting the hostID from the HostNodeID
metadata. With that, nothing looks at the HostNodeID metadata of
Uncontained/Unmanaged nodes.
2017-12-28 12:54:21 +00:00
Matthias Radestock
7ce160d492 don't propagate ImageID in MapContainer2ContainerImage
The ImageID is already the id of the node we are creation, and that's
what summarisation renders in the event we fail to join this node with
a node from the ContainerImage topology that has more metadata.
Nothing is looking at the ImageID metadata field.
2017-12-28 12:50:11 +00:00
Matthias Radestock
9034296209 don't propagate ImageID in MapContainerImage2Name
This was building a set of all the image ids represented by the same
unversioned image. Well, it was doing that until I broke it with a
silly mistake in #1739 - instead of extracting the imageID from the
original node ID, it's extracting it from the updated ID, which is the
unversioned image. Even if it was working though, it's pointless
since nothing is looking at that info.
2017-12-28 12:50:11 +00:00
Matthias Radestock
a46b9c9c24 don't propagate ContainerHostname in MapContainer2Hostname
The container hostname is already the id of the node, and that's what
summarisation renders. Nothing looks at the docker.ContainerHostname
metadata of nodes in the ContainerHostname group topology.
2017-12-28 12:50:11 +00:00
Matthias Radestock
bbd6c5fe47 don't propagate HostNodeID in endpoints2Hosts
The HostNodeID is already the id of host nodes (as the name suggests),
and that's what summarisation renders. Nothing looks at the HostNodeID
metadata of host nodes.
2017-12-28 12:50:11 +00:00