Skip to content

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.

[Fix]: Threshold in dashboard fixes (#3979)

Rajat Dabadedc7a55e8714f
diff --git a/frontend/src/container/NewWidget/RightContainer/Threshold/Threshold.tsx b/frontend/src/container/NewWidget/RightContainer/Threshold/Threshold.tsx
index bc8fc60119..7117c33657 100644
--- a/frontend/src/container/NewWidget/RightContainer/Threshold/Threshold.tsx
+++ b/frontend/src/container/NewWidget/RightContainer/Threshold/Threshold.tsx
@@ -237,7 +237,7 @@ function Threshold({
)}
{isEditMode ? (
<Select
- style={{ maxWidth: '200px', backgroundColor: '#141414' }}
+ style={{ minWidth: '200px', backgroundColor: '#141414' }}
bordered={false}
defaultValue={unit}
options={unitOptions}
@@ -253,22 +253,21 @@ function Threshold({
<Space direction="vertical">
<Typography.Text>Show with</Typography.Text>
<Space>
- {isEditMode ? (
+ {isEditMode && selectedGraph === PANEL_TYPES.TIME_SERIES ? (
<ColorSelector setColor={setColor} thresholdColor={color} />
) : (
<ShowCaseValue width="100px" value={<CustomColor color={color} />} />
)}
{isEditMode && selectedGraph === PANEL_TYPES.VALUE ? (
- <>
- <Select
- style={{ minWidth: '100px' }}
- defaultValue={format}
- options={showAsOptions}
- onChange={handlerFormatChange}
- />
- <ShowCaseValue width="100px" value={format} />
- </>
- ) : null}
+ <Select
+ style={{ minWidth: '100px' }}
+ defaultValue={format}
+ options={showAsOptions}
+ onChange={handlerFormatChange}
+ />
+ ) : (
+ <ShowCaseValue width="100px" value={format} />
+ )}
</Space>
</Space>
</div>