You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

constants.ts 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2020 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. import { colors } from '../app/theme';
  21. import { ComponentQualifier } from '../types/component';
  22. import { IssueScope, IssueType } from '../types/issues';
  23. export const SEVERITIES = ['BLOCKER', 'CRITICAL', 'MAJOR', 'MINOR', 'INFO'];
  24. export const STATUSES = ['OPEN', 'REOPENED', 'CONFIRMED', 'RESOLVED', 'CLOSED'];
  25. export const ISSUE_TYPES: T.IssueType[] = [
  26. IssueType.Bug,
  27. IssueType.Vulnerability,
  28. IssueType.CodeSmell,
  29. IssueType.SecurityHotspot
  30. ];
  31. export const SOURCE_SCOPES = [
  32. { scope: IssueScope.Main, qualifier: ComponentQualifier.File },
  33. { scope: IssueScope.Test, qualifier: ComponentQualifier.TestFile }
  34. ];
  35. export const RULE_TYPES: T.RuleType[] = ['BUG', 'VULNERABILITY', 'CODE_SMELL', 'SECURITY_HOTSPOT'];
  36. export const RULE_STATUSES = ['READY', 'BETA', 'DEPRECATED'];
  37. export const CHART_COLORS_RANGE_PERCENT = [
  38. colors.green,
  39. colors.lightGreen,
  40. colors.yellow,
  41. colors.orange,
  42. colors.red
  43. ];
  44. export const CHART_REVERSED_COLORS_RANGE_PERCENT = [
  45. colors.red,
  46. colors.orange,
  47. colors.yellow,
  48. colors.lightGreen,
  49. colors.green
  50. ];
  51. export const RATING_COLORS = [
  52. colors.green,
  53. colors.lightGreen,
  54. colors.yellow,
  55. colors.orange,
  56. colors.red
  57. ];
  58. export const PROJECT_KEY_MAX_LEN = 400;