summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pipelines/components/pipeline_graph/stage_pill.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/pipelines/components/pipeline_graph/stage_pill.vue')
-rw-r--r--app/assets/javascripts/pipelines/components/pipeline_graph/stage_pill.vue35
1 files changed, 35 insertions, 0 deletions
diff --git a/app/assets/javascripts/pipelines/components/pipeline_graph/stage_pill.vue b/app/assets/javascripts/pipelines/components/pipeline_graph/stage_pill.vue
new file mode 100644
index 00000000000..7b2458db725
--- /dev/null
+++ b/app/assets/javascripts/pipelines/components/pipeline_graph/stage_pill.vue
@@ -0,0 +1,35 @@
+<script>
+import tooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate.vue';
+
+export default {
+ components: {
+ tooltipOnTruncate,
+ },
+ props: {
+ stageName: {
+ type: String,
+ required: true,
+ },
+ isEmpty: {
+ type: Boolean,
+ required: false,
+ default: false,
+ },
+ },
+ computed: {
+ emptyClass() {
+ return this.isEmpty ? 'gl-bg-gray-200' : 'gl-bg-gray-600';
+ },
+ },
+};
+</script>
+<template>
+ <tooltip-on-truncate :title="stageName" truncate-target="child" placement="top">
+ <div
+ class="gl-px-5 gl-py-2 gl-text-white gl-text-center gl-text-truncate gl-rounded-pill pipeline-stage-pill"
+ :class="emptyClass"
+ >
+ {{ stageName }}
+ </div>
+ </tooltip-on-truncate>
+</template>