Logs Panel: Table UI - feedback link (#78354)

* Adds google form link to let users submit feedback on logs table UI

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
pull/71168/head^2
Galen Kistler 2 years ago committed by GitHub
parent 2ac60dc300
commit f7ace22285
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 26
      public/app/features/explore/Logs/Logs.tsx
  2. 38
      public/app/features/explore/Logs/LogsFeedback.tsx

@ -57,6 +57,7 @@ import { dedupLogRows, filterLogLevels } from '../../logs/logsModel';
import { getUrlStateFromPaneState } from '../hooks/useStateSync';
import { changePanelState } from '../state/explorePane';
import { LogsFeedback } from './LogsFeedback';
import { LogsMetaRow } from './LogsMetaRow';
import LogsNavigation from './LogsNavigation';
import { getLogsTableHeight, LogsTableWrap } from './LogsTableWrap';
@ -602,16 +603,21 @@ class UnthemedLogs extends PureComponent<Props, State> {
</PanelChrome>
<PanelChrome
titleItems={[
config.featureToggles.logsExploreTableVisualisation ? (
this.state.visualisationType === 'logs' ? null : (
<PanelChrome.TitleItem title="Experimental" key="A">
<FeatureBadge
featureState={FeatureState.beta}
tooltip="This feature is experimental and may change in future versions"
/>
</PanelChrome.TitleItem>
)
) : null,
config.featureToggles.logsExploreTableVisualisation
? this.state.visualisationType === 'logs'
? null
: [
<PanelChrome.TitleItem title="Experimental" key="A">
<FeatureBadge
featureState={FeatureState.beta}
tooltip="Table view is experimental and may change in future versions"
/>
</PanelChrome.TitleItem>,
<PanelChrome.TitleItem title="Feedback" key="B">
<LogsFeedback feedbackUrl="https://forms.gle/5YyKdRQJ5hzq4c289" />
</PanelChrome.TitleItem>,
]
: null,
]}
title={'Logs'}
actions={

@ -0,0 +1,38 @@
import { css } from '@emotion/css';
import React from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { Icon, Stack, useStyles2 } from '@grafana/ui';
interface Props {
feedbackUrl?: string;
}
export function LogsFeedback({ feedbackUrl }: Props) {
const styles = useStyles2(getStyles);
return (
<Stack>
<a
href={feedbackUrl}
className={styles.link}
title="The logs table 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,
},
}),
};
}
Loading…
Cancel
Save