mirror of https://github.com/linkerd/linkerd2.git
25 lines
656 B
JavaScript
25 lines
656 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={`/dashboard/db/linkerd-${resource}?var-namespace=${namespace}&var-${resource}=${name}`}
|
|
deployment="grafana"
|
|
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;
|