summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/jobs/components/job_log_controllers.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/jobs/components/job_log_controllers.vue')
-rw-r--r--app/assets/javascripts/jobs/components/job_log_controllers.vue123
1 files changed, 62 insertions, 61 deletions
diff --git a/app/assets/javascripts/jobs/components/job_log_controllers.vue b/app/assets/javascripts/jobs/components/job_log_controllers.vue
index 3e62ababea3..94ab1b16c84 100644
--- a/app/assets/javascripts/jobs/components/job_log_controllers.vue
+++ b/app/assets/javascripts/jobs/components/job_log_controllers.vue
@@ -1,72 +1,73 @@
<script>
- import { polyfillSticky } from '~/lib/utils/sticky';
- import Icon from '~/vue_shared/components/icon.vue';
- import tooltip from '~/vue_shared/directives/tooltip';
- import { numberToHumanSize } from '~/lib/utils/number_utils';
- import { sprintf } from '~/locale';
+import { polyfillSticky } from '~/lib/utils/sticky';
+import Icon from '~/vue_shared/components/icon.vue';
+import tooltip from '~/vue_shared/directives/tooltip';
+import { numberToHumanSize } from '~/lib/utils/number_utils';
+import { sprintf } from '~/locale';
+import scrollDown from '../svg/scroll_down.svg';
- export default {
- components: {
- Icon,
+export default {
+ components: {
+ Icon,
+ },
+ directives: {
+ tooltip,
+ },
+ scrollDown,
+ props: {
+ erasePath: {
+ type: String,
+ required: false,
+ default: null,
},
- directives: {
- tooltip,
+ size: {
+ type: Number,
+ required: true,
},
- props: {
- erasePath: {
- type: String,
- required: false,
- default: null,
- },
- size: {
- type: Number,
- required: true,
- },
- rawPath: {
- type: String,
- required: false,
- default: null,
- },
- isScrollTopDisabled: {
- type: Boolean,
- required: true,
- },
- isScrollBottomDisabled: {
- type: Boolean,
- required: true,
- },
- isScrollingDown: {
- type: Boolean,
- required: true,
- },
- isTraceSizeVisible: {
- type: Boolean,
- required: true,
- },
+ rawPath: {
+ type: String,
+ required: false,
+ default: null,
},
- computed: {
- jobLogSize() {
- return sprintf('Showing last %{size} of log -', {
- size: numberToHumanSize(this.size),
- });
- },
+ isScrollTopDisabled: {
+ type: Boolean,
+ required: true,
},
- mounted() {
- polyfillSticky(this.$el);
+ isScrollBottomDisabled: {
+ type: Boolean,
+ required: true,
},
- methods: {
- handleScrollToTop() {
- this.$emit('scrollJobLogTop');
- },
- handleScrollToBottom() {
- this.$emit('scrollJobLogBottom');
- },
+ isScrollingDown: {
+ type: Boolean,
+ required: true,
},
-
- };
+ isTraceSizeVisible: {
+ type: Boolean,
+ required: true,
+ },
+ },
+ computed: {
+ jobLogSize() {
+ return sprintf('Showing last %{size} of log -', {
+ size: numberToHumanSize(this.size),
+ });
+ },
+ },
+ mounted() {
+ polyfillSticky(this.$el);
+ },
+ methods: {
+ handleScrollToTop() {
+ this.$emit('scrollJobLogTop');
+ },
+ handleScrollToBottom() {
+ this.$emit('scrollJobLogBottom');
+ },
+ },
+};
</script>
<template>
- <div class="top-bar">
+ <div class="top-bar affix">
<!-- truncate information -->
<div class="js-truncated-info truncated-info d-none d-sm-block float-left">
<template v-if="isTraceSizeVisible">
@@ -101,7 +102,7 @@
v-tooltip
:title="s__('Job|Erase job log')"
:href="erasePath"
- data-confirm="__('Are you sure you want to erase this build?')"
+ :data-confirm="__('Are you sure you want to erase this build?')"
class="js-erase-link controllers-buttons"
data-container="body"
data-method="post"
@@ -139,8 +140,8 @@
class="js-scroll-bottom btn-scroll btn-transparent btn-blank"
:class="{ animate: isScrollingDown }"
@click="handleScrollToBottom"
+ v-html="$options.scrollDown"
>
- <icon name="scroll_down"/>
</button>
</div>
<!-- eo scroll buttons -->