summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-06-02 14:45:58 +0100
committerPhil Hughes <me@iamphill.com>2018-06-06 08:33:04 +0100
commitf73b2c8e5ee0e02407b6674b9b0021ce4843349b (patch)
treeca819e8f577c07badc764da57e7f47a17fae82c8 /app/assets/javascripts/ide
parent2d6022e0865642deb10d458d58d6b0b8c072e98e (diff)
downloadgitlab-ce-f73b2c8e5ee0e02407b6674b9b0021ce4843349b.tar.gz
component specs
Diffstat (limited to 'app/assets/javascripts/ide')
-rw-r--r--app/assets/javascripts/ide/components/jobs/detail.vue13
1 files changed, 5 insertions, 8 deletions
diff --git a/app/assets/javascripts/ide/components/jobs/detail.vue b/app/assets/javascripts/ide/components/jobs/detail.vue
index 72daba5486b..41833f1d4de 100644
--- a/app/assets/javascripts/ide/components/jobs/detail.vue
+++ b/app/assets/javascripts/ide/components/jobs/detail.vue
@@ -33,9 +33,6 @@ export default {
isScrolledToTop() {
return this.scrollPos === scrollPositions.top;
},
- jobId() {
- return `#${this.detailJob.id}`;
- },
},
mounted() {
this.getTrace();
@@ -43,15 +40,15 @@ export default {
methods: {
...mapActions('pipelines', ['fetchJobTrace', 'setDetailJob']),
scrollDown() {
- this.$refs.buildTrace.scrollTo(0, this.$refs.buildTrace.scrollHeight);
+ if (this.$refs.buildTrace)
+ this.$refs.buildTrace.scrollTo(0, this.$refs.buildTrace.scrollHeight);
},
scrollUp() {
- 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.scrollTop;
- const offsetHeight = this.$refs.buildTrace.offsetHeight;
- const scrollHeight = this.$refs.buildTrace.scrollHeight;
+ const { scrollTop } = this.$refs.buildTrace;
+ const { offsetHeight, scrollHeight } = this.$refs.buildTrace;
if (scrollTop + offsetHeight === scrollHeight) {
this.scrollPos = scrollPositions.bottom;