summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/performance_bar/index.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-25 00:06:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-25 00:06:14 +0000
commit6d43720a1a86ccca9618417a6d0415e7d522fa49 (patch)
treeceab63f6374252b8afe4913b949bae39a027366f /app/assets/javascripts/performance_bar/index.js
parent46bfa73d93786bc2a832be7e42e2119712a0bafb (diff)
downloadgitlab-ce-6d43720a1a86ccca9618417a6d0415e7d522fa49.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/performance_bar/index.js')
-rw-r--r--app/assets/javascripts/performance_bar/index.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/assets/javascripts/performance_bar/index.js b/app/assets/javascripts/performance_bar/index.js
index 1ae9487f391..735c9d804ee 100644
--- a/app/assets/javascripts/performance_bar/index.js
+++ b/app/assets/javascripts/performance_bar/index.js
@@ -1,4 +1,6 @@
import Vue from 'vue';
+import axios from '~/lib/utils/axios_utils';
+
import PerformanceBarService from './services/performance_bar_service';
import PerformanceBarStore from './stores/performance_bar_store';
@@ -32,6 +34,15 @@ export default ({ container }) =>
PerformanceBarService.removeInterceptor(this.interceptor);
},
methods: {
+ addRequestManually(urlOrRequestId) {
+ if (urlOrRequestId.startsWith('https://') || urlOrRequestId.startsWith('http://')) {
+ // We don't need to do anything with the response, we just
+ // want to trace the request.
+ axios.get(urlOrRequestId);
+ } else {
+ this.loadRequestDetails(urlOrRequestId, urlOrRequestId);
+ }
+ },
loadRequestDetails(requestId, requestUrl) {
if (!this.store.canTrackRequest(requestUrl)) {
return;
@@ -58,6 +69,9 @@ export default ({ container }) =>
peekUrl: this.peekUrl,
profileUrl: this.profileUrl,
},
+ on: {
+ 'add-request': this.addRequestManually,
+ },
});
},
});