Skip to content
Snippets Groups Projects
Unverified Commit d2dcfe5f authored by Phil Hughes's avatar Phil Hughes
Browse files

added missing button type

moved values to constants
parent deaf4f72
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -40,11 +40,14 @@ export default {
methods: {
...mapActions('pipelines', ['fetchJobTrace', 'setDetailJob']),
scrollDown() {
if (this.$refs.buildTrace)
if (this.$refs.buildTrace) {
this.$refs.buildTrace.scrollTo(0, this.$refs.buildTrace.scrollHeight);
}
},
scrollUp() {
if (this.$refs.buildTrace) this.$refs.buildTrace.scrollTo(0, 0);
if (this.$refs.buildTrace) {
this.$refs.buildTrace.scrollTo(0, 0);
}
},
scrollBuildLog: _.throttle(function buildLogScrollDebounce() {
const { scrollTop } = this.$refs.buildTrace;
Loading
Loading
Loading
Loading
@@ -3,6 +3,11 @@ import { __ } from '../../../../locale';
import Icon from '../../../../vue_shared/components/icon.vue';
import tooltip from '../../../../vue_shared/directives/tooltip';
 
const directions = {
up: 'up',
down: 'down',
};
export default {
directives: {
tooltip,
Loading
Loading
@@ -15,7 +20,7 @@ export default {
type: String,
required: true,
validator(value) {
return ['up', 'down'].includes(value);
return Object.keys(directions).includes(value);
},
},
disabled: {
Loading
Loading
@@ -25,7 +30,7 @@ export default {
},
computed: {
tooltipTitle() {
return this.direction === 'up' ? __('Scroll to top') : __('Scroll to bottom');
return this.direction === directions.up ? __('Scroll to top') : __('Scroll to bottom');
},
iconName() {
return `scroll_${this.direction}`;
Loading
Loading
Loading
Loading
@@ -32,6 +32,7 @@ export default {
/>
<div class="ml-auto align-self-center">
<button
type="button"
class="btn btn-default btn-sm"
@click="clickViewLog"
>
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment