Skip to content

Commit

Permalink
#7447 improve SparkUI status widget (#7514)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariusz Jurowicz authored and scottdraves committed Jun 12, 2018
1 parent 09caa48 commit 5da861e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/notebook/src/SparkUI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export class SparkUIView extends widgets.VBoxView {
this.sparkStats.node.innerHTML = `
<div class="active label label-info" title="Active Tasks">0</div> <div
class="dead label label-danger" title="Dead Executors">0</div> <div
class="memory label label-default" title="Storage Memory">0.0 B</div>
class="memory label label-default" title="Storage Memory">0 KB</div>
`;

this.connectionLabelActive = this.sparkStats.node.querySelector('.active');
Expand Down
4 changes: 2 additions & 2 deletions js/notebook/src/shared/bkUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
1 change: 0 additions & 1 deletion js/notebook/src/shared/style/spark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@
padding: 0 1em;
border-radius: 3px;
margin: 4px 6px;
min-width: 160px;

&.connected {
border: none;
Expand Down

0 comments on commit 5da861e

Please sign in to comment.