fix: add table label ellipsis to avoid much long label #23

This commit is contained in:
moonrailgun 2024-02-06 19:52:38 +08:00
parent da5149b166
commit 343c05c3ab
2 changed files with 19 additions and 1 deletions

View File

@ -41,6 +41,7 @@ export const MetricsTable: React.FC<MetricsTableProps> = React.memo((props) => {
{ {
title: title[0], title: title[0],
dataIndex: 'x', dataIndex: 'x',
ellipsis: true,
render: (val) => val ?? <span className="italic opacity-60">(None)</span>, render: (val) => val ?? <span className="italic opacity-60">(None)</span>,
}, },
{ {

View File

@ -96,7 +96,24 @@ async function createSessionEvent(session: WebsiteSession) {
data: Array.from({ length: faker.number.int({ max: 20 }) }).map(() => ({ data: Array.from({ length: faker.number.int({ max: 20 }) }).map(() => ({
sessionId: session.id, sessionId: session.id,
websiteId: session.websiteId, websiteId: session.websiteId,
urlPath: '/', urlPath: [
faker.system.directoryPath(),
faker.system.directoryPath(),
faker.system.directoryPath(),
faker.system.directoryPath(),
faker.system.directoryPath(),
faker.system.directoryPath(),
faker.system.directoryPath(),
faker.system.directoryPath(),
faker.system.directoryPath(),
faker.system.directoryPath(),
faker.system.directoryPath(),
faker.system.directoryPath(),
faker.system.directoryPath(),
faker.system.directoryPath(),
faker.system.directoryPath(),
faker.system.filePath(),
].join(''), // generate long path
createdAt: faker.date.between({ createdAt: faker.date.between({
from: session.createdAt, from: session.createdAt,
to: endDate, to: endDate,