<commit_before>import React, {PureComponent} from 'react'

import {SearchStatus} from 'src/types/logs'
import {formatTime} from 'src/logs/utils'

interface Props {
  status: SearchStatus
  lower: number
  upper: number
}

class LoadingStatus extends PureComponent<Props> {
  public render() {
    return (
      <div className="logs-viewer--table-container generic-empty-state">
        {this.loadingSpinner}
        <h4>
          {this.loadingMessage} {this.description}
        </h4>
      </div>
    )
  }

  private get description(): JSX.Element {
    switch (this.props.status) {
      case SearchStatus.SourceError:
        return (
          <>
            Try changing your <strong>Source</strong> or <strong>Bucket</strong>.
          </>
        )
      case SearchStatus.NoResults:
        return (
          <>
            Try changing the <strong>Time Range</strong> or{' '}
            <strong>Removing Filters</strong><commit_msg>Fix loading empty state (#1149)<commit_after>import React, {PureComponent} from 'react'

import {EmptyState, ComponentSpacer,Alignment ComponentSize} from 'src/clockface'

import {SearchStatus} from 'src/types/logs'
import {formatTime} from 'src/logs/utils'

interface Props {
  status: SearchStatus
  lower: number
  upper: number
}

class LoadingStatus extends PureComponent<Props> {
  public render() {
    return (
      <div className="logs-viewer--table-container">
        <EmptyState size={ComponentSize.Large}>
          {this.loadingSpinner}
          <h4>
          <ComponentSpacer align={Alignment.Center}>
            <>{this.loadingMessage}</>
            </ComponentSpacer>
            <ComponentSpacer align={Alignment.Center}>
            <>{this.description}</>
          </ComponentSpacer>
          </h4>
        </EmptyState>
      </div>
    )
  }

  private get description(): JSX.Element {
    switch (this.props.status) {
      case SearchStatus.SourceError:
        return (
          <>
            Try changing your <strong>Source</strong> or <strong>Bucket</strong>.
          </>
        )
      case SearchStatus.NoResults:
        return (
          <>
            Try changing the <strong>Time Range</strong> or{' '}
            <strong>Removing Filters</strong>
{'fraction_non_alphanumeric': 0.11903700401248328, 'fraction_numerical': 0.0035666518056174765, 'mean_word_length': 2.36431784107946, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, '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': '5396086', 'n_tokens_mistral': 639, 'n_tokens_neox': 624, 'n_words': 143}