Fix System Stat dashboard UI issues.

This commit is contained in:
Khushboo Vashi
2023-10-12 14:04:58 +05:30
parent 37dced23f0
commit 82fade7645
3 changed files with 29 additions and 42 deletions

View File

@@ -49,7 +49,7 @@ const useStyles = makeStyles((theme) => ({
}));
const chartsDefault = {
'hpc_stats': {'Handle': [], 'Process': []},
'hpc_stats': {'Process': [], 'Handle': []},
};
const SummaryTable = (props) => {
@@ -294,7 +294,7 @@ export function SummaryWrapper(props) {
</div>
</Grid>
<Grid item md={6} sm={12} className={classes.chartContainer}>
<ChartContainer id='hpc-graph' title={gettext('Handle & process count')} datasets={props.processHandleCount.datasets} errorMsg={props.errorMsg} isTest={props.isTest}>
<ChartContainer id='hpc-graph' title={gettext('Process & handle count')} datasets={props.processHandleCount.datasets} errorMsg={props.errorMsg} isTest={props.isTest}>
<StreamingChart data={props.processHandleCount} dataPointSize={DATA_POINT_SIZE} xRange={X_AXIS_LENGTH} options={options} showSecondAxis={true} />
</ChartContainer>
</Grid>

View File

@@ -19,8 +19,8 @@
{% set add_union = true %}
SELECT 'hpc_stats' AS chart_name, pg_catalog.row_to_json(t) AS chart_data
FROM (SELECT
(SELECT handle_count FROM pg_sys_os_info()) AS "{{ _('Handle') }}",
(SELECT process_count FROM pg_sys_os_info()) AS "{{ _('Process') }}"
(SELECT process_count FROM pg_sys_os_info()) AS "{{ _('Process') }}",
(SELECT handle_count FROM pg_sys_os_info()) AS "{{ _('Handle') }}"
) t
{% endif %}
{% if add_union and 'cpu_stats' in chart_names %}
@@ -110,4 +110,4 @@
{% if 'pi_stats' in chart_names %}
{% set add_union = true %}
SELECT 'pi_stats' AS chart_name, pg_catalog.row_to_json(t) AS chart_data FROM (SELECT * FROM pg_sys_process_info()) t
{% endif %}
{% endif %}