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/07/26 19:55:35 UTC

[1/3] git commit: Iterate frameworks successively to save concat

Updated Branches:
  refs/heads/master 7d108f767 -> dfdeeebe3


Iterate frameworks successively to save concat

`concat` concatenates two Arrays and returns a new Array. `frameworks`
and `completed_frameworks` can be iterated successively to save
allocation of a new Array that is thrown away after finding the current
framework.

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


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

Branch: refs/heads/master
Commit: 6cb1206f9a535f0f34ce5b2d8623d74c609f9e46
Parents: 7d108f7
Author: Ross Allen <re...@gmail.com>
Authored: Sat Jul 20 15:14:27 2013 -0700
Committer: Ross Allen <re...@gmail.com>
Committed: Fri Jul 26 10:54:35 2013 -0700

----------------------------------------------------------------------
 src/webui/master/static/js/controllers.js | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/6cb1206f/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 84012de..a757f13 100644
--- a/src/webui/master/static/js/controllers.js
+++ b/src/webui/master/static/js/controllers.js
@@ -575,11 +575,14 @@
 
         $scope.slave = {};
 
+        function matchFramework(framework) {
+          return $scope.framework_id === framework.id;
+        }
+
         // Find the framework; it's either active or completed.
-        $scope.framework = _.find($scope.state.frameworks.concat($scope.state.completed_frameworks),
-            function(framework) {
-              return $scope.framework_id === framework.id;
-            });
+        $scope.framework =
+            _.find($scope.state.frameworks, matchFramework) ||
+            _.find($scope.state.completed_frameworks, matchFramework);
 
         if (!$scope.framework) {
           $scope.alert_message = 'No framework found with ID: ' + $routeParams.framework_id;


[2/3] git commit: Replace jQuery with Angular's jQlite in app.js

Posted by ss...@apache.org.
Replace jQuery with Angular's jQlite in app.js

Angular's jQlite can replace the use cases in app.js, which moves Mesos
a step closer to dropping jQuery completely. No functionality changed.

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


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

Branch: refs/heads/master
Commit: 54519f9b1dc8efa93821ea31bae920be7f4b867d
Parents: 6cb1206
Author: Ross Allen <re...@gmail.com>
Authored: Mon Jul 22 18:31:26 2013 -0700
Committer: Ross Allen <re...@gmail.com>
Committed: Fri Jul 26 10:55:03 2013 -0700

----------------------------------------------------------------------
 src/webui/master/static/js/app.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/54519f9b/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 dd56a23..6637513 100644
--- a/src/webui/master/static/js/app.js
+++ b/src/webui/master/static/js/app.js
@@ -145,7 +145,7 @@
           var clip = new ZeroClipboard(element[0]);
 
           clip.on('mouseover', function() {
-            $(this).trigger('clipboardhover');
+            angular.element(this).triggerHandler('clipboardhover');
           });
 
           clip.on('mouseout', function() {
@@ -160,7 +160,7 @@
               delete elScope.tt_content_orig;
             }
 
-            $(this).trigger('clipboardhover');
+            angular.element(this).triggerHandler('clipboardhover');
           });
 
           clip.on('complete', function() {
@@ -189,7 +189,7 @@
             //
             // Browsers with no flash support will not append the 'flash' class
             // and will therefore not see the copy buttons.
-            $('html').addClass('flash');
+            angular.element('html').addClass('flash');
           });
         }
       };


[3/3] git commit: Replace popover with copy button on /slaves/:id

Posted by ss...@apache.org.
Replace popover with copy button on /slaves/:id

This page was still using a Popover for its framework ID rather than
the updated copy button using ZeroClipboard.
Review: http://reviews.apache.org/r/12878


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

Branch: refs/heads/master
Commit: dfdeeebe3f530f78120a4ef8264777800210e7a5
Parents: 54519f9
Author: Ross Allen <re...@gmail.com>
Authored: Tue Jul 23 13:34:40 2013 -0700
Committer: Ross Allen <re...@gmail.com>
Committed: Fri Jul 26 10:55:29 2013 -0700

----------------------------------------------------------------------
 src/webui/master/static/slave.html | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/dfdeeebe/src/webui/master/static/slave.html
----------------------------------------------------------------------
diff --git a/src/webui/master/static/slave.html b/src/webui/master/static/slave.html
index f0d30d7..e1dabc0 100644
--- a/src/webui/master/static/slave.html
+++ b/src/webui/master/static/slave.html
@@ -202,19 +202,18 @@
       <tbody>
         <tr ng-repeat="completed_framework in _.values(slave.completed_frameworks) | orderBy:tables['completed_frameworks'].selected_column:tables['completed_frameworks'].reverse">
           <td>
-            <a href="javascript:void(0)"
-                popover="{{completed_framework.id}}"
-                popover-placement="bottom"
-                popover-title="ID">
-              {{completed_framework.id | truncateMesosID}}
-            </a>
-          </td>
-          <td>{{completed_framework.user}}</td>
-          <td>
             <a href="{{'#/slaves/' + slave_id + '/frameworks/' + completed_framework.id}}">
-              {{completed_framework.name}}
-            </a>
+              {{completed_framework.id | truncateMesosID}}</a>
+            <button class="btn btn-mini btn-toggle"
+              clipboard
+              data-clipboard-text="{{framework.id}}"
+              tooltip="Copy ID"
+              tooltip-placement="right"
+              tooltip-trigger="clipboardhover">
+            </button>
           </td>
+          <td>{{completed_framework.user}}</td>
+          <td>{{completed_framework.name}}</td>
           <td>{{completed_framework.num_tasks | number}}</td>
           <td>{{completed_framework.cpus | number}}</td>
           <td>{{completed_framework.mem * (1024 * 1024) | dataSize}}</td>