Merge: + client: add detailed date format for filters

Close #624

Squashed commit of the following:

commit 5a66d8ca350880abd0a7a146b75df385aa8f97b4
Author: Artem Baskal <a.baskal@adguard.com>
Date:   Mon Jan 20 19:16:27 2020 +0300

    update CellWrap logic

commit 072586493ef2cb73ba514a01d8b7f8904d4f5754
Author: Artem Baskal <a.baskal@adguard.com>
Date:   Mon Jan 20 15:37:26 2020 +0300

    fix invalid date case

commit bd2a21f2c788b2835485f4697dac1b797d5559c0
Author: Artem Baskal <a.baskal@adguard.com>
Date:   Fri Jan 17 18:44:23 2020 +0300

    + client: add detailed date format for filters
This commit is contained in:
Artem Baskal
2020-01-24 18:59:38 +03:00
parent ce7f1e231b
commit ac156b9612
8 changed files with 62 additions and 64 deletions

View File

@@ -22,6 +22,7 @@ import Loading from '../ui/Loading';
import PopoverFiltered from '../ui/PopoverFilter';
import Popover from '../ui/Popover';
import './Logs.css';
import CellWrap from '../ui/CellWrap';
const TABLE_FIRST_PAGE = 0;
const INITIAL_REQUEST_DATA = ['', TABLE_FIRST_PAGE, TABLE_DEFAULT_PAGE_SIZE];
@@ -115,12 +116,11 @@ class Logs extends Component {
checkWhiteList = reason => reason === FILTERED_STATUS.NOT_FILTERED_WHITE_LIST;
getTimeCell = ({ value }) => (
<div className="logs__row">
<span className="logs__text" title={formatDateTime(value)}>
{isToday(value) ? formatTime(value) : formatDateTime(value)}
</span>
</div>
getDateCell = row => CellWrap(
row,
(isToday(row.value) ? formatTime : formatDateTime),
formatDateTime,
);
getDomainCell = (row) => {
@@ -259,7 +259,7 @@ class Logs extends Component {
Header: t('time_table_header'),
accessor: 'time',
minWidth: 105,
Cell: this.getTimeCell,
Cell: this.getDateCell,
},
{
Header: t('domain_name_table_header'),