feat: changed visible Panel name for Value Panel to Number (#7092)

* feat: changed visible Panel name for Value Panel to Number

* feat: added display values to enum
This commit is contained in:
SagarRajput-7 2025-02-12 11:29:07 +05:30 committed by GitHub
parent 962e75c6d4
commit b772a0fb56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 36 additions and 19 deletions

View File

@ -407,3 +407,13 @@ export const HAVING_OPERATORS: string[] = [
OPERATORS['<='],
OPERATORS['<'],
];
export enum PanelDisplay {
TIME_SERIES = 'Time Series',
VALUE = 'Number',
TABLE = 'Table',
LIST = 'List',
BAR = 'Bar',
PIE = 'Pie',
HISTOGRAM = 'Histogram',
}

View File

@ -1,5 +1,5 @@
import { Color } from '@signozhq/design-tokens';
import { PANEL_TYPES } from 'constants/queryBuilder';
import { PANEL_TYPES, PanelDisplay } from 'constants/queryBuilder';
import {
BarChart3,
LineChart,
@ -13,37 +13,37 @@ const Items: ItemsProps[] = [
{
name: PANEL_TYPES.TIME_SERIES,
icon: <LineChart size={16} color={Color.BG_ROBIN_400} />,
display: 'Time Series',
display: PanelDisplay.TIME_SERIES,
},
{
name: PANEL_TYPES.VALUE,
icon: <SigmaSquare size={16} color={Color.BG_ROBIN_400} />,
display: 'Value',
display: PanelDisplay.VALUE,
},
{
name: PANEL_TYPES.TABLE,
icon: <Table size={16} color={Color.BG_ROBIN_400} />,
display: 'Table',
display: PanelDisplay.TABLE,
},
{
name: PANEL_TYPES.LIST,
icon: <List size={16} color={Color.BG_ROBIN_400} />,
display: 'List',
display: PanelDisplay.LIST,
},
{
name: PANEL_TYPES.BAR,
icon: <BarChart3 size={16} color={Color.BG_ROBIN_400} />,
display: 'Bar',
display: PanelDisplay.BAR,
},
{
name: PANEL_TYPES.PIE,
icon: <PieChart size={16} color={Color.BG_ROBIN_400} />,
display: 'Pie',
display: PanelDisplay.PIE,
},
{
name: PANEL_TYPES.HISTOGRAM,
icon: <BarChart3 size={16} color={Color.BG_ROBIN_400} />,
display: 'Histogram',
display: PanelDisplay.HISTOGRAM,
},
];

View File

@ -4,7 +4,7 @@ import './RightContainer.styles.scss';
import { Input, InputNumber, Select, Space, Switch, Typography } from 'antd';
import TimePreference from 'components/TimePreferenceDropDown';
import { PANEL_TYPES } from 'constants/queryBuilder';
import { PANEL_TYPES, PanelDisplay } from 'constants/queryBuilder';
import GraphTypes, {
ItemsProps,
} from 'container/NewDashboard/ComponentsSlider/menuItems';
@ -212,7 +212,8 @@ function RightContainer({
defaultValue={yAxisUnit}
onSelect={setYAxisUnit}
fieldLabel={
selectedGraphType === 'Value' || selectedGraphType === 'Pie'
selectedGraphType === PanelDisplay.VALUE ||
selectedGraphType === PanelDisplay.PIE
? 'Unit'
: 'Y Axis Unit'
}

View File

@ -6706,6 +6706,11 @@ core-js@^2.4.0:
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec"
integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==
core-js@^3.38.1:
version "3.40.0"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.40.0.tgz#2773f6b06877d8eda102fc42f828176437062476"
integrity sha512-7vsMc/Lty6AGnn7uFpYT56QesI5D2Y/UkgKounk87OP9Z2H9Z8kj6jzcSGAxFmUtDOS0ntK6lbQz+Nsa0Jj6mQ==
core-util-is@~1.0.0:
version "1.0.3"
resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz"
@ -13118,14 +13123,15 @@ postcss@8.4.38, postcss@^8.0.0, postcss@^8.1.1, postcss@^8.3.7, postcss@^8.4.21,
picocolors "^1.0.0"
source-map-js "^1.2.0"
posthog-js@1.160.3:
version "1.160.3"
resolved "https://registry.yarnpkg.com/posthog-js/-/posthog-js-1.160.3.tgz#17c8af4c9ffa2d795d925ca1e7146e61cd5ccabd"
integrity sha512-mGvxOIlWPtdPx8EI0MQ81wNKlnH2K0n4RqwQOl044b34BCKiFVzZ7Hc7geMuZNaRAvCi5/5zyGeWHcAYZQxiMQ==
posthog-js@1.215.5:
version "1.215.5"
resolved "https://registry.yarnpkg.com/posthog-js/-/posthog-js-1.215.5.tgz#0512cfdb919da960b809c5f686ca147f9c2922ba"
integrity sha512-42lPur+xvkp51pHz2FQ7Y+KHdZ4eQSNIhUO03EECvc2UsmnM0FiVTrF1bcLwHZMaWfR26gOeuOAAjTUV9tinJg==
dependencies:
core-js "^3.38.1"
fflate "^0.4.8"
preact "^10.19.3"
web-vitals "^4.0.1"
web-vitals "^4.2.0"
preact@^10.19.3:
version "10.22.0"
@ -16465,10 +16471,10 @@ web-vitals@^0.2.4:
resolved "https://registry.npmjs.org/web-vitals/-/web-vitals-0.2.4.tgz"
integrity sha512-6BjspCO9VriYy12z356nL6JBS0GYeEcA457YyRzD+dD6XYCQ75NKhcOHUMHentOE7OcVCIXXDvOm0jKFfQG2Gg==
web-vitals@^4.0.1:
version "4.2.0"
resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-4.2.0.tgz#008949ab79717a68ccaaa3c4371cbc7bbbd78a92"
integrity sha512-ohj72kbtVWCpKYMxcbJ+xaOBV3En76hW47j52dG+tEGG36LZQgfFw5yHl9xyjmosy3XUMn8d/GBUAy4YPM839w==
web-vitals@^4.2.0:
version "4.2.4"
resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-4.2.4.tgz#1d20bc8590a37769bd0902b289550936069184b7"
integrity sha512-r4DIlprAGwJ7YM11VZp4R884m0Vmgr6EAKe3P+kO0PPj3Unqyvv59rczf6UiGcb9Z8QxZVcqKNwv/g0WNdWwsw==
web-worker@^1.2.0:
version "1.2.0"