(frequency = updateFrequency)
| 401 | }; |
| 402 | |
| 403 | const _onChangeAutoUpdate = (frequency = updateFrequency) => { |
| 404 | if (updateFreqType === "seconds" && frequency < 10 && frequency > 0) { |
| 405 | setAutoUpdateError("Invalid update frequency"); |
| 406 | return; |
| 407 | } |
| 408 | |
| 409 | setAutoUpdateLoading(true); |
| 410 | dispatch(updateChart({ |
| 411 | project_id: params.projectId, |
| 412 | chart_id: chart.id, |
| 413 | data: { autoUpdate: frequency }, |
| 414 | justUpdates: true, |
| 415 | })) |
| 416 | .then(() => { |
| 417 | setAutoUpdateLoading(false); |
| 418 | setUpdateModal(false); |
| 419 | }) |
| 420 | .catch(() => { |
| 421 | setAutoUpdateLoading(false); |
| 422 | setError(true); |
| 423 | setUpdateModal(false); |
| 424 | }); |
| 425 | }; |
| 426 | |
| 427 | const _chartHasFilter = (dashFilters = activeDashboardFilters) => { |
| 428 | let found = false; |
no test coverage detected