You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ss...@apache.org on 2013/12/05 19:04:48 UTC

[1/3] git commit: Linted jquery.pailer.js, added missing semicolons.

Updated Branches:
  refs/heads/master e55bde93c -> d6535587e


Linted jquery.pailer.js, added missing semicolons.

There are not functional changes here, only cosmetic. Added missing
semicolons, used triple equals to test equality, and preferred
unquoted hash keys where appropriate.

Review: http://reviews.apache.org/r/16028


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/0e1b440f
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/0e1b440f
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/0e1b440f

Branch: refs/heads/master
Commit: 0e1b440fbaaf83fdc44d713ee0f203dd2f66737f
Parents: e55bde9
Author: Ross Allen <ro...@gmail.com>
Authored: Wed Dec 4 17:48:51 2013 -0800
Committer: Ross Allen <ro...@gmail.com>
Committed: Wed Dec 4 17:53:48 2013 -0800

----------------------------------------------------------------------
 src/webui/master/static/js/jquery.pailer.js | 35 +++++++++++++-----------
 1 file changed, 19 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/0e1b440f/src/webui/master/static/js/jquery.pailer.js
----------------------------------------------------------------------
diff --git a/src/webui/master/static/js/jquery.pailer.js b/src/webui/master/static/js/jquery.pailer.js
index 4edc5b4..79c3c0d 100644
--- a/src/webui/master/static/js/jquery.pailer.js
+++ b/src/webui/master/static/js/jquery.pailer.js
@@ -98,7 +98,7 @@
       var height = this_.element.height();
       var scrollHeight = this_.element[0].scrollHeight;
 
-      if (scrollTop == 0) {
+      if (scrollTop === 0) {
         this_.page();
       } else if (scrollTop + height >= scrollHeight) {
         if (!this_.tailing) {
@@ -140,7 +140,7 @@
           this_.initialize();
         }, 1000);
       });
-  }
+  };
 
 
   Pailer.prototype.page = function() {
@@ -157,7 +157,7 @@
     this_.paging = true;
     this_.indicate('(PAGING)');
 
-    if (this_.start == 0) {
+    if (this_.start === 0) {
       this_.paging = false;
       this_.indicate('(AT BEGINNING OF FILE)');
       setTimeout(function() { this_.indicate(''); }, 1000);
@@ -190,7 +190,7 @@
             data.data = buffer + data.data;
 
             // Truncate to the first newline (unless this is the beginning).
-            if (data.offset != 0) {
+            if (data.offset !== 0) {
               var index = data.data.indexOf('\n') + 1;
               data.offset += index;
               data.data = data.data.substring(index);
@@ -216,10 +216,10 @@
             this_.page();
           }, 1000);
         });
-    }
+    };
 
     read(offset, length);
-  }
+  };
 
 
   Pailer.prototype.tail = function() {
@@ -245,7 +245,7 @@
         if (data.data.length > 0) {
           // Truncate to the first newline if this is the first time
           // (and we aren't reading from the beginning of the log).
-          if (this_.start == this_.end && data.offset != 0) {
+          if (this_.start === this_.end && data.offset !== 0) {
             var index = data.data.indexOf('\n') + 1;
             data.offset += index;
             data.data = data.data.substring(index);
@@ -272,7 +272,7 @@
         // log data at a time ... the right solution here might be to do
         // a request to determine the new ending offset and then request
         // the proper length.
-        if (data.data.length == this_.truncate_length) {
+        if (data.data.length === this_.truncate_length) {
           setTimeout(function() { this_.tail(); }, 0);
         } else {
           setTimeout(function() { this_.tail(); }, 1000);
@@ -286,7 +286,7 @@
           this_.initialize();
         }, 1000);
       });
-  }
+  };
 
 
   Pailer.prototype.indicate = function(text) {
@@ -295,7 +295,7 @@
     if (this_.indicator) {
       this_.indicator.text(text);
     }
-  }
+  };
 
 
   Pailer.prototype.truncate = function() {
@@ -307,14 +307,16 @@
       this_.start = this_.end - this_.truncate_length;
       this_.element.html(this_.element.html().substring(index));
     }
-  }
+  };
 
   $.fn.pailer = function(options) {
     var settings = $.extend({
-      'read': function() { return {
-        'success': function() {},
-        'error': function(f) { f(); }
-      }},
+      read: function() {
+        return {
+          success: function() {},
+          error: function(f) { f(); }
+        };
+      },
       'page_size': 8 * 4096, // 8 "pages".
       'truncate_length': 50000
     }, options);
@@ -331,5 +333,6 @@
         pailer.initialize();
       }
     });
-  }
+  };
+
 })(jQuery);


[3/3] git commit: Removed unused 'slaves' table from home page.

Posted by ss...@apache.org.
Removed unused 'slaves' table from home page.

The slaves table was removed from the home page a while ago, and so
the table was not ever being referenced.

