From d3e0f6f2bf57f8c668095004299f9d283b048fb5 Mon Sep 17 00:00:00 2001 From: stevenstetzler Date: Thu, 22 Jul 2021 20:03:06 -0400 Subject: [PATCH 1/2] Add CPU display to extension --- jupyter_resource_usage/static/main.js | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/jupyter_resource_usage/static/main.js b/jupyter_resource_usage/static/main.js index 00d2352..69a4dae 100644 --- a/jupyter_resource_usage/static/main.js +++ b/jupyter_resource_usage/static/main.js @@ -14,6 +14,16 @@ define([ .attr('title', 'Actively used Memory (updates every 5s)') ) ); + $('#maintoolbar-container').append( + $('
').attr('id', 'jupyter-resource-usage-display-cpu') + .addClass('btn-group') + .addClass('pull-right').append( + $('').text(' CPU: ') + ).append( + $('').attr('id', 'jupyter-resource-usage-cpu') + .attr('title', 'Actively used CPU (updates every 5s)') + ) + ); // FIXME: Do something cleaner to get styles in here? $('head').append( $('