mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* add filtered results
* add feedback link
* correctly debounce fuzzy search thank you leon
* reduce calls to filterMetrics()in letter search
* clean up the alphabet type
* bug fix, filter type should be subtractive
* each filter is don;t explicitly, subtracting from the results of each
* Revert "each filter is don;t explicitly, subtracting from the results of each"
This reverts commit 5648788451.
* each filter is filtered explicitly, one after the other, subtracting from the results of each
41 lines
945 B
TypeScript
41 lines
945 B
TypeScript
import { css } from '@emotion/css';
|
|
import React from 'react';
|
|
|
|
import { GrafanaTheme2 } from '@grafana/data';
|
|
import { Stack } from '@grafana/experimental';
|
|
import { Icon, useStyles2 } from '@grafana/ui';
|
|
|
|
export interface Props {
|
|
feedbackUrl?: string;
|
|
}
|
|
|
|
export function FeedbackLink({ feedbackUrl }: Props) {
|
|
const styles = useStyles2(getStyles);
|
|
|
|
return (
|
|
<Stack gap={1}>
|
|
<a
|
|
href={feedbackUrl}
|
|
className={styles.link}
|
|
title="The Metric Encyclopedia is new, please let us know how we can improve it"
|
|
target="_blank"
|
|
rel="noreferrer noopener"
|
|
>
|
|
<Icon name="comment-alt-message" /> Give feedback
|
|
</a>
|
|
</Stack>
|
|
);
|
|
}
|
|
|
|
function getStyles(theme: GrafanaTheme2) {
|
|
return {
|
|
link: css({
|
|
color: theme.colors.text.secondary,
|
|
fontSize: theme.typography.bodySmall.fontSize,
|
|
':hover': {
|
|
color: theme.colors.text.link,
|
|
},
|
|
}),
|
|
};
|
|
}
|