<commit_before>import _ from 'lodash'
import {timeRanges} from 'shared/data/timeRanges'
import {NULL_HOVER_TIME} from 'src/shared/constants/tableGraph'

import {applyDashboardTempVarOverrides} from 'src/dashboards/utils/tempVars'

const {lower, upper} = timeRanges.find(tr => tr.lower === 'now() - 1h')

export const initialState = {
  dashboards: [],
  timeRange: {lower, upper},
  zoomedTimeRange: {lower: null, upper: null},
  isEditMode: false,
  cellQueryStatus: {queryID: null, status: null},
  hoverTime: NULL_HOVER_TIME,
  activeCellID: '',
  tempVarOverrides: {},
}

import {TEMPLATE_VARIABLE_TYPES} from 'src/dashboards/constants'

const ui = (state = initialState, action) => {
  switch (action.type) {
    case 'LOAD_DASHBOARDS': {
      const {dashboards} = action.payload
      const newState = {
        dashboards,
      }

      return {...state, ...newState}
    }

    case 'LOAD_DASHBOARD': {
      const {dashboard} = action.payload<commit_msg>Remove obsolete tempVarOverrides reducer prop<commit_after>import _ from 'lodash'
import {timeRanges} from 'shared/data/timeRanges'
import {NULL_HOVER_TIME} from 'src/shared/constants/tableGraph'

import {applyDashboardTempVarOverrides} from 'src/dashboards/utils/tempVars'

const {lower, upper} = timeRanges.find(tr => tr.lower === 'now() - 1h')

export const initialState = {
  dashboards: [],
  timeRange: {lower, upper},
  zoomedTimeRange: {lower: null, upper: null},
  isEditMode: false,
  cellQueryStatus: {queryID: null, status: null},
  hoverTime: NULL_HOVER_TIME,
  activeCellID: '',
}

import {TEMPLATE_VARIABLE_TYPES} from 'src/dashboards/constants'

const ui = (state = initialState, action) => {
  switch (action.type) {
    case 'LOAD_DASHBOARDS': {
      const {dashboards} = action.payload
      const newState = {
        dashboards,
      }

      return {...state, ...newState}
    }

    case 'LOAD_DASHBOARD': {
      const {dashboard} = action.payload
{'fraction_non_alphanumeric': 0.13106295149638802, 'fraction_numerical': 0.0010319917440660474, 'mean_word_length': 4.036363636363636, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4802113', 'n_tokens_mistral': 652, 'n_tokens_neox': 658, 'n_words': 146}