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.

config.libsonnet 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. {
  2. _config+:: {
  3. local c = self,
  4. dashboardNamePrefix: 'Gitea',
  5. dashboardTags: ['gitea'],
  6. dashboardPeriod: 'now-1h',
  7. dashboardTimezone: 'default',
  8. dashboardRefresh: '1m',
  9. // please see https://docs.gitea.com/administration/config-cheat-sheet#metrics-metrics
  10. // Show issue by repository metrics with format gitea_issues_by_repository{repository="org/repo"} 5.
  11. // Requires Gitea 1.16.0 with ENABLED_ISSUE_BY_REPOSITORY set to true.
  12. showIssuesByRepository: true,
  13. // Show graphs for issue by label metrics with format gitea_issues_by_label{label="bug"} 2.
  14. // Requires Gitea 1.16.0 with ENABLED_ISSUE_BY_LABEL set to true.
  15. showIssuesByLabel: true,
  16. // Requires Gitea 1.16.0.
  17. showIssuesOpenClose: true,
  18. // add or remove metrics from dashboard
  19. giteaStatMetrics:
  20. [
  21. {
  22. name: 'gitea_organizations',
  23. description: 'Organizations',
  24. },
  25. {
  26. name: 'gitea_teams',
  27. description: 'Teams',
  28. },
  29. {
  30. name: 'gitea_users',
  31. description: 'Users',
  32. },
  33. {
  34. name: 'gitea_repositories',
  35. description: 'Repositories',
  36. },
  37. {
  38. name: 'gitea_milestones',
  39. description: 'Milestones',
  40. },
  41. {
  42. name: 'gitea_stars',
  43. description: 'Stars',
  44. },
  45. {
  46. name: 'gitea_releases',
  47. description: 'Releases',
  48. },
  49. ]
  50. +
  51. if c.showIssuesOpenClose then
  52. [
  53. {
  54. name: 'gitea_issues_open',
  55. description: 'Issues opened',
  56. },
  57. {
  58. name: 'gitea_issues_closed',
  59. description: 'Issues closed',
  60. },
  61. ] else
  62. [
  63. {
  64. name: 'gitea_issues',
  65. description: 'Issues',
  66. },
  67. ],
  68. //set this for using label colors on graphs
  69. issueLabels: [
  70. {
  71. label: 'bug',
  72. color: '#ee0701',
  73. },
  74. {
  75. label: 'duplicate',
  76. color: '#cccccc',
  77. },
  78. {
  79. label: 'invalid',
  80. color: '#e6e6e6',
  81. },
  82. {
  83. label: 'enhancement',
  84. color: '#84b6eb',
  85. },
  86. {
  87. label: 'help wanted',
  88. color: '#128a0c',
  89. },
  90. {
  91. label: 'question',
  92. color: '#cc317c',
  93. },
  94. ],
  95. },
  96. }