You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2016/10/14 19:00:09 UTC
[5/5] mesos git commit: Moved the `decimalFloat` filter to app.js for
consistency.
Moved the `decimalFloat` filter to app.js for consistency.
Review: https://reviews.apache.org/r/52664/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9afaaffd
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9afaaffd
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9afaaffd
Branch: refs/heads/master
Commit: 9afaaffd8badbe4e28013e25918cd62afe1e0edd
Parents: 6762fc8
Author: haosdent huang <ha...@gmail.com>
Authored: Fri Oct 14 11:59:48 2016 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Fri Oct 14 11:59:48 2016 -0700
----------------------------------------------------------------------
src/webui/master/static/js/app.js | 6 ++++++
src/webui/master/static/js/controllers.js | 7 -------
2 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/9afaaffd/src/webui/master/static/js/app.js
----------------------------------------------------------------------
diff --git a/src/webui/master/static/js/app.js b/src/webui/master/static/js/app.js
index c764430..c32177a 100644
--- a/src/webui/master/static/js/app.js
+++ b/src/webui/master/static/js/app.js
@@ -118,6 +118,12 @@
}
};
})
+ // A filter that uses to convert small float number to decimal string.
+ .filter('decimalFloat', function() {
+ return function(num) {
+ return num ? parseFloat(num.toFixed(4)).toString() : num;
+ }
+ })
.filter('dataSize', function() {
var BYTES_PER_KB = Math.pow(2, 10);
var BYTES_PER_MB = Math.pow(2, 20);
http://git-wip-us.apache.org/repos/asf/mesos/blob/9afaaffd/src/webui/master/static/js/controllers.js
----------------------------------------------------------------------
diff --git a/src/webui/master/static/js/controllers.js b/src/webui/master/static/js/controllers.js
index 8aac466..0a7ea3f 100644
--- a/src/webui/master/static/js/controllers.js
+++ b/src/webui/master/static/js/controllers.js
@@ -240,13 +240,6 @@
return true; // Continue polling.
}
- // Add a filter to convert small float number to decimal string
- mesosApp.filter('decimalFloat', function() {
- return function(num) {
- return num ? parseFloat(num.toFixed(4)).toString() : num;
- }
- });
-
// Update the outermost scope with the metrics/snapshot endpoint.
function updateMetrics($scope, $timeout, data) {
var metrics = JSON.parse(data);