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: use correct created_at and updated_at (#7305)

Nityananda Gohainb46f0c9a7b79
diff --git a/frontend/src/container/AlertHistory/Statistics/TopContributorsCard/TopContributorsCard.tsx b/frontend/src/container/AlertHistory/Statistics/TopContributorsCard/TopContributorsCard.tsx
index d3cd0bb756..9c9f0a1884 100644
--- a/frontend/src/container/AlertHistory/Statistics/TopContributorsCard/TopContributorsCard.tsx
+++ b/frontend/src/container/AlertHistory/Statistics/TopContributorsCard/TopContributorsCard.tsx
@@ -22,7 +22,7 @@ function TopContributorsCard({
const viewAllTopContributorsParam = searchParams.get('viewAllTopContributors');
const [isViewAllVisible, setIsViewAllVisible] = useState(
- !!viewAllTopContributorsParam ?? false,
+ !!viewAllTopContributorsParam,
);
const isDarkMode = useIsDarkMode();
diff --git a/frontend/src/container/GridCardLayout/DashboardEmptyState/DashboardEmptyState.tsx b/frontend/src/container/GridCardLayout/DashboardEmptyState/DashboardEmptyState.tsx
index 29e2defe2a..9c5566be0f 100644
--- a/frontend/src/container/GridCardLayout/DashboardEmptyState/DashboardEmptyState.tsx
+++ b/frontend/src/container/GridCardLayout/DashboardEmptyState/DashboardEmptyState.tsx
@@ -28,7 +28,7 @@ export default function DashboardEmptyState(): JSX.Element {
}
const userRole: ROLES | null =
- selectedDashboard?.created_by === user?.email
+ selectedDashboard?.createdBy === user?.email
? (USER_ROLES.AUTHOR as ROLES)
: user.role;
diff --git a/frontend/src/container/GridCardLayout/GridCardLayout.tsx b/frontend/src/container/GridCardLayout/GridCardLayout.tsx
index 27a3cd0dd6..c910aba903 100644
--- a/frontend/src/container/GridCardLayout/GridCardLayout.tsx
+++ b/frontend/src/container/GridCardLayout/GridCardLayout.tsx
@@ -113,7 +113,7 @@ function GraphLayout(props: GraphLayoutProps): JSX.Element {
}
const userRole: ROLES | null =
- selectedDashboard?.created_by === user?.email
+ selectedDashboard?.createdBy === user?.email
? (USER_ROLES.AUTHOR as ROLES)
: user.role;
diff --git a/frontend/src/container/GridCardLayout/WidgetRow.tsx b/frontend/src/container/GridCardLayout/WidgetRow.tsx
index d46bff3b5d..ddb3302c0a 100644
--- a/frontend/src/container/GridCardLayout/WidgetRow.tsx
+++ b/frontend/src/container/GridCardLayout/WidgetRow.tsx
@@ -44,7 +44,7 @@ export function WidgetRowHeader(props: WidgetRowHeaderProps): JSX.Element {
const { user } = useAppContext();
const userRole: ROLES | null =
- selectedDashboard?.created_by === user?.email
+ selectedDashboard?.createdBy === user?.email
? (USER_ROLES.AUTHOR as ROLES)
: user.role;
const [addPanelPermission] = useComponentPermission(permissions, userRole);
diff --git a/frontend/src/container/ListOfDashboard/SearchFilter/__tests__/utils.test.ts b/frontend/src/container/ListOfDashboard/SearchFilter/__tests__/utils.test.ts
index b215d205a5..a77cf8ccb5 100644
--- a/frontend/src/container/ListOfDashboard/SearchFilter/__tests__/utils.test.ts
+++ b/frontend/src/container/ListOfDashboard/SearchFilter/__tests__/utils.test.ts
@@ -8,10 +8,10 @@ describe('executeSearchQueries', () => {
const firstDashboard: Dashboard = {
id: 11111,
uuid: uuid(),
- created_at: '',
- updated_at: '',
- created_by: '',
- updated_by: '',
+ createdAt: '',
+ updatedAt: '',
+ createdBy: '',
+ updatedBy: '',
data: {
title: 'first dashboard',
variables: {},
@@ -20,10 +20,10 @@ describe('executeSearchQueries', () => {
const secondDashboard: Dashboard = {
id: 22222,
uuid: uuid(),
- created_at: '',
- updated_at: '',
- created_by: '',
- updated_by: '',
+ createdAt: '',
+ updatedAt: '',
+ createdBy: '',
+ updatedBy: '',
data: {
title: 'second dashboard',
variables: {},
@@ -32,10 +32,10 @@ describe('executeSearchQueries', () => {
const thirdDashboard: Dashboard = {
id: 333333,
uuid: uuid(),
- created_at: '',
- updated_at: '',
- created_by: '',
- updated_by: '',
+ createdAt: '',
+ updatedAt: '',
+ createdBy: '',
+ updatedBy: '',
data: {
title: 'third dashboard (with special characters +?\\)',
variables: {},
diff --git a/frontend/src/pages/DashboardsListPage/__tests__/DashboardListPage.test.tsx b/frontend/src/pages/DashboardsListPage/__tests__/DashboardListPage.test.tsx
index f2c63d5088..e6d6490cfc 100644
--- a/frontend/src/pages/DashboardsListPage/__tests__/DashboardListPage.test.tsx
+++ b/frontend/src/pages/DashboardsListPage/__tests__/DashboardListPage.test.tsx
@@ -236,7 +236,7 @@ describe('dashboard list page', () => {
expect.objectContaining({
id: firstDashboardData.uuid,
title: firstDashboardData.data.title,
- createdAt: firstDashboardData.created_at,
+ createdAt: firstDashboardData.createdAt,
}),
);
});