Merge pull request #15026 from influxdata/fix/check-update

fix(ui/src/alerting/components/CheckCard): include entire check in update
pull/15031/head
Michael Desa 2019-09-06 16:52:19 -04:00 committed by GitHub
commit a1ffc5c8ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -69,7 +69,7 @@ const CheckCard: FunctionComponent<Props> = ({
}) => {
const onUpdateName = async (name: string) => {
try {
await updateCheck({id: check.id, name})
await updateCheck({...check, name})
} catch (e) {
onNotify(updateCheckFailed(e.message))
}
@ -77,7 +77,7 @@ const CheckCard: FunctionComponent<Props> = ({
const onUpdateDescription = async (description: string) => {
try {
await updateCheck({id: check.id, description})
await updateCheck({...check, description})
} catch (e) {
onNotify(updateCheckFailed(e.message))
}
@ -95,7 +95,7 @@ const CheckCard: FunctionComponent<Props> = ({
const status = check.status === 'active' ? 'inactive' : 'active'
try {
await updateCheck({id: check.id, status})
await updateCheck({...check, status})
} catch (e) {
onNotify(updateCheckFailed(e.message))
}