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/27 02:50:58 UTC
git commit: Style /browse to distinguish folders
Updated Branches:
refs/heads/master f2222a5d2 -> e9cf343d8
Style /browse to distinguish folders
* Add small folder icons to the left of folders to distinguish them
from other files.
* Right align Size, Nlink, and mtime columns.
* Remove 'name' title since it is apparent
* Order files first by file type, i.e. folder or not folder, and then
by name.
Review: http://reviews.apache.org/r/12887
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e9cf343d
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e9cf343d
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e9cf343d
Branch: refs/heads/master
Commit: e9cf343d8b403f0a8837b2eb6a2912261454e5c5
Parents: f2222a5
Author: Ross Allen <re...@gmail.com>
Authored: Tue Jul 23 16:27:03 2013 -0700
Committer: Ross Allen <re...@gmail.com>
Committed: Fri Jul 26 17:50:45 2013 -0700
----------------------------------------------------------------------
src/webui/master/static/browse.html | 72 ++++++++++++++++----------------
1 file changed, 36 insertions(+), 36 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/e9cf343d/src/webui/master/static/browse.html
----------------------------------------------------------------------
diff --git a/src/webui/master/static/browse.html b/src/webui/master/static/browse.html
index 366e999..5b54d19 100644
--- a/src/webui/master/static/browse.html
+++ b/src/webui/master/static/browse.html
@@ -14,9 +14,6 @@
</ul>
<ul class="breadcrumb">
- <li>
- <em>Path:</em>
- </li>
<li ng-repeat="dir in path.split('/')">
<a href="#/slaves/{{slave_id}}/browse?path={{
encodeURIComponent(path.split('/').slice(0, $index + 1).join('/'))}}">
@@ -34,48 +31,51 @@
<div class="row hide" id="listing">
<div class="span9">
<div class="well">
- <table class="table table-condensed">
+ <div data-ng-show="listing.length == 0">
+ No files in this directory.
+ </div>
+ <table class="table table-condensed" data-ng-show="listing.length > 0">
<thead>
<tr>
<th>mode</th>
- <th>nlink</th>
+ <th class="text-right">nlink</th>
<th>uid</th>
<th>gid</th>
- <th>size</th>
- <th>mtime</th>
- <th>name</th>
+ <th class="text-right">size</th>
+ <th class="text-right">mtime</th>
+ <th></th>
<th></th>
</tr>
</thead>
<tbody>
- <tr ng-repeat="file in listing">
- <td>{{file.mode}}</td>
- <td>{{file.nlink}}</td>
- <td>{{file.uid}}</td>
- <td>{{file.gid}}</td>
- <td>{{file.size | dataSize}}</td>
- <td>{{file.mtime * 1000 | unixDate}}</td>
- <td ui-if="file.mode[0] == 'd'" align="right">
- <a href="#/slaves/{{slave_id}}/browse?path={{encodeURIComponent(file.path)}}">
- {{basename(file.path)}}
- </a>
- </td>
- <td ui-if="file.mode[0] != 'd'" align="right">
- <a href="" ng-click="pail($event, encodeURIComponent(file.path))">
- {{basename(file.path)}}
- </a>
- </td>
- <td>
- <a ui-if="file.mode[0] != 'd'"
- href="http://{{slave_host}}/files/download.json?path={{encodeURIComponent(file.path)}}">
- <button class="btn btn-mini" type="button">download</button>
- </a>
- </td>
- </tr>
- <!-- Add a row to the bottom for a consistent look. -->
- <tr>
- <td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
- </tr>
+ <tr ng-repeat="file in listing | orderBy:['-mode', 'path']">
+ <td>{{file.mode}}</td>
+ <td class="text-right">{{file.nlink}}</td>
+ <td>{{file.uid}}</td>
+ <td>{{file.gid}}</td>
+ <td class="text-right">{{file.size | dataSize}}</td>
+ <td class="text-right">{{file.mtime * 1000 | unixDate}}</td>
+ <td ui-if="file.mode[0] == 'd'">
+ <i class="icon-folder-close"></i>
+ <a href="#/slaves/{{slave_id}}/browse?path={{encodeURIComponent(file.path)}}">
+ {{basename(file.path)}}
+ </a>
+ </td>
+ <td ui-if="file.mode[0] != 'd'">
+ <i class="icon-file" style="visibility: hidden;"></i>
+ <a href="" ng-click="pail($event, encodeURIComponent(file.path))">
+ {{basename(file.path)}}
+ </a>
+ </td>
+ <td>
+ <a ui-if="file.mode[0] != 'd'"
+ href="http://{{slave_host}}/files/download.json?path={{encodeURIComponent(file.path)}}">
+ <button class="btn btn-mini" type="button">
+ Download
+ </button>
+ </a>
+ </td>
+ </tr>
</tbody>
</table>
</div>