Commit b54dc205 authored by Phil Hughes's avatar Phil Hughes

Merge branch '284894-refactor-security-dashboards-part-2' into 'master'

Move pipeline related files to its own folder

See merge request gitlab-org/gitlab!63391
parents 791bb374 d1090c27
......@@ -2,9 +2,9 @@
import { GlToggle } from '@gitlab/ui';
import { mapState, mapActions } from 'vuex';
import { severityFilter, pipelineScannerFilter } from 'ee/security_dashboard/helpers';
import { DISMISSAL_STATES } from 'ee/security_dashboard/store/modules/filters/constants';
import { s__ } from '~/locale';
import { DISMISSAL_STATES } from '../store/modules/filters/constants';
import StandardFilter from './filters/standard_filter.vue';
import StandardFilter from '../filters/standard_filter.vue';
export default {
i18n: {
......
<script>
import { GlEmptyState } from '@gitlab/ui';
import { LOADING_VULNERABILITIES_ERROR_CODES as ERROR_CODES } from 'ee/security_dashboard/store/modules/vulnerabilities/constants';
import { s__, __ } from '~/locale';
import { LOADING_VULNERABILITIES_ERROR_CODES as ERROR_CODES } from '../store/modules/vulnerabilities/constants';
const description = s__(
'SecurityReports|Security reports can only be accessed by authorized users.',
......
<script>
import { GlAlert, GlIntersectionObserver, GlLoadingIcon } from '@gitlab/ui';
import { produce } from 'immer';
import findingsQuery from '../graphql/queries/pipeline_findings.query.graphql';
import { preparePageInfo } from '../helpers';
import { VULNERABILITIES_PER_PAGE } from '../store/constants';
import VulnerabilityList from './vulnerability_list.vue';
import findingsQuery from 'ee/security_dashboard/graphql/queries/pipeline_findings.query.graphql';
import { preparePageInfo } from 'ee/security_dashboard/helpers';
import { VULNERABILITIES_PER_PAGE } from 'ee/security_dashboard/store/constants';
import VulnerabilityList from '../vulnerability_list.vue';
export default {
name: 'PipelineFindings',
......
<script>
import { GlEmptyState } from '@gitlab/ui';
import { mapActions } from 'vuex';
import pipelineSecurityReportSummaryQuery from 'ee/security_dashboard/graphql/queries/pipeline_security_report_summary.query.graphql';
import { fetchPolicies } from '~/lib/graphql';
import { s__ } from '~/locale';
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import pipelineSecurityReportSummaryQuery from '../graphql/queries/pipeline_security_report_summary.query.graphql';
import VulnerabilityReport from '../vulnerability_report.vue';
import SecurityDashboard from './security_dashboard_vuex.vue';
import SecurityReportsSummary from './security_reports_summary.vue';
import VulnerabilityReport from './vulnerability_report.vue';
export default {
name: 'PipelineSecurityDashboard',
......
......@@ -7,12 +7,12 @@ import {
GlIcon,
} from '@gitlab/ui';
import { mapActions, mapState } from 'vuex';
import { DASHBOARD_TYPES } from 'ee/security_dashboard/store/constants';
import { VULNERABILITY_MODAL_ID } from 'ee/vue_shared/security_reports/components/constants';
import SeverityBadge from 'ee/vue_shared/security_reports/components/severity_badge.vue';
import convertReportType from 'ee/vue_shared/security_reports/store/utils/convert_report_type';
import getPrimaryIdentifier from 'ee/vue_shared/security_reports/store/utils/get_primary_identifier';
import { BV_SHOW_MODAL } from '~/lib/utils/constants';
import { DASHBOARD_TYPES } from '../store/constants';
import VulnerabilityActionButtons from './vulnerability_action_buttons.vue';
import VulnerabilityIssueLink from './vulnerability_issue_link.vue';
......
......@@ -4,10 +4,10 @@ import PipelineArtifactDownload from 'ee/vue_shared/security_reports/components/
import IssueModal from 'ee/vue_shared/security_reports/components/modal.vue';
import { securityReportTypeEnumToReportType } from 'ee/vue_shared/security_reports/constants';
import { vulnerabilityModalMixin } from 'ee/vue_shared/security_reports/mixins/vulnerability_modal_mixin';
import VulnerabilityReportLayout from '../vulnerability_report_layout.vue';
import Filters from './filters.vue';
import LoadingError from './loading_error.vue';
import SecurityDashboardTable from './security_dashboard_table.vue';
import VulnerabilityReportLayout from './vulnerability_report_layout.vue';
export default {
components: {
......
......@@ -8,11 +8,11 @@ import {
GlModalDirective,
GlLink,
} from '@gitlab/ui';
import { COLLAPSE_SECURITY_REPORTS_SUMMARY_LOCAL_STORAGE_KEY as LOCAL_STORAGE_KEY } from 'ee/security_dashboard/constants';
import { getFormattedSummary } from 'ee/security_dashboard/helpers';
import Modal from 'ee/vue_shared/security_reports/components/dast_modal.vue';
import AccessorUtilities from '~/lib/utils/accessor';
import { __ } from '~/locale';
import { COLLAPSE_SECURITY_REPORTS_SUMMARY_LOCAL_STORAGE_KEY as LOCAL_STORAGE_KEY } from '../constants';
import { getFormattedSummary } from '../helpers';
export default {
name: 'SecurityReportsSummary',
......
......@@ -15,7 +15,7 @@ import DashboardNotConfiguredInstance from './empty_states/instance_dashboard_no
import DashboardNotConfiguredProject from './empty_states/reports_not_configured.vue';
import GroupVulnerabilities from './group/group_vulnerabilities.vue';
import InstanceVulnerabilities from './instance/instance_vulnerabilities.vue';
import PipelineFindings from './pipeline_findings.vue';
import PipelineFindings from './pipeline/pipeline_findings.vue';
import ProjectVulnerabilities from './project/project_vulnerabilities.vue';
import ProjectPipelineStatus from './project_pipeline_status.vue';
import SurveyRequestBanner from './shared/survey_request_banner.vue';
......
import Vue from 'vue';
import { parseBoolean } from '~/lib/utils/common_utils';
import PipelineSecurityDashboard from './components/pipeline_security_dashboard.vue';
import PipelineSecurityDashboard from './components/pipeline/pipeline_security_dashboard.vue';
import apolloProvider from './graphql/provider';
import createDashboardStore from './store';
import { DASHBOARD_TYPES } from './store/constants';
......
import { GlToggle } from '@gitlab/ui';
import { shallowMount, mount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import Filters from 'ee/security_dashboard/components/filters.vue';
import Filters from 'ee/security_dashboard/components/pipeline/filters.vue';
import { pipelineScannerFilter } from 'ee/security_dashboard/helpers';
import createStore from 'ee/security_dashboard/store';
import state from 'ee/security_dashboard/store/modules/filters/state';
......
import { GlEmptyState } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import LoadingError from 'ee/security_dashboard/components/loading_error.vue';
import LoadingError from 'ee/security_dashboard/components/pipeline/loading_error.vue';
const illustrations = {
401: '/401.svg',
......
import { GlAlert, GlIntersectionObserver, GlLoadingIcon } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import VueApollo from 'vue-apollo';
import PipelineFindings from 'ee/security_dashboard/components/pipeline_findings.vue';
import PipelineFindings from 'ee/security_dashboard/components/pipeline/pipeline_findings.vue';
import VulnerabilityList from 'ee/security_dashboard/components/vulnerability_list.vue';
import pipelineFindingsQuery from 'ee/security_dashboard/graphql/queries/pipeline_findings.query.graphql';
import createMockApollo from 'helpers/mock_apollo_helper';
import { mockPipelineFindingsResponse } from '../mock_data';
import { mockPipelineFindingsResponse } from '../../mock_data';
describe('Pipeline findings', () => {
let wrapper;
......
import { GlEmptyState } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import PipelineSecurityDashboard from 'ee/security_dashboard/components/pipeline_security_dashboard.vue';
import SecurityDashboard from 'ee/security_dashboard/components/security_dashboard_vuex.vue';
import SecurityReportsSummary from 'ee/security_dashboard/components/security_reports_summary.vue';
import PipelineSecurityDashboard from 'ee/security_dashboard/components/pipeline/pipeline_security_dashboard.vue';
import SecurityDashboard from 'ee/security_dashboard/components/pipeline/security_dashboard_vuex.vue';
import SecurityReportsSummary from 'ee/security_dashboard/components/pipeline/security_reports_summary.vue';
import VulnerabilityReport from 'ee/security_dashboard/components/vulnerability_report.vue';
const localVue = createLocalVue();
......
import { GlFormCheckbox } from '@gitlab/ui';
import { mount, shallowMount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import SecurityDashboardTableRow from 'ee/security_dashboard/components/security_dashboard_table_row.vue';
import SecurityDashboardTableRow from 'ee/security_dashboard/components/pipeline/security_dashboard_table_row.vue';
import createStore from 'ee/security_dashboard/store';
import { DASHBOARD_TYPES } from 'ee/security_dashboard/store/constants';
import { VULNERABILITY_MODAL_ID } from 'ee/vue_shared/security_reports/components/constants';
import SeverityBadge from 'ee/vue_shared/security_reports/components/severity_badge.vue';
import { trimText } from 'helpers/text_helper';
import { BV_SHOW_MODAL } from '~/lib/utils/constants';
import mockDataVulnerabilities from '../store/modules/vulnerabilities/data/mock_data_vulnerabilities';
import mockDataVulnerabilities from '../../store/modules/vulnerabilities/data/mock_data_vulnerabilities';
const localVue = createLocalVue();
localVue.use(Vuex);
......
import { GlEmptyState, GlFormCheckbox } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import SecurityDashboardTable from 'ee/security_dashboard/components/security_dashboard_table.vue';
import SecurityDashboardTableRow from 'ee/security_dashboard/components/security_dashboard_table_row.vue';
import SecurityDashboardTable from 'ee/security_dashboard/components/pipeline/security_dashboard_table.vue';
import SecurityDashboardTableRow from 'ee/security_dashboard/components/pipeline/security_dashboard_table_row.vue';
import createStore from 'ee/security_dashboard/store';
import {
RECEIVE_VULNERABILITIES_ERROR,
RECEIVE_VULNERABILITIES_SUCCESS,
REQUEST_VULNERABILITIES,
} from 'ee/security_dashboard/store/modules/vulnerabilities/mutation_types';
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import mockDataVulnerabilities from '../store/modules/vulnerabilities/data/mock_data_vulnerabilities';
import mockDataVulnerabilities from '../../store/modules/vulnerabilities/data/mock_data_vulnerabilities';
const localVue = createLocalVue();
localVue.use(Vuex);
......
......@@ -3,10 +3,10 @@ import MockAdapter from 'axios-mock-adapter';
import { merge } from 'lodash';
import { nextTick } from 'vue';
import Vuex from 'vuex';
import Filters from 'ee/security_dashboard/components/filters.vue';
import LoadingError from 'ee/security_dashboard/components/loading_error.vue';
import SecurityDashboardTable from 'ee/security_dashboard/components/security_dashboard_table.vue';
import SecurityDashboard from 'ee/security_dashboard/components/security_dashboard_vuex.vue';
import Filters from 'ee/security_dashboard/components/pipeline/filters.vue';
import LoadingError from 'ee/security_dashboard/components/pipeline/loading_error.vue';
import SecurityDashboardTable from 'ee/security_dashboard/components/pipeline/security_dashboard_table.vue';
import SecurityDashboard from 'ee/security_dashboard/components/pipeline/security_dashboard_vuex.vue';
import VulnerabilityReportLayout from 'ee/security_dashboard/components/vulnerability_report_layout.vue';
import { getStoreConfig } from 'ee/security_dashboard/store';
import { VULNERABILITY_MODAL_ID } from 'ee/vue_shared/security_reports/components/constants';
......
import { GlSprintf } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import SecurityReportsSummary from 'ee/security_dashboard/components/security_reports_summary.vue';
import SecurityReportsSummary from 'ee/security_dashboard/components/pipeline/security_reports_summary.vue';
import Modal from 'ee/vue_shared/security_reports/components/dast_modal.vue';
import { useLocalStorageSpy } from 'helpers/local_storage_helper';
import { trimText } from 'helpers/text_helper';
......
......@@ -3,7 +3,7 @@ import { mount, createLocalVue } from '@vue/test-utils';
import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import Vuex from 'vuex';
import SelectionSummary from 'ee/security_dashboard/components/selection_summary_vuex.vue';
import SelectionSummary from 'ee/security_dashboard/components/pipeline/selection_summary_vuex.vue';
import createStore from 'ee/security_dashboard/store/index';
import {
SELECT_VULNERABILITY,
......@@ -11,7 +11,7 @@ import {
} from 'ee/security_dashboard/store/modules/vulnerabilities/mutation_types';
import waitForPromises from 'helpers/wait_for_promises';
import httpStatus from '~/lib/utils/http_status';
import mockDataVulnerabilities from '../store/modules/vulnerabilities/data/mock_data_vulnerabilities';
import mockDataVulnerabilities from '../../store/modules/vulnerabilities/data/mock_data_vulnerabilities';
const localVue = createLocalVue();
localVue.use(Vuex);
......
......@@ -2,14 +2,14 @@ import { GlButton } from '@gitlab/ui';
import { createWrapper, mount, shallowMount } from '@vue/test-utils';
import VulnerabilityActionButtons, {
i18n,
} from 'ee/security_dashboard/components/vulnerability_action_buttons.vue';
} from 'ee/security_dashboard/components/pipeline/vulnerability_action_buttons.vue';
import createStore from 'ee/security_dashboard/store';
import { VULNERABILITY_MODAL_ID } from 'ee/vue_shared/security_reports/components/constants';
import { extendedWrapper } from 'helpers/vue_test_utils_helper';
import { BV_SHOW_MODAL } from '~/lib/utils/constants';
import { visitUrl } from '~/lib/utils/url_utility';
import { resetStore } from '../helpers';
import mockDataVulnerabilities from '../store/modules/vulnerabilities/data/mock_data_vulnerabilities';
import { resetStore } from '../../helpers';
import mockDataVulnerabilities from '../../store/modules/vulnerabilities/data/mock_data_vulnerabilities';
jest.mock('~/lib/utils/url_utility', () => ({
visitUrl: jest.fn(),
......
import Vue from 'vue';
import component from 'ee/security_dashboard/components/vulnerability_issue_link.vue';
import component from 'ee/security_dashboard/components/pipeline/vulnerability_issue_link.vue';
import mountComponent from 'helpers/vue_mount_component_helper';
describe('Vulnerability Issue Link component', () => {
......
......@@ -8,7 +8,7 @@ module QA
class Show < QA::Page::Base
include Page::Component::SecureReport
view 'ee/app/assets/javascripts/security_dashboard/components/security_dashboard_table.vue' do
view 'ee/app/assets/javascripts/security_dashboard/components/pipeline/security_dashboard_table.vue' do
element :security_report_content, required: true
end
......
......@@ -8,7 +8,7 @@ module QA
class Show < QA::Page::Base
include Page::Component::SecureReport
view 'ee/app/assets/javascripts/security_dashboard/components/security_dashboard_table.vue' do
view 'ee/app/assets/javascripts/security_dashboard/components/pipeline/security_dashboard_table.vue' do
element :security_report_content, required: true
end
end
......
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