mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-11 21:09:09 +08:00
fix: save unit on dashboard without hitting apply (#912)
This commit is contained in:
parent
78b1a750fa
commit
ca78947a55
@ -18,6 +18,7 @@ export const SaveDashboard = ({
|
|||||||
title,
|
title,
|
||||||
widgetId,
|
widgetId,
|
||||||
dashboardId,
|
dashboardId,
|
||||||
|
yAxisUnit,
|
||||||
}: SaveDashboardProps): ((dispatch: Dispatch<AppActions>) => void) => {
|
}: SaveDashboardProps): ((dispatch: Dispatch<AppActions>) => void) => {
|
||||||
return async (dispatch: Dispatch<AppActions>): Promise<void> => {
|
return async (dispatch: Dispatch<AppActions>): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
@ -39,6 +40,7 @@ export const SaveDashboard = ({
|
|||||||
const updatednullZeroValues = nullZeroValues;
|
const updatednullZeroValues = nullZeroValues;
|
||||||
const updatedopacity = opacity;
|
const updatedopacity = opacity;
|
||||||
const updatedtimePreferance = timePreferance;
|
const updatedtimePreferance = timePreferance;
|
||||||
|
const updatedYAxisUnit = yAxisUnit;
|
||||||
|
|
||||||
const selectedWidgetIndex = data.widgets?.findIndex(
|
const selectedWidgetIndex = data.widgets?.findIndex(
|
||||||
(e) => e.id === widgetId,
|
(e) => e.id === widgetId,
|
||||||
@ -74,6 +76,7 @@ export const SaveDashboard = ({
|
|||||||
opacity: updatedopacity,
|
opacity: updatedopacity,
|
||||||
title: updatedTitle,
|
title: updatedTitle,
|
||||||
timePreferance: updatedtimePreferance,
|
timePreferance: updatedtimePreferance,
|
||||||
|
yAxisUnit: updatedYAxisUnit,
|
||||||
queryData: {
|
queryData: {
|
||||||
...selectedWidget.queryData,
|
...selectedWidget.queryData,
|
||||||
data: [
|
data: [
|
||||||
|
@ -357,6 +357,7 @@ const dashboard = (
|
|||||||
|
|
||||||
case SAVE_SETTING_TO_PANEL_SUCCESS: {
|
case SAVE_SETTING_TO_PANEL_SUCCESS: {
|
||||||
const selectedDashboard = action.payload;
|
const selectedDashboard = action.payload;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
dashboards: [
|
dashboards: [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user