Makes the Font Awesome CSS stylesheet available offline. Users loading the dashboard with no/limited internet will see both the Font Awesome and Material-UI sidebar icons consistently. Before, only the Material-UI icons were available offline.
Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>
Makes the "overview" view of the Linkerd dashboard functional on mobile devices, with responsive tables and a minimized sidebar.
Also lines up the sidebar icons and makes them a uniform size on both desktop and mobile views.
This is a first step towards a fully-responsive dashboard.
Add validation webhook for service profiles
Fixes#2075
Todo in a follow-up PRs: remove the SP check from the CLI check.
Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
Problem:
In #2532 I removed the Tap/Top tables if there was no http traffic, but the
check I used depended on a stats object being present in the processed metrics
(spoiler: it isn't present in the processed metrics).
Solution:
Use a better check for no traffic.
The new check checks for both no requests (so nil request rate) and
also no latency (in the case that the service is http but receiving no traffic).
Fixes#2641
Adds local and cloud integration testing for the dashboard using WebdriverIO and
SauceLabs. Includes documentation on how to set up and run the Sauce Connect
proxy locally. Adds a `bin/web integration` script that takes `local` or `cloud`
arguments to run the tests.
Note: for web development, the web server launched by `bin/web run` and `bin/web
dev` is now 7777, not 8084, because the Sauce Connect proxy can only tunnel to
certain ports.
Fixes#2490
The following PR adds validation to the New Service Profile popup form in the linkerd dashboard for the service and namespace user input.
* Add validation to the Service Profile form (#2490)
Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>
* Change RegExp to handle all cases
Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>
* Fix link and error msg issue
Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>
* Refactor code
Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>
* Revert to onBlur and remove warning on field clear
Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>
* Refactor code to make it more readable
Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>
* Reset state to initialstate on form close
Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>
When a resource only has TCP traffic and no HTTP traffic, the dashboard looks
weird in a bunch of places.
This branch:
- updates the main resource card in the Octopus graph to show TCP stats if no HTTP
stats are available
- cleans up the resource detail page to show fewer blank
tables if the resource only has TCP traffic.
Fixes#2420.
Sorts the data returned from a Top Routes query before rendering the tables in the web UI. Previously we rendered the data tables without sorting, leading to inadvertent flipping of table order if the API returned data in a different order.
Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>
Fixes#2347
Previously, running a Top query for a namespace and resource that did not return
data would permanently disable the 'start query' button even if a user chose a
new namespace/resource combination. This allows the user to perform a new query
after their previous query does not return data.
Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>
* Add TCP stats to the Linkerd Pod Grafana dashboard (#2329)
* Minimize tcp stats and link it to dashboard tcp tables
* Add rows to fix minimization issues
Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>
Closes#2327.
This PR creates a "Community" menu item on the dashboard sidebar that, when clicked, displays an iFrame of a page on linkerd.io. A yellow badge appears on the menu item if there has been an update since the user last clicked the "Community" menu item. This is calculated by comparing a date in the user's localStorage to a JSON feed at linkerd.io.
linkerd/linkerd2#1721 introduced a `--single-namespace` install flag,
enabling the control-plane to function within a single namespace. With
the introduction of ServiceProfiles, and upcoming identity changes, this
single namespace mode of operation is becoming less viable.
This change removes the `--single-namespace` install flag, and all
underlying support. The control-plane must have cluster-wide access to
operate.
A few related changes:
- Remove `--single-namespace` from `linkerd check`, this motivates
combining some check categories, as we can always assume cluster-wide
requirements.
- Simplify the `k8s.ResourceAuthz` API, as callers no longer need to
make a decision based on cluster-wide vs. namespace-wide access.
Components either have access, or they error out.
- Modify the web dashboard to always assume ServiceProfiles are enabled.
Reverts #1721
Part of #2337
Signed-off-by: Andrew Seigner <siggy@buoyant.io>
Some time ago, I fixed sorting on these tables so that the default route ([default])
was sorted to the bottom. The name was changed to [DEFAULT] causing that sort
to no longer put the default route at the bottom. Update to correct case.
Show TCP stats in the linkerd stat output. They are not shown by default, but
will be queried when using -o wide or -o json.
Also display read/write bytes as bytes per sec in the CLI and dashboard.
* Refactor code to make sidebar in sync with the main view (#2134)
Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>
* Remove redundancy and cleanup code
Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>
* Remove extra space and add new line
Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>
Fixes#1792.
This PR adds filter functionality to the web UI via an optional Material-UI <Toolbar> on the top of the table which contains the table's title and a filter icon. The toolbar only shows if the enableFilter={true} prop is passed down from the parent component. The PR modifies the MetricsTable test and adds tests for BaseTable and TopRoutesTable.
Note: The previous Ant-based UI allowed certain tables to be filtered by individual table column; this capacity is not part of this PR but can be added later if useful.
The control-plane components relied on a `--single-namespace` param,
passed from `linkerd install` into each individual component, to
determine which namespaces they were authorized to access, and whether
to support ServiceProfiles. This command-line flag was redundant given
the authorization rules encoded in the parent `linkerd install` output,
via [Cluster]Role[Binding]s.
Modify the control-plane components to query Kubernetes at startup to
determine which namespaces they are authorized to access, and whether
ServiceProfile support is available. This allows removal of the
`--single-namespace` flag on the components.
Also update `bin/test-cleanup` to cleanup the ServiceProfile CRD.
TODO:
- Remove `--single-namespace` flag on `linkerd install`, part of #2164
Signed-off-by: Andrew Seigner <siggy@buoyant.io>
The `Overview` and `Resources` nav items were slightly out of alignment
with the other nav items.
Add paddingRight to the other nav items, to compensate for their
shrunken icons.
Signed-off-by: Andrew Seigner <siggy@buoyant.io>
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
In #2195 we introduced `linkerd endpoints` on the CLI. I would like similar
information to be on the web.
This PR adds an api endpoint at `/api/endpoints`, and introduces a new debugging
pagethat shows a table of endpoints, available at `/debug`
Up until now, the proxy-api controller service has been the sole service
that the proxy communicates with, implementing the majoriry of the API
defined in the `linkerd2-proxy-api` repo. But this is about to change:
linkerd/linkerd2-proxy-api#25 introduces a new Identity service; and
this service must be served outside of the existing proxy-api service
in the linkerd-controller deployment (so that it may run under a
distinct service account).
With this change, the "proxy-api" name becomes less descriptive. It's no
longer "the service that serves the API for the proxy," it's "the
service that serves the Destination API to the proxy." Therefore, it
seems best to bite the bullet and rename this to be the "destination"
service (i.e. because it only serves the
`io.linkerd.proxy.destination.Destination` service).
Co-authored-by: Kevin Lingerfelt <kl@buoyant.io>
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
Fixes#2255.
When Kubernetes periodically pinged booksapp to perform a health check, the
lack of namespace violated the `TapLink` component's propTypes requirement.
This triggered a warning in the browser console when on the web UI Top view.
Working with @rmars, I removed the namespace requirement from propTypes and
moved the check for an empty namespace to the top of the component to avoid an
unnecessary queryString construction.
Fixes#2232
The Linkerd logo on the top left of the web UI is now wrapped in a
`react-router-dom` Link component so that clicking it redirects to `/overview`.
@rmars and I set out to replace all instances of lodash filter with native
filter in order to prevent the additional import. However, there was only one
use of _filter that could be easily replaced, since our other uses depend on
lodash's ability to handle empty variables, and the ability to filter both
objects and arrays (JS's native filter is only for arrays). Switching to native
filter in those cases would have required us to manually check the value of the
variable, set it to an empty array and/or convert it from an object to an array.
Signed-off-by: Carol Scott <carol@buoyant.io>
I noticed that #2131 was able to merge even though it contained a missing ;
which should have failed lint checks. I think the problem is that if fix is
enabled, running bin/web build fixes the issue and then the lint checks pass on
the fixed but uncommitted code.
We should avoid autofixing in environments that aren't development to avoid
merging unfixed code to master.
DaemonSet stats are not currently shown in the cli stat command, web ui
or grafana dashboard. This commit adds daemonset support for stat.
Update stat command's help message to reference daemonsets.
Update the public-api to support stats for daemonsets.
Add tests for stat summary and api.
Add daemonset get/list/watch permissions to the linkerd-controller
cluster role that's created using the install command.
Update golden expectation test files for install command
yaml manifest output.
Update web UI with daemonsets
Update navigation, overview and pages to list daemonsets and the pods
associated to them.
Add daemonset paths to server, and ui apps.
Add grafana dashboard for daemonsets; a clone of the deployment
dashboard.
Update dependencies and dockerfile hashes
Add DaemonSet support to tap and top commands
Fixes of #2006
Signed-off-by: Zak Knill <zrjknill@gmail.com>
The recent routes API changes caused the Top Routes tab to stop working, as it
wasn't looking for the changed structure of the response. This PR updates that
page to accept the new API response.
This PR also adds to fields to the Top Routes query form, so that the equivalent
of linkerd routes deploy --to deploy/authors will work in the dashboard.
As mentioned in #2006, the resource detail page currently only shows inbound/outbound traffic from resources that match the type being viewed (e.g. if we are on the page for deploy/voting, inbound/outbound traffic to a daemonset won't be shown).
This branch updates the ResourceDetail code to display traffic from more than one resource type (this applies to the Octopus Graph as well).
For things that comprise pods, e.g deployments and daemonsets, we omit showing authorities,
services and pods
This PR also updates the Metric Table to handle the display of a table of multiple different resource types.
* Simplify syntax for state variable access
* Add a warning chip if a resource isn't receiving traffic
Also add a meshed chip to the resource detail pages
JavaScript assets could be cached across Linkerd releases, showing an
out of date ui, or a broken page.
Modify the webpack build pipeline to add a hash to the JS bundle
filename. Move all logic around webpack-dev-server state from Go into
JS, via a templatized index_bundle.js file, generated at build time.
Disable caching of index_bundle.js in Go, via a `Cache-Control` header.
Fixes#1996
Signed-off-by: Andrew Seigner <siggy@buoyant.io>
* Proxy grafana requests through web service
* Fix -grafana-addr default, clarify -api-addr flag
* Fix version check in grafana dashboards
* Fix comment typo
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>