MCPcopy Create free account
hub / github.com/chartbrew/chartbrew / _onRefreshPreview

Function _onRefreshPreview

client/src/containers/AddChart/AddChart.jsx:358–386  ·  view source on GitHub ↗
(skipParsing = true, filters = [])

Source from the content-addressed store, hash-verified

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;

Callers 2

_onChangeChartFunction · 0.70
AddChartFunction · 0.70

Calls 3

runQueryFunction · 0.90
runQueryWithFiltersFunction · 0.90
dispatchFunction · 0.50

Tested by

no test coverage detected