diff --git a/app/helpers/generic_object_helper/textual_summary.rb b/app/helpers/generic_object_helper/textual_summary.rb index d900bedf34c..0f946a9f848 100644 --- a/app/helpers/generic_object_helper/textual_summary.rb +++ b/app/helpers/generic_object_helper/textual_summary.rb @@ -20,7 +20,7 @@ def textual_updated def textual_group_attribute_details_list if @record.property_attributes.count.zero? - TextualEmpty.new(_('Attributes'), _('No Attributes defined')) + TextualEmpty.new(_('Attributes')) else TextualMultilabel.new( _('Attributes'), @@ -33,7 +33,7 @@ def textual_group_attribute_details_list def textual_group_associations if @record.property_associations.count.zero? - TextualEmpty.new(_('Associations'), _('No Associations defined')) + TextualEmpty.new(_('Associations')) else TextualGroup.new(_("Associations"), associations) end @@ -62,7 +62,7 @@ def textual_group_methods end if methods.count.zero? - TextualEmpty.new(_('Methods'), _('No Methods defined')) + TextualEmpty.new(_('Methods')) else TextualGroup.new(_('Methods'), methods) end diff --git a/app/javascript/components/textual_summary/empty_group.jsx b/app/javascript/components/textual_summary/empty_group.jsx index cbace001c21..2ad5bb0a4a2 100644 --- a/app/javascript/components/textual_summary/empty_group.jsx +++ b/app/javascript/components/textual_summary/empty_group.jsx @@ -1,25 +1,18 @@ import * as React from 'react'; import PropTypes from 'prop-types'; +import MiqStructuredList from '../miq-structured-list'; export default function EmptyGroup(props) { - const { title, text } = props; + const { title } = props; return ( - - - - - - - - - - - -
{title}
{text}
+ ); } EmptyGroup.propTypes = { title: PropTypes.string.isRequired, - text: PropTypes.string.isRequired, }; diff --git a/spec/helpers/generic_object_helper/textual_summary_spec.rb b/spec/helpers/generic_object_helper/textual_summary_spec.rb index 33b7ed35fc7..7230aa1f5ca 100644 --- a/spec/helpers/generic_object_helper/textual_summary_spec.rb +++ b/spec/helpers/generic_object_helper/textual_summary_spec.rb @@ -37,7 +37,7 @@ it "displays 'No Attributes defined' when Attributes do not exist" do @record = FactoryBot.create(:generic_object, :generic_object_definition_id => @generic_obj_defn.id) - expected = TextualEmpty.new('Attributes', 'No Attributes defined') + expected = TextualEmpty.new('Attributes') expect(textual_group_attribute_details_list).to eq(expected) end @@ -59,7 +59,7 @@ it "displays 'No Associations defined' when do not Associations exist" do @record = FactoryBot.create(:generic_object, :generic_object_definition_id => @generic_obj_defn_with_no_properties.id) - expected = TextualEmpty.new('Associations', 'No Associations defined') + expected = TextualEmpty.new('Associations') expect(textual_group_associations).to eq(expected) end @@ -75,7 +75,7 @@ it "displays 'No Methods defined' when do not Methods exist" do @record = FactoryBot.create(:generic_object, :generic_object_definition_id => @generic_obj_defn_with_no_properties.id) - expected = TextualEmpty.new('Methods', 'No Methods defined') + expected = TextualEmpty.new('Methods') expect(textual_group_methods).to eq(expected) end