mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-13 14:08:58 +08:00
chore: move facing issues button in dashboards and disable intercom ping (#5571)
* chore: move facing issues button in dashboards and disable intercom ping * chore: review comment
This commit is contained in:
parent
ba7e6fcf23
commit
522e73b48e
@ -16,6 +16,7 @@ export interface FacingIssueBtnProps {
|
|||||||
buttonText?: string;
|
buttonText?: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
onHoverText?: string;
|
onHoverText?: string;
|
||||||
|
intercomMessageDisabled?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
function FacingIssueBtn({
|
function FacingIssueBtn({
|
||||||
@ -25,11 +26,12 @@ function FacingIssueBtn({
|
|||||||
buttonText = '',
|
buttonText = '',
|
||||||
className = '',
|
className = '',
|
||||||
onHoverText = '',
|
onHoverText = '',
|
||||||
|
intercomMessageDisabled = false,
|
||||||
}: FacingIssueBtnProps): JSX.Element | null {
|
}: FacingIssueBtnProps): JSX.Element | null {
|
||||||
const handleFacingIssuesClick = (): void => {
|
const handleFacingIssuesClick = (): void => {
|
||||||
logEvent(eventName, attributes);
|
logEvent(eventName, attributes);
|
||||||
|
|
||||||
if (window.Intercom) {
|
if (window.Intercom && !intercomMessageDisabled) {
|
||||||
window.Intercom('showNewMessage', defaultTo(message, ''));
|
window.Intercom('showNewMessage', defaultTo(message, ''));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -62,6 +64,7 @@ FacingIssueBtn.defaultProps = {
|
|||||||
buttonText: '',
|
buttonText: '',
|
||||||
className: '',
|
className: '',
|
||||||
onHoverText: '',
|
onHoverText: '',
|
||||||
|
intercomMessageDisabled: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default FacingIssueBtn;
|
export default FacingIssueBtn;
|
||||||
|
@ -653,8 +653,9 @@ function DashboardsList(): JSX.Element {
|
|||||||
}}
|
}}
|
||||||
eventName="Dashboard: Facing Issues in dashboard"
|
eventName="Dashboard: Facing Issues in dashboard"
|
||||||
message={dashboardListMessage}
|
message={dashboardListMessage}
|
||||||
buttonText="Facing issues with dashboards?"
|
buttonText="Need help with dashboards?"
|
||||||
onHoverText="Click here to get help with dashboards"
|
onHoverText="Click here to get help with dashboards"
|
||||||
|
intercomMessageDisabled
|
||||||
/>
|
/>
|
||||||
</Flex>
|
</Flex>
|
||||||
</div>
|
</div>
|
||||||
|
@ -300,17 +300,6 @@ function DashboardDescription(props: DashboardDescriptionProps): JSX.Element {
|
|||||||
{title}
|
{title}
|
||||||
</Button>
|
</Button>
|
||||||
</section>
|
</section>
|
||||||
<FacingIssueBtn
|
|
||||||
attributes={{
|
|
||||||
uuid: selectedDashboard?.uuid,
|
|
||||||
title: updatedTitle,
|
|
||||||
screen: 'Dashboard Details',
|
|
||||||
}}
|
|
||||||
eventName="Dashboard: Facing Issues in dashboard"
|
|
||||||
message={dashboardHelpMessage(selectedDashboard?.data, selectedDashboard)}
|
|
||||||
buttonText="Facing issues with dashboards?"
|
|
||||||
onHoverText="Click here to get help with dashboard details"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<section className="dashbord-details">
|
<section className="dashbord-details">
|
||||||
<div className="left-section">
|
<div className="left-section">
|
||||||
@ -323,6 +312,18 @@ function DashboardDescription(props: DashboardDescriptionProps): JSX.Element {
|
|||||||
{isDashboardLocked && <LockKeyhole size={14} />}
|
{isDashboardLocked && <LockKeyhole size={14} />}
|
||||||
</div>
|
</div>
|
||||||
<div className="right-section">
|
<div className="right-section">
|
||||||
|
<FacingIssueBtn
|
||||||
|
attributes={{
|
||||||
|
uuid: selectedDashboard?.uuid,
|
||||||
|
title: updatedTitle,
|
||||||
|
screen: 'Dashboard Details',
|
||||||
|
}}
|
||||||
|
eventName="Dashboard: Facing Issues in dashboard"
|
||||||
|
message={dashboardHelpMessage(selectedDashboard?.data, selectedDashboard)}
|
||||||
|
buttonText="Need help with this dashboard?"
|
||||||
|
onHoverText="Click here to get help with dashboard"
|
||||||
|
intercomMessageDisabled
|
||||||
|
/>
|
||||||
<DateTimeSelectionV2 showAutoRefresh hideShareModal />
|
<DateTimeSelectionV2 showAutoRefresh hideShareModal />
|
||||||
<Popover
|
<Popover
|
||||||
open={isDashboardSettingsOpen}
|
open={isDashboardSettingsOpen}
|
||||||
|
@ -4,6 +4,7 @@ import { Color } from '@signozhq/design-tokens';
|
|||||||
import { Button, Tabs, Tooltip, Typography } from 'antd';
|
import { Button, Tabs, Tooltip, Typography } from 'antd';
|
||||||
import logEvent from 'api/common/logEvent';
|
import logEvent from 'api/common/logEvent';
|
||||||
import PromQLIcon from 'assets/Dashboard/PromQl';
|
import PromQLIcon from 'assets/Dashboard/PromQl';
|
||||||
|
import FacingIssueBtn from 'components/facingIssueBtn/FacingIssueBtn';
|
||||||
import TextToolTip from 'components/TextToolTip';
|
import TextToolTip from 'components/TextToolTip';
|
||||||
import { PANEL_TYPES } from 'constants/queryBuilder';
|
import { PANEL_TYPES } from 'constants/queryBuilder';
|
||||||
import { QBShortcuts } from 'constants/shortcuts/QBShortcuts';
|
import { QBShortcuts } from 'constants/shortcuts/QBShortcuts';
|
||||||
@ -236,6 +237,21 @@ function QuerySection({
|
|||||||
onChange={handleQueryCategoryChange}
|
onChange={handleQueryCategoryChange}
|
||||||
tabBarExtraContent={
|
tabBarExtraContent={
|
||||||
<span style={{ display: 'flex', gap: '1rem', alignItems: 'center' }}>
|
<span style={{ display: 'flex', gap: '1rem', alignItems: 'center' }}>
|
||||||
|
<FacingIssueBtn
|
||||||
|
attributes={{
|
||||||
|
uuid: selectedDashboard?.uuid,
|
||||||
|
title: selectedDashboard?.data.title,
|
||||||
|
screen: 'Dashboard widget',
|
||||||
|
panelType: selectedGraph,
|
||||||
|
widgetId: query.id,
|
||||||
|
queryType: currentQuery.queryType,
|
||||||
|
}}
|
||||||
|
eventName="Dashboard: Facing Issues in dashboard"
|
||||||
|
buttonText="Need help with this chart?"
|
||||||
|
// message={chartHelpMessage(selectedDashboard, graphType)}
|
||||||
|
onHoverText="Click here to get help with this dashboard widget"
|
||||||
|
intercomMessageDisabled
|
||||||
|
/>
|
||||||
<TextToolTip
|
<TextToolTip
|
||||||
text="This will temporarily save the current query and graph state. This will persist across tab change"
|
text="This will temporarily save the current query and graph state. This will persist across tab change"
|
||||||
url="https://signoz.io/docs/userguide/query-builder?utm_source=product&utm_medium=query-builder"
|
url="https://signoz.io/docs/userguide/query-builder?utm_source=product&utm_medium=query-builder"
|
||||||
|
@ -4,8 +4,6 @@ import './NewWidget.styles.scss';
|
|||||||
import { WarningOutlined } from '@ant-design/icons';
|
import { WarningOutlined } from '@ant-design/icons';
|
||||||
import { Button, Flex, Modal, Space, Tooltip, Typography } from 'antd';
|
import { Button, Flex, Modal, Space, Tooltip, Typography } from 'antd';
|
||||||
import logEvent from 'api/common/logEvent';
|
import logEvent from 'api/common/logEvent';
|
||||||
import FacingIssueBtn from 'components/facingIssueBtn/FacingIssueBtn';
|
|
||||||
import { chartHelpMessage } from 'components/facingIssueBtn/util';
|
|
||||||
import OverlayScrollbar from 'components/OverlayScrollbar/OverlayScrollbar';
|
import OverlayScrollbar from 'components/OverlayScrollbar/OverlayScrollbar';
|
||||||
import { FeatureKeys } from 'constants/features';
|
import { FeatureKeys } from 'constants/features';
|
||||||
import { QueryParams } from 'constants/query';
|
import { QueryParams } from 'constants/query';
|
||||||
@ -608,20 +606,6 @@ function NewWidget({ selectedGraph }: NewWidgetProps): JSX.Element {
|
|||||||
<Typography.Text className="configure-panel">
|
<Typography.Text className="configure-panel">
|
||||||
Configure panel
|
Configure panel
|
||||||
</Typography.Text>
|
</Typography.Text>
|
||||||
<FacingIssueBtn
|
|
||||||
attributes={{
|
|
||||||
uuid: selectedDashboard?.uuid,
|
|
||||||
title: selectedDashboard?.data.title,
|
|
||||||
screen: 'Dashboard widget',
|
|
||||||
panelType: graphType,
|
|
||||||
widgetId: query.get('widgetId'),
|
|
||||||
queryType: currentQuery.queryType,
|
|
||||||
}}
|
|
||||||
eventName="Dashboard: Facing Issues in dashboard"
|
|
||||||
message={chartHelpMessage(selectedDashboard, graphType)}
|
|
||||||
buttonText="Facing issues with dashboards?"
|
|
||||||
onHoverText="Click here to get help with dashboard widget"
|
|
||||||
/>
|
|
||||||
</Flex>
|
</Flex>
|
||||||
</div>
|
</div>
|
||||||
{isSaveDisabled && (
|
{isSaveDisabled && (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user