consts.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import { EHealthyStatus, ITimeRangeOption } from './Types';
  2. export const TOPO_WIDTH = 800;
  3. export const TOPO_HEIGHT = 600;
  4. export const TOPO_NODE_R = [68, 45, 30];
  5. export const TOPO_LINK_LENGTH = [160, 270];
  6. export const MAIN_VIEW_WIDTH = 600;
  7. export const CHART_WIDTH = 500;
  8. export const HEALTHY_INDEX_ROW_HEIGHT = 20;
  9. export const HEALTHY_INDEX_ROW_GAP_RATIO = 0.3;
  10. export const HEALTHY_STATUS_COLORS = {
  11. [EHealthyStatus.noData]: '#ccc',
  12. [EHealthyStatus.healthy]: '#6CD676',
  13. [EHealthyStatus.warning]: '#F4DD0E',
  14. [EHealthyStatus.failed]: '#F16415',
  15. };
  16. export const LINE_CHART_LARGE_HEIGHT = 60;
  17. export const LINE_CHART_SMALL_HEIGHT = 42;
  18. export const LINE_COLOR = '#394E97';
  19. export const LINE_LABEL_Y_PADDING = 6;
  20. export const LINE_LABEL_FONT_SIZE = 14;
  21. export const LINE_SMALL_LABEL_FONT_SIZE = 12;
  22. export const timeRangeOptions: ITimeRangeOption[] = [
  23. {
  24. label: '1h',
  25. value: 60 * 60 * 1000,
  26. step: 3 * 60 * 1000,
  27. },
  28. {
  29. label: '24h',
  30. value: 24 * 60 * 60 * 1000,
  31. step: 60 * 60 * 1000,
  32. },
  33. {
  34. label: '7d',
  35. value: 7 * 24 * 60 * 60 * 1000,
  36. step: 8 * 60 * 60 * 1000,
  37. },
  38. ];