Review: http://reviews.apache.org/r/16030


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d6535587
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d6535587
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d6535587

Branch: refs/heads/master
Commit: d6535587ecbec8c0fefe6199fa500bae9bd8e6ae
Parents: 3379e94
Author: Ross Allen <ro...@gmail.com>
Authored: Thu Nov 14 16:20:37 2013 -0800
Committer: Ross Allen <ro...@gmail.com>
Committed: Wed Dec 4 17:54:05 2013 -0800

----------------------------------------------------------------------
 src/webui/master/static/js/controllers.js | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d6535587/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 76ca428..5308bb9 100644
--- a/src/webui/master/static/js/controllers.js
+++ b/src/webui/master/static/js/controllers.js
@@ -345,7 +345,6 @@
 
     $scope.tables = {};
     $scope.tables['frameworks'] = new Table('id');
-    $scope.tables['slaves'] = new Table('id');
     $scope.tables['completed_frameworks'] = new Table('id');
 
     $scope.columnClass = columnClass($scope);


[2/3] git commit: Made pailer scrollable in Chrome and Safari.

Posted by ss...@apache.org.
Made pailer scrollable in Chrome and Safari.

After a change to fix the pailer in Firefox, Chrome and Safari broke.
By removing the inner <code> block and using just a <pre> element, the
calculations done by the pailer work again and in all 3 browsers.

The style changes simplified the CSS.

In JS, references to the DOM are kept in variables to prevent unneeded
trips to the DOM on window resizing.

Review: http://reviews.apache.org/r/16029


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/3379e941
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/3379e941
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/3379e941

Branch: refs/heads/master
Commit: 3379e9410f246c79a9de9f519c5598ec3ae2c713
Parents: 0e1b440
Author: Ross Allen <ro...@gmail.com>
Authored: Wed Dec 4 17:50:59 2013 -0800
Committer: Ross Allen <ro...@gmail.com>
Committed: Wed Dec 4 17:53:56 2013 -0800

----------------------------------------------------------------------
 src/webui/master/static/pailer.html | 47 ++++++++++++++------------------
 1 file changed, 20 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/3379e941/src/webui/master/static/pailer.html
----------------------------------------------------------------------
diff --git a/src/webui/master/static/pailer.html b/src/webui/master/static/pailer.html
index ee2b1b8..19e0981 100644
--- a/src/webui/master/static/pailer.html
+++ b/src/webui/master/static/pailer.html
@@ -3,49 +3,42 @@
   <head>
     <meta charset="utf-8">
     <title></title>
-
-    <style type="text/css">
-      .log {
-        font-family: "Inconsolata", "Monaco", "Courier New", "Courier";
-        line-height:16px;
+    <style>
+      body {
+        line-height: 16px;
         font-size: 14px;
       }
 
-      .invert {
+      .indicator {
+        background: #000000;
         color: #FFFFFF;
+        left: 5px;
+        position: absolute;
         text-decoration: none;
-        background: #000000;
+        top: 5px;
       }
     </style>
   </head>
 
   <body style="overflow: hidden;">
-    <pre><code id="data" class="log"></code></pre>
-
-    <div style="position: absolute; left: 5px; top: 0px;">
-      <p id="indicator" class="log invert"></p>
-    </div>
+    <pre id="data"></pre>
+    <div class="indicator" id="indicator"></div>
 
     <script src="/static/js/jquery-1.7.1.min.js"></script>
     <script src="/static/js/underscore-1.4.3.min.js"></script>
     <script src="/static/js/jquery.pailer.js"></script>
 
     <script>
-      // TODO(benh): Give focus to $('#data') so we can initially page
-      // with the arrow keys.
-      $(window).keydown(function(event) {
-        if ($('#data').scrollTop() == 0) {
-          if (event.keyCode == 38) { // UP.
-          }
-        }
-      });
+      var $body = $('body');
+      var $data = $('#data');
 
       function resize() {
-        var margin_left = parseInt($('body').css('margin-left'));
-        var margin_top = parseInt($('body').css('margin-top'));
-        var margin_bottom = parseInt($('body').css('margin-bottom'));
-        $('#data').width($(window).width() - margin_left);
-        $('#data').height($(window).height() - margin_top - margin_bottom);
+        var margin_left = parseInt($body.css('margin-left'));
+        var margin_top = parseInt($body.css('margin-top'));
+        var margin_bottom = parseInt($body.css('margin-bottom'));
+        $data
+          .width($(window).width() - margin_left)
+          .height($(window).height() - margin_top - margin_bottom);
       }
 
       $(window).resize(resize);
@@ -53,8 +46,8 @@
       $(document).ready(function() {
         resize();
 
-        $('#data').pailer({
-          'read': function(options) {
+        $data.pailer({
+          read: function(options) {
             var settings = $.extend({
               'offset': -1,
               'length': -1