Skip to content

Commit

Permalink
ui/policy: always use Dest API (#3867)
Browse files Browse the repository at this point in the history
* remove dest conditionals from policy page

* add missing name attr

* fix step test

* update remaining step tests

* remove unused files/code

* rename Chip -> ServiceChip

* update favorites test

* remove console.log

* add checks after each add action

* remove .only

* update material select tests

* add checks for webhook create

---------

Co-authored-by: Forfold <Nathaniel.Cook@Target.com>
  • Loading branch information
mastercactapus and Forfold committed May 15, 2024
1 parent a0751b9 commit a6f2e50
Show file tree
Hide file tree
Showing 16 changed files with 192 additions and 910 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ReactNode } from 'react'
import { Typography, Grid, Divider } from '@mui/material'
import makeStyles from '@mui/styles/makeStyles'
import { ServiceChip } from '../../../util/Chips'
import { ServiceChip } from '../../../util/ServiceChip'
import { FormField } from '../../../forms'
import Markdown from '../../../util/Markdown'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import makeStyles from '@mui/styles/makeStyles'
import ServiceLabelFilterContainer from '../../../services/ServiceFilterContainer'
import { Search as SearchIcon } from '@mui/icons-material'
import { FavoriteIcon } from '../../../util/SetFavoriteButton'
import { ServiceChip } from '../../../util/Chips'
import { ServiceChip } from '../../../util/ServiceChip'
import AddIcon from '@mui/icons-material/Add'
import _ from 'lodash'
import getServiceFilters from '../../../util/getServiceFilters'
Expand Down
82 changes: 0 additions & 82 deletions web/src/app/escalation-policies/PolicyStepCreateDialog.tsx

This file was deleted.

69 changes: 0 additions & 69 deletions web/src/app/escalation-policies/PolicyStepEditDialog.tsx

This file was deleted.

3 changes: 1 addition & 2 deletions web/src/app/escalation-policies/PolicyStepEditDialogDest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ function PolicyStepEditDialogDest(
// - actions field has it's own validation
// - errors on existing actions are not handled specially, and just display in the dialog (i.e., duplicates)
// - the delay field has no validation, and is automatically clamped to the min/max values by the backend
const [a, errs] = splitErrorsByPath(editStepStatus.error, [])
console.log(a, errs, editStepStatus.error)
const [, errs] = splitErrorsByPath(editStepStatus.error, [])

return (
<FormDialog
Expand Down
Loading

0 comments on commit a6f2e50

Please sign in to comment.