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 2017/09/27 01:46:56 UTC

[1/2] mesos git commit: Shortened the mesos ID truncation in the webui.

Repository: mesos
Updated Branches:
  refs/heads/master 06341309e -> 53b56117b


Shortened the mesos ID truncation in the webui.

As the tables get more crowded, it helps to shorten IDs further
than we currently do.

Input: 9d4b2f2b-a759-4458-bebf-7d3507a6f0ca-S9
Output before this change: ...bebf-7d3507a6f0ca-S9
Output after this change: ...7d3507a6f0ca-S9


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

Branch: refs/heads/master
Commit: 062b04deee771e5c86fa0c7ad84a9ab5aaa161b6
Parents: 0634130
Author: Benjamin Mahler <bm...@apache.org>
Authored: Tue Sep 26 18:43:52 2017 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Tue Sep 26 18:43:52 2017 -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/062b04de/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 26cd36f..e51c6d6 100644
--- a/src/webui/master/static/js/app.js
+++ b/src/webui/master/static/js/app.js
@@ -86,15 +86,15 @@
     .filter('truncateMesosID', function() {
       // Returns a truncated ID, for example:
       // Input: 9d4b2f2b-a759-4458-bebf-7d3507a6f0ca-S9
-      // Output: ...bebf-7d3507a6f0ca-S9
+      // Output: ...7d3507a6f0ca-S9
       //
       // Note that an ellipsis is used for display purposes.
       return function(id) {
         if (id) {
           var truncatedIdParts = id.split('-');
 
-          if (truncatedIdParts.length > 3) {
-            return '\u2026' + truncatedIdParts.splice(3, 3).join('-');
+          if (truncatedIdParts.length > 4) {
+            return '\u2026' + truncatedIdParts.splice(4).join('-');
           } else {
             return id;
           }


[2/2] mesos git commit: Fixed some inconsistent display of framework IDs in the webui.

Posted by bm...@apache.org.
Fixed some inconsistent display of framework IDs in the webui.

There was inconsistency around whether the ID was being truncated,
whether the copy to clipboard button was present, and whether the
ID was a link to the framework page.


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

Branch: refs/heads/master
Commit: 53b56117befae94cdec9599c7b9bfe47ff36c968
Parents: 062b04d
Author: Benjamin Mahler <bm...@apache.org>
Authored: Tue Sep 26 18:45:28 2017 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Tue Sep 26 18:45:28 2017 -0700

----------------------------------------------------------------------
 src/webui/master/static/frameworks.html | 29 ++++++++++++++------------
 src/webui/master/static/home.html       | 31 +++++++++++++++++++++++++---
 2 files changed, 44 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/53b56117/src/webui/master/static/frameworks.html
----------------------------------------------------------------------
diff --git a/src/webui/master/static/frameworks.html b/src/webui/master/static/frameworks.html
index 7debadb..d37c613 100644
--- a/src/webui/master/static/frameworks.html
+++ b/src/webui/master/static/frameworks.html
@@ -29,13 +29,14 @@
     <tr ng-repeat="framework in $data  | filter: { active: true }">
       <td>
         <a href="{{'#/frameworks/' + framework.id}}">
-          {{(framework.id | truncateMesosID) || framework.name}}</a>
+          {{framework.id | truncateMesosID}}
+        </a>
         <button class="btn btn-xs btn-toggle btn-default"
-          clipboard
-          data-clipboard-text="{{framework.id}}"
-          tooltip="Copy ID"
-          tooltip-placement="right"
-          tooltip-trigger="clipboardhover">
+                clipboard
+                data-clipboard-text="{{framework.id}}"
+                tooltip="Copy ID"
+                tooltip-placement="right"
+                tooltip-trigger="clipboardhover">
         </button>
       </td>
       <td ng-switch="!!framework.webui_url">
@@ -91,7 +92,8 @@
   <tr ng-repeat="framework in $data  | filter: { active: false }">
     <td>
       <a href="{{'#/frameworks/' + framework.id}}">
-        {{(framework.id | truncateMesosID) || framework.name}}</a>
+        {{framework.id | truncateMesosID}}
+      </a>
       <button class="btn btn-xs btn-toggle btn-default"
               clipboard
               data-clipboard-text="{{framework.id}}"
@@ -147,13 +149,14 @@
     <tr ng-repeat="framework in $data">
       <td>
         <a href="{{'#/frameworks/' + framework.id}}" title="{{framework.id}}">
-          {{framework.id | truncateMesosID}}</a>
+          {{framework.id | truncateMesosID}}
+        </a>
         <button class="btn btn-xs btn-toggle btn-default"
-          clipboard
-          data-clipboard-text="{{framework.id}}"
-          tooltip="Copy ID"
-          tooltip-placement="right"
-          tooltip-trigger="clipboardhover">
+                clipboard
+                data-clipboard-text="{{framework.id}}"
+                tooltip="Copy ID"
+                tooltip-placement="right"
+                tooltip-trigger="clipboardhover">
         </button>
       </td>
       <td>{{framework.hostname}}</td>

http://git-wip-us.apache.org/repos/asf/mesos/blob/53b56117/src/webui/master/static/home.html
----------------------------------------------------------------------
diff --git a/src/webui/master/static/home.html b/src/webui/master/static/home.html
index 08db378..a4aaa4f 100644
--- a/src/webui/master/static/home.html
+++ b/src/webui/master/static/home.html
@@ -174,8 +174,15 @@
         <tr ng-repeat="task in $data">
           <td>
             <a href="#/frameworks/{{task.framework_id}}/">
-              {{task.framework_id}}
+              {{task.framework_id | truncateMesosID}}
             </a>
+            <button class="btn btn-xs btn-toggle btn-default"
+                    clipboard
+                    data-clipboard-text="{{task.framework_id}}"
+                    tooltip="Copy ID"
+                    tooltip-placement="right"
+                    tooltip-trigger="clipboardhover">
+            </button>
           </td>
           <td>
             <a href="#/agents/{{task.slave_id}}/frameworks/{{task.framework_id}}/executors/{{task.executor_id}}">
@@ -227,8 +234,15 @@
         <tr ng-repeat="task in $data">
           <td>
             <a href="#/frameworks/{{task.framework_id}}/">
-              {{task.framework_id}}
+              {{task.framework_id | truncateMesosID}}
             </a>
+            <button class="btn btn-xs btn-toggle btn-default"
+                    clipboard
+                    data-clipboard-text="{{task.framework_id}}"
+                    tooltip="Copy ID"
+                    tooltip-placement="right"
+                    tooltip-trigger="clipboardhover">
+            </button>
           </td>
           <td>{{task.id}}</td>
           <td>{{task.name}}</td>
@@ -261,7 +275,18 @@
           <td colspan="8">No completed tasks.</td>
         </tr>
         <tr ng-repeat="task in $data">
-          <td>{{task.framework_id}}</td>
+         <td>
+            <a href="#/frameworks/{{task.framework_id}}/">
+              {{task.framework_id | truncateMesosID}}
+            </a>
+            <button class="btn btn-xs btn-toggle btn-default"
+                    clipboard
+                    data-clipboard-text="{{task.framework_id}}"
+                    tooltip="Copy ID"
+                    tooltip-placement="right"
+                    tooltip-trigger="clipboardhover">
+            </button>
+          </td>
           <td>{{task.id}}</td>
           <td>{{task.name}}</td>
           <td>{{task.role}}</td>