mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 06:29:02 +08:00
fix: use correct created_at and updated_at (#7305)
This commit is contained in:
parent
9df23bc1ed
commit
b46f0c9a7b
@ -22,7 +22,7 @@ function TopContributorsCard({
|
|||||||
const viewAllTopContributorsParam = searchParams.get('viewAllTopContributors');
|
const viewAllTopContributorsParam = searchParams.get('viewAllTopContributors');
|
||||||
|
|
||||||
const [isViewAllVisible, setIsViewAllVisible] = useState(
|
const [isViewAllVisible, setIsViewAllVisible] = useState(
|
||||||
!!viewAllTopContributorsParam ?? false,
|
!!viewAllTopContributorsParam,
|
||||||
);
|
);
|
||||||
|
|
||||||
const isDarkMode = useIsDarkMode();
|
const isDarkMode = useIsDarkMode();
|
||||||
|
@ -28,7 +28,7 @@ export default function DashboardEmptyState(): JSX.Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const userRole: ROLES | null =
|
const userRole: ROLES | null =
|
||||||
selectedDashboard?.created_by === user?.email
|
selectedDashboard?.createdBy === user?.email
|
||||||
? (USER_ROLES.AUTHOR as ROLES)
|
? (USER_ROLES.AUTHOR as ROLES)
|
||||||
: user.role;
|
: user.role;
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ function GraphLayout(props: GraphLayoutProps): JSX.Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const userRole: ROLES | null =
|
const userRole: ROLES | null =
|
||||||
selectedDashboard?.created_by === user?.email
|
selectedDashboard?.createdBy === user?.email
|
||||||
? (USER_ROLES.AUTHOR as ROLES)
|
? (USER_ROLES.AUTHOR as ROLES)
|
||||||
: user.role;
|
: user.role;
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ export function WidgetRowHeader(props: WidgetRowHeaderProps): JSX.Element {
|
|||||||
const { user } = useAppContext();
|
const { user } = useAppContext();
|
||||||
|
|
||||||
const userRole: ROLES | null =
|
const userRole: ROLES | null =
|
||||||
selectedDashboard?.created_by === user?.email
|
selectedDashboard?.createdBy === user?.email
|
||||||
? (USER_ROLES.AUTHOR as ROLES)
|
? (USER_ROLES.AUTHOR as ROLES)
|
||||||
: user.role;
|
: user.role;
|
||||||
const [addPanelPermission] = useComponentPermission(permissions, userRole);
|
const [addPanelPermission] = useComponentPermission(permissions, userRole);
|
||||||
|
@ -8,10 +8,10 @@ describe('executeSearchQueries', () => {
|
|||||||
const firstDashboard: Dashboard = {
|
const firstDashboard: Dashboard = {
|
||||||
id: 11111,
|
id: 11111,
|
||||||
uuid: uuid(),
|
uuid: uuid(),
|
||||||
created_at: '',
|
createdAt: '',
|
||||||
updated_at: '',
|
updatedAt: '',
|
||||||
created_by: '',
|
createdBy: '',
|
||||||
updated_by: '',
|
updatedBy: '',
|
||||||
data: {
|
data: {
|
||||||
title: 'first dashboard',
|
title: 'first dashboard',
|
||||||
variables: {},
|
variables: {},
|
||||||
@ -20,10 +20,10 @@ describe('executeSearchQueries', () => {
|
|||||||
const secondDashboard: Dashboard = {
|
const secondDashboard: Dashboard = {
|
||||||
id: 22222,
|
id: 22222,
|
||||||
uuid: uuid(),
|
uuid: uuid(),
|
||||||
created_at: '',
|
createdAt: '',
|
||||||
updated_at: '',
|
updatedAt: '',
|
||||||
created_by: '',
|
createdBy: '',
|
||||||
updated_by: '',
|
updatedBy: '',
|
||||||
data: {
|
data: {
|
||||||
title: 'second dashboard',
|
title: 'second dashboard',
|
||||||
variables: {},
|
variables: {},
|
||||||
@ -32,10 +32,10 @@ describe('executeSearchQueries', () => {
|
|||||||
const thirdDashboard: Dashboard = {
|
const thirdDashboard: Dashboard = {
|
||||||
id: 333333,
|
id: 333333,
|
||||||
uuid: uuid(),
|
uuid: uuid(),
|
||||||
created_at: '',
|
createdAt: '',
|
||||||
updated_at: '',
|
updatedAt: '',
|
||||||
created_by: '',
|
createdBy: '',
|
||||||
updated_by: '',
|
updatedBy: '',
|
||||||
data: {
|
data: {
|
||||||
title: 'third dashboard (with special characters +?\\)',
|
title: 'third dashboard (with special characters +?\\)',
|
||||||
variables: {},
|
variables: {},
|
||||||
|
@ -236,7 +236,7 @@ describe('dashboard list page', () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: firstDashboardData.uuid,
|
id: firstDashboardData.uuid,
|
||||||
title: firstDashboardData.data.title,
|
title: firstDashboardData.data.title,
|
||||||
createdAt: firstDashboardData.created_at,
|
createdAt: firstDashboardData.createdAt,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user