MCPcopy Index your code
hub / github.com/chartbrew/chartbrew / _onChangeAutoUpdate

Function _onChangeAutoUpdate

client/src/containers/Chart/Chart.jsx:403–425  ·  view source on GitHub ↗
(frequency = updateFrequency)

Source from the content-addressed store, hash-verified

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;

Callers 1

ChartFunction · 0.85

Calls 2

updateChartFunction · 0.90
dispatchFunction · 0.50

Tested by

no test coverage detected