Commit 4f8db02f authored by Phil Hughes's avatar Phil Hughes

Merge branch 'ee-49375-move-reports-code' into 'master'

EE port of Moves report components to reports folder

See merge request gitlab-org/gitlab-ee!6836
parents 466dc337 2bdc8aa9
<script> <script>
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import { componentNames } from '~/vue_shared/components/reports/issue_body'; import { componentNames } from './issue_body';
import ReportSection from '~/vue_shared/components/reports/report_section.vue'; import ReportSection from './report_section.vue';
import SummaryRow from '~/vue_shared/components/reports/summary_row.vue'; import SummaryRow from './summary_row.vue';
import IssuesList from '~/vue_shared/components/reports/issues_list.vue'; import IssuesList from './issues_list.vue';
import Modal from './modal.vue'; import Modal from './modal.vue';
import createStore from '../store'; import createStore from '../store';
import { summaryTextBuilder, reportTextBuilder, statusIcon } from '../store/utils'; import { summaryTextBuilder, reportTextBuilder, statusIcon } from '../store/utils';
......
import TestIssueBody from '~/reports/components/test_issue_body.vue'; import TestIssueBody from './test_issue_body.vue';
export const components = { export const components = {
TestIssueBody, TestIssueBody,
......
<script> <script>
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import { import {
STATUS_FAILED, STATUS_FAILED,
STATUS_NEUTRAL, STATUS_NEUTRAL,
STATUS_SUCCESS, STATUS_SUCCESS,
} from '~/vue_shared/components/reports/constants'; } from '../constants';
export default { export default {
name: 'IssueStatusIcon', name: 'IssueStatusIcon',
......
<script> <script>
import IssuesBlock from '~/vue_shared/components/reports/report_issues.vue'; import IssuesBlock from '~/reports/components/report_issues.vue';
import { import {
STATUS_SUCCESS, STATUS_SUCCESS,
STATUS_FAILED, STATUS_FAILED,
STATUS_NEUTRAL, STATUS_NEUTRAL,
} from '~/vue_shared/components/reports/constants'; } from '~/reports/constants';
import { componentNames } from 'ee/vue_shared/components/reports/issue_body';
import { componentNames } from 'ee/vue_shared/components/reports/issue_body';
import SastContainerInfo from 'ee/vue_shared/security_reports/components/sast_container_info.vue'; import SastContainerInfo from 'ee/vue_shared/security_reports/components/sast_container_info.vue';
/** /**
......
<script> <script>
import IssueStatusIcon from '~/vue_shared/components/reports/issue_status_icon.vue'; import IssueStatusIcon from '~/reports/components/issue_status_icon.vue';
import { components, componentNames } from 'ee/vue_shared/components/reports/issue_body'; import { components, componentNames } from 'ee/vue_shared/components/reports/issue_body';
export default { export default {
......
<script> <script>
import { __ } from '~/locale'; import { __ } from '~/locale';
import StatusIcon from '~/vue_merge_request_widget/components/mr_widget_status_icon.vue'; import StatusIcon from '~/vue_merge_request_widget/components/mr_widget_status_icon.vue';
import Popover from '~/vue_shared/components/help_popover.vue';
import IssuesList from './issues_list.vue'; import IssuesList from './issues_list.vue';
import Popover from '../help_popover.vue';
const LOADING = 'LOADING'; const LOADING = 'LOADING';
const ERROR = 'ERROR'; const ERROR = 'ERROR';
......
<script> <script>
import CiIcon from '~/vue_shared/components/ci_icon.vue'; import CiIcon from '~/vue_shared/components/ci_icon.vue';
import LoadingIcon from '~/vue_shared/components/loading_icon.vue'; import LoadingIcon from '~/vue_shared/components/loading_icon.vue';
import Popover from '../help_popover.vue'; import Popover from '~/vue_shared/components/help_popover.vue';
/** /**
* Renders the summary row for each report * Renders the summary row for each report
......
...@@ -11,6 +11,8 @@ export const SUCCESS = 'SUCCESS'; ...@@ -11,6 +11,8 @@ export const SUCCESS = 'SUCCESS';
export const STATUS_FAILED = 'failed'; export const STATUS_FAILED = 'failed';
export const STATUS_SUCCESS = 'success'; export const STATUS_SUCCESS = 'success';
export const STATUS_NEUTRAL = 'neutral';
export const ICON_WARNING = 'warning'; export const ICON_WARNING = 'warning';
export const ICON_SUCCESS = 'success'; export const ICON_SUCCESS = 'success';
export const ICON_NOTFOUND = 'notfound'; export const ICON_NOTFOUND = 'notfound';
export const STATUS_FAILED = 'failed';
export const STATUS_SUCCESS = 'success';
export const STATUS_NEUTRAL = 'neutral';
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Renders Code quality body text * Renders Code quality body text
* Fixed: [name] in [link]:[line] * Fixed: [name] in [link]:[line]
*/ */
import ReportLink from '~/vue_shared/components/reports/report_link.vue'; import ReportLink from '~/reports/components/report_link.vue';
import { STATUS_SUCCESS } from '~/vue_shared/components/reports/constants'; import { STATUS_SUCCESS } from '~/reports/constants';
export default { export default {
name: 'CodequalityIssueBody', name: 'CodequalityIssueBody',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Renders Perfomance issue body text * Renders Perfomance issue body text
* [name] :[score] [symbol] [delta] in [link] * [name] :[score] [symbol] [delta] in [link]
*/ */
import ReportLink from '~/vue_shared/components/reports/report_link.vue'; import ReportLink from '~/reports/components/report_link.vue';
export default { export default {
name: 'PerformanceIssueBody', name: 'PerformanceIssueBody',
......
<script> <script>
import ReportSection from '~/vue_shared/components/reports/report_section.vue'; import ReportSection from '~/reports/components/report_section.vue';
import GroupedSecurityReportsApp from 'ee/vue_shared/security_reports/grouped_security_reports_app.vue'; import GroupedSecurityReportsApp from 'ee/vue_shared/security_reports/grouped_security_reports_app.vue';
import reportsMixin from 'ee/vue_shared/security_reports/mixins/reports_mixin'; import reportsMixin from 'ee/vue_shared/security_reports/mixins/reports_mixin';
import { componentNames } from 'ee/vue_shared/components/reports/issue_body'; import { componentNames } from 'ee/vue_shared/components/reports/issue_body';
......
import { import {
components as componentsCE, components as componentsCE,
componentNames as componentNamesCE, componentNames as componentNamesCE,
} from '~/vue_shared/components/reports/issue_body'; } from '~/reports/components/issue_body';
import PerformanceIssueBody from 'ee/vue_merge_request_widget/components/performance_issue_body.vue'; import PerformanceIssueBody from 'ee/vue_merge_request_widget/components/performance_issue_body.vue';
import CodequalityIssueBody from 'ee/vue_merge_request_widget/components/codequality_issue_body.vue'; import CodequalityIssueBody from 'ee/vue_merge_request_widget/components/codequality_issue_body.vue';
import LicenseIssueBody from 'ee/vue_shared/license_management/components/license_issue_body.vue'; import LicenseIssueBody from 'ee/vue_shared/license_management/components/license_issue_body.vue';
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { mapActions } from 'vuex'; import { mapActions } from 'vuex';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import IssueStatusIcon from '~/vue_shared/components/reports/issue_status_icon.vue'; import IssueStatusIcon from '~/reports/components/issue_status_icon.vue';
import { getIssueStatusFromLicenseStatus } from 'ee/vue_shared/license_management/store/utils'; import { getIssueStatusFromLicenseStatus } from 'ee/vue_shared/license_management/store/utils';
import { LICENSE_APPROVAL_STATUS } from '../constants'; import { LICENSE_APPROVAL_STATUS } from '../constants';
......
<script> <script>
import { mapState, mapGetters, mapActions } from 'vuex'; import { mapState, mapGetters, mapActions } from 'vuex';
import ReportSection from '~/vue_shared/components/reports/report_section.vue'; import ReportSection from '~/reports/components/report_section.vue';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import reportsMixin from 'ee/vue_shared/security_reports/mixins/reports_mixin'; import reportsMixin from 'ee/vue_shared/security_reports/mixins/reports_mixin';
import SetLicenseApprovalModal from 'ee/vue_shared/license_management/components/set_approval_status_modal.vue'; import SetLicenseApprovalModal from 'ee/vue_shared/license_management/components/set_approval_status_modal.vue';
......
...@@ -3,7 +3,7 @@ import { ...@@ -3,7 +3,7 @@ import {
STATUS_FAILED, STATUS_FAILED,
STATUS_NEUTRAL, STATUS_NEUTRAL,
STATUS_SUCCESS, STATUS_SUCCESS,
} from '~/vue_shared/components/reports/constants'; } from '~/reports/constants';
import { LICENSE_APPROVAL_STATUS } from 'ee/vue_shared/license_management/constants'; import { LICENSE_APPROVAL_STATUS } from 'ee/vue_shared/license_management/constants';
/** /**
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* [severity] ([confidence]): [name] * [severity] ([confidence]): [name]
*/ */
import ModalOpenName from '~/vue_shared/components/reports/modal_open_name.vue'; import ModalOpenName from '~/reports/components/modal_open_name.vue';
export default { export default {
name: 'DastIssueBody', name: 'DastIssueBody',
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Renders SAST CONTAINER body text * Renders SAST CONTAINER body text
* [priority]: [name] in [link]:[line] * [priority]: [name] in [link]:[line]
*/ */
import ReportLink from '~/vue_shared/components/reports/report_link.vue'; import ReportLink from '~/reports/components/report_link.vue';
import ModalOpenName from '~/vue_shared/components/reports/modal_open_name.vue'; import ModalOpenName from '~/reports/components/modal_open_name.vue';
export default { export default {
name: 'SastContainerIssueBody', name: 'SastContainerIssueBody',
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Renders SAST body text * Renders SAST body text
* [severity] ([confidence]): [name] in [link] : [line] * [severity] ([confidence]): [name] in [link] : [line]
*/ */
import ReportLink from '~/vue_shared/components/reports/report_link.vue'; import ReportLink from '~/reports/components/report_link.vue';
import ModalOpenName from '~/vue_shared/components/reports/modal_open_name.vue'; import ModalOpenName from '~/reports/components/modal_open_name.vue';
export default { export default {
name: 'SastIssueBody', name: 'SastIssueBody',
......
<script> <script>
import { mapActions, mapState, mapGetters } from 'vuex'; import { mapActions, mapState, mapGetters } from 'vuex';
import ReportSection from '~/vue_shared/components/reports/report_section.vue'; import ReportSection from '~/reports/components/report_section.vue';
import SummaryRow from '~/vue_shared/components/reports/summary_row.vue'; import SummaryRow from '~/reports/components/summary_row.vue';
import IssuesList from '~/vue_shared/components/reports/issues_list.vue'; import IssuesList from '~/reports/components/issues_list.vue';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import { componentNames } from 'ee/vue_shared/components/reports/issue_body'; import { componentNames } from 'ee/vue_shared/components/reports/issue_body';
import IssueModal from './components/modal.vue'; import IssueModal from './components/modal.vue';
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { mapActions, mapState } from 'vuex'; import { mapActions, mapState } from 'vuex';
import { s__, sprintf, n__ } from '~/locale'; import { s__, sprintf, n__ } from '~/locale';
import createFlash from '~/flash'; import createFlash from '~/flash';
import ReportSection from '~/vue_shared/components/reports/report_section.vue'; import ReportSection from '~/reports/components/report_section.vue';
import { componentNames } from 'ee/vue_shared/components/reports/issue_body'; import { componentNames } from 'ee/vue_shared/components/reports/issue_body';
import IssueModal from './components/modal.vue'; import IssueModal from './components/modal.vue';
import mixin from './mixins/security_report_mixin'; import mixin from './mixins/security_report_mixin';
......
...@@ -10,7 +10,7 @@ import { ...@@ -10,7 +10,7 @@ import {
STATUS_FAILED, STATUS_FAILED,
STATUS_NEUTRAL, STATUS_NEUTRAL,
STATUS_SUCCESS, STATUS_SUCCESS,
} from '~/vue_shared/components/reports/constants'; } from '~/reports/constants';
import { import {
approvedLicense, approvedLicense,
blacklistedLicense, blacklistedLicense,
......
...@@ -5,7 +5,7 @@ import { ...@@ -5,7 +5,7 @@ import {
STATUS_FAILED, STATUS_FAILED,
STATUS_NEUTRAL, STATUS_NEUTRAL,
STATUS_SUCCESS, STATUS_SUCCESS,
} from '~/vue_shared/components/reports/constants'; } from '~/reports/constants';
describe('code quality issue body issue body', () => { describe('code quality issue body issue body', () => {
let vm; let vm;
......
import Vue from 'vue'; import Vue from 'vue';
import reportIssues from '~/vue_shared/components/reports/report_issues.vue'; import reportIssues from '~/reports/components/report_issues.vue';
import { STATUS_FAILED, STATUS_SUCCESS } from '~/vue_shared/components/reports/constants'; import { STATUS_FAILED, STATUS_SUCCESS } from '~/reports/constants';
import { componentNames } from 'ee/vue_shared/components/reports/issue_body'; import { componentNames } from 'ee/vue_shared/components/reports/issue_body';
import store from 'ee/vue_shared/security_reports/store'; import store from 'ee/vue_shared/security_reports/store';
import mountComponent, { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import mountComponent, { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper';
......
import Vue from 'vue'; import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
import component from '~/vue_shared/components/reports/modal_open_name.vue'; import component from '~/reports/components/modal_open_name.vue';
import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper';
describe('Modal open name', () => { describe('Modal open name', () => {
......
import Vue from 'vue'; import Vue from 'vue';
import component from '~/vue_shared/components/reports/report_link.vue'; import component from '~/reports/components/report_link.vue';
import mountComponent from '../../../helpers/vue_mount_component_helper'; import mountComponent from '../../helpers/vue_mount_component_helper';
describe('report link', () => { describe('report link', () => {
let vm; let vm;
......
import Vue from 'vue'; import Vue from 'vue';
import reportSection from '~/vue_shared/components/reports/report_section.vue'; import reportSection from '~/reports/components/report_section.vue';
import mountComponent, { mountComponentWithSlots } from 'spec/helpers/vue_mount_component_helper'; import mountComponent, { mountComponentWithSlots } from 'spec/helpers/vue_mount_component_helper';
describe('Report section', () => { describe('Report section', () => {
......
import Vue from 'vue'; import Vue from 'vue';
import component from '~/vue_shared/components/reports/summary_row.vue'; import component from '~/reports/components/summary_row.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper'; import mountComponent from 'spec/helpers/vue_mount_component_helper';
describe('Summary row', () => { describe('Summary row', () => {
......
import Vue from 'vue'; import Vue from 'vue';
import component from 'ee/vue_shared/security_reports/components/sast_issue_body.vue'; import component from 'ee/vue_shared/security_reports/components/sast_issue_body.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper'; import mountComponent from 'spec/helpers/vue_mount_component_helper';
import { STATUS_FAILED } from '~/vue_shared/components/reports/constants'; import { STATUS_FAILED } from '~/reports/constants';
describe('sast issue body', () => { describe('sast issue body', () => {
let vm; let vm;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment