Commit ad9434db authored by Savas Vedova's avatar Savas Vedova

Move empty states to the shared subfolder

parent 054c3f71
...@@ -5,7 +5,7 @@ import vulnerabilityGradesQuery from 'ee/security_dashboard/graphql/queries/grou ...@@ -5,7 +5,7 @@ import vulnerabilityGradesQuery from 'ee/security_dashboard/graphql/queries/grou
import vulnerabilityHistoryQuery from 'ee/security_dashboard/graphql/queries/group_vulnerability_history.query.graphql'; import vulnerabilityHistoryQuery from 'ee/security_dashboard/graphql/queries/group_vulnerability_history.query.graphql';
import { PROJECT_LOADING_ERROR_MESSAGE } from 'ee/security_dashboard/helpers'; import { PROJECT_LOADING_ERROR_MESSAGE } from 'ee/security_dashboard/helpers';
import createFlash from '~/flash'; import createFlash from '~/flash';
import DashboardNotConfigured from '../empty_states/group_dashboard_not_configured.vue'; import DashboardNotConfigured from '../shared/empty_states/group_dashboard_not_configured.vue';
import VulnerabilitySeverities from '../shared/project_security_status_chart.vue'; import VulnerabilitySeverities from '../shared/project_security_status_chart.vue';
import SecurityDashboardLayout from '../shared/security_dashboard_layout.vue'; import SecurityDashboardLayout from '../shared/security_dashboard_layout.vue';
import VulnerabilitiesOverTimeChart from '../shared/vulnerabilities_over_time_chart.vue'; import VulnerabilitiesOverTimeChart from '../shared/vulnerabilities_over_time_chart.vue';
......
...@@ -5,7 +5,7 @@ import vulnerabilityGradesQuery from 'ee/security_dashboard/graphql/queries/inst ...@@ -5,7 +5,7 @@ import vulnerabilityGradesQuery from 'ee/security_dashboard/graphql/queries/inst
import vulnerabilityHistoryQuery from 'ee/security_dashboard/graphql/queries/instance_vulnerability_history.query.graphql'; import vulnerabilityHistoryQuery from 'ee/security_dashboard/graphql/queries/instance_vulnerability_history.query.graphql';
import { PROJECT_LOADING_ERROR_MESSAGE } from 'ee/security_dashboard/helpers'; import { PROJECT_LOADING_ERROR_MESSAGE } from 'ee/security_dashboard/helpers';
import createFlash from '~/flash'; import createFlash from '~/flash';
import DashboardNotConfigured from '../empty_states/instance_dashboard_not_configured.vue'; import DashboardNotConfigured from '../shared/empty_states/instance_dashboard_not_configured.vue';
import VulnerabilitySeverities from '../shared/project_security_status_chart.vue'; import VulnerabilitySeverities from '../shared/project_security_status_chart.vue';
import SecurityDashboardLayout from '../shared/security_dashboard_layout.vue'; import SecurityDashboardLayout from '../shared/security_dashboard_layout.vue';
import VulnerabilitiesOverTimeChart from '../shared/vulnerabilities_over_time_chart.vue'; import VulnerabilitiesOverTimeChart from '../shared/vulnerabilities_over_time_chart.vue';
......
...@@ -7,7 +7,7 @@ import createFlash from '~/flash'; ...@@ -7,7 +7,7 @@ import createFlash from '~/flash';
import { formatDate, getDateInPast } from '~/lib/utils/datetime_utility'; import { formatDate, getDateInPast } from '~/lib/utils/datetime_utility';
import { getSvgIconPathContent } from '~/lib/utils/icon_utils'; import { getSvgIconPathContent } from '~/lib/utils/icon_utils';
import { s__, __ } from '~/locale'; import { s__, __ } from '~/locale';
import DashboardNotConfigured from '../empty_states/reports_not_configured.vue'; import DashboardNotConfigured from '../shared/empty_states/reports_not_configured.vue';
import SecurityDashboardLayout from '../shared/security_dashboard_layout.vue'; import SecurityDashboardLayout from '../shared/security_dashboard_layout.vue';
const CHART_DEFAULT_DAYS = 30; const CHART_DEFAULT_DAYS = 30;
......
...@@ -8,8 +8,8 @@ import { ...@@ -8,8 +8,8 @@ import {
GlTooltipDirective, GlTooltipDirective,
GlTable, GlTable,
} from '@gitlab/ui'; } from '@gitlab/ui';
import DashboardHasNoVulnerabilities from 'ee/security_dashboard/components/empty_states/dashboard_has_no_vulnerabilities.vue'; import DashboardHasNoVulnerabilities from 'ee/security_dashboard/components/shared/empty_states/dashboard_has_no_vulnerabilities.vue';
import FiltersProducedNoResults from 'ee/security_dashboard/components/empty_states/filters_produced_no_results.vue'; import FiltersProducedNoResults from 'ee/security_dashboard/components/shared/empty_states/filters_produced_no_results.vue';
import { VULNERABILITIES_PER_PAGE, DASHBOARD_TYPES } from 'ee/security_dashboard/store/constants'; import { VULNERABILITIES_PER_PAGE, DASHBOARD_TYPES } from 'ee/security_dashboard/store/constants';
import SeverityBadge from 'ee/vue_shared/security_reports/components/severity_badge.vue'; 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 convertReportType from 'ee/vue_shared/security_reports/store/utils/convert_report_type';
......
...@@ -7,15 +7,15 @@ import instanceProjectsQuery from 'ee/security_dashboard/graphql/queries/instanc ...@@ -7,15 +7,15 @@ import instanceProjectsQuery from 'ee/security_dashboard/graphql/queries/instanc
import { DASHBOARD_TYPES } from 'ee/security_dashboard/store/constants'; import { DASHBOARD_TYPES } from 'ee/security_dashboard/store/constants';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import DashboardNotConfiguredGroup from '../empty_states/group_dashboard_not_configured.vue';
import DashboardNotConfiguredInstance from '../empty_states/instance_dashboard_not_configured.vue';
import DashboardNotConfiguredProject from '../empty_states/reports_not_configured.vue';
import GroupVulnerabilities from '../group/group_vulnerabilities.vue'; import GroupVulnerabilities from '../group/group_vulnerabilities.vue';
import InstanceVulnerabilities from '../instance/instance_vulnerabilities.vue'; import InstanceVulnerabilities from '../instance/instance_vulnerabilities.vue';
import PipelineFindings from '../pipeline/pipeline_findings.vue'; import PipelineFindings from '../pipeline/pipeline_findings.vue';
import ProjectVulnerabilities from '../project/project_vulnerabilities.vue'; import ProjectVulnerabilities from '../project/project_vulnerabilities.vue';
import AutoFixUserCallout from './auto_fix_user_callout.vue'; import AutoFixUserCallout from './auto_fix_user_callout.vue';
import CsvExportButton from './csv_export_button.vue'; import CsvExportButton from './csv_export_button.vue';
import DashboardNotConfiguredGroup from './empty_states/group_dashboard_not_configured.vue';
import DashboardNotConfiguredInstance from './empty_states/instance_dashboard_not_configured.vue';
import DashboardNotConfiguredProject from './empty_states/reports_not_configured.vue';
import Filters from './filters/filters_layout.vue'; import Filters from './filters/filters_layout.vue';
import ProjectPipelineStatus from './project_pipeline_status.vue'; import ProjectPipelineStatus from './project_pipeline_status.vue';
import SurveyRequestBanner from './survey_request_banner.vue'; import SurveyRequestBanner from './survey_request_banner.vue';
......
...@@ -4,7 +4,7 @@ import { parseBoolean } from '~/lib/utils/common_utils'; ...@@ -4,7 +4,7 @@ import { parseBoolean } from '~/lib/utils/common_utils';
import GroupSecurityCharts from './components/group/group_security_dashboard.vue'; import GroupSecurityCharts from './components/group/group_security_dashboard.vue';
import InstanceSecurityCharts from './components/instance/instance_security_dashboard.vue'; import InstanceSecurityCharts from './components/instance/instance_security_dashboard.vue';
import ProjectSecurityCharts from './components/project/project_security_dashboard.vue'; import ProjectSecurityCharts from './components/project/project_security_dashboard.vue';
import UnavailableState from './components/empty_states/unavailable_state.vue'; import UnavailableState from './components/shared/empty_states/unavailable_state.vue';
import apolloProvider from './graphql/provider'; import apolloProvider from './graphql/provider';
import createRouter from './router'; import createRouter from './router';
import createStore from './store'; import createStore from './store';
......
import Vue from 'vue'; import Vue from 'vue';
import { DASHBOARD_TYPES } from 'ee/security_dashboard/store/constants'; import { DASHBOARD_TYPES } from 'ee/security_dashboard/store/constants';
import { parseBoolean } from '~/lib/utils/common_utils'; import { parseBoolean } from '~/lib/utils/common_utils';
import UnavailableState from './components/empty_states/unavailable_state.vue'; import UnavailableState from './components/shared/empty_states/unavailable_state.vue';
import VulnerabilityReport from './components/shared/vulnerability_report.vue'; import VulnerabilityReport from './components/shared/vulnerability_report.vue';
import apolloProvider from './graphql/provider'; import apolloProvider from './graphql/provider';
import createRouter from './router'; import createRouter from './router';
......
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`UnscannedProjects component header matches the snapshot when the "helpPath" prop is empty 1`] = `
<header
class="px-3 pt-3 mb-0"
>
<h4
class="my-0"
>
Project scanning
<!---->
</h4>
<p
class="text-secondary mb-0"
>
Default branch scanning by project
</p>
</header>
`;
exports[`UnscannedProjects component header matches the snapshot when the "helpPath" prop is not empty 1`] = `
<header
class="px-3 pt-3 mb-0"
>
<h4
class="my-0"
>
Project scanning
<a
class="gl-link"
href="/foo/bar/help"
rel="noopener"
target="_blank"
title="Project scanning help page"
>
<svg
aria-hidden="true"
class="align-top gl-icon s12"
data-testid="question-icon"
role="img"
>
<use
href="#question"
/>
</svg>
</a>
</h4>
<p
class="text-secondary mb-0"
>
Default branch scanning by project
</p>
</header>
`;
exports[`UnscannedProjects component tab content shows a list of outdated projects 1`] = `
<div
class="mx-3 my-2 overflow-auto"
style="height: 15rem;"
>
<div
class="mb-3"
>
<h5
class="m-0"
>
Outdated Projects Group 1
</h5>
<ul
class="list-unstyled mb-0"
>
<li
class="mt-1"
>
<a
class="gl-link"
href="/outdated-project-1/pipelines"
rel="noopener"
target="_blank"
>
Outdated Project One
</a>
</li>
</ul>
</div>
<div
class="mb-3"
>
<h5
class="m-0"
>
Outdated Projects Group 2
</h5>
<ul
class="list-unstyled mb-0"
>
<li
class="mt-1"
>
<a
class="gl-link"
href="/outdated-project-2/pipelines"
rel="noopener"
target="_blank"
>
Outdated Project Two
</a>
</li>
</ul>
</div>
</div>
`;
exports[`UnscannedProjects component tab content shows a list of untested projects 1`] = `
<div
class="mx-3 my-2 overflow-auto"
style="height: 15rem;"
>
<ul
class="list-unstyled m-0"
>
<li
class="mb-1"
>
<a
class="gl-link"
href="/untested-1/security/configuration"
rel="noopener"
target="_blank"
>
Untested Project One
</a>
</li>
<li
class="mb-1"
>
<a
class="gl-link"
href="/untested-2/security/configuration"
rel="noopener"
target="_blank"
>
Untested Project Two
</a>
</li>
</ul>
</div>
`;
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import DashboardNotConfigured from 'ee/security_dashboard/components/empty_states/group_dashboard_not_configured.vue';
import GroupSecurityDashboard from 'ee/security_dashboard/components/group/group_security_dashboard.vue'; import GroupSecurityDashboard from 'ee/security_dashboard/components/group/group_security_dashboard.vue';
import DashboardNotConfigured from 'ee/security_dashboard/components/shared/empty_states/group_dashboard_not_configured.vue';
import VulnerabilitySeverities from 'ee/security_dashboard/components/shared/project_security_status_chart.vue'; import VulnerabilitySeverities from 'ee/security_dashboard/components/shared/project_security_status_chart.vue';
import SecurityDashboardLayout from 'ee/security_dashboard/components/shared/security_dashboard_layout.vue'; import SecurityDashboardLayout from 'ee/security_dashboard/components/shared/security_dashboard_layout.vue';
import VulnerabilitiesOverTimeChart from 'ee/security_dashboard/components/shared/vulnerabilities_over_time_chart.vue'; import VulnerabilitiesOverTimeChart from 'ee/security_dashboard/components/shared/vulnerabilities_over_time_chart.vue';
......
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import DashboardNotConfigured from 'ee/security_dashboard/components/empty_states/instance_dashboard_not_configured.vue';
import InstanceSecurityDashboard from 'ee/security_dashboard/components/instance/instance_security_dashboard.vue'; import InstanceSecurityDashboard from 'ee/security_dashboard/components/instance/instance_security_dashboard.vue';
import DashboardNotConfigured from 'ee/security_dashboard/components/shared/empty_states/instance_dashboard_not_configured.vue';
import VulnerabilitySeverities from 'ee/security_dashboard/components/shared/project_security_status_chart.vue'; import VulnerabilitySeverities from 'ee/security_dashboard/components/shared/project_security_status_chart.vue';
import SecurityDashboardLayout from 'ee/security_dashboard/components/shared/security_dashboard_layout.vue'; import SecurityDashboardLayout from 'ee/security_dashboard/components/shared/security_dashboard_layout.vue';
import VulnerabilitiesOverTimeChart from 'ee/security_dashboard/components/shared/vulnerabilities_over_time_chart.vue'; import VulnerabilitiesOverTimeChart from 'ee/security_dashboard/components/shared/vulnerabilities_over_time_chart.vue';
......
...@@ -2,8 +2,8 @@ import { GlLoadingIcon } from '@gitlab/ui'; ...@@ -2,8 +2,8 @@ import { GlLoadingIcon } from '@gitlab/ui';
import { GlLineChart } from '@gitlab/ui/dist/charts'; import { GlLineChart } from '@gitlab/ui/dist/charts';
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount, createLocalVue } from '@vue/test-utils';
import VueApollo from 'vue-apollo'; import VueApollo from 'vue-apollo';
import DashboardNotConfigured from 'ee/security_dashboard/components/empty_states/reports_not_configured.vue';
import ProjectSecurityDashboard from 'ee/security_dashboard/components/project/project_security_dashboard.vue'; import ProjectSecurityDashboard from 'ee/security_dashboard/components/project/project_security_dashboard.vue';
import DashboardNotConfigured from 'ee/security_dashboard/components/shared/empty_states/reports_not_configured.vue';
import SecurityDashboardLayout from 'ee/security_dashboard/components/shared/security_dashboard_layout.vue'; import SecurityDashboardLayout from 'ee/security_dashboard/components/shared/security_dashboard_layout.vue';
import projectsHistoryQuery from 'ee/security_dashboard/graphql/queries/project_vulnerabilities_by_day_and_count.query.graphql'; import projectsHistoryQuery from 'ee/security_dashboard/graphql/queries/project_vulnerabilities_by_day_and_count.query.graphql';
import { useFakeDate } from 'helpers/fake_date'; import { useFakeDate } from 'helpers/fake_date';
......
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import DashboardHasNoVulnerabilities from 'ee/security_dashboard/components/empty_states/dashboard_has_no_vulnerabilities.vue'; import DashboardHasNoVulnerabilities from 'ee/security_dashboard/components/shared/empty_states/dashboard_has_no_vulnerabilities.vue';
describe('dashboard has no vulnerabilities empty state', () => { describe('dashboard has no vulnerabilities empty state', () => {
let wrapper; let wrapper;
......
import { GlEmptyState } from '@gitlab/ui'; import { GlEmptyState } from '@gitlab/ui';
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import FiltersProducedNoResults from 'ee/security_dashboard/components/empty_states/filters_produced_no_results.vue'; import FiltersProducedNoResults from 'ee/security_dashboard/components/shared/empty_states/filters_produced_no_results.vue';
describe('filters produced no results empty state', () => { describe('filters produced no results empty state', () => {
let wrapper; let wrapper;
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import DashboardNotConfigured from 'ee/security_dashboard/components/empty_states/group_dashboard_not_configured.vue'; import DashboardNotConfigured from 'ee/security_dashboard/components/shared/empty_states/group_dashboard_not_configured.vue';
describe('Group Security Dashboard Empty State', () => { describe('Group Security Dashboard Empty State', () => {
let wrapper; let wrapper;
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import DashboardNotConfigured from 'ee/security_dashboard/components/empty_states/instance_dashboard_not_configured.vue'; import DashboardNotConfigured from 'ee/security_dashboard/components/shared/empty_states/instance_dashboard_not_configured.vue';
describe('Instance Security Dashboard Empty State', () => { describe('Instance Security Dashboard Empty State', () => {
let wrapper; let wrapper;
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import ReportsNotConfigured from 'ee/security_dashboard/components/empty_states/reports_not_configured.vue'; import ReportsNotConfigured from 'ee/security_dashboard/components/shared/empty_states/reports_not_configured.vue';
describe('reports not configured empty state', () => { describe('reports not configured empty state', () => {
let wrapper; let wrapper;
......
import { GlDeprecatedSkeletonLoading as GlSkeletonLoading, GlTable, GlTruncate } from '@gitlab/ui'; import { GlDeprecatedSkeletonLoading as GlSkeletonLoading, GlTable, GlTruncate } from '@gitlab/ui';
import { capitalize } from 'lodash'; import { capitalize } from 'lodash';
import DashboardHasNoVulnerabilities from 'ee/security_dashboard/components/empty_states/dashboard_has_no_vulnerabilities.vue'; import DashboardHasNoVulnerabilities from 'ee/security_dashboard/components/shared/empty_states/dashboard_has_no_vulnerabilities.vue';
import FiltersProducedNoResults from 'ee/security_dashboard/components/empty_states/filters_produced_no_results.vue'; import FiltersProducedNoResults from 'ee/security_dashboard/components/shared/empty_states/filters_produced_no_results.vue';
import IssuesBadge from 'ee/security_dashboard/components/shared/issues_badge.vue'; import IssuesBadge from 'ee/security_dashboard/components/shared/issues_badge.vue';
import SelectionSummary from 'ee/security_dashboard/components/shared/selection_summary.vue'; import SelectionSummary from 'ee/security_dashboard/components/shared/selection_summary.vue';
import VulnerabilityCommentIcon from 'ee/security_dashboard/components/shared/vulnerability_comment_icon.vue'; import VulnerabilityCommentIcon from 'ee/security_dashboard/components/shared/vulnerability_comment_icon.vue';
......
...@@ -4,14 +4,14 @@ import Cookies from 'js-cookie'; ...@@ -4,14 +4,14 @@ import Cookies from 'js-cookie';
import { PortalTarget } from 'portal-vue'; import { PortalTarget } from 'portal-vue';
import { nextTick } from 'vue'; import { nextTick } from 'vue';
import VueApollo from 'vue-apollo'; import VueApollo from 'vue-apollo';
import DashboardNotConfiguredGroup from 'ee/security_dashboard/components/empty_states/group_dashboard_not_configured.vue';
import DashboardNotConfiguredInstance from 'ee/security_dashboard/components/empty_states/instance_dashboard_not_configured.vue';
import DashboardNotConfiguredProject from 'ee/security_dashboard/components/empty_states/reports_not_configured.vue';
import GroupVulnerabilities from 'ee/security_dashboard/components/group/group_vulnerabilities.vue'; import GroupVulnerabilities from 'ee/security_dashboard/components/group/group_vulnerabilities.vue';
import InstanceVulnerabilities from 'ee/security_dashboard/components/instance/instance_vulnerabilities.vue'; import InstanceVulnerabilities from 'ee/security_dashboard/components/instance/instance_vulnerabilities.vue';
import ProjectVulnerabilities from 'ee/security_dashboard/components/project/project_vulnerabilities.vue'; import ProjectVulnerabilities from 'ee/security_dashboard/components/project/project_vulnerabilities.vue';
import AutoFixUserCallout from 'ee/security_dashboard/components/shared/auto_fix_user_callout.vue'; import AutoFixUserCallout from 'ee/security_dashboard/components/shared/auto_fix_user_callout.vue';
import CsvExportButton from 'ee/security_dashboard/components/shared/csv_export_button.vue'; import CsvExportButton from 'ee/security_dashboard/components/shared/csv_export_button.vue';
import DashboardNotConfiguredGroup from 'ee/security_dashboard/components/shared/empty_states/group_dashboard_not_configured.vue';
import DashboardNotConfiguredInstance from 'ee/security_dashboard/components/shared/empty_states/instance_dashboard_not_configured.vue';
import DashboardNotConfiguredProject from 'ee/security_dashboard/components/shared/empty_states/reports_not_configured.vue';
import Filters from 'ee/security_dashboard/components/shared/filters/filters_layout.vue'; import Filters from 'ee/security_dashboard/components/shared/filters/filters_layout.vue';
import ProjectPipelineStatus from 'ee/security_dashboard/components/shared/project_pipeline_status.vue'; import ProjectPipelineStatus from 'ee/security_dashboard/components/shared/project_pipeline_status.vue';
import SurveyRequestBanner from 'ee/security_dashboard/components/shared/survey_request_banner.vue'; import SurveyRequestBanner from 'ee/security_dashboard/components/shared/survey_request_banner.vue';
......
...@@ -25502,9 +25502,6 @@ msgstr "" ...@@ -25502,9 +25502,6 @@ msgstr ""
msgid "Project path" msgid "Project path"
msgstr "" msgstr ""
msgid "Project scanning help page"
msgstr ""
msgid "Project security status" msgid "Project security status"
msgstr "" msgstr ""
...@@ -34842,21 +34839,6 @@ msgstr "" ...@@ -34842,21 +34839,6 @@ msgstr ""
msgid "UnscannedProjects|60 or more days" msgid "UnscannedProjects|60 or more days"
msgstr "" msgstr ""
msgid "UnscannedProjects|Default branch scanning by project"
msgstr ""
msgid "UnscannedProjects|Out of date"
msgstr ""
msgid "UnscannedProjects|Project scanning"
msgstr ""
msgid "UnscannedProjects|Untested"
msgstr ""
msgid "UnscannedProjects|Your projects are up do date! Nice job!"
msgstr ""
msgid "Unschedule job" msgid "Unschedule job"
msgstr "" msgstr ""
......
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