summaryrefslogtreecommitdiff
path: root/app/assets/javascripts
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/jobs/components/sidebar_details_block.vue38
-rw-r--r--app/assets/javascripts/jobs/job_details_bundle.js2
2 files changed, 26 insertions, 14 deletions
diff --git a/app/assets/javascripts/jobs/components/sidebar_details_block.vue b/app/assets/javascripts/jobs/components/sidebar_details_block.vue
index d2adf628050..36d4a3e2bc9 100644
--- a/app/assets/javascripts/jobs/components/sidebar_details_block.vue
+++ b/app/assets/javascripts/jobs/components/sidebar_details_block.vue
@@ -1,14 +1,16 @@
<script>
-import detailRow from './sidebar_detail_row.vue';
-import loadingIcon from '../../vue_shared/components/loading_icon.vue';
-import timeagoMixin from '../../vue_shared/mixins/timeago';
-import { timeIntervalInWords } from '../../lib/utils/datetime_utility';
+import LoadingIcon from '~/vue_shared/components/loading_icon.vue';
+import timeagoMixin from '~/vue_shared/mixins/timeago';
+import { timeIntervalInWords } from '~/lib/utils/datetime_utility';
+import Icon from '~/vue_shared/components/icon.vue';
+import DetailRow from './sidebar_detail_row.vue';
export default {
name: 'SidebarDetailsBlock',
components: {
- detailRow,
- loadingIcon,
+ DetailRow,
+ LoadingIcon,
+ Icon,
},
mixins: [timeagoMixin],
props: {
@@ -20,16 +22,16 @@ export default {
type: Boolean,
required: true,
},
- canUserRetry: {
- type: Boolean,
- required: false,
- default: false,
- },
runnerHelpUrl: {
type: String,
required: false,
default: '',
},
+ terminalPath: {
+ type: String,
+ required: false,
+ default: null,
+ },
},
computed: {
shouldRenderContent() {
@@ -92,7 +94,7 @@ export default {
{{ job.name }}
</strong>
<a
- v-if="canUserRetry"
+ v-if="job.retry_path"
:class="retryButtonClass"
:href="job.retry_path"
data-method="post"
@@ -100,6 +102,16 @@ export default {
>
{{ __('Retry') }}
</a>
+ <a
+ v-if="terminalPath"
+ :href="terminalPath"
+ class="js-terminal-link pull-right btn btn-primary
+ btn-inverted visible-md-block visible-lg-block"
+ target="_blank"
+ >
+ {{ __('Debug') }}
+ <icon name="external-link" />
+ </a>
<button
:aria-label="__('Toggle Sidebar')"
type="button"
@@ -125,7 +137,7 @@ export default {
{{ __('New issue') }}
</a>
<a
- v-if="canUserRetry"
+ v-if="job.retry_path"
:href="job.retry_path"
class="js-retry-job btn btn-inverted-secondary"
data-method="post"
diff --git a/app/assets/javascripts/jobs/job_details_bundle.js b/app/assets/javascripts/jobs/job_details_bundle.js
index 0db7b95636c..a84324f14b2 100644
--- a/app/assets/javascripts/jobs/job_details_bundle.js
+++ b/app/assets/javascripts/jobs/job_details_bundle.js
@@ -52,9 +52,9 @@ export default () => {
return createElement('details-block', {
props: {
isLoading: this.mediator.state.isLoading,
- canUserRetry: !!('canUserRetry' in detailsBlockDataset),
job: this.mediator.store.state.job,
runnerHelpUrl: dataset.runnerHelpUrl,
+ terminalPath: detailsBlockDataset.terminalPath,
},
});
},