From 5da861e5cf858b04e26250d216d931bb246d9b26 Mon Sep 17 00:00:00 2001 From: Mariusz Jurowicz Date: Tue, 12 Jun 2018 13:51:27 +0200 Subject: [PATCH] #7447 improve SparkUI status widget (#7514) --- js/notebook/src/SparkUI.ts | 2 +- js/notebook/src/shared/bkUtils.js | 4 ++-- js/notebook/src/shared/style/spark.scss | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/js/notebook/src/SparkUI.ts b/js/notebook/src/SparkUI.ts index f3bb46466d..f4636b9016 100644 --- a/js/notebook/src/SparkUI.ts +++ b/js/notebook/src/SparkUI.ts @@ -191,7 +191,7 @@ export class SparkUIView extends widgets.VBoxView { this.sparkStats.node.innerHTML = `
0
0
0.0 B
+ class="memory label label-default" title="Storage Memory">0 KB `; this.connectionLabelActive = this.sparkStats.node.querySelector('.active'); diff --git a/js/notebook/src/shared/bkUtils.js b/js/notebook/src/shared/bkUtils.js index 4835aebc3a..cab1d46d62 100644 --- a/js/notebook/src/shared/bkUtils.js +++ b/js/notebook/src/shared/bkUtils.js @@ -56,10 +56,10 @@ module.exports = { return jQuery.Deferred(); }, formatBytes: function(bytes) { - if (bytes == 0) return '0.0 B'; + if (bytes <= 1000) return '0 KB'; var k = 1000; - var dm = 1; + var dm = 0; var sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; var i = Math.floor(Math.log(bytes) / Math.log(k)); diff --git a/js/notebook/src/shared/style/spark.scss b/js/notebook/src/shared/style/spark.scss index 824785cbae..5da5a98e66 100644 --- a/js/notebook/src/shared/style/spark.scss +++ b/js/notebook/src/shared/style/spark.scss @@ -164,7 +164,6 @@ padding: 0 1em; border-radius: 3px; margin: 4px 6px; - min-width: 160px; &.connected { border: none;