mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Variables: Only update panels that are impacted by variable change (#39420)
* Refactor: adds affectedPanelIds and fixes some bugs * Refactor: Fixes all dependencies and affected panel ids * Refactor: glue it together with events * Chore: remove debug code * Chore: remove unused events * Chore: removes unused function * Chore: reverts processRepeats * Chore: update to use redux state * Refactor: adds feature toggle in variables settings * Refactor: adds appEvents to jest-setup * Tests: adds tests for strict panel refresh logic * Refactor: small refactor * Refactor: moved to more events * Tests: fixes test * Refactor: makes sure we store strictPanelRefreshMode in dashboard model * Refactor: reporting and adds tests * Tests: fix broken tests * Tests: fix broken initDashboard test * Tests: fix broken Wrapper test * Refactor: adds solution for $__all_variables * Chore: updates to radio button * Refactor: removes toggle and calculates threshold instead * Chore: fix up tests * Refactor: moving functions around * Tests: fixes broken test * Update public/app/features/dashboard/services/TimeSrv.ts Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com> * Chore: fix after PR comments * Chore: fix import and add comment * Chore: update after PR comments Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
import { includes, isDate } from 'lodash';
|
||||
import { DateTime, dateTime, dateTimeForTimeZone, ISO_8601, isDateTime, DurationUnit } from './moment_wrapper';
|
||||
import { DateTime, dateTime, dateTimeForTimeZone, DurationUnit, isDateTime, ISO_8601 } from './moment_wrapper';
|
||||
import { TimeZone } from '../types/index';
|
||||
|
||||
const units: DurationUnit[] = ['y', 'M', 'w', 'd', 'h', 'm', 's', 'Q'];
|
||||
|
||||
/**
|
||||
* Determine if a string contains a relative date time.
|
||||
* @param text
|
||||
*/
|
||||
export function isMathString(text: string | DateTime | Date): boolean {
|
||||
if (!text) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user