diff --git a/packages/api-v4/src/aglb/types.ts b/packages/api-v4/src/aglb/types.ts index 7dcae7df052..ab3795cc682 100644 --- a/packages/api-v4/src/aglb/types.ts +++ b/packages/api-v4/src/aglb/types.ts @@ -42,7 +42,12 @@ type Policy = | 'random' | 'maglev'; -export type MatchField = 'path_prefix' | 'query' | 'host' | 'header' | 'method'; +export type MatchField = + | 'always_match' + | 'path_prefix' + | 'query' + | 'header' + | 'method'; export interface RoutePayload { label: string; diff --git a/packages/manager/.changeset/pr-10016-fixed-1703172060704.md b/packages/manager/.changeset/pr-10016-fixed-1703172060704.md new file mode 100644 index 00000000000..62ec8c3de7f --- /dev/null +++ b/packages/manager/.changeset/pr-10016-fixed-1703172060704.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Fixed +--- + +AGLB route rules being cleared when updating a route ([#10016](https://github.com/linode/manager/pull/10016)) diff --git a/packages/manager/.changeset/pr-10016-fixed-1703172108441.md b/packages/manager/.changeset/pr-10016-fixed-1703172108441.md new file mode 100644 index 00000000000..cd77df12b4c --- /dev/null +++ b/packages/manager/.changeset/pr-10016-fixed-1703172108441.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Fixed +--- + +AGLB Service Target validation ([#10016](https://github.com/linode/manager/pull/10016)) diff --git a/packages/manager/cypress/e2e/core/loadBalancers/load-balancer-service-targets.spec.ts b/packages/manager/cypress/e2e/core/loadBalancers/load-balancer-service-targets.spec.ts index 75a33020556..ea8a271d5d9 100644 --- a/packages/manager/cypress/e2e/core/loadBalancers/load-balancer-service-targets.spec.ts +++ b/packages/manager/cypress/e2e/core/loadBalancers/load-balancer-service-targets.spec.ts @@ -200,20 +200,10 @@ describe('Akamai Global Load Balancer service targets', () => { .should('be.visible') .click(); - // Confirm that health check options are hidden when health check is disabled. - cy.findByText('Use Health Checks').should('be.visible').click(); - - cy.get('[data-qa-healthcheck-options]').should('not.exist'); - - // Re-enable health check, fill out form. - cy.findByText('Use Health Checks') + cy.findByLabelText('Health Check Host') .scrollIntoView() .should('be.visible') - .click(); - - cy.get('[data-qa-healthcheck-options]') - .scrollIntoView() - .should('be.visible'); + .type('example.com'); ui.button .findByTitle('Create Service Target') @@ -382,30 +372,6 @@ describe('Akamai Global Load Balancer service targets', () => { mockServiceTarget.healthcheck.unhealthy_threshold ); - // Confirm that health check options are hidden when health check is disabled. - cy.findByText('Use Health Checks').should('be.visible').click(); - - cy.get('[data-qa-healthcheck-options]').should('not.exist'); - - // Re-enable health check, fill out form. - cy.findByText('Use Health Checks') - .scrollIntoView() - .should('be.visible') - .click(); - - cy.get('[data-qa-healthcheck-options]') - .scrollIntoView() - .should('be.visible'); - - // Confirm that health check options are restored to defaults after toggle. - cy.findByLabelText('Interval').should('have.value', 10); - - cy.findByLabelText('Timeout').should('have.value', 5000); - - cy.findByLabelText('Healthy Threshold').should('have.value', 5); - - cy.findByLabelText('Unhealthy Threshold').should('have.value', 5); - //Confirm that health check path and host match service target data. cy.findByLabelText('Health Check Path', { exact: false }).should( 'have.value', diff --git a/packages/manager/src/features/LoadBalancers/LoadBalancerCreate/ServiceTargetForm.tsx b/packages/manager/src/features/LoadBalancers/LoadBalancerCreate/ServiceTargetForm.tsx index 72806252b4c..821a6ae2e30 100644 --- a/packages/manager/src/features/LoadBalancers/LoadBalancerCreate/ServiceTargetForm.tsx +++ b/packages/manager/src/features/LoadBalancers/LoadBalancerCreate/ServiceTargetForm.tsx @@ -7,7 +7,6 @@ import { ActionsPanel } from 'src/components/ActionsPanel/ActionsPanel'; import { Autocomplete } from 'src/components/Autocomplete/Autocomplete'; import { SelectedIcon } from 'src/components/Autocomplete/Autocomplete.styles'; import { BetaChip } from 'src/components/BetaChip/BetaChip'; -import { Box } from 'src/components/Box'; import { Divider } from 'src/components/Divider'; import { FormControlLabel } from 'src/components/FormControlLabel'; import { FormHelperText } from 'src/components/FormHelperText'; @@ -18,7 +17,6 @@ import { Radio } from 'src/components/Radio/Radio'; import { RadioGroup } from 'src/components/RadioGroup'; import { Stack } from 'src/components/Stack'; import { TextField } from 'src/components/TextField'; -import { Toggle } from 'src/components/Toggle/Toggle'; import { TooltipIcon } from 'src/components/TooltipIcon'; import { Typography } from 'src/components/Typography'; @@ -128,10 +126,11 @@ export const ServiceTargetForm = (props: Props) => { return (