Merge: - client: fix ui issues with table pagination and whois
Closes #1927 * commit '1c9d3acaa8864bca3e17dc3a313630dbc9ebea60': - client: fix whois wrap and vertical alignment - client: revert table paginations
This commit is contained in:
commit
ff9d1c234c
|
@ -62,23 +62,13 @@ class Table extends Component {
|
||||||
showPagination
|
showPagination
|
||||||
defaultPageSize={10}
|
defaultPageSize={10}
|
||||||
minRows={5}
|
minRows={5}
|
||||||
previousText={
|
ofText="/"
|
||||||
<svg className="icons icon--24 icon--gray">
|
previousText={t('previous_btn')}
|
||||||
<use xlinkHref="#arrow-left" />
|
nextText={t('next_btn')}
|
||||||
</svg>}
|
pageText={t('page_table_footer_text')}
|
||||||
nextText={
|
|
||||||
<svg className="icons icon--24 icon--gray">
|
|
||||||
<use xlinkHref="#arrow-right" />
|
|
||||||
</svg>}
|
|
||||||
loadingText={t('loading_table_status')}
|
|
||||||
pageText=''
|
|
||||||
ofText=''
|
|
||||||
rowsText={t('rows_table_footer_text')}
|
rowsText={t('rows_table_footer_text')}
|
||||||
|
loadingText={t('loading_table_status')}
|
||||||
noDataText={t('rewrite_not_found')}
|
noDataText={t('rewrite_not_found')}
|
||||||
showPageSizeOptions={false}
|
|
||||||
showPageJump={false}
|
|
||||||
renderTotalPagesCount={() => false}
|
|
||||||
getPaginationProps={() => ({ className: 'custom-pagination' })}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,24 +128,15 @@ class Table extends Component {
|
||||||
columns={this.columns}
|
columns={this.columns}
|
||||||
showPagination
|
showPagination
|
||||||
defaultPageSize={10}
|
defaultPageSize={10}
|
||||||
showPageSizeOptions={false}
|
|
||||||
showPageJump={false}
|
|
||||||
renderTotalPagesCount={() => false}
|
|
||||||
loading={loading}
|
loading={loading}
|
||||||
minRows={6}
|
minRows={6}
|
||||||
pageText=''
|
ofText="/"
|
||||||
ofText=''
|
previousText={t('previous_btn')}
|
||||||
|
nextText={t('next_btn')}
|
||||||
|
pageText={t('page_table_footer_text')}
|
||||||
|
rowsText={t('rows_table_footer_text')}
|
||||||
loadingText={t('loading_table_status')}
|
loadingText={t('loading_table_status')}
|
||||||
noDataText={whitelist ? t('no_whitelist_added') : t('no_blocklist_added')}
|
noDataText={whitelist ? t('no_whitelist_added') : t('no_blocklist_added')}
|
||||||
getPaginationProps={() => ({ className: 'custom-pagination' })}
|
|
||||||
previousText={
|
|
||||||
<svg className="icons icon--24 icon--gray w-100 h-100">
|
|
||||||
<use xlinkHref="#arrow-left" />
|
|
||||||
</svg>}
|
|
||||||
nextText={
|
|
||||||
<svg className="icons icon--24 icon--gray w-100 h-100">
|
|
||||||
<use xlinkHref="#arrow-right" />
|
|
||||||
</svg>}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ const getClientCell = ({
|
||||||
|
|
||||||
const autoClient = autoClients.find((autoClient) => autoClient.name === client);
|
const autoClient = autoClients.find((autoClient) => autoClient.name === client);
|
||||||
const source = autoClient?.source;
|
const source = autoClient?.source;
|
||||||
|
const whoisAvailable = whois_info && Object.keys(whois_info).length > 0;
|
||||||
|
|
||||||
const id = nanoid();
|
const id = nanoid();
|
||||||
|
|
||||||
|
@ -33,7 +34,7 @@ const getClientCell = ({
|
||||||
const isFiltered = checkFiltered(reason);
|
const isFiltered = checkFiltered(reason);
|
||||||
|
|
||||||
const nameClass = classNames('w-90 o-hidden d-flex flex-column', {
|
const nameClass = classNames('w-90 o-hidden d-flex flex-column', {
|
||||||
'mt-2': isDetailed && !name && !whois_info,
|
'mt-2': isDetailed && !name && !whoisAvailable,
|
||||||
'white-space--nowrap': isDetailed,
|
'white-space--nowrap': isDetailed,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -78,12 +79,19 @@ const getClientCell = ({
|
||||||
content: processedData,
|
content: processedData,
|
||||||
placement: 'bottom',
|
placement: 'bottom',
|
||||||
})}
|
})}
|
||||||
<div
|
<div className={nameClass}>
|
||||||
className={nameClass}>
|
<div data-tip={true} data-for={id}>
|
||||||
<div data-tip={true} data-for={id}>{formatClientCell(row, isDetailed)}</div>
|
{formatClientCell(row, isDetailed)}
|
||||||
{isDetailed && name
|
</div>
|
||||||
&& !whois_info && <div className="detailed-info d-none d-sm-block logs__text"
|
|
||||||
title={name}>{name}</div>}
|
{isDetailed && name && !whoisAvailable && (
|
||||||
|
<div
|
||||||
|
className="detailed-info d-none d-sm-block logs__text"
|
||||||
|
title={name}
|
||||||
|
>
|
||||||
|
{name}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
{renderBlockingButton(isFiltered, domain)}
|
{renderBlockingButton(isFiltered, domain)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -58,8 +58,7 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logs__text--wrap,
|
.logs__text--wrap {
|
||||||
.logs__text--whois {
|
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
}
|
}
|
||||||
|
@ -71,6 +70,7 @@
|
||||||
|
|
||||||
.logs__text--whois {
|
.logs__text--whois {
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
|
color: #9aa0ac;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logs__row .tooltip-custom {
|
.logs__row .tooltip-custom {
|
||||||
|
@ -362,7 +362,7 @@
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.-pageInfo {
|
.logs__table .-pageInfo {
|
||||||
--side-size: 2rem;
|
--side-size: 2rem;
|
||||||
font-variant-numeric: tabular-nums !important;
|
font-variant-numeric: tabular-nums !important;
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
|
@ -376,18 +376,18 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagination-bottom {
|
.logs__table .pagination-bottom {
|
||||||
justify-content: center !important;
|
justify-content: center !important;
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.-center:before {
|
.logs__table .-center:before {
|
||||||
content: '...';
|
content: '...';
|
||||||
transform: translateY(-0.25rem);
|
transform: translateY(-0.25rem);
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.-center:after {
|
.logs__table .-center:after {
|
||||||
content: '...';
|
content: '...';
|
||||||
transform: translateY(-0.25rem);
|
transform: translateY(-0.25rem);
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
|
|
@ -85,23 +85,13 @@ class AutoClients extends Component {
|
||||||
showPagination
|
showPagination
|
||||||
defaultPageSize={10}
|
defaultPageSize={10}
|
||||||
minRows={5}
|
minRows={5}
|
||||||
showPageSizeOptions={false}
|
ofText="/"
|
||||||
showPageJump={false}
|
previousText={t('previous_btn')}
|
||||||
renderTotalPagesCount={() => false}
|
nextText={t('next_btn')}
|
||||||
previousText={
|
pageText={t('page_table_footer_text')}
|
||||||
<svg className="icons icon--24 icon--gray w-100 h-100">
|
|
||||||
<use xlinkHref="#arrow-left" />
|
|
||||||
</svg>}
|
|
||||||
nextText={
|
|
||||||
<svg className="icons icon--24 icon--gray w-100 h-100">
|
|
||||||
<use xlinkHref="#arrow-right" />
|
|
||||||
</svg>}
|
|
||||||
loadingText={t('loading_table_status')}
|
|
||||||
pageText=''
|
|
||||||
ofText=''
|
|
||||||
rowsText={t('rows_table_footer_text')}
|
rowsText={t('rows_table_footer_text')}
|
||||||
|
loadingText={t('loading_table_status')}
|
||||||
noDataText={t('clients_not_found')}
|
noDataText={t('clients_not_found')}
|
||||||
getPaginationProps={() => ({ className: 'custom-pagination' })}
|
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
|
|
@ -297,23 +297,13 @@ class ClientsTable extends Component {
|
||||||
showPagination
|
showPagination
|
||||||
defaultPageSize={10}
|
defaultPageSize={10}
|
||||||
minRows={5}
|
minRows={5}
|
||||||
showPageSizeOptions={false}
|
ofText="/"
|
||||||
showPageJump={false}
|
previousText={t('previous_btn')}
|
||||||
renderTotalPagesCount={() => false}
|
nextText={t('next_btn')}
|
||||||
previousText={
|
pageText={t('page_table_footer_text')}
|
||||||
<svg className="icons icon--24 icon--gray w-100 h-100">
|
|
||||||
<use xlinkHref="#arrow-left" />
|
|
||||||
</svg>}
|
|
||||||
nextText={
|
|
||||||
<svg className="icons icon--24 icon--gray w-100 h-100">
|
|
||||||
<use xlinkHref="#arrow-right" />
|
|
||||||
</svg>}
|
|
||||||
loadingText={t('loading_table_status')}
|
|
||||||
pageText=''
|
|
||||||
ofText=''
|
|
||||||
rowsText={t('rows_table_footer_text')}
|
rowsText={t('rows_table_footer_text')}
|
||||||
|
loadingText={t('loading_table_status')}
|
||||||
noDataText={t('clients_not_found')}
|
noDataText={t('clients_not_found')}
|
||||||
getPaginationProps={() => ({ className: 'custom-pagination' })}
|
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|
|
@ -296,7 +296,7 @@ export const DEFAULT_LOGS_FILTER = {
|
||||||
|
|
||||||
export const DEFAULT_LANGUAGE = 'en';
|
export const DEFAULT_LANGUAGE = 'en';
|
||||||
|
|
||||||
export const TABLE_DEFAULT_PAGE_SIZE = 50;
|
export const TABLE_DEFAULT_PAGE_SIZE = 25;
|
||||||
|
|
||||||
export const TABLE_FIRST_PAGE = 0;
|
export const TABLE_FIRST_PAGE = 0;
|
||||||
|
|
||||||
|
|
|
@ -31,10 +31,11 @@ export const formatClientCell = (row, isDetailed = false, isLogs = true) => {
|
||||||
|
|
||||||
if (info) {
|
if (info) {
|
||||||
const { name, whois_info } = info;
|
const { name, whois_info } = info;
|
||||||
|
const whoisAvailable = whois_info && Object.keys(whois_info).length > 0;
|
||||||
|
|
||||||
if (name) {
|
if (name) {
|
||||||
if (isLogs) {
|
if (isLogs) {
|
||||||
nameContainer = !whois_info && isDetailed
|
nameContainer = !whoisAvailable && isDetailed
|
||||||
? (
|
? (
|
||||||
<small title={value}>{value}</small>
|
<small title={value}>{value}</small>
|
||||||
) : (
|
) : (
|
||||||
|
@ -54,7 +55,7 @@ export const formatClientCell = (row, isDetailed = false, isLogs = true) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (whois_info && isDetailed) {
|
if (whoisAvailable && isDetailed) {
|
||||||
whoisContainer = (
|
whoisContainer = (
|
||||||
<div className="logs__text logs__text--wrap logs__text--whois">
|
<div className="logs__text logs__text--wrap logs__text--whois">
|
||||||
{getFormattedWhois(whois_info)}
|
{getFormattedWhois(whois_info)}
|
||||||
|
|
Loading…
Reference in New Issue