summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/jobs/components/job_app.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/jobs/components/job_app.vue')
-rw-r--r--app/assets/javascripts/jobs/components/job_app.vue183
1 files changed, 99 insertions, 84 deletions
diff --git a/app/assets/javascripts/jobs/components/job_app.vue b/app/assets/javascripts/jobs/components/job_app.vue
index 819e880ff88..13a159f5d87 100644
--- a/app/assets/javascripts/jobs/components/job_app.vue
+++ b/app/assets/javascripts/jobs/components/job_app.vue
@@ -65,6 +65,7 @@
'isTraceSizeVisible',
'isScrollTopDisabled',
'isScrollBottomDisabled',
+ 'isScrollInBottom',
]),
...mapGetters(['headerActions', 'headerTime', 'shouldRenderCalloutMessage', 'jobHasTrace']),
/**
@@ -78,6 +79,14 @@
return this.job.deployment_status && !_.isEmpty(this.job.deployment_status);
},
},
+ watch: {
+ trace() {
+ this.$nextTick()
+ .then(() => {
+ debugger;
+ });
+ }
+ },
created() {
this.setJobEndpoint(this.jobEndpoint);
@@ -86,7 +95,12 @@
// set traceState
this.fetchJob();
- this.fetchTrace();
+ this.fetchTrace()
+ .then(() => {
+ this.scrollBottom();
+ })
+ .then(() => this.toggleScrollButtons());
+
},
mounted() {
window.addEventListener('scroll', this.onScroll);
@@ -122,99 +136,100 @@
};
</script>
<template>
- <div class="build-page">
- <gl-loading-icon
- v-if="isLoading"
- :size="3"
- class="prepend-top-20"
- />
-
- <template v-else>
- <!-- Header Section -->
- <header>
- <div class="js-build-header build-header top-area">
- <ci-header
- :status="job.status"
- :item-id="job.id"
- :time="headerTime"
- :user="job.user"
- :actions="headerActions"
- :has-sidebar-button="true"
- :should-render-triggered-label="jobStarted"
- :item-name="__('Job')"
- />
- </div>
-
- <callout
- v-if="shouldRenderCalloutMessage"
- :message="job.callout_message"
+ <div>
+ <div class="build-page">
+ <gl-loading-icon
+ v-if="isLoading"
+ :size="3"
+ class="prepend-top-20"
/>
- </header>
- <!-- EO Header Section -->
- <!-- Body Section -->
- <stuck-block
- v-if="job.runners.available"
- :has-no-runners-for-project="job.runners.available"
- :tags="job.tag_list"
- :runners-path="runnersPath"
- />
+ <template v-else>
+ <!-- Header Section -->
+ <header>
+ <div class="js-build-header build-header top-area">
+ <ci-header
+ :status="job.status"
+ :item-id="job.id"
+ :time="headerTime"
+ :user="job.user"
+ :actions="headerActions"
+ :has-sidebar-button="true"
+ :should-render-triggered-label="jobStarted"
+ :item-name="__('Job')"
+ />
+ </div>
- <environments-block
- v-if="hasEnvironment"
- :deployment-status="job.deployment_status"
- />
+ <callout
+ v-if="shouldRenderCalloutMessage"
+ :message="job.callout_message"
+ />
+ </header>
+ <!-- EO Header Section -->
- <erased-block
- v-if="job.erased"
- :user="job.erased_by"
- :erased-at="job.erased_at"
- />
+ <!-- Body Section -->
+ <stuck-block
+ v-if="job.runners.available"
+ :has-no-runners-for-project="job.runners.available"
+ :tags="job.tag_list"
+ :runners-path="runnersPath"
+ />
- <!--job log -->
- <div
- v-if="jobHasTrace"
- class="build-trace-container prepend-top-default"
- >
- <log-controllers
- :erase-path="job.erase_path"
- :raw-path="job.raw_path"
- :size="traceSize"
- :is-scroll-bottom-disabled="isScrollBottomDisabled"
- :is-scroll-top-disabled="isScrollTopDisabled"
- :is-trace-size-visible="isTraceSizeVisible"
- :is-scrolling-down="isScrollingDown"
- @scrollJobLogTop="scrollTop"
- @scrollJobLogBottom="scrollBottom"
+ <environments-block
+ v-if="hasEnvironment"
+ :deployment-status="job.deployment_status"
/>
- <log-block
- :trace="trace"
- :is-complete="isTraceComplete"
- class="float-left"
+ <erased-block
+ v-if="job.erased"
+ :user="job.erased_by"
+ :erased-at="job.erased_at"
/>
- </div>
- <!-- EO job log -->
- <!-- fl todo, check the illustrations not loading -->
- <empty-state
- v-else
- :illustration-path="job.status.illustration.image"
- :illustration-size-class="job.status.illustration.size"
- :title="job.status.illustration.title"
- :content="job.status.illustration.content"
- :action="job.status.action"
- />
- <!-- EO Body Section -->
+ <!--job log -->
+ <div
+ v-if="jobHasTrace"
+ class="build-trace-container prepend-top-default"
+ >
+ <log-controllers
+ :erase-path="job.erase_path"
+ :raw-path="job.raw_path"
+ :size="traceSize"
+ :is-scroll-bottom-disabled="isScrollBottomDisabled"
+ :is-scroll-top-disabled="isScrollTopDisabled"
+ :is-trace-size-visible="isTraceSizeVisible"
+ :is-scrolling-down="isScrollingDown"
+ @scrollJobLogTop="scrollTop"
+ @scrollJobLogBottom="scrollBottom"
+ />
- <!-- Sidebar Section -->
- <sidebar
- :job="job"
- :runner-help-url="runnerHelpUrl"
- :terminal-path="terminalPath"
- />
- <!-- EO Sidebar Section -->
+ <log-block
+ :trace="trace"
+ :is-complete="isTraceComplete"
+ class="float-left"
+ />
+ </div>
+ <!-- EO job log -->
- </template>
+ <!-- fl todo, check the illustrations not loading -->
+ <empty-state
+ v-else
+ :illustration-path="job.status.illustration.image"
+ :illustration-size-class="job.status.illustration.size"
+ :title="job.status.illustration.title"
+ :content="job.status.illustration.content"
+ :action="job.status.action"
+ />
+ <!-- EO Body Section -->
+ </template>
+ </div>
+ <!-- Sidebar Section -->
+ <sidebar
+ v-if="!isLoading"
+ :job="job"
+ :runner-help-url="runnerHelpUrl"
+ :terminal-path="terminalPath"
+ />
+ <!-- EO Sidebar Section -->
</div>
</template>