We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 30f8be5 commit 2463050Copy full SHA for 2463050
nbresuse/static/main.js
@@ -1,6 +1,4 @@
1
-define(['jquery'], function ($) {
2
- var displayDiv = null;
3
-
+define(['jquery', 'base/js/utils'], function ($, utils) {
4
function createDisplayDiv() {
5
$('#maintoolbar-container').append(
6
$('<div>').attr('id', 'nbresuse-display')
@@ -16,7 +14,7 @@ define(['jquery'], function ($) {
16
14
}
17
15
18
var displayMetrics = function() {
19
- $.getJSON('/metrics', function(data) {
+ $.getJSON(utils.get_body_data('baseUrl') + 'metrics', function(data) {
20
// FIXME: Proper setups for MB and GB. MB should have 0 things
21
// after the ., but GB should have 2.
22
var displayRSS = (data['rss'] / (1024 * 1024)).toFixed(0);
0 commit comments