Commit Graph

56 Commits

Author SHA1 Message Date
Carol A. Scott 982d629552
Removing TLS columns from tables in dashboard (#2611)
This PR closes #2608. It removes the TLS columns from the dashboard tables and updates the associated tests.
2019-04-02 16:54:39 -07:00
Risha Mars 80b6e41d5d
Modify StatSummary to also return TCP stats (#2262)
Adds a flag, tcp_stats to the StatSummary request, which queries prometheus for TCP stats.
This branch returns TCP stats at /api/tps-reports when this flag is true.

TCP stats are now displayed on the Resource Detail pages.

The current queried TCP stats are:
tcp_open_connections
tcp_read_bytes_total
tcp_write_bytes_total
2019-02-25 10:37:39 -08:00
Risha Mars a609dd5894
Reduce webpack bundle size: import lodash by module (#2028)
Imports lodash function individually, eliminate 'import _ from lodash'

This branch replaces imports of all of lodash (import _ from 'lodash' with per
function imports e..g import _isNil from 'lodash/isNil'. This reduces the bundle
size from~520 kb to ~160kb.

I've also taken the opportunity to replace our use of lodash functions with
native js functions where it makes sense (e.g. some maps, concats, sizes).
2019-01-03 13:50:46 -05:00
Risha Mars 5280ecbf40
Use jest instead of karma for running tests (#1768)
Jest is faster, has more flexibility to run a subset of the tests, and will allow 
us to remove a bunch of our assertion libraries.

Many thanks to @grampelberg for prior work on this (#1000)

This PR:
- changes the test runner from karma to jest
- moves individual tests from /test/ to/js/components` where jest expects them
2018-10-15 17:06:35 -07:00
Kevin Lingerfelt 12b10e27c1
Update version checks to support release channels (#1667)
* Update version checks to support release channels
* Update based on review feedback
* Fix sidebar tests
* Update CI config for edge and stable tags

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-09-17 17:13:50 -07:00
Andrew Seigner b708378d07
Add version check to Grafana dashboard (#1638)
* Add version check to Grafana dashboard

The web dashboard checks the local Linkerd version against the latest
release, and informs the user if an update is available. Grafana was not
doing this.

Modify the Grafana dashboard to perform a version check, and prompt the
user to update if needed.

Fixes #1607

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-09-13 15:28:44 -07:00
Risha Mars b49ccce5f0
Add small success rate chart to table, misc web tweaks (#1628)
A bunch of web UI tweaks: 
- Add a small success rate chart to the metrics tables
- Improve latency formatting for seconds latencies
- Rename upstream/downstream to inbound/outbound
- Make Top table look consistent with rest of tables on page
- Fix widths of metrics column columns so that tables align
2018-09-12 13:47:46 -07:00
Dennis Adjei-Baah b1181e552d
Add breadcrumb navigation at the top of linkerd dashboard (#1613)
This PR adds a breadcrumb style navigation to the Linkerd dashboard. Each "crumb" links to its corresponding page in the UI.

This PR also includes a small UI fix in the sidebar. The select box always seems to revert to the All Namespaces option whenever there is a state change on the React side. The fix ensures that the select box always displays the namespace filter if it is available and revert to All Namespaces when no namespace is selected.

fixes #1464
fixes #1543
fixes #1627

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-09-12 09:22:01 -07:00
Risha Mars 77ddd142c3
Perform linkerd version check once upon page load (#1540)
Previously, we included a version check in the server polling loop, which meant
we were hitting the version check endpoint once very 10 seconds from the
sidebar. This PR moves that check out of the loop so that we only hit it once,
upon pageload.

This PR also includes

- some whitespace fixes 
- a fix for a console error we were triggering with our tests
2018-08-28 14:36:11 -07:00
Dennis Adjei-Baah 097632a2f0
Add kubernetes style sidebar (#1500)
Linkerd CLI's "look and feel" is similar to Kubernetes kubectl CLI. Linkerd's dashboard can be extended to match Kubernetes dashboard UI.

This PR serves as a starting point for this work. The new sidebar shows all resources from all namespaces on initial page load. Resources can be filtered to show only items in a given namespace. The sidebar displays authority, deployment, service and, pod resources. We may need to think about whether it is necessary to show all resources types. Some resources, i.e. authorities, contain a large cardinality of resource details and may not be very useful to a user.

fixes #1449

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-08-27 12:59:37 -07:00
Risha Mars cc98b5e784
Add the basis for an octopus graph to resource detail page (#1494)
Add a basic top graph depicting the current resource's stats 
and it's upstreams and downstreams. 

Also add upstreams and downstreams tables for this resource

This will be styled more later, but just getting the basic components 
and data onto the page.
2018-08-21 15:01:34 -07:00
Risha Mars d1ab629953
Add grafana icon to links, refactor svgs, link to ResourceDetail component (#1482)
This PR started out as a PR to link to our Resource Detail dashboard in 
addition to grafana in the resource list pages, but I decided to refactor 
the way we deal with our svgs since I was here.

This branch:
- modifies the GrafanaLink component to consist of the grafana icon 
that links to grafana adds links to the ResourceDetail page in all our metrics tables
- adds a jsx component we can use to wrap svgs so that we don't get 
annoying 404s on images that we have to handle
- remove the relative paths hack for images
- removes unused svg files in /img
2018-08-17 15:12:33 -07:00
Dennis Adjei-Baah a3bd861667
Add a meshed column to metrics tables in the web UI (#1466)
Currently conduit stat outputs a column that shows the number of meshed pods in the resource being
queried. The web UI does not have this information about meshed pod state.

This commit adds a meshed column for better UI parity with the stat command.

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-08-16 11:14:01 -07:00
Risha Mars 38c4b2937a
Tap web UI: Fix latency formatting (#1429)
* Nicely format tap latencies to be more readable
* Various whitespace cleanups
2018-08-09 15:23:34 -07:00
Adam Christian f510d7ea08
Changing the statusText to be an object with more fields, then displa… (#1395)
* Changing the statusText to be an object with more fields, then displaying them in the ErrorBanner

Signed-off-by: Adam Christian <adam@buoyant.io>

Refactoring karma tests and propTypes and defaultProps per the code review from @rmars

Signed-off-by: Adam Christian <adam@buoyant.io>

Changing the default message to pass the ServiceMeshTest ErrorBanner assertion

Revert "Changing the default message to pass the ServiceMeshTest ErrorBanner assertion"

This reverts commit 2415b7099b03ad7a8deda9f67218bb531111b3ec.

Fixing the failing karma unit tests because the statusMessage wasn't being properly passed into the component rendering stub context

Signed-off-by: Adam Christian <adam@buoyant.io>

merging master in

Signed-off-by: Adam Christian <adam@buoyant.io>

* Export api error type independently from ApiHelpers

Signed-off-by: Adam Christian <adam@buoyant.io>
2018-08-08 15:45:08 -07:00
Kevin Lingerfelt 4b9700933a
Update prometheus labels to match k8s resource names (#1355)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-23 15:45:05 -07:00
Franziska von der Goltz 829371bc06
add application topology graph to namespace tab (#1110)
* This commit adds an application topology graph within the namespace tab. As a developer / operator one would like to see an overview of the services running to identify dependencies. Adding this graph gives Linkerd2 users a good overview of service dependencies.
* networkgraphtest added

Fixes: #924

Signed-off-by: Franziska von der Goltz <franziska@vdgoltz.eu>
2018-07-18 17:10:15 -07:00
Franziska von der Goltz c7ac072acc
update grafana dashboards: conduit to linkerd (#1320)
* update grafana dashboards to remove conduit reference and replace with linkerd instances
* update test install fixtures to reflect changes

Fixes: #1315

Signed-off-by: Franziska von der Goltz <franziska@vdgoltz.eu>
2018-07-16 13:05:01 -07:00
Kevin Lingerfelt e5cce1abaf
Rename CLI from conduit to linkerd (#1312)
* Rename CLI binary
* Update integration tests for new binary name
* Rename --conduit-namespace flag, change default ns
* Rename occurrences of conduit in rest of CLI
* Rename inject and install components
* Remove conduit occurrences in docker files
* Additional miscellaneous cleanup
* Move protobuf definitions to linkerd2 package
* Rename conduit.io labels to use linkerd.io
* Rename conduit-managed segment to linkerd-managed
* Fix conduit references in web project

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-12 17:14:07 -07:00
Risha Mars cf0ee70689
Continue to remove conduit branding from /web (#1290)
This PR adjusts the colour of a popup in the sidebar, as well as removes 
references to conduit in the frontend test fixtures.

All that's left in the Web UI code now is a few references to the conduit sites / githubs, 
as well as the CLI name.

* Remove a touch of conduit blue from the sidebar popup
* Remove minor references to conduit throughout the web code
* Fully colour the sidebar in new bg colour
2018-07-10 17:57:27 -07:00
Risha Mars 372e145fea
Start removing references to conduit in the web UI (#1260)
This PR starts removing all references to the word "Conduit" in the web UI.
In the interest of not making huge changes all at once, I'll gradually start moving away
from the usage of "conduit" in the Web UI. For example, there are a lot of components that
have conduit in their names but they don't need to.

This branch is mostly component / variable names. There should be no visible changes except 
the spinner is no longer a Conduit spinner.

See #1262 for visible branding changes.

- Rename ConduitLink to PrefixedLink
- Remove ConduitSpinner in favour of antd.Spin
- Remove css classnames that are conduit- centered
- Parameterize the current Product Name so that it's easier to change in the future

Tracking ticket: linkerd/linkerd#2018
2018-07-05 15:07:51 -07:00
Risha Mars 0ff1bb4ad8
Don't allow stat requests for named resources in --all-namespaces (#1163)
Don't allow the CLI or Web UI to request named resources if --all-namespaces is used.

This follows kubectl, which also does not allow requesting named resources
over all namespaces.

This PR also updates the Web API's behaviour to be in line with the CLI's. 
Both will now default to the default namespace if no namespace is specified.
2018-06-20 12:59:31 -07:00
Risha Mars 0ed40288e5
Display proxy container errors in the Web UI (#1130)
* Display proxy container errors in the Web UI

Add an error modal to display pod errors
Add icon to data tables to indicate errors are present
Display errors on the Service Mesh Overview Page and all the resource pages
2018-06-15 14:12:36 -07:00
Thomas Rampelberg c3dc20d64f
Move from /api/stat to /api/tps-reports (#1105)
Common blacklists have `/api/stat` in them. This causes the dashboard to not load.

`/api/tps-reports` is not in any blacklists, suggests what this route does and is slightly tongue in cheek. Fixes #970
2018-06-11 16:39:00 -07:00
Kevin Lingerfelt ec2433e9bd
Update controller to use 'tls' metric label (#1044)
* Update controller to use 'tls' metric label
* Fix meshed column formatter

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-06-01 16:44:33 -07:00
Kevin Lingerfelt f344421dbd
Web: remove ns column from tables on individual ns page (#1043)
* Web: remove ns column from tables on individual ns page
* Add prop types and tests for MetricsTable component

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-05-31 14:07:33 -07:00
Thomas Rampelberg 1bcd428680
Add propType validation (#993)
* Add propType validation

When refactoring components, it is hard to know what is required and isn't.

Adds propTypes to the existing components and enables eslint errors for anything
moving forward. This should keep us documenting the API for components.

* Remove extra newline
2018-05-30 17:26:05 -07:00
Kevin Lingerfelt 423a073930
Update eslint config to extend more default rules (#1035)
* Update eslint config to extend more default rules
* react/no-unused-state rule doesn't recognize _.pick(this.state, ...)

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-05-29 18:23:13 -07:00
Thomas Rampelberg 3f6514431c
Add a HOC for the REST API tooling (#989)
* Add a HOC for the REST API tooling

We're copying and duplicating logic all over the place with components that need to talk to the API.

Moves most of the REST API tooling into a HOC that can be used by other components. Now, a component can use `withREST`, pass in the promises that it would like resolved and receive the responses as props.

* Show PageHeader whether there's an error or not

* Hiding page header during loading

* Test updates to work with namespace restructuring
2018-05-29 09:56:49 -07:00
Risha Mars d095ea7834
Show kube-* stats in the web UI, tweaks to no resources appearance (#1007)
Previously, we would filter out stats coming from Conduit itself and from the kube-* 
namespaces on some views in the Web UI. Remove this filtering, so that we display 
all the resource information we get back from the Stat API. (Fixes #997)

On the Resource pages, the call to action would show up when there were no 
metrics present, but that's actually not actionable by the user. Instead, I'm 
going to show a blank table with a "no s detected" message.

* Remove special-case filtering out of kube-* namespaces, and conduit namespaces
* Remove the call to action for no metrics
* Linkify the namespace column for the resource pages
2018-05-25 10:44:23 -07:00
Thomas Rampelberg 15d3c1fbc4
Add an app-wide context for global props. (#949)
* Add an app-wide context for global props.

We've been passing the `api` object down from the top of the react tree. With
16.x, there's now the ability to have context that can inject anywhere in the
tree. This creates a top level context provider that contains most of the global
variables we've been using (api, appData, ...). It subsequently cleans up some
of the routes and nested components.

- Bumps `react-dom` to 16.3.2 (to match `react`).
- Adds `enzyme-context-patch` for now. This is fixed in enzyme master, but there
  has not been a release yet. Needs to be removed when that is fixed.

* Use a default inside appData for controllerNamespace

* Update syntax of if to use curly brackets
2018-05-24 11:09:02 -07:00
Risha Mars ffabdefc6c
Add queries to prometheus to determine number of fully meshed requests (#983)
- Update the `response_total` prometheus query of the StatSummary endpoint to also
break queries out by a `meshed` label. 
- Add a 'Secured' column to the web UI/CLI stat displays, which indicate the percentage of traffic
starting and ending in the mesh

This meshed label is used in the CLI/Web UI to display a column of the percentage of traffic that
starts/ends in the mesh. (Which is a proxy indicator for whether that traffic is 'secured' when we
add TLS by default for intra mesh requests).

The `meshed` label is not yet added anywhere, so until it is supplied by the proxy, all traffic will
show up as 0% secured in the web/CLI.
2018-05-24 11:05:09 -07:00
Risha Mars b078a27a82
Consolidate calls to /metrics to use the new resource type all (#963)
This PR modifies the Namespace page in the web UI to replace the 3 existing api calls 
with a single call.

* Consolidate calls to /metrics to use the new resource type all
* Simplify urlsForResource, add comment with assumptions
2018-05-21 10:38:49 -07:00
Risha Mars 1b0f269a43
Add per namespace pages that show all resource stats for a namespace (#893)
Add namespaces as a top level resource in the Web UI

This PR does the following:
- Replace the deployments table in the service mesh page with namespaces
- Add a Namespaces index page that lists all namespaces and their stats
- Add an individual namespace page showing all resources for that namespace
- Make the incomplete mesh message more generic to any resource type
- Revamp rest of service mesh page to move off ListPods
2018-05-08 14:05:16 -07:00
Risha Mars 0f7d98067d
Make the sidebar icon based and collapsed by default (#897)
Make the sidebar icon based and collapsed by default

I had to move the call to version check into the sidebar component, indicator 
when the sidebar was minimized if there was a conduit update.

Currently I just have letters representing the icons for Deployments, RCs and Pods, 
but we can change this in the future.
2018-05-08 12:30:05 -07:00
Risha Mars f94856e489
Modify the Stat endpoint to also return the number of failed conduit pods (#895)
* Modify the Stat endpoint to also return the count of failed pods
* Add comments explaining pod count stats
* Rename total pod count to running pod count

This is to support the service mesh overview page, as I'd like to include an indicator of
failed pods there.
2018-05-08 10:35:21 -07:00
Risha Mars 4661aaf30d
Add a namespace column to the metrics tables (#854)
* Add a namespace column to the metrics tables, support long resource names

* Add a test for GrafanaLink

* Change the PodList.jsx component to not use the ListPods api
2018-04-26 16:34:59 -07:00
Risha Mars fbacdd8a05
Add a Replication Controllers page in the Web UI (#850)
* Add a Replication Controllers page in the Web UI


@siggy pointed out that we don't need to use the PodsList api any more, since the new stats endpoint (#671) includes meshedPodCount and totalPodCount, which is all we need to determine whether the deployment/rc has been added to the mesh (which is what we were using ListPods to determine).

This PR modifies deployments to not use the pods api any more, and adds a Replication Controllers page. This page is quite similar to the Deployments page in logic, so I've made a PodOwnersList component to share the code.

I haven't added Replication Controllers to the Service Mesh page yet, because that page does require a list of component pods. Also, we don't need the calls to Prometheus for the Service Mesh page, so I don't want to use the existing stat apis for it. I figure that is a large enough change for a separate PR.
2018-04-25 15:01:06 -07:00
Kevin Lingerfelt 71a51afb40
Expose pod stats in CLI, web UI, and Grafana (#788)
* Expose pod stats in CLI, web UI, and Grafana
* Fix js api helpers test
* Add outbound traffic stats to pod dashboard

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-04-18 11:26:47 -07:00
Andrew Seigner 727521f914
Permit arbitrary time windows in public-api (#774)
The public-api previously only permitted 4 hard-coded time windows:
10s, 1m, 10m, 1h. This was primarily a relic of the recently removed
telemetry system.

Modify the public-api to validate the time string, but allow for any
window size, which is then passed through to Prometheus.

Fixes #686

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-04-16 17:37:17 -07:00
Kevin Lingerfelt fb15fe7c1a
Remove the telemetry service (#757)
* Remove the telemetry service

The telemetry service is no longer needed, now that prometheus scrapes
metrics directly from proxies, and the public-api talks directly to
prometheus. In this branch I'm removing the service itself as well as
all of the telemetry protobuf, and updating the conduit install command
to no longer install the service. I'm also removing the old version of
the stat command, which required the telemetry service, and renaming the
statsummary command to stat.

* Fix time window tests

* Remove deprecated controller scrape config

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-04-13 11:21:29 -07:00
Kevin Lingerfelt 37434d048a
Update web component to use new stat api (#753)
* Update web component to use new stat api
* Address review feedback
* Add external link icon

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-04-12 17:35:03 -07:00
Andrew Seigner 836168884e
Link to Grafana from Conduit Dashboard (#678)
* Link to Grafana from Conduit Dashboard

Previously the only way to access the Grafana dashboards was via direct
link, provided by the `conduit dashboard` command.

Add Grafana links throughout the Conduit Dashboard, next to all
Deployment objects. This change also modifies the behavior of the
ConduitLink helper, to enable linking to other deployments proxied by
the `conduit dashboard` command.

Part of #420

Signed-off-by: Andrew Seigner <siggy@buoyant.io>

* review feedback

Signed-off-by: Andrew Seigner <siggy@buoyant.io>

* review feedback, fix console, remove absolute

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-04-06 10:56:42 -07:00
Risha Mars ae0d47d5c9
Add ability to cancel promises via a wrapper (#374)
* Add ability to cancel promises via a wrapper

* Let the ApiHelpers keep track of outstanding requests, provide ApiHelpers.cancel()
2018-02-19 17:28:40 -08:00
Risha Mars 53354cf68f
Small UI tweaks for 0.3 prep (#377)
* Display more decimal points for truncated numbers, add hover info

* Filter completed pods out of web UI

* Decrease the polling interval from 10s to 2s

* Add more detailed pod categorization based on status

* Tweak filtering of pods, tweak explanations in status table
2018-02-19 14:11:03 -08:00
Risha Mars 8bc7c5acde
UI tweaks: sidebar collapse, latency formatting, table row spacing (#361)
- reduce row spacing on tables to make them more compact
- Rename TabbedMetricsTable to MetricsTable since it's not tabbed any more
- Format latencies greater than 1000ms as seconds
- Make sidebar collapsible 
- poll the /pods endpoint from the sidebar in order to refresh the list of deployments in the autocomplete
- display the conduit namespace in the service mesh details table
- Use floats rather than Col for more responsive layout (fixes #224)
2018-02-19 11:21:54 -08:00
Risha Mars 9887f10749
Add ability to change the time window for metrics fetching throughout the app (#237)
* Control metricsWindow from root of app

- Add buttons [currently hidden] on metrics pages to control window of metrics requests
- Consolidate metricsWindow usage (stop passing it around)
- Add a ConduitLink component so we can stop passing around pathPrefix
- Add tests for ApiHelpers

* Hide the time window buttons; fix bug in absolute links
* Add a note explaining why metricWindow buttons are disabled
* Convert ConduitLink in to a component that wraps another
2018-02-05 10:56:17 -08:00
Risha Mars b9f5ad093f
Rename js components to clarify component relationships (#179)
* Rename components to clarify component relationships
* Rename Deployment to DeploymentDetail to match PodDetail
* Rename Deployments to DeploymentsList to clarify which page this is
* Rename StatPane to ResourceMetricsOverview to be a less generic name
* Rename HealthPane -> ResourceHealthOverview
* Rename StatPaneStat -> ResourceOverviewMetric

Signed-off-by: Risha Mars <mars@buoyant.io>
2018-01-23 10:05:53 -08:00
Risha Mars 14cba8870e
Revive scatterplot: re-add scatterplot to Deployments page (#144)
* Revive scatterplot: re-add scatterplot to Deployments page

Tried to make some UI improvements to address previous problems:

* added a hover bar and tooltip that displays all of the nodes under the bar, 
in descending order of successRate (to correspond with their order in the chart)
* the tooltip looked weird in the empty state so I also added the max/min latencies 
observed there

Also cleans up the Deployments page a little when there are not any "least healthy deployments".

* Previously, the sidebar tooltip would still render the last
highlighted nodes' information when the dots updated. Fix that
by selecting a datapoint to highlight when the dots update.

* Add overlay tooltip with names of highlighted nodes

* Align the node labels with the node, except in cases of label overlap


Signed-off-by: Risha Mars <mars@buoyant.io>
2018-01-17 10:10:59 -08:00
Risha Mars 00844913f5
Upgrade React, ant, enzyme (#109)
* Upgrade ant to 3.1.0

* Adjust styles for updated ant

- Locale is enUS by default now, so removing our config
- Adjust table styles

* Upgrade react and react-dom to 16.2.0

* Upgrade enzyme to 3.3.0, fix tests accordingly
2018-01-10 10:10:59 -08:00