(skipParsing = true, filters = [])
| 356 | }; |
| 357 | |
| 358 | const _onRefreshPreview = (skipParsing = true, filters = []) => { |
| 359 | if (!params.chartId) return; |
| 360 | dispatch(runQuery({ |
| 361 | project_id: params.projectId, |
| 362 | chart_id: params.chartId, |
| 363 | noSource: true, |
| 364 | skipParsing, |
| 365 | filters, |
| 366 | getCache: useCache |
| 367 | })) |
| 368 | .then(() => { |
| 369 | if (conditions.length > 0) { |
| 370 | return dispatch(runQueryWithFilters({ |
| 371 | project_id: params.projectId, |
| 372 | chart_id: newChart.id, |
| 373 | filters: conditions, |
| 374 | getCache: useCache, |
| 375 | })); |
| 376 | } |
| 377 | |
| 378 | return true; |
| 379 | }) |
| 380 | .then(() => { |
| 381 | setLoading(false); |
| 382 | }) |
| 383 | .catch(() => { |
| 384 | setLoading(false); |
| 385 | }); |
| 386 | }; |
| 387 | |
| 388 | const _onAddFilter = (condition) => { |
| 389 | let found = false; |
no test coverage detected