diff options
Diffstat (limited to 'app/assets/javascripts/jobs')
7 files changed, 37 insertions, 18 deletions
diff --git a/app/assets/javascripts/jobs/components/job/job_app.vue b/app/assets/javascripts/jobs/components/job/job_app.vue index d93b8a8de29..a5a92a3c4ff 100644 --- a/app/assets/javascripts/jobs/components/job/job_app.vue +++ b/app/assets/javascripts/jobs/components/job/job_app.vue @@ -3,6 +3,7 @@ import { GlLoadingIcon, GlIcon, GlAlert } from '@gitlab/ui'; import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils'; import { throttle, isEmpty } from 'lodash'; import { mapGetters, mapState, mapActions } from 'vuex'; +import LogTopBar from 'ee_else_ce/jobs/components/job/job_log_controllers.vue'; import SafeHtml from '~/vue_shared/directives/safe_html'; import { isScrolledToBottom } from '~/lib/utils/scroll_utils'; import { __, sprintf } from '~/locale'; @@ -13,7 +14,6 @@ import { MANUAL_STATUS } from '~/jobs/constants'; import EmptyState from './empty_state.vue'; import EnvironmentsBlock from './environments_block.vue'; import ErasedBlock from './erased_block.vue'; -import LogTopBar from './job_log_controllers.vue'; import StuckBlock from './stuck_block.vue'; import UnmetPrerequisitesBlock from './unmet_prerequisites_block.vue'; import Sidebar from './sidebar/sidebar.vue'; diff --git a/app/assets/javascripts/jobs/components/job/job_log_controllers.vue b/app/assets/javascripts/jobs/components/job/job_log_controllers.vue index ea7e13418f2..efd4eed2a9f 100644 --- a/app/assets/javascripts/jobs/components/job/job_log_controllers.vue +++ b/app/assets/javascripts/jobs/components/job/job_log_controllers.vue @@ -178,6 +178,7 @@ export default { </script> <template> <div class="top-bar gl-display-flex gl-justify-content-space-between"> + <slot name="drawers"></slot> <!-- truncate information --> <div class="truncated-info gl-display-none gl-sm-display-flex gl-flex-wrap gl-align-items-center" @@ -197,6 +198,7 @@ export default { <!-- eo truncate information --> <div class="controllers"> + <slot name="controllers"> </slot> <gl-search-box-by-click v-model="searchTerm" class="gl-mr-3" diff --git a/app/assets/javascripts/jobs/components/job/sidebar/job_sidebar_retry_button.vue b/app/assets/javascripts/jobs/components/job/sidebar/job_sidebar_retry_button.vue index 7183a8b5d03..e70f9199b55 100644 --- a/app/assets/javascripts/jobs/components/job/sidebar/job_sidebar_retry_button.vue +++ b/app/assets/javascripts/jobs/components/job/sidebar/job_sidebar_retry_button.vue @@ -1,5 +1,5 @@ <script> -import { GlButton, GlDropdown, GlDropdownItem, GlModalDirective } from '@gitlab/ui'; +import { GlButton, GlDisclosureDropdown, GlModalDirective } from '@gitlab/ui'; import { mapGetters } from 'vuex'; import { JOB_SIDEBAR_COPY } from '~/jobs/constants'; @@ -10,8 +10,7 @@ export default { }, components: { GlButton, - GlDropdown, - GlDropdownItem, + GlDisclosureDropdown, }, directives: { GlModal: GlModalDirective, @@ -32,6 +31,21 @@ export default { }, computed: { ...mapGetters(['hasForwardDeploymentFailure']), + dropdownItems() { + return [ + { + text: this.$options.i18n.runAgainJobButtonLabel, + href: this.href, + extraAttrs: { + 'data-method': 'post', + }, + }, + { + text: this.$options.i18n.updateVariables, + action: () => this.$emit('updateVariablesClicked'), + }, + ]; + }, }, }; </script> @@ -45,20 +59,14 @@ export default { icon="retry" data-testid="retry-job-button" /> - <gl-dropdown + <gl-disclosure-dropdown v-else-if="isManualJob" icon="retry" category="primary" - :right="true" + placement="right" variant="confirm" - > - <gl-dropdown-item :href="href" data-method="post"> - {{ $options.i18n.runAgainJobButtonLabel }} - </gl-dropdown-item> - <gl-dropdown-item @click="$emit('updateVariablesClicked')"> - {{ $options.i18n.updateVariables }} - </gl-dropdown-item> - </gl-dropdown> + :items="dropdownItems" + /> <gl-button v-else :href="href" diff --git a/app/assets/javascripts/jobs/components/job/sidebar/stages_dropdown.vue b/app/assets/javascripts/jobs/components/job/sidebar/stages_dropdown.vue index 9a88018205b..c1f84adf664 100644 --- a/app/assets/javascripts/jobs/components/job/sidebar/stages_dropdown.vue +++ b/app/assets/javascripts/jobs/components/job/sidebar/stages_dropdown.vue @@ -161,6 +161,11 @@ export default { </gl-sprintf> </div> - <gl-disclosure-dropdown :toggle-text="selectedStage" :items="dropdownItems" class="gl-mt-3" /> + <gl-disclosure-dropdown + :toggle-text="selectedStage" + :items="dropdownItems" + block + class="gl-mt-3" + /> </div> </template> diff --git a/app/assets/javascripts/jobs/components/job/stuck_block.vue b/app/assets/javascripts/jobs/components/job/stuck_block.vue index d7a26d22406..1a678ce69a8 100644 --- a/app/assets/javascripts/jobs/components/job/stuck_block.vue +++ b/app/assets/javascripts/jobs/components/job/stuck_block.vue @@ -1,6 +1,7 @@ <script> import { GlAlert, GlBadge, GlLink, GlSprintf } from '@gitlab/ui'; import { s__ } from '~/locale'; +import { DOCS_URL } from 'jh_else_ce/lib/utils/url_utility'; /** * Renders Stuck Runners block for job's view. */ @@ -31,7 +32,7 @@ export default { return this.tags.length > 0; }, protectedBranchSettingsDocsLink() { - return 'https://docs.gitlab.com/runner/security/index.html#reduce-the-security-risk-of-using-privileged-containers'; + return `${DOCS_URL}/runner/security/index.html#reduce-the-security-risk-of-using-privileged-containers`; }, stuckData() { if (this.hasNoRunnersWithCorrespondingTags) { diff --git a/app/assets/javascripts/jobs/components/table/cells/job_cell.vue b/app/assets/javascripts/jobs/components/table/cells/job_cell.vue index b692553fdc2..27d286fc766 100644 --- a/app/assets/javascripts/jobs/components/table/cells/job_cell.vue +++ b/app/assets/javascripts/jobs/components/table/cells/job_cell.vue @@ -71,7 +71,7 @@ export default { <template> <div> - <div class="gl-text-truncate"> + <div class="gl-text-truncate gl-mb-2"> <gl-link v-if="canReadJob" class="gl-text-blue-600!" @@ -92,7 +92,7 @@ export default { /> <div - class="gl-display-flex gl-text-gray-700 gl-align-items-center gl-lg-justify-content-start gl-justify-content-end" + class="gl-display-flex gl-text-gray-700 gl-align-items-center gl-lg-justify-content-start gl-justify-content-end gl-mt-2" > <div v-if="jobRef" diff --git a/app/assets/javascripts/jobs/index.js b/app/assets/javascripts/jobs/index.js index 44bb1ffb1bc..8cd69f25218 100644 --- a/app/assets/javascripts/jobs/index.js +++ b/app/assets/javascripts/jobs/index.js @@ -2,6 +2,7 @@ import { GlToast } from '@gitlab/ui'; import Vue from 'vue'; import VueApollo from 'vue-apollo'; import createDefaultClient from '~/lib/graphql'; +import { parseBoolean } from '~/lib/utils/common_utils'; import JobApp from './components/job/job_app.vue'; import createStore from './store'; @@ -29,6 +30,7 @@ const initializeJobPage = (element) => { buildStatus, projectPath, retryOutdatedJobDocsUrl, + aiRootCauseAnalysisAvailable, } = element.dataset; return new Vue({ @@ -41,6 +43,7 @@ const initializeJobPage = (element) => { provide: { projectPath, retryOutdatedJobDocsUrl, + aiRootCauseAnalysisAvailable: parseBoolean(aiRootCauseAnalysisAvailable), }, render(createElement) { return createElement('job-app', { |