|
| 1 | +/* |
| 2 | + * Copyright Red Hat, Inc. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +export const AGGREGATED_CARDS_METRIC_IDS = { |
| 18 | + jiraMetricId: 'jira.open_issues', |
| 19 | + githubMetricId: 'github.open_prs', |
| 20 | + githubOpenPrsKpi: 'openPrsKpi', |
| 21 | + jiraOpenIssuesKpi: 'openIssuesKpi', |
| 22 | + openPrsWeightedKpi: 'openPrsWeightedKpi', |
| 23 | +} as const; |
| 24 | + |
| 25 | +/** Must match `title` in App.tsx homepage widget config (Add widget picker). */ |
| 26 | +export const AGGREGATED_CARDS_WIDGET_TITLES = { |
| 27 | + jiraMetricId: 'Scorecard: With deprecated metricId property (Jira)', |
| 28 | + githubMetricId: 'Scorecard: With default aggregation config (GitHub)', |
| 29 | + githubOpenPrsKpi: 'Scorecard: GitHub open PRs', |
| 30 | + jiraOpenIssuesKpi: 'Scorecard: Jira open blocking tickets', |
| 31 | + openPrsWeightedKpi: 'Scorecard: GitHub open PRs (weighted health)', |
| 32 | +} as const; |
| 33 | + |
| 34 | +export const AGGREGATED_CARDS_METADATA = { |
| 35 | + deprecatedMetricId: { |
| 36 | + id: AGGREGATED_CARDS_METRIC_IDS.jiraMetricId, |
| 37 | + title: 'Scorecard: With deprecated metricId property (Jira)', |
| 38 | + metricId: 'jira.open_issues', |
| 39 | + }, |
| 40 | + defaultAggregation: { |
| 41 | + id: AGGREGATED_CARDS_METRIC_IDS.githubMetricId, |
| 42 | + title: 'Scorecard: With default aggregation config (GitHub)', |
| 43 | + metricId: 'github.open_prs', |
| 44 | + }, |
| 45 | + jiraOpenIssuesKpi: { |
| 46 | + id: AGGREGATED_CARDS_METRIC_IDS.jiraOpenIssuesKpi, |
| 47 | + title: 'Scorecard: Jira open blocking tickets', |
| 48 | + metricId: 'jira.open_issues', |
| 49 | + }, |
| 50 | + githubOpenPrsKpi: { |
| 51 | + id: AGGREGATED_CARDS_METRIC_IDS.githubOpenPrsKpi, |
| 52 | + title: 'Scorecard: GitHub open PRs', |
| 53 | + metricId: 'github.open_prs', |
| 54 | + }, |
| 55 | + openPrsWeightedKpi: { |
| 56 | + id: AGGREGATED_CARDS_METRIC_IDS.openPrsWeightedKpi, |
| 57 | + title: 'Scorecard: GitHub open PRs (weighted health)', |
| 58 | + metricId: 'github.open_prs', |
| 59 | + }, |
| 60 | +} as const; |
0 commit comments