Skip to content

Commit

Permalink
virus scan admin page add date column
Browse files Browse the repository at this point in the history
  • Loading branch information
孙永强 committed Oct 30, 2024
1 parent 096e9cb commit 461b9b6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
13 changes: 9 additions & 4 deletions frontend/src/pages/sys-admin/virus-scan/all-virus-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Loading from '../../../components/loading';
import Paginator from '../../../components/paginator';
import MainPanelTopbar from '../main-panel-topbar';
import Nav from './nav';
import dayjs from 'dayjs';

const virusFileItemPropTypes = {
virusFile: PropTypes.object.isRequired,
Expand Down Expand Up @@ -94,6 +95,9 @@ class VirusFileItem extends Component {
<td>{virusFile.repo_owner}</td>
<td>{virusFile.file_path}</td>
<td>{fileStatus}</td>
<td>
{`${virusFile.timestamp ? dayjs(virusFile.timestamp).format('YYYY-MM-DD HH:mm') : '--'}`}
</td>
<td>
{fileOpList.length > 0 && this.state.isOpIconShown &&
<OpMenu
Expand Down Expand Up @@ -166,10 +170,11 @@ class Content extends Component {
<table>
<thead>
<tr>
<th width="27%">{gettext('Library')}</th>
<th width="25%">{gettext('Owner')}</th>
<th width="28%">{gettext('Virus File')}</th>
<th width="15%">{gettext('Status')}</th>
<th width="25%">{gettext('Library')}</th>
<th width="23%">{gettext('Owner')}</th>
<th width="26%">{gettext('Virus File')}</th>
<th width="13%">{gettext('Status')}</th>
<th width="8%">{gettext('Time')}</th>
<th width="5%">{/* Operations */}</th>
</tr>
</thead>
Expand Down
1 change: 1 addition & 0 deletions seahub/api2/endpoints/admin/virus_scan_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def get(self, request):
record["has_deleted"] = virus_file.has_deleted
record["has_ignored"] = virus_file.has_ignored
record["virus_id"] = virus_file.vid
record['timestamp'] = virus_file.timestamp
virus_file_list.append(record)

return Response({"virus_file_list": virus_file_list, "has_next_page": has_next_page}, status=status.HTTP_200_OK)
Expand Down

0 comments on commit 461b9b6

Please sign in to comment.