summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/repository
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-12 12:06:18 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-12 12:06:18 +0000
commit1b7381e998ff4b33ec8f633766030082e95f10c8 (patch)
tree952eb7afc179cdf64cafedc7f23384741a51661b /app/assets/javascripts/repository
parent7801d133b6c33917a3a151c7a8db5243b148a487 (diff)
downloadgitlab-ce-1b7381e998ff4b33ec8f633766030082e95f10c8.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/repository')
-rw-r--r--app/assets/javascripts/repository/components/table/row.vue18
-rw-r--r--app/assets/javascripts/repository/log_tree.js1
-rw-r--r--app/assets/javascripts/repository/queries/getCommit.query.graphql1
-rw-r--r--app/assets/javascripts/repository/queries/getCommits.query.graphql1
4 files changed, 20 insertions, 1 deletions
diff --git a/app/assets/javascripts/repository/components/table/row.vue b/app/assets/javascripts/repository/components/table/row.vue
index 9f5d929b008..52f861fbb61 100644
--- a/app/assets/javascripts/repository/components/table/row.vue
+++ b/app/assets/javascripts/repository/components/table/row.vue
@@ -1,7 +1,8 @@
<script>
-import { GlBadge, GlLink, GlSkeletonLoading } from '@gitlab/ui';
+import { GlBadge, GlLink, GlSkeletonLoading, GlTooltipDirective } from '@gitlab/ui';
import { visitUrl } from '~/lib/utils/url_utility';
import TimeagoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
+import Icon from '~/vue_shared/components/icon.vue';
import { getIconName } from '../../utils/icon';
import getRefMixin from '../../mixins/get_ref';
import getCommit from '../../queries/getCommit.query.graphql';
@@ -12,6 +13,10 @@ export default {
GlLink,
GlSkeletonLoading,
TimeagoTooltip,
+ Icon,
+ },
+ directives: {
+ GlTooltip: GlTooltipDirective,
},
apollo: {
commit: {
@@ -95,6 +100,9 @@ export default {
shortSha() {
return this.id.slice(0, 8);
},
+ hasLockLabel() {
+ return this.commit && this.commit.lockLabel;
+ },
},
methods: {
openRow(e) {
@@ -122,6 +130,14 @@ export default {
<template v-if="isSubmodule">
@ <gl-link :href="submoduleTreeUrl" class="commit-sha">{{ shortSha }}</gl-link>
</template>
+ <icon
+ v-if="hasLockLabel"
+ v-gl-tooltip
+ :title="commit.lockLabel"
+ name="lock"
+ :size="12"
+ class="ml-2 vertical-align-middle"
+ />
</td>
<td class="d-none d-sm-table-cell tree-commit">
<gl-link
diff --git a/app/assets/javascripts/repository/log_tree.js b/app/assets/javascripts/repository/log_tree.js
index d4eec35a8e5..112f7d1a30e 100644
--- a/app/assets/javascripts/repository/log_tree.js
+++ b/app/assets/javascripts/repository/log_tree.js
@@ -14,6 +14,7 @@ export function normalizeData(data) {
commitPath: d.commit_path,
fileName: d.file_name,
type: d.type,
+ lockLabel: d.lock_label,
__typename: 'LogTreeCommit',
}));
}
diff --git a/app/assets/javascripts/repository/queries/getCommit.query.graphql b/app/assets/javascripts/repository/queries/getCommit.query.graphql
index e2a2d831e47..65d750884a8 100644
--- a/app/assets/javascripts/repository/queries/getCommit.query.graphql
+++ b/app/assets/javascripts/repository/queries/getCommit.query.graphql
@@ -6,5 +6,6 @@ query getCommit($fileName: String!, $type: String!, $path: String!) {
commitPath
fileName
type
+ lockLabel
}
}
diff --git a/app/assets/javascripts/repository/queries/getCommits.query.graphql b/app/assets/javascripts/repository/queries/getCommits.query.graphql
index df9e67cc440..780a24d2663 100644
--- a/app/assets/javascripts/repository/queries/getCommits.query.graphql
+++ b/app/assets/javascripts/repository/queries/getCommits.query.graphql
@@ -6,5 +6,6 @@ query getCommits {
commitPath
fileName
type
+ lockLabel
}
}