diff options
Diffstat (limited to 'app/assets/javascripts/reports')
-rw-r--r-- | app/assets/javascripts/reports/components/issue_body.js | 9 | ||||
-rw-r--r-- | app/assets/javascripts/reports/components/report_item.vue | 21 | ||||
-rw-r--r-- | app/assets/javascripts/reports/constants.js | 1 |
3 files changed, 26 insertions, 5 deletions
diff --git a/app/assets/javascripts/reports/components/issue_body.js b/app/assets/javascripts/reports/components/issue_body.js index 56f46a3938e..6014d9d6ad8 100644 --- a/app/assets/javascripts/reports/components/issue_body.js +++ b/app/assets/javascripts/reports/components/issue_body.js @@ -1,3 +1,4 @@ +import IssueStatusIcon from '~/reports/components/issue_status_icon.vue'; import AccessibilityIssueBody from '../accessibility_report/components/accessibility_issue_body.vue'; import CodequalityIssueBody from '../codequality_report/components/codequality_issue_body.vue'; import TestIssueBody from '../grouped_test_report/components/test_issue_body.vue'; @@ -13,3 +14,11 @@ export const componentNames = { CodequalityIssueBody: CodequalityIssueBody.name, TestIssueBody: TestIssueBody.name, }; + +export const iconComponents = { + IssueStatusIcon, +}; + +export const iconComponentNames = { + IssueStatusIcon: IssueStatusIcon.name, +}; diff --git a/app/assets/javascripts/reports/components/report_item.vue b/app/assets/javascripts/reports/components/report_item.vue index df20d5c19ba..8871da8fbd7 100644 --- a/app/assets/javascripts/reports/components/report_item.vue +++ b/app/assets/javascripts/reports/components/report_item.vue @@ -1,12 +1,16 @@ <script> -import { components, componentNames } from 'ee_else_ce/reports/components/issue_body'; -import IssueStatusIcon from '~/reports/components/issue_status_icon.vue'; +import { + components, + componentNames, + iconComponents, + iconComponentNames, +} from 'ee_else_ce/reports/components/issue_body'; export default { name: 'ReportItem', components: { - IssueStatusIcon, ...components, + ...iconComponents, }, props: { issue: { @@ -19,6 +23,12 @@ export default { default: '', validator: (value) => value === '' || Object.values(componentNames).includes(value), }, + iconComponent: { + type: String, + required: false, + default: iconComponentNames.IssueStatusIcon, + validator: (value) => Object.values(iconComponentNames).includes(value), + }, // failed || success status: { type: String, @@ -48,11 +58,12 @@ export default { class="report-block-list-issue align-items-center" data-qa-selector="report_item_row" > - <issue-status-icon + <component + :is="iconComponent" v-if="showReportSectionStatusIcon" :status="status" :status-icon-size="statusIconSize" - class="gl-mr-3" + class="gl-mr-2" /> <component :is="component" v-if="component" :issue="issue" :status="status" :is-new="isNew" /> diff --git a/app/assets/javascripts/reports/constants.js b/app/assets/javascripts/reports/constants.js index acd90ebf1b1..7f7ea2adc0e 100644 --- a/app/assets/javascripts/reports/constants.js +++ b/app/assets/javascripts/reports/constants.js @@ -16,6 +16,7 @@ export const STATUS_NEUTRAL = 'neutral'; export const ICON_WARNING = 'warning'; export const ICON_SUCCESS = 'success'; export const ICON_NOTFOUND = 'notfound'; +export const ICON_PENDING = 'pending'; export const status = { LOADING, |