Skip to content

Commit

Permalink
fix: Change all "N/A" to "Not available" (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fewwy authored Jul 11, 2022
1 parent 4fcc7e8 commit e89a6dd
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 24 deletions.
2 changes: 1 addition & 1 deletion compiled-lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"medium": "Medium",
"moderate": "Moderate",
"modified": "Modified",
"nA": "N/A",
"nA": "Not available",
"name": "Name",
"noAffectedClustersBody": "This recommendation does not affect any cluster.",
"noAffectedClustersTitle": "No clusters",
Expand Down
19 changes: 7 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ const AffectedClustersTable = ({ query, rule, afterDisableFn }) => {
</span>,
<span key={r.id}>
{r.cells[AFFECTED_CLUSTERS_VERSION_CELL] ||
intl.formatMessage(messages.notAvailable)}
intl.formatMessage(messages.nA)}
</span>,
<span key={r.id}>
{r.cells[AFFECTED_CLUSTERS_LAST_SEEN_CELL] ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -634,14 +634,14 @@ describe('non-empty successful affected clusters table', () => {
});
});

it('missing impacted date shown as N/A', () => {
it('missing impacted date shown as Not available', () => {
filterApply({
name: values.filter((v) => !Object.hasOwn(v, 'impacted'))[0].name,
});
cy.get('[data-label="Impacted"]').should('contain', 'N/A');
cy.get('[data-label="Impacted"]').should('contain', 'Not available');
removeAllChips();
filterApply({ name: values.filter((v) => v['impacted'] === '')[0].name });
cy.get('[data-label="Impacted"]').should('contain', 'N/A');
cy.get('[data-label="Impacted"]').should('contain', 'Not available');
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/Components/ClustersListTable/ClustersListTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const ClustersListTable = ({
{it.cluster_name || it.cluster_id}
</Link>
</span>,
ver === '0.0.0' ? intl.formatMessage(messages.notAvailable) : ver,
ver === '0.0.0' ? intl.formatMessage(messages.nA) : ver,
it.total_hit_count,
it.hits_by_total_risk?.[4] || 0,
it.hits_by_total_risk?.[3] || 0,
Expand Down
8 changes: 2 additions & 6 deletions src/Messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ export default defineMessages({
},
nA: {
id: 'nA',
description: 'Abreviated as N/A, text equivelent, not applicable',
defaultMessage: 'N/A',
description: 'Abreviated as not available, text equivelent, not applicable',
defaultMessage: 'Not available',
},
permsTitle: {
id: 'permsTitle',
Expand Down Expand Up @@ -605,10 +605,6 @@ export default defineMessages({
id: 'filterByVersion',
defaultMessage: 'Filter by version',
},
notAvailable: {
id: 'notAvailable',
defaultMessage: 'Not available',
},
impacted: {
id: 'impacted',
defaultMessage: 'Impacted',
Expand Down

0 comments on commit e89a6dd

Please sign in to comment.