SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
feat: export panel is updated (#3099)
Palash Guptae746bae8dbcd
diff --git a/frontend/src/container/ExportPanel/config.ts b/frontend/src/container/ExportPanel/config.tsdeleted file mode 100644index a70d996b79..0000000000--- a/frontend/src/container/ExportPanel/config.ts+++ /dev/null@@ -1,9 +0,0 @@-export const MENU_KEY = {- EXPORT: 'export',- CREATE_ALERTS: 'create-alerts',-};--export const MENU_LABEL = {- EXPORT: 'Export Panel',- CREATE_ALERTS: 'Create Alerts',-};diff --git a/frontend/src/container/ExportPanel/index.tsx b/frontend/src/container/ExportPanel/index.tsxindex 467051cb3f..8447814fa7 100644--- a/frontend/src/container/ExportPanel/index.tsx+++ b/frontend/src/container/ExportPanel/index.tsx@@ -1,12 +1,12 @@-import { Button, Dropdown, MenuProps, Modal } from 'antd';+import { AlertOutlined, AreaChartOutlined } from '@ant-design/icons';+import { Button, Modal, Space } from 'antd';import { queryParamNamesMap } from 'constants/queryBuilderQueryNames';import ROUTES from 'constants/routes';import history from 'lib/history';-import { useCallback, useMemo, useState } from 'react';+import { useCallback, useState } from 'react';import { Dashboard } from 'types/api/dashboard/getAll';import { Query } from 'types/api/queryBuilder/queryBuilderData';-import { MENU_KEY, MENU_LABEL } from './config';import ExportPanelContainer from './ExportPanel';function ExportPanel({@@ -28,45 +28,30 @@ function ExportPanel({);}, [query]);- const onMenuClickHandler: MenuProps['onClick'] = useCallback(- (e: OnClickProps) => {- if (e.key === MENU_KEY.EXPORT) {- onModalToggle(true);- }-- if (e.key === MENU_KEY.CREATE_ALERTS) {- onCreateAlertsHandler();- }- },- [onModalToggle, onCreateAlertsHandler],- );-- const menu: MenuProps = useMemo(- () => ({- items: [- {- key: MENU_KEY.EXPORT,- label: MENU_LABEL.EXPORT,- },- {- key: MENU_KEY.CREATE_ALERTS,- label: MENU_LABEL.CREATE_ALERTS,- },- ],- onClick: onMenuClickHandler,- }),- [onMenuClickHandler],- );-const onCancel = (value: boolean) => (): void => {onModalToggle(value);};+ const onAddToDashboard = (): void => {+ setIsExport(true);+ };+return (<>- <Dropdown trigger={['click']} menu={menu}>- <Button>Actions</Button>- </Dropdown>+ <Space size={24}>+ <Button+ icon={<AreaChartOutlined />}+ onClick={onAddToDashboard}+ type="primary"+ >+ Add to Dashboard+ </Button>++ <Button onClick={onCreateAlertsHandler} icon={<AlertOutlined />}>+ Setup Alerts+ </Button>+ </Space>+<Modalfooter={null}onOk={onCancel(false)}@@ -85,10 +70,6 @@ function ExportPanel({);}-interface OnClickProps {- key: string;-}-export interface ExportPanelProps {isLoading?: boolean;onExport: (dashboard: Dashboard | null) => void;