mirror of https://github.com/linkerd/linkerd2.git
24 lines
637 B
JavaScript
24 lines
637 B
JavaScript
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import { grafanaIcon } from './util/SvgWrappers.jsx';
|
|
|
|
const GrafanaLink = ({PrefixedLink, name, namespace, resource}) => {
|
|
return (
|
|
<PrefixedLink
|
|
to={`/grafana/dashboard/db/linkerd-${resource}?var-namespace=${namespace}&var-${resource}=${name}`}
|
|
targetBlank={true}>
|
|
|
|
{grafanaIcon}
|
|
</PrefixedLink>
|
|
);
|
|
};
|
|
|
|
GrafanaLink.propTypes = {
|
|
name: PropTypes.string.isRequired,
|
|
namespace: PropTypes.string.isRequired,
|
|
PrefixedLink: PropTypes.func.isRequired,
|
|
resource: PropTypes.string.isRequired,
|
|
};
|
|
|
|
export default GrafanaLink;
|