You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2018/01/29 19:26:39 UTC

mesos git commit: Reordered roles in Web UI to display them alphabetically by default.

Repository: mesos
Updated Branches:
  refs/heads/master 0dae8757d -> f0735edd2


Reordered roles in Web UI to display them alphabetically by default.

Use the alphabetical order of the name of the roles by
default to better display their hierarchy.

Review: https://reviews.apache.org/r/65351/


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

Branch: refs/heads/master
Commit: f0735edd200a8eb2549c967582767550b3958541
Parents: 0dae875
Author: Armand Grillet <ag...@mesosphere.io>
Authored: Mon Jan 29 11:26:07 2018 -0800
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Mon Jan 29 11:26:07 2018 -0800

----------------------------------------------------------------------
 src/webui/master/static/js/app.js  | 7 ++++++-
 src/webui/master/static/roles.html | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/f0735edd/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 463c563..8960f9d 100644
--- a/src/webui/master/static/js/app.js
+++ b/src/webui/master/static/js/app.js
@@ -301,8 +301,13 @@
 
             if (scope.columnKey === key) {
               scope.sortOrder = !scope.sortOrder;
+            } else if (el.hasClass('ascending')) {
+              // We can order the table the other way around by adding
+              // 'class="ascending"' to the table header.
+              scope.sortOrder = !defaultOrder;
+            } else {
+              scope.sortOrder = defaultOrder;
             }
-            else { scope.sortOrder = defaultOrder }
 
             scope.columnKey = key;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/f0735edd/src/webui/master/static/roles.html
----------------------------------------------------------------------
diff --git a/src/webui/master/static/roles.html b/src/webui/master/static/roles.html
index 7578852..1c84ad3 100644
--- a/src/webui/master/static/roles.html
+++ b/src/webui/master/static/roles.html
@@ -11,7 +11,7 @@
   class="table table-striped table-bordered table-condensed">
   <thead>
     <tr>
-      <th data-key="name" data-sort>Role</th>
+      <th data-key="name" data-sort class="ascending">Role</th>
       <th data-key="weight">Weight</th>
       <th data-key="frameworks.length">Frameworks</th>
       <th data-key="resources.cpus">CPUs (Allocated / Quota)</th>