summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/performance_bar.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/performance_bar.js')
-rw-r--r--app/assets/javascripts/performance_bar.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/assets/javascripts/performance_bar.js b/app/assets/javascripts/performance_bar.js
index ef44e2323ef..a224a3440b4 100644
--- a/app/assets/javascripts/performance_bar.js
+++ b/app/assets/javascripts/performance_bar.js
@@ -18,6 +18,8 @@ export default class PerformanceBar {
this.$sqlProfileModal = $container.find('#modal-peek-pg-queries');
this.$lineProfileLink = $container.find('.js-toggle-modal-peek-line-profile');
this.$lineProfileModal = $('#modal-peek-line-profile');
+ this.$gitalyProfileLink = $container.find('.js-toggle-modal-peek-gitaly');
+ this.$gitalyProfileModal = $container.find('#modal-peek-gitaly-details');
this.initEventListeners();
this.showModalOnLoad();
}
@@ -25,6 +27,7 @@ export default class PerformanceBar {
initEventListeners() {
this.$sqlProfileLink.on('click', () => this.handleSQLProfileLink());
this.$lineProfileLink.on('click', e => this.handleLineProfileLink(e));
+ this.$gitalyProfileLink.on('click', () => this.handleGitalyProfileLink());
$(document).on('click', '.js-lineprof-file', PerformanceBar.toggleLineProfileFile);
}
@@ -52,6 +55,10 @@ export default class PerformanceBar {
}
}
+ handleGitalyProfileLink() {
+ PerformanceBar.toggleModal(this.$gitalyProfileModal);
+ }
+
static toggleModal($modal) {
if ($modal.length) {
$modal.modal('toggle');