Updated Branches: refs/heads/master 77c72f363 -> 87b72088f
Moved offers to their own tab and page. In preparation for moving Tasks to the homepage, Offers moved to their own page and tab. They are available as top-level navigation, and the homepage table is now gone. Review: http://reviews.apache.org/r/15527 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/87b72088 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/87b72088 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/87b72088 Branch: refs/heads/master Commit: 87b72088f90a502fc60d3e00c4640418d26d1223 Parents: 77c72f3 Author: Ross Allen <[email protected]> Authored: Wed Nov 13 09:39:27 2013 -0800 Committer: Ross Allen <[email protected]> Committed: Thu Nov 14 15:58:15 2013 -0800 ---------------------------------------------------------------------- src/webui/master/static/home.html | 43 --------------------- src/webui/master/static/index.html | 1 + src/webui/master/static/js/app.js | 2 + src/webui/master/static/js/controllers.js | 11 +++++- src/webui/master/static/offers.html | 52 ++++++++++++++++++++++++++ 5 files changed, 65 insertions(+), 44 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/87b72088/src/webui/master/static/home.html ---------------------------------------------------------------------- diff --git a/src/webui/master/static/home.html b/src/webui/master/static/home.html index 4f9e2d9..bccffd9 100644 --- a/src/webui/master/static/home.html +++ b/src/webui/master/static/home.html @@ -290,48 +290,5 @@ </tbody> </table> - <h3>Offers</h3> - <table class="table table-striped table-bordered table-condensed"> - <thead> - <tr> - <th ng-class="columnClass('offers', 'id')" - ng-click="selectColumn('offers', 'id')"> - ID - </th> - <th ng-class="columnClass('offers', 'framework_name')" - ng-click="selectColumn('offers', 'framework_name')"> - Framework - </th> - <th ng-class="columnClass('offers', 'hostname')" - ng-click="selectColumn('offers', 'hostname')"> - Host - </th> - <th ng-class="columnClass('offers', 'resources.cpus')" - ng-click="selectColumn('offers', 'resources.cpus')"> - CPUs - </th> - <th ng-class="columnClass('offers', 'resources.mem')" - ng-click="selectColumn('offers', 'resources.mem')"> - Mem - </th> - </tr> - </thead> - <tbody> - <tr ng-repeat="offer in _.values(offers) | orderBy:tables['offers'].selected_column:tables['offers'].reverse"> - <td> - <abbr title="{{offer.id}}">{{offer.id | truncateMesosID}}</abbr> - </td> - <td><a href="{{'#/frameworks/' + offer.framework_id}}">{{offer.framework_name}}</a></td> - <td> - <a href="#/slaves/{{slaves[offer.slave_id].id}}"> - {{offer.hostname}} - </a> - </td> - <td>{{offer.resources.cpus | number}}</td> - <td>{{offer.resources.mem * (1024 * 1024) | dataSize}}</td> - </tr> - </tbody> - </table> - </div> </div> http://git-wip-us.apache.org/repos/asf/mesos/blob/87b72088/src/webui/master/static/index.html ---------------------------------------------------------------------- diff --git a/src/webui/master/static/index.html b/src/webui/master/static/index.html index 954273c..929cb0e 100644 --- a/src/webui/master/static/index.html +++ b/src/webui/master/static/index.html @@ -34,6 +34,7 @@ <ul class="nav"> <li data-tabname="frameworks"><a href="#/frameworks">Frameworks</a></li> <li data-tabname="slaves"><a href="#/slaves">Slaves</a></li> + <li data-tabname="offers"><a href="#/offers">Offers</a></li> </ul> <ul class="nav pull-right"> <li> http://git-wip-us.apache.org/repos/asf/mesos/blob/87b72088/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 021637d..163c50b 100644 --- a/src/webui/master/static/js/app.js +++ b/src/webui/master/static/js/app.js @@ -10,6 +10,8 @@ {templateUrl: 'static/frameworks.html', controller: 'FrameworksCtrl'}) .when('/frameworks/:id', {templateUrl: 'static/framework.html', controller: 'FrameworkCtrl'}) + .when('/offers', + {templateUrl: 'static/offers.html', controller: 'OffersCtrl'}) .when('/slaves', {templateUrl: 'static/slaves.html', controller: 'SlavesCtrl'}) .when('/slaves/:slave_id', http://git-wip-us.apache.org/repos/asf/mesos/blob/87b72088/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 7c7a50d..1c2e73a 100644 --- a/src/webui/master/static/js/controllers.js +++ b/src/webui/master/static/js/controllers.js @@ -342,7 +342,6 @@ $scope.tables = {}; $scope.tables['frameworks'] = new Table('id'); $scope.tables['slaves'] = new Table('id'); - $scope.tables['offers'] = new Table('id'); $scope.tables['completed_frameworks'] = new Table('id'); $scope.columnClass = columnClass($scope); @@ -376,6 +375,16 @@ }); + mesosApp.controller('OffersCtrl', function($scope) { + setNavbarActiveTab('offers'); + + $scope.tables = {}; + $scope.tables['offers'] = new Table('id'); + + $scope.columnClass = columnClass($scope); + $scope.selectColumn = selectColumn($scope); + }); + mesosApp.controller('FrameworkCtrl', function($scope, $routeParams) { setNavbarActiveTab('frameworks'); http://git-wip-us.apache.org/repos/asf/mesos/blob/87b72088/src/webui/master/static/offers.html ---------------------------------------------------------------------- diff --git a/src/webui/master/static/offers.html b/src/webui/master/static/offers.html new file mode 100644 index 0000000..215d65e --- /dev/null +++ b/src/webui/master/static/offers.html @@ -0,0 +1,52 @@ +<ul class="breadcrumb"> + <li> + <a class="badge badge-type" href="#/">Master</a> + <span class="divider">/</span> + </li> + <li class="active"> + <span class="badge badge-type">Offers</span> + </li> +</ul> + +<h3>Offers</h3> +<table class="table table-striped table-bordered table-condensed"> + <thead> + <tr> + <th ng-class="columnClass('offers', 'id')" + ng-click="selectColumn('offers', 'id')"> + ID + </th> + <th ng-class="columnClass('offers', 'framework_name')" + ng-click="selectColumn('offers', 'framework_name')"> + Framework + </th> + <th ng-class="columnClass('offers', 'hostname')" + ng-click="selectColumn('offers', 'hostname')"> + Host + </th> + <th ng-class="columnClass('offers', 'resources.cpus')" + ng-click="selectColumn('offers', 'resources.cpus')"> + CPUs + </th> + <th ng-class="columnClass('offers', 'resources.mem')" + ng-click="selectColumn('offers', 'resources.mem')"> + Mem + </th> + </tr> + </thead> + <tbody> + <tr ng-repeat="offer in _.values(offers) | orderBy:tables['offers'].selected_column:tables['offers'].reverse"> + <td> + <abbr title="{{offer.id}}">{{offer.id | truncateMesosID}}</abbr> + </td> + <td><a href="{{'#/frameworks/' + offer.framework_id}}">{{offer.framework_name}}</a></td> + <td> + <a href="#/slaves/{{slaves[offer.slave_id].id}}"> + {{offer.hostname}} + </a> + </td> + <td>{{offer.resources.cpus | number}}</td> + <td>{{offer.resources.mem * (1024 * 1024) | dataSize}}</td> + </tr> + </tbody> +</table>
