Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/vue_shared/security_reports/components/artifact_downloads/merge_request_artifact_download.vue')
-rw-r--r--app/assets/javascripts/vue_shared/security_reports/components/artifact_downloads/merge_request_artifact_download.vue91
1 files changed, 0 insertions, 91 deletions
diff --git a/app/assets/javascripts/vue_shared/security_reports/components/artifact_downloads/merge_request_artifact_download.vue b/app/assets/javascripts/vue_shared/security_reports/components/artifact_downloads/merge_request_artifact_download.vue
deleted file mode 100644
index 4c2b082242b..00000000000
--- a/app/assets/javascripts/vue_shared/security_reports/components/artifact_downloads/merge_request_artifact_download.vue
+++ /dev/null
@@ -1,91 +0,0 @@
-<script>
-import { reportTypeToSecurityReportTypeEnum } from 'ee_else_ce/vue_shared/security_reports/constants';
-import { createAlert } from '~/alert';
-import { s__ } from '~/locale';
-import SecurityReportDownloadDropdown from '~/vue_shared/security_reports/components/security_report_download_dropdown.vue';
-import securityReportMergeRequestDownloadPathsQuery from '~/vue_shared/security_reports/graphql/queries/security_report_merge_request_download_paths.query.graphql';
-import { extractSecurityReportArtifactsFromMergeRequest } from '~/vue_shared/security_reports/utils';
-
-export default {
- components: {
- SecurityReportDownloadDropdown,
- },
- props: {
- reportTypes: {
- type: Array,
- required: true,
- validator: (reportType) => {
- return reportType.every((report) => reportTypeToSecurityReportTypeEnum[report]);
- },
- },
- targetProjectFullPath: {
- type: String,
- required: true,
- },
- mrIid: {
- type: Number,
- required: true,
- },
- injectedArtifacts: {
- type: Array,
- required: false,
- default: () => [],
- },
- },
- data() {
- return {
- reportArtifacts: [],
- };
- },
- apollo: {
- reportArtifacts: {
- query: securityReportMergeRequestDownloadPathsQuery,
- variables() {
- return {
- projectPath: this.targetProjectFullPath,
- iid: String(this.mrIid),
- reportTypes: this.reportTypes.map(
- (reportType) => reportTypeToSecurityReportTypeEnum[reportType],
- ),
- };
- },
- update(data) {
- return extractSecurityReportArtifactsFromMergeRequest(this.reportTypes, data);
- },
- error(error) {
- this.showError(error);
- },
- },
- },
- computed: {
- isLoadingReportArtifacts() {
- return this.$apollo.queries.reportArtifacts.loading;
- },
- mergedReportArtifacts() {
- return [...this.reportArtifacts, ...this.injectedArtifacts];
- },
- },
- methods: {
- showError(error) {
- createAlert({
- message: this.$options.i18n.apiError,
- captureError: true,
- error,
- });
- },
- },
- i18n: {
- apiError: s__(
- 'SecurityReports|Failed to get security report information. Please reload the page or try again later.',
- ),
- },
-};
-</script>
-
-<template>
- <security-report-download-dropdown
- :title="s__('SecurityReports|Download results')"
- :artifacts="mergedReportArtifacts"
- :loading="isLoadingReportArtifacts"
- />
-</template>