Skip to content
代码片段 群组 项目
未验证 提交 d4ee9ac5 编辑于 作者: Eduardo Sanz García's avatar Eduardo Sanz García 提交者: GitLab
浏览文件

Merge branch 'feat/add-entry-in-mr-tabs-page-for-jh' into 'master'

No related branches found
No related tags found
1 合并请求!2498Add job wait time to group runners dashboard
......@@ -6,10 +6,10 @@ import { TYPE_MERGE_REQUEST } from '~/issues/constants';
import toast from '~/vue_shared/plugins/global_toast';
import { __ } from '~/locale';
import { loadingIconForLegacyJS } from '~/loading_icon_for_legacy_js';
import MergeRequestTabs from 'jh_else_ce/merge_request_tabs';
import axios from './lib/utils/axios_utils';
import { addDelimiter } from './lib/utils/text_utility';
import { getParameterValues, setUrlParams } from './lib/utils/url_utility';
import MergeRequestTabs from './merge_request_tabs';
import TaskList from './task_list';
function MergeRequest(opts) {
......
......@@ -131,7 +131,7 @@ function mountPipelines() {
return table;
}
function destroyPipelines(app) {
export function destroyPipelines(app) {
if (app && app.$destroy) {
app.$destroy();
......@@ -167,7 +167,7 @@ function loadDiffs({ url, tabs }) {
});
}
function toggleLoader(state) {
export function toggleLoader(state) {
$('.mr-loading-status .loading').toggleClass('hide', !state);
}
......@@ -183,7 +183,7 @@ export function getActionFromHref(pathName) {
return action;
}
const pageBundles = {
export const pageBundles = {
show: () => import(/* webpackPrefetch: true */ '~/mr_notes/mount_app'),
diffs: () => import(/* webpackPrefetch: true */ '~/diffs'),
};
......@@ -208,6 +208,7 @@ export default class MergeRequestTabs {
this.pageLayout = document.querySelector('.layout-page');
this.expandSidebar = document.querySelectorAll('.js-expand-sidebar, .js-sidebar-toggle');
this.paddingTop = 16;
this.actionRegex = /\/(commits|diffs|pipelines)(\.html)?\/?$/;
this.scrollPositions = {};
......@@ -435,7 +436,7 @@ export default class MergeRequestTabs {
this.currentAction = action;
// Remove a trailing '/commits' '/diffs' '/pipelines'
let newState = location.pathname.replace(/\/(commits|diffs|pipelines)(\.html)?\/?$/, '');
let newState = location.pathname.replace(this.actionRegex, '');
// Append the new action if we're on a tab other than 'notes'
if (this.currentAction !== 'show' && this.currentAction !== 'new') {
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册