all files / src/SqlLab/ constants.js

100% Statements 5/5
100% Branches 0/0
100% Functions 0/0
100% Lines 5/5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35                                                            
import { t } from '../locales';
 
export const STATE_BSSTYLE_MAP = {
  failed: 'danger',
  pending: 'info',
  fetching: 'info',
  running: 'warning',
  stopped: 'danger',
  success: 'success',
};
 
export const STATUS_OPTIONS = [
  'success',
  'failed',
  'running',
  'pending',
];
 
export const TIME_OPTIONS = [
  'now',
  '1 hour ago',
  '1 day ago',
  '7 days ago',
  '28 days ago',
  '90 days ago',
  '1 year ago',
];
 
export const VISUALIZE_VALIDATION_ERRORS = {
  REQUIRE_CHART_TYPE: t('Pick a chart type!'),
  REQUIRE_TIME: t('To use this chart type you need at least one column flagged as a date'),
  REQUIRE_DIMENSION: t('To use this chart type you need at least one dimension'),
  REQUIRE_AGGREGATION_FUNCTION: t('To use this chart type you need at least one aggregation function'),
};