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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-13 18:08:31 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-13 18:08:31 +0300
commit6ce180777857bd5733bf995131b1065965b41230 (patch)
treec5104dc3ebd2c3048357b40cb22fdb6a9ebdca4f /app/assets/javascripts/artifacts
parente1eaab3fcdd63ca029886b53c29642dab536334f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/artifacts')
-rw-r--r--app/assets/javascripts/artifacts/components/artifact_row.vue2
-rw-r--r--app/assets/javascripts/artifacts/components/job_artifacts_table.vue3
-rw-r--r--app/assets/javascripts/artifacts/index.js4
3 files changed, 7 insertions, 2 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/job_artifacts_table.vue b/app/assets/javascripts/artifacts/components/job_artifacts_table.vue
index 3b5c5f54a82..5743ff3ec9e 100644
--- a/app/assets/javascripts/artifacts/components/job_artifacts_table.vue
+++ b/app/assets/javascripts/artifacts/components/job_artifacts_table.vue
@@ -61,7 +61,7 @@ export default {
ArtifactsTableRowDetails,
FeedbackBanner,
},
- inject: ['projectPath'],
+ inject: ['projectPath', 'canDestroyArtifacts'],
apollo: {
jobArtifacts: {
query: getJobArtifactsQuery,
@@ -311,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"
diff --git a/app/assets/javascripts/artifacts/index.js b/app/assets/javascripts/artifacts/index.js
index a05fe640d31..e0b2ab2bf47 100644
--- a/app/assets/javascripts/artifacts/index.js
+++ b/app/assets/javascripts/artifacts/index.js
@@ -1,6 +1,7 @@
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import createDefaultClient from '~/lib/graphql';
+import { parseBoolean } from '~/lib/utils/common_utils';
import JobArtifactsTable from './components/job_artifacts_table.vue';
Vue.use(VueApollo);
@@ -16,13 +17,14 @@ export const initArtifactsTable = () => {
return false;
}
- const { projectPath, artifactsManagementFeedbackImagePath } = el.dataset;
+ const { projectPath, canDestroyArtifacts, artifactsManagementFeedbackImagePath } = el.dataset;
return new Vue({
el,
apolloProvider,
provide: {
projectPath,
+ canDestroyArtifacts: parseBoolean(canDestroyArtifacts),
artifactsManagementFeedbackImagePath,
},
render: (createElement) => createElement(JobArtifactsTable),