| | |
| | | import MyExportButton from '../components/MyExportButton'; |
| | | import PageDrawer from "../components/PageDrawer"; |
| | | import MyField from "../components/MyField"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE } from '@/config/setting'; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | import rowSx from './rowSx'; |
| | | import { format } from 'date-fns'; |
| | |
| | | }, |
| | | '& .RaDatagrid-row': { |
| | | cursor: 'auto' |
| | | }, |
| | | '& .column-url': { |
| | | maxWidth: '16em', |
| | | overflow: 'hidden', |
| | | textOverflow: 'ellipsis', |
| | | whiteSpace: 'nowrap', |
| | | }, |
| | | '& .column-request': { |
| | | maxWidth: '18em', |
| | |
| | | ]} |
| | | />, |
| | | <ReferenceInput source="userId" reference="user"> |
| | | <AutocompleteInput label="table.field.operationRecord.userId" optionText="nickname" /> |
| | | <AutocompleteInput label="table.field.operationRecord.userId" optionText="nickname" filterToQuery={(val) => ({ nickname: val })} /> |
| | | </ReferenceInput>, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | |
| | | <MyExportButton /> |
| | | </TopToolbar> |
| | | )} |
| | | perPage={25} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='operationRecord' |
| | |
| | | <TextField source="appkey" label="table.field.operationRecord.appkey" /> |
| | | <FormattedTimestampField source="timestamp" label="table.field.operationRecord.timestamp" /> |
| | | <NumberField source="spendTime" label="table.field.operationRecord.spendTime" sx={{ fontWeight: 'bold' }} /> |
| | | <TextField source="request" label="table.field.operationRecord.request" sortable={false} /> |
| | | <TextField source="response" label="table.field.operationRecord.response" sortable={false} /> |
| | | <TextField source="request" label="table.field.operationRecord.request" sortable={false} hidden={!!drawerVal} /> |
| | | <TextField source="response" label="table.field.operationRecord.response" sortable={false} hidden={!!drawerVal} /> |
| | | <ResultField source="result" label="table.field.operationRecord.result" /> |
| | | <TextField source="err" label="table.field.operationRecord.err" /> |
| | | <TextField source="clientIp" label="table.field.operationRecord.clientIp" /> |
| | |
| | | > |
| | | <OperationDetail |
| | | operation={drawerVal} |
| | | setDrawerVal={setDrawerVal} |
| | | /> |
| | | </PageDrawer> |
| | | </Box> |