change(ui): session list date range
This commit is contained in:
parent
26e32d48db
commit
d4e51415cd
1 changed files with 8 additions and 3 deletions
|
|
@ -23,6 +23,7 @@ function SessionHeader(props: Props) {
|
||||||
filter: { startDate, endDate, rangeValue },
|
filter: { startDate, endDate, rangeValue },
|
||||||
activeTab,
|
activeTab,
|
||||||
isEnterprise,
|
isEnterprise,
|
||||||
|
listCount,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const period = Period({ start: startDate, end: endDate, rangeName: rangeValue });
|
const period = Period({ start: startDate, end: endDate, rangeName: rangeValue });
|
||||||
|
|
@ -51,8 +52,12 @@ function SessionHeader(props: Props) {
|
||||||
<>
|
<>
|
||||||
<SessionTags />
|
<SessionTags />
|
||||||
<div className="mr-auto" />
|
<div className="mr-auto" />
|
||||||
<SelectDateRange period={period} onChange={onDateChange} right={true} />
|
{listCount > 0 && (
|
||||||
<div className="mx-2" />
|
<>
|
||||||
|
<SelectDateRange period={period} onChange={onDateChange} right={true} />
|
||||||
|
<div className="mx-2" />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<SessionSort />
|
<SessionSort />
|
||||||
|
|
@ -72,7 +77,7 @@ function SessionHeader(props: Props) {
|
||||||
export default connect(
|
export default connect(
|
||||||
(state: any) => ({
|
(state: any) => ({
|
||||||
filter: state.getIn(['search', 'instance']),
|
filter: state.getIn(['search', 'instance']),
|
||||||
listCount: numberWithCommas(state.getIn(['sessions', 'total'])),
|
listCount: state.getIn(['sessions', 'total']),
|
||||||
activeTab: state.getIn(['search', 'activeTab', 'type']),
|
activeTab: state.getIn(['search', 'activeTab', 'type']),
|
||||||
isEnterprise: state.getIn(['user', 'account', 'edition']) === 'ee',
|
isEnterprise: state.getIn(['user', 'account', 'edition']) === 'ee',
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue