From d68c0f9f837351ec91794002dde6c6b4e9d8e72f Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Tue, 18 May 2021 16:31:13 +0300 Subject: [PATCH] Pull request: client: fix query log response status error Closes #3089 Squashed commit of the following: commit c5f3112298b11a73b77a35ea249f24abed221425 Author: Ildar Kamalov Date: Tue May 18 16:08:56 2021 +0300 client: fix query log response status error --- client/src/components/Logs/Cells/ClientCell.js | 1 - client/src/components/Logs/Cells/index.js | 1 - client/src/components/Logs/index.js | 8 ++++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/client/src/components/Logs/Cells/ClientCell.js b/client/src/components/Logs/Cells/ClientCell.js index fa579d46..fe9c7d54 100644 --- a/client/src/components/Logs/Cells/ClientCell.js +++ b/client/src/components/Logs/Cells/ClientCell.js @@ -209,7 +209,6 @@ ClientCell.propTypes = { client: propTypes.string.isRequired, client_id: propTypes.string, client_info: propTypes.shape({ - ids: propTypes.arrayOf(propTypes.string).isRequired, name: propTypes.string.isRequired, whois: propTypes.shape({ country: propTypes.string, diff --git a/client/src/components/Logs/Cells/index.js b/client/src/components/Logs/Cells/index.js index 5740bbd0..25d6584e 100644 --- a/client/src/components/Logs/Cells/index.js +++ b/client/src/components/Logs/Cells/index.js @@ -231,7 +231,6 @@ Row.propTypes = { client_proto: propTypes.string.isRequired, client_id: propTypes.string, client_info: propTypes.shape({ - ids: propTypes.arrayOf(propTypes.string).isRequired, name: propTypes.string.isRequired, whois: propTypes.shape({ country: propTypes.string, diff --git a/client/src/components/Logs/index.js b/client/src/components/Logs/index.js index bcc9a94d..2c159e2a 100644 --- a/client/src/components/Logs/index.js +++ b/client/src/components/Logs/index.js @@ -63,8 +63,8 @@ const Logs = () => { const history = useHistory(); const { - response_status: response_status_url_param = '', - search: search_url_param = '', + response_status: response_status_url_param, + search: search_url_param, } = queryString.parse(history.location.search); const { @@ -76,8 +76,8 @@ const Logs = () => { const filter = useSelector((state) => state.queryLogs.filter, shallowEqual); const logs = useSelector((state) => state.queryLogs.logs, shallowEqual); - const search = filter?.search || search_url_param; - const response_status = filter?.response_status || response_status_url_param; + const search = filter?.search || search_url_param || ''; + const response_status = filter?.response_status || response_status_url_param || ''; const [isSmallScreen, setIsSmallScreen] = useState(window.innerWidth < SMALL_SCREEN_SIZE); const [detailedDataCurrent, setDetailedDataCurrent] = useState({});