Skip to content

Commit

Permalink
upcoming: [M3-7707] - Change AGLB Rule Execution Order Column Header …
Browse files Browse the repository at this point in the history
…and Values (#10112)

* change `Execution` ➡️ `Execution Order` and use numeric value

* update unit test

* Added changeset: Change ACLB Rule Execution Order Column

---------

Co-authored-by: Banks Nussman <banks@nussman.us>
  • Loading branch information
bnussman-akamai and bnussman authored Jan 29, 2024
1 parent 2008880 commit c43b09e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

Change ACLB Rule Execution Order Column ([#10112](https://github.com/linode/manager/pull/10112))
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ interface RuleRowProps {
totalRules: number;
}

const getExecutionLabel = (index: number, total: number) => {
if (index === 0) {
return 'First';
} else if (index === total - 1) {
return 'Last';
}
return index + 1;
};

export const RuleRow = (props: RuleRowProps) => {
const {
index,
Expand Down Expand Up @@ -77,7 +68,7 @@ export const RuleRow = (props: RuleRowProps) => {
}}
>
<StyledDragIndicator aria-label="Drag indicator icon" />
{getExecutionLabel(index, totalRules)}
{index + 1}
</Box>
<Box
sx={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('RulesTable', () => {
route={mockRoute}
/>
);
expect(getByText('Execution')).toBeInTheDocument();
expect(getByText('Execution Order')).toBeInTheDocument();
expect(getByText('Match Value')).toBeInTheDocument();
});

Expand All @@ -56,7 +56,7 @@ describe('RulesTable', () => {
/>
);

expect(getByText('First')).toBeInTheDocument();
expect(getByText('1')).toBeInTheDocument();
expect(getByText('/images/*')).toBeInTheDocument();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const RulesTable = (props: Props) => {
width: xsDown ? '50%' : '15%',
}}
>
Execution
Execution Order
</Box>
<Box sx={{ ...sxItemSpacing, width: xsDown ? '45%' : '20%' }}>
Match Value
Expand Down

0 comments on commit c43b09e

Please sign in to comment.