mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 02:59:00 +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 [isViewAllVisible, setIsViewAllVisible] = useState(
|
||||
!!viewAllTopContributorsParam ?? false,
|
||||
!!viewAllTopContributorsParam,
|
||||
);
|
||||
|
||||
const isDarkMode = useIsDarkMode();
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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: {},
|
||||
|
@ -236,7 +236,7 @@ describe('dashboard list page', () => {
|
||||
expect.objectContaining({
|
||||
id: firstDashboardData.uuid,
|
||||
title: firstDashboardData.data.title,
|
||||
createdAt: firstDashboardData.created_at,
|
||||
createdAt: firstDashboardData.createdAt,
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user