From d259f14267ff54a0b5e5760d4874eb422a093891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 21 Jan 2014 22:06:54 +0100 Subject: [PATCH] Initial work on #9 (millisecond y axis formater) --- src/app/components/kbn.js | 9 +++++++++ src/app/directives/kibanaPanel.js | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/components/kbn.js b/src/app/components/kbn.js index c6cd97df022..92c0368e09f 100644 --- a/src/app/components/kbn.js +++ b/src/app/components/kbn.js @@ -505,5 +505,14 @@ function($, _, moment) { return (size.toFixed(decimals) + ext); }; + kbn.msFormat = function(size) { + if (size < 500) { + return size.toFixed(0) + " ms"; + } + else { + return (size / 1000).toFixed(0) + " s"; + } + }; + return kbn; }); \ No newline at end of file diff --git a/src/app/directives/kibanaPanel.js b/src/app/directives/kibanaPanel.js index 507b74fca06..f85ba808f7f 100644 --- a/src/app/directives/kibanaPanel.js +++ b/src/app/directives/kibanaPanel.js @@ -61,8 +61,7 @@ function (angular, $) { $scope.kbnJqUiDraggableOptions = { revert: 'invalid', - helper: function(event) { - console.log(event); + helper: function() { return $('
'); }, placeholder: 'keep'