Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ export default defineMessages({
titlesAdvisoryType: {
id: 'titlesAdvisoryType',
description: 'title with capital letter',
defaultMessage: 'Advisory type',
defaultMessage: 'Type',
},
titlesAffectedSystems: {
id: 'affectedSystems',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ exports[`AdvisoryHeader Should match the snapshots when loaded 1`] = `
data-ouia-component-type="PF6/Title"
data-ouia-safe="true"
>
Advisory type
Type
</h5>
</div>
<div
Expand Down Expand Up @@ -218,7 +218,7 @@ exports[`AdvisoryHeader Should match the snapshots when loading 1`] = `
data-ouia-component-type="PF6/Title"
data-ouia-safe="true"
>
Advisory type
Type
</h5>
</div>
<div
Expand Down
14 changes: 5 additions & 9 deletions src/Utilities/Helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,15 +479,11 @@ export const buildFilterChips = (filters, search, searchChipLabel = 'Search', pa
(item) => filters[item] !== '' && [].concat(filters[item]).length !== 0,
);
filterConfig = filterConfig.concat(
categories.map((category) => {
const label =
(category === 'installed_evra' && 'Package version') || filterCategories[category].label;
return {
category: label,
id: category,
chips: buildChips(filters, category),
};
}),
categories.map((category) => ({
category: filterCategories[category].label,
id: category,
chips: buildChips(filters, category),
})),
);
};

Expand Down
4 changes: 2 additions & 2 deletions src/Utilities/Helpers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ describe('Helpers tests', () => {
filters | search | result
${{ advisory_type_name: 'bugfix' }} | ${undefined} | ${[
{
category: 'Advisory type',
category: 'Type',
chips: [{ id: 'bugfix', name: 'Bugfix', value: 'bugfix' }],
id: 'advisory_type_name',
},
Expand Down Expand Up @@ -372,7 +372,7 @@ describe('Helpers tests', () => {
deleteTitle: 'Clear filters',
filters: [
{
category: 'Advisory type',
category: 'Type',
chips: [{ id: 'bugfix', name: 'Bugfix', value: 'bugfix' }],
id: 'advisory_type_name',
},
Expand Down
7 changes: 5 additions & 2 deletions src/Utilities/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,15 +239,15 @@ export const rebootRequired = [

export const filterCategories = {
advisory_type_name: {
label: 'Advisory type',
label: 'Type',
values: advisoryTypes,
},
severity: {
label: 'Severity',
values: advisorySeverities,
},
public_date: {
label: 'Public date',
label: 'Publish date',
values: publicDateOptions,
},
update_status: {
Expand Down Expand Up @@ -283,6 +283,9 @@ export const filterCategories = {
group_name: {
label: 'Group',
},
installed_evra: {
label: 'Version',
},
};

export const entityTypes = {
Expand Down
Loading