Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-12 06:09:29 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-12 06:09:29 +0300
commit8ca719f247e416c44550e6259b87c893b2b4fc4d (patch)
tree5344a615ad310753d0001399caf03f2e98134751 /app/assets/javascripts/performance_bar
parent0f5dcf55e543e2cb30697d4c8ea8ce509cf25375 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/performance_bar')
-rw-r--r--app/assets/javascripts/performance_bar/index.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/app/assets/javascripts/performance_bar/index.js b/app/assets/javascripts/performance_bar/index.js
index f88314dabcf..d29099b872a 100644
--- a/app/assets/javascripts/performance_bar/index.js
+++ b/app/assets/javascripts/performance_bar/index.js
@@ -5,14 +5,15 @@ import axios from '~/lib/utils/axios_utils';
import PerformanceBarService from './services/performance_bar_service';
import PerformanceBarStore from './stores/performance_bar_store';
-const initPerformanceBar = ({ container }) =>
- new Vue({
- el: container,
+const initPerformanceBar = el => {
+ const performanceBarData = el.dataset;
+
+ return new Vue({
+ el,
components: {
PerformanceBarApp: () => import('./components/performance_bar_app.vue'),
},
data() {
- const performanceBarData = document.querySelector(this.$options.el).dataset;
const store = new PerformanceBarStore();
return {
@@ -118,9 +119,13 @@ const initPerformanceBar = ({ container }) =>
});
},
});
+};
document.addEventListener('DOMContentLoaded', () => {
- initPerformanceBar({ container: '#js-peek' });
+ const jsPeek = document.querySelector('#js-peek');
+ if (jsPeek) {
+ initPerformanceBar(jsPeek);
+ }
});
export default initPerformanceBar;