From b49c63c50333a507f6cdf72fbc5ad947c98f7407 Mon Sep 17 00:00:00 2001 From: Gilbert Cherrie Date: Fri, 31 May 2024 16:09:41 -0400 Subject: [PATCH] Fix survey table readability --- app/helpers/configuration_script_helper.rb | 3 ++- app/helpers/textual_table.rb | 4 ++-- .../components/miq-structured-list/index.jsx | 4 ++-- .../components/textual_summary/simple_table.jsx | 7 ++++++- .../components/textual_summary/textual_group.jsx | 1 + app/stylesheet/miq-structured-list.scss | 14 ++++++++++++++ app/views/configuration_script/show.html.haml | 3 ++- 7 files changed, 29 insertions(+), 7 deletions(-) diff --git a/app/helpers/configuration_script_helper.rb b/app/helpers/configuration_script_helper.rb index 9e7acd41be5..3222c7d955d 100644 --- a/app/helpers/configuration_script_helper.rb +++ b/app/helpers/configuration_script_helper.rb @@ -52,7 +52,8 @@ def textual_group_surveys TextualTable.new( _("Surveys"), items, - headers + headers, + 'survey-table' ) end diff --git a/app/helpers/textual_table.rb b/app/helpers/textual_table.rb index 67e29ef8b31..f5f41014530 100644 --- a/app/helpers/textual_table.rb +++ b/app/helpers/textual_table.rb @@ -1,5 +1,5 @@ -TextualTable = Struct.new(:title, :rows, :labels) do +TextualTable = Struct.new(:title, :rows, :labels, :className) do def locals - {:title => title, :rows => rows, :labels => labels, :component => 'SimpleTable'} + {:title => title, :rows => rows, :labels => labels, :component => 'SimpleTable', :className => className} end end diff --git a/app/javascript/components/miq-structured-list/index.jsx b/app/javascript/components/miq-structured-list/index.jsx index c64f0faaa91..d15f4ed493e 100644 --- a/app/javascript/components/miq-structured-list/index.jsx +++ b/app/javascript/components/miq-structured-list/index.jsx @@ -10,7 +10,7 @@ import { hasClickEvents } from './helpers'; /** Component to render the items in summary pages */ const MiqStructuredList = ({ - title, headers, rows, mode, onClick, message, + title, headers, rows, mode, onClick, message, className = '', }) => { const clickEvents = hasClickEvents(mode); @@ -35,7 +35,7 @@ const MiqStructuredList = ({ }; const accordionList = () => ( - + {simpleList()} diff --git a/app/javascript/components/textual_summary/simple_table.jsx b/app/javascript/components/textual_summary/simple_table.jsx index 7c18b250f7c..f36d267c031 100644 --- a/app/javascript/components/textual_summary/simple_table.jsx +++ b/app/javascript/components/textual_summary/simple_table.jsx @@ -4,10 +4,13 @@ import PropTypes from 'prop-types'; import MiqStructuredList from '../miq-structured-list'; export default function SimpleTable(props) { - const { rows, labels, title } = props; + const { + rows, labels, title, className, + } = props; return ( { case 'SimpleTable': return ( "layouts/flash_msg" -= render :partial => "layouts/textual_groups_generic" +.templates-summary-page + = render :partial => "layouts/textual_groups_generic"