Skip to content

Commit

Permalink
Fix #1810
Browse files Browse the repository at this point in the history
- client: Fix query log bugs

Squashed commit of the following:

commit 188bbad
Merge: 15db9e9 ec6e0be
Author: Andrey Meshkov <am@adguard.com>
Date:   Thu Jun 18 22:43:11 2020 +0300

    Merge branch 'master' into fix/1810

commit 15db9e9
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Thu Jun 18 19:01:10 2020 +0300

    Open tooltip on hover, show scroll on overflow y

commit 19c0133
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Thu Jun 18 17:17:46 2020 +0300

    Replace tooltip component

commit 7e7103d
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Thu Jun 18 14:21:54 2020 +0300

    -client: Fix query log bugs
  • Loading branch information
ameshkov committed Jun 18, 2020
1 parent ec6e0be commit aa7b3c3
Show file tree
Hide file tree
Showing 13 changed files with 122 additions and 249 deletions.
98 changes: 54 additions & 44 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
"react-dom": "^16.13.1",
"react-i18next": "^11.4.0",
"react-modal": "^3.11.2",
"react-popper-tooltip": "^2.11.1",
"react-redux": "^7.2.0",
"react-redux-loading-bar": "^4.6.0",
"react-router-dom": "^5.2.0",
"react-router-hash-link": "^1.2.2",
"react-select": "^3.1.0",
"react-table": "^6.11.4",
"react-tooltip": "^4.2.6",
"react-transition-group": "^4.4.1",
"redux": "^4.0.5",
"redux-actions": "^2.6.5",
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/Dashboard/Clients.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Fragment } from 'react';
import React from 'react';
import ReactTable from 'react-table';
import PropTypes from 'prop-types';
import { Trans, withTranslation } from 'react-i18next';
Expand Down Expand Up @@ -60,13 +60,13 @@ const clientCell = (t, toggleClientStatus, processing, disallowedClients) => fun
const ipMatchListStatus = getIpMatchListStatus(value, disallowedClients);

return (
<Fragment>
<>
<div className="logs__row logs__row--overflow logs__row--column">
{formatClientCell(row, t)}
</div>
{ipMatchListStatus !== IP_MATCH_LIST_STATUS.CIDR
&& renderBlockingButton(ipMatchListStatus, value, toggleClientStatus, processing)}
</Fragment>
</>
);
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
.custom-tooltip {
.tooltip__container {
padding: 1rem 1.5rem 1.25rem 1.5rem;
font-size: 16px !important;
box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
border-radius: 4px !important;
pointer-events: auto !important;
}

/*crutch, may cause problems https://github.com/wwayne/react-tooltip/issues/204*/
@media (hover: none) {
.custom-tooltip {
position: absolute !important;
top: 4rem !important;
}
background-color: var(--white);
z-index: 102;
overflow-y: scroll;
max-height: 100%;
}

.white-space--nowrap {
white-space: nowrap !important;
}

.white-space--normal {
.overflow-break {
white-space: normal !important;
}

.word-break--break-all {
word-break: break-all !important;
overflow-wrap: break-word;
}

.grid {
Expand Down Expand Up @@ -74,10 +67,6 @@
.grid .key-colon, .grid .title--border {
font-weight: bold;
}

.custom-tooltip {
overflow-y: scroll;
}
}

.grid .key-colon:nth-child(odd)::after {
Expand All @@ -92,14 +81,6 @@
grid-auto-flow: column;
}

.custom-tooltip.show {
opacity: 1 !important;
}

.custom-tooltip:hover {
opacity: 1 !important;
}

.grid-content > * {
justify-content: space-between !important;
width: 100% !important;
Expand Down
3 changes: 1 addition & 2 deletions client/src/components/Logs/Cells/getClientCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,11 @@ const getClientCell = ({
className: hintClass,
columnClass: 'grid grid--limited',
tooltipClass: 'px-5 pb-5 pt-4 mw-75',
dataTip: true,
xlinkHref: 'question',
contentItemClass: 'text-truncate key-colon',
title: 'client_details',
content: processedData,
place: 'bottom',
placement: 'bottom',
})}
<div
className={nameClass}>
Expand Down
Loading

0 comments on commit aa7b3c3

Please sign in to comment.