提交 e325367a 编写于 作者: M Mike Greiling

Merge branch 'include-all-axios-requests-in-performance-bar' into 'master'

Start performance bar eagerly

See merge request gitlab-org/gitlab-ce!20201
/* eslint-disable consistent-return, no-new */ /* eslint-disable consistent-return, no-new */
import $ from 'jquery'; import $ from 'jquery';
import Flash from './flash';
import GfmAutoComplete from './gfm_auto_complete'; import GfmAutoComplete from './gfm_auto_complete';
import { convertPermissionToBoolean } from './lib/utils/common_utils'; import { convertPermissionToBoolean } from './lib/utils/common_utils';
import GlFieldErrors from './gl_field_errors'; import GlFieldErrors from './gl_field_errors';
import Shortcuts from './shortcuts'; import Shortcuts from './shortcuts';
import SearchAutocomplete from './search_autocomplete'; import SearchAutocomplete from './search_autocomplete';
import performanceBar from './performance_bar';
function initSearch() { function initSearch() {
// Only when search form is present // Only when search form is present
...@@ -72,9 +72,7 @@ function initGFMInput() { ...@@ -72,9 +72,7 @@ function initGFMInput() {
function initPerformanceBar() { function initPerformanceBar() {
if (document.querySelector('#js-peek')) { if (document.querySelector('#js-peek')) {
import('./performance_bar') performanceBar({ container: '#js-peek' });
.then(m => new m.default({ container: '#js-peek' })) // eslint-disable-line new-cap
.catch(() => Flash('Error loading performance bar module'));
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册