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/artifacts/components')
-rw-r--r--app/assets/javascripts/artifacts/components/artifact_row.vue2
-rw-r--r--app/assets/javascripts/artifacts/components/feedback_banner.vue41
-rw-r--r--app/assets/javascripts/artifacts/components/job_artifacts_table.vue6
3 files changed, 48 insertions, 1 deletions
diff --git a/app/assets/javascripts/artifacts/components/artifact_row.vue b/app/assets/javascripts/artifacts/components/artifact_row.vue
index 8c03db2acd1..fffdfce60a7 100644
--- a/app/assets/javascripts/artifacts/components/artifact_row.vue
+++ b/app/assets/javascripts/artifacts/components/artifact_row.vue
@@ -11,6 +11,7 @@ export default {
GlBadge,
GlFriendlyWrap,
},
+ inject: ['canDestroyArtifacts'],
props: {
artifact: {
type: Object,
@@ -73,6 +74,7 @@ export default {
data-testid="job-artifact-row-download-button"
/>
<gl-button
+ v-if="canDestroyArtifacts"
category="tertiary"
icon="remove"
:title="$options.i18n.delete"
diff --git a/app/assets/javascripts/artifacts/components/feedback_banner.vue b/app/assets/javascripts/artifacts/components/feedback_banner.vue
new file mode 100644
index 00000000000..d2c96b1a201
--- /dev/null
+++ b/app/assets/javascripts/artifacts/components/feedback_banner.vue
@@ -0,0 +1,41 @@
+<script>
+import { GlBanner } from '@gitlab/ui';
+import UserCalloutDismisser from '~/vue_shared/components/user_callout_dismisser.vue';
+import {
+ I18N_FEEDBACK_BANNER_TITLE,
+ I18N_FEEDBACK_BANNER_BODY,
+ I18N_FEEDBACK_BANNER_BUTTON,
+ FEEDBACK_URL,
+} from '../constants';
+
+export default {
+ components: {
+ GlBanner,
+ UserCalloutDismisser,
+ },
+ inject: ['artifactsManagementFeedbackImagePath'],
+ FEEDBACK_URL,
+ i18n: {
+ title: I18N_FEEDBACK_BANNER_TITLE,
+ body: I18N_FEEDBACK_BANNER_BODY,
+ button: I18N_FEEDBACK_BANNER_BUTTON,
+ },
+};
+</script>
+<template>
+ <user-callout-dismisser feature-name="artifacts_management_page_feedback_banner">
+ <template #default="{ dismiss, shouldShowCallout }">
+ <gl-banner
+ v-if="shouldShowCallout"
+ class="gl-mb-6"
+ :title="$options.i18n.title"
+ :button-text="$options.i18n.button"
+ :button-link="$options.FEEDBACK_URL"
+ :svg-path="artifactsManagementFeedbackImagePath"
+ @close="dismiss"
+ >
+ <p>{{ $options.i18n.body }}</p>
+ </gl-banner>
+ </template>
+ </user-callout-dismisser>
+</template>
diff --git a/app/assets/javascripts/artifacts/components/job_artifacts_table.vue b/app/assets/javascripts/artifacts/components/job_artifacts_table.vue
index 34e443f4e58..5743ff3ec9e 100644
--- a/app/assets/javascripts/artifacts/components/job_artifacts_table.vue
+++ b/app/assets/javascripts/artifacts/components/job_artifacts_table.vue
@@ -35,6 +35,7 @@ import {
INITIAL_LAST_PAGE_SIZE,
} from '../constants';
import ArtifactsTableRowDetails from './artifacts_table_row_details.vue';
+import FeedbackBanner from './feedback_banner.vue';
const INITIAL_PAGINATION_STATE = {
currentPage: INITIAL_CURRENT_PAGE,
@@ -58,8 +59,9 @@ export default {
CiIcon,
TimeAgo,
ArtifactsTableRowDetails,
+ FeedbackBanner,
},
- inject: ['projectPath'],
+ inject: ['projectPath', 'canDestroyArtifacts'],
apollo: {
jobArtifacts: {
query: getJobArtifactsQuery,
@@ -214,6 +216,7 @@ export default {
</script>
<template>
<div>
+ <feedback-banner />
<gl-table
:items="jobArtifacts"
:fields="$options.fields"
@@ -308,6 +311,7 @@ export default {
data-testid="job-artifacts-browse-button"
/>
<gl-button
+ v-if="canDestroyArtifacts"
icon="remove"
:title="$options.i18n.delete"
:aria-label="$options.i18n.delete"