From c9cc5257c742a3ad99ec4385721b937c578c97ce Mon Sep 17 00:00:00 2001 From: Khushboo Vashi Date: Thu, 18 Jul 2024 09:40:49 +0530 Subject: [PATCH] Fix Server Log minor UI issues. --- docs/en_US/tabbed_browser.rst | 1 + web/pgadmin/dashboard/static/js/Dashboard.jsx | 27 +++++++++---------- web/pgadmin/static/js/helpers/Notifier.jsx | 2 +- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/docs/en_US/tabbed_browser.rst b/docs/en_US/tabbed_browser.rst index 93b9d3ae2..79d34d30b 100644 --- a/docs/en_US/tabbed_browser.rst +++ b/docs/en_US/tabbed_browser.rst @@ -76,6 +76,7 @@ Click the *Configuration* tab to get the server configuration details. Click the *Logs* tab to get the server logs. * Use the Log Format switch to select the format you want. Text/Plain, JSON and CSV are supported. + The enable/disable state of the log format depends on the Postgresql.conf setting. * Use the Logs in tabular format? switch if you want to see the logs in a tabular format. Click the *System Statistics* tab to get the statistics for the system: diff --git a/web/pgadmin/dashboard/static/js/Dashboard.jsx b/web/pgadmin/dashboard/static/js/Dashboard.jsx index ad4a8b457..e9aa4a352 100644 --- a/web/pgadmin/dashboard/static/js/Dashboard.jsx +++ b/web/pgadmin/dashboard/static/js/Dashboard.jsx @@ -66,6 +66,9 @@ const Root = styled('div')(({theme}) => ({ width: '100%', minHeight: '400px', padding: '4px', + '& .Dashboard-cardHeader': { + padding: '8px', + }, '& .Dashboard-mainTabs': { ...theme.mixins.panelBorder.all, height: '100%', @@ -75,10 +78,9 @@ const Root = styled('div')(({theme}) => ({ color: theme.palette.error.main }, '& .Dashboard-download': { - alignSelf: 'end', '& .Dashboard-downloadButton': { - width: '35px', - height:'30px' + width: '40px', + height:'30px !important', }, }, '& .Dashboard-textArea': { @@ -87,9 +89,6 @@ const Root = styled('div')(({theme}) => ({ '& .RefreshButtons': { display: 'flex', }, - '& .Mui-disabled': { - pointerEvents: 'auto', - }, }, }, }, @@ -823,10 +822,8 @@ function Dashboard({ let _format = res.data; let _frm = [ {'label': gettext('Text'), 'value': 'T', 'disabled': !_format.includes('stderr')}, - {'label': gettext('JSON'), 'value': 'J', 'disabled': !_format.includes('jsonlog'), - tooltip: gettext('Enable JSON logging from postgresql.conf.')}, - {'label': gettext('CSV'), 'value': 'C', 'disabled': !_format.includes('csvlog'), - tooltip: gettext('Enable CSV logging from postgres.conf.')} + {'label': gettext('JSON'), 'value': 'J', 'disabled': !_format.includes('jsonlog')}, + {'label': gettext('CSV'), 'value': 'C', 'disabled': !_format.includes('csvlog')} ]; setLogConfigFormat(_frm); }) @@ -886,7 +883,7 @@ function Dashboard({ }) .then((res) => { if (res.data && res.data['logs_disabled']) { - setSsMsg(gettext('Please enable the logging to view the server logs.')); + setSsMsg(gettext('Please enable the logging to view the server logs or check the log file is in place or not.')); } else { setDashData(parseData(res.data)); } @@ -966,7 +963,7 @@ function Dashboard({ label: gettext('Table based logs'), }; const CustomLogHeader = () => { - return ( + return (