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/09/14 01:30:19 UTC

git commit: Hid links to dead slaves to prevent dead links.

Updated Branches:
  refs/heads/master 012d7c71c -> b4a94c3df


Hid links to dead slaves to prevent dead links.

If a slave is gone, the framework page will print "Slave gone" in place
of the links to the slave's UI. The links would previously fail in
redirection and return the user to the Mesos root page, which is
unpleasant.

Fixes: https://issues.apache.org/jira/browse/MESOS-650

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


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

Branch: refs/heads/master
Commit: b4a94c3dffd81848dd039ec690d3bd7398fd00a1
Parents: 012d7c7
Author: Ross Allen <re...@gmail.com>
Authored: Tue Sep 10 18:37:19 2013 -0700
Committer: Ross Allen <re...@gmail.com>
Committed: Fri Sep 13 16:29:56 2013 -0700

----------------------------------------------------------------------
 src/webui/master/static/framework.html | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/b4a94c3d/src/webui/master/static/framework.html
----------------------------------------------------------------------
diff --git a/src/webui/master/static/framework.html b/src/webui/master/static/framework.html
index 1973cbe..6e5cd9f 100644
--- a/src/webui/master/static/framework.html
+++ b/src/webui/master/static/framework.html
@@ -90,11 +90,21 @@
           </td>
           <td>{{task.name}}</td>
           <td>{{task.state | truncateMesosState}}</td>
-          <td>{{slaves[task.slave_id].hostname}}</td>
           <td>
-            <a href="#/slaves/{{task.slave_id}}/frameworks/{{task.framework_id}}/executors/{{task.executor_id}}/browse">
+            <span data-ng-show="slaves[task.slave_id]">
+              {{slaves[task.slave_id].hostname}}
+            </span>
+            <span class="muted" data-ng-show="!slaves[task.slave_id]">
+              Slave offline
+            </span>
+          </td>
+          <td>
+            <a data-ng-show="slaves[task.slave_id]" href="#/slaves/{{task.slave_id}}/frameworks/{{task.framework_id}}/executors/{{task.executor_id}}/browse">
               Sandbox
             </a>
+            <span class="muted" data-ng-show="!slaves[task.slave_id]">
+              Slave offline
+            </span>
           </td>
         </tr>
       </tbody>
@@ -130,14 +140,21 @@
           <td>{{task.name}}</td>
           <td>{{task.state | truncateMesosState}}</td>
           <td>
-            <a href="#/slaves/{{task.slave_id}}/frameworks/{{task.framework_id}}/executors/{{task.executor_id}}">
+            <a data-ng-show="slaves[task.slave_id]"
+                href="#/slaves/{{task.slave_id}}/frameworks/{{task.framework_id}}/executors/{{task.executor_id}}">
               {{slaves[task.slave_id].hostname}}
             </a>
+            <span class="muted" data-ng-show="!slaves[task.slave_id]">
+              Slave offline
+            </span>
           </td>
           <td>
-            <a href="#/slaves/{{task.slave_id}}/frameworks/{{task.framework_id}}/executors/{{task.executor_id}}/browse">
+            <a data-ng-show="slaves[task.slave_id]" href="#/slaves/{{task.slave_id}}/frameworks/{{task.framework_id}}/executors/{{task.executor_id}}/browse">
               Sandbox
             </a>
+            <span class="muted" data-ng-show="!slaves[task.slave_id]">
+              Slave offline
+            </span>
           </td>
         </tr>
       </tbody>