You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2012/08/09 00:50:36 UTC
svn commit: r1371006 - in /incubator/mesos/trunk/src: ./ files/ local/
master/ slave/ tests/ webui/master/static/
Author: benh
Date: Wed Aug 8 22:50:35 2012
New Revision: 1371006
URL: http://svn.apache.org/viewvc?rev=1371006&view=rev
Log:
Used new 'Files' abstraction for serving log files from master and
slaves. Updated webui to use the '/files' endpoint. Updated
pailer.html to always use JSONP so that it can be used both for
accessing files from the same origin as well as others (i.e., slaves)
(https://reviews.apache.org/r/6477).
Added:
incubator/mesos/trunk/src/webui/master/static/slave.html
Modified:
incubator/mesos/trunk/src/Makefile.am
incubator/mesos/trunk/src/files/files.cpp
incubator/mesos/trunk/src/local/local.cpp
incubator/mesos/trunk/src/master/http.cpp
incubator/mesos/trunk/src/master/http.hpp
incubator/mesos/trunk/src/master/master.cpp
incubator/mesos/trunk/src/master/master.hpp
incubator/mesos/trunk/src/slave/http.cpp
incubator/mesos/trunk/src/slave/slave.cpp
incubator/mesos/trunk/src/slave/slave.hpp
incubator/mesos/trunk/src/tests/slave_tests.cpp
incubator/mesos/trunk/src/webui/master/static/app.js
incubator/mesos/trunk/src/webui/master/static/controllers.js
incubator/mesos/trunk/src/webui/master/static/home.html
incubator/mesos/trunk/src/webui/master/static/pailer.html
incubator/mesos/trunk/src/webui/master/static/slaves.html
Modified: incubator/mesos/trunk/src/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/Makefile.am?rev=1371006&r1=1371005&r2=1371006&view=diff
==============================================================================
--- incubator/mesos/trunk/src/Makefile.am (original)
+++ incubator/mesos/trunk/src/Makefile.am Wed Aug 8 22:50:35 2012
@@ -378,7 +378,7 @@ nobase_dist_webui_DATA += webui/master/s
nobase_dist_webui_DATA += webui/master/static/dashboard.html \
webui/master/static/framework.html \
webui/master/static/frameworks.html webui/master/static/home.html \
- webui/master/static/index.html webui/master/static/log.html \
+ webui/master/static/index.html webui/master/static/pailer.html \
webui/master/static/slaves.html
# Need to distribute/install webui images.
Modified: incubator/mesos/trunk/src/files/files.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/files/files.cpp?rev=1371006&r1=1371005&r2=1371006&view=diff
==============================================================================
--- incubator/mesos/trunk/src/files/files.cpp (original)
+++ incubator/mesos/trunk/src/files/files.cpp Wed Aug 8 22:50:35 2012
@@ -174,7 +174,7 @@ Future<Response> FilesProcess::read(cons
// suffix, if it's not a directory and there is a suffix, return
// '404 Not Found'.
string path = paths[prefix];
- if (utils::os::exists(path, true)) {
+ if (os::exists(path, true)) {
path += "/" + suffix;
// Canonicalize the absolute path and make sure the result
@@ -275,7 +275,7 @@ Future<Response> FilesProcess::read(cons
response.headers["Content-Type"] = "application/json";
}
- response.headers["Content-Length"] = utils::stringify(out.str().size());
+ response.headers["Content-Length"] = stringify(out.str().size());
response.body = out.str().data();
return response;
Modified: incubator/mesos/trunk/src/local/local.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/local/local.cpp?rev=1371006&r1=1371005&r2=1371006&view=diff
==============================================================================
--- incubator/mesos/trunk/src/local/local.cpp (original)
+++ incubator/mesos/trunk/src/local/local.cpp Wed Aug 8 22:50:35 2012
@@ -115,7 +115,7 @@ PID<Master> launch(const Configuration&
vector<UPID> pids;
- slave::Flags flags;
+ flags::Flags<logging::Flags, slave::Flags> flags;
flags.load(configuration.getMap());
for (int i = 0; i < numSlaves; i++) {
Modified: incubator/mesos/trunk/src/master/http.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/http.cpp?rev=1371006&r1=1371005&r2=1371006&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/http.cpp (original)
+++ incubator/mesos/trunk/src/master/http.cpp Wed Aug 8 22:50:35 2012
@@ -159,6 +159,7 @@ JSON::Object model(const Slave& slave)
{
JSON::Object object;
object.values["id"] = slave.id.value();
+ object.values["pid"] = string(slave.pid);
object.values["hostname"] = slave.info.hostname();
object.values["webui_hostname"] = slave.info.webui_hostname();
object.values["webui_port"] = slave.info.webui_port();
@@ -340,124 +341,6 @@ Future<Response> state(
return response;
}
-
-Future<Response> log(
- const Master& master,
- const Request& request)
-{
- VLOG(1) << "HTTP request for '" << request.path << "'";
-
- map<string, vector<string> > pairs =
- strings::pairs(request.query, ";&", "=");
-
- off_t offset = -1;
- ssize_t length = -1;
- string level = "INFO";
-
- if (pairs.count("offset") > 0 && pairs["offset"].size() > 0) {
- Try<off_t> result = numify<off_t>(pairs["offset"].back());
- if (result.isError()) {
- LOG(WARNING) << "Failed to \"numify\" the 'offset' value (\""
- << pairs["offset"].back() << "\"): "
- << result.error();
- return BadRequest();
- }
- offset = result.get();
- }
-
- if (pairs.count("length") > 0 && pairs["length"].size() > 0) {
- Try<ssize_t> result = numify<ssize_t>(pairs["length"].back());
- if (result.isError()) {
- LOG(WARNING) << "Failed to \"numify\" the 'length' value (\""
- << pairs["length"].back() << "\"): "
- << result.error();
- return BadRequest();
- }
- length = result.get();
- }
-
- if (pairs.count("level") > 0 && pairs["level"].size() > 0) {
- level = pairs["level"].back();
- }
-
- if (master.flags.log_dir.isNone()) {
- return NotFound();
- }
-
- string path = master.flags.log_dir.get() + "/mesos-master." + level;
-
- Try<int> fd = os::open(path, O_RDONLY);
-
- if (fd.isError()) {
- LOG(WARNING) << "Failed to open log file at "
- << path << ": " << fd.error();
- return InternalServerError();
- }
-
- off_t size = lseek(fd.get(), 0, SEEK_END);
-
- if (size == -1) {
- PLOG(WARNING) << "Failed to seek in the log";
- close(fd.get());
- return InternalServerError();
- }
-
- if (offset == -1) {
- offset = size;
- }
-
- if (length == -1) {
- length = size - offset;
- }
-
- JSON::Object object;
-
- if (offset < size) {
- // Seek to the offset we want to read from.
- if (lseek(fd.get(), offset, SEEK_SET) == -1) {
- PLOG(WARNING) << "Failed to seek in the log";
- close(fd.get());
- return InternalServerError();
- }
-
- // Read length bytes (or to EOF).
- char* temp = new char[length];
-
- length = ::read(fd.get(), temp, length);
-
- if (length == 0) {
- object.values["offset"] = offset;
- object.values["length"] = 0;
- delete[] temp;
- } else if (length == -1) {
- PLOG(WARNING) << "Failed to read from the log";
- delete[] temp;
- close(fd.get());
- return InternalServerError();
- } else {
- object.values["offset"] = offset;
- object.values["length"] = length;
- object.values["data"] = string(temp, length);
- delete[] temp;
- }
- } else {
- object.values["offset"] = size;
- object.values["length"] = 0;
- }
-
- close(fd.get());
-
- std::ostringstream out;
-
- JSON::render(out, object);
-
- OK response;
- response.headers["Content-Type"] = "application/json";
- response.headers["Content-Length"] = stringify(out.str().size());
- response.body = out.str().data();
- return response;
-}
-
} // namespace json {
} // namespace http {
} // namespace master {
Modified: incubator/mesos/trunk/src/master/http.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/http.hpp?rev=1371006&r1=1371005&r2=1371006&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/http.hpp (original)
+++ incubator/mesos/trunk/src/master/http.hpp Wed Aug 8 22:50:35 2012
@@ -56,11 +56,6 @@ process::Future<process::http::Response>
const Master& master,
const process::http::Request& request);
-// Returns data from the log.
-process::Future<process::http::Response> log(
- const Master& master,
- const process::http::Request& request);
-
} // namespace json {
} // namespace http {
} // namespace master {
Modified: incubator/mesos/trunk/src/master/master.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/master.cpp?rev=1371006&r1=1371005&r2=1371006&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/master.cpp (original)
+++ incubator/mesos/trunk/src/master/master.cpp Wed Aug 8 22:50:35 2012
@@ -444,7 +444,6 @@ void Master::initialize()
route("/vars", bind(&http::vars, cref(*this), params::_1));
route("/stats.json", bind(&http::json::stats, cref(*this), params::_1));
route("/state.json", bind(&http::json::state, cref(*this), params::_1));
- route("/log.json", bind(&http::json::log, cref(*this), params::_1));
// Provide HTTP assets from a "webui" directory. This is either
// specified via flags (which is necessary for running out of the
@@ -453,6 +452,11 @@ void Master::initialize()
// Makefile.
provide("", path::join(flags.webui_dir, "master/static/index.html"));
provide("static", path::join(flags.webui_dir, "master/static"));
+
+ // TODO(benh): Ask glog for file name (i.e., mesos-master.INFO).
+ if (flags.log_dir.isSome()) {
+ files.attach(flags.log_dir.get() + "/mesos-master.INFO", "/log");
+ }
}
Modified: incubator/mesos/trunk/src/master/master.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/master.hpp?rev=1371006&r1=1371005&r2=1371006&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/master.hpp (original)
+++ incubator/mesos/trunk/src/master/master.hpp Wed Aug 8 22:50:35 2012
@@ -40,6 +40,8 @@
#include "logging/flags.hpp"
+#include "files/files.hpp"
+
#include "master/constants.hpp"
#include "master/flags.hpp"
#include "master/http.hpp"
@@ -196,10 +198,6 @@ private:
const Master& master,
const process::http::Request& request);
- friend Future<process::http::Response> http::json::log(
- const Master& master,
- const process::http::Request& request);
-
const flags::Flags<logging::Flags, master::Flags> flags;
UPID leader; // Current leading master.
@@ -234,6 +232,8 @@ private:
} stats;
double startTime; // Start time used to calculate uptime.
+
+ Files files;
};
Modified: incubator/mesos/trunk/src/slave/http.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave/http.cpp?rev=1371006&r1=1371005&r2=1371006&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave/http.cpp (original)
+++ incubator/mesos/trunk/src/slave/http.cpp Wed Aug 8 22:50:35 2012
@@ -16,12 +16,15 @@
* limitations under the License.
*/
-#include <iomanip>
+#include <map>
#include <sstream>
#include <string>
+#include <vector>
#include <stout/foreach.hpp>
#include <stout/json.hpp>
+#include <stout/stringify.hpp>
+#include <stout/strings.hpp>
#include "common/build.hpp"
#include "common/resources.hpp"
@@ -40,7 +43,10 @@ using process::http::OK;
using process::http::Response;
using process::http::Request;
+using std::map;
using std::string;
+using std::vector;
+
// TODO(benh): Consider moving the modeling code some place else so
// that it can be shared between slave/http.cpp and master/http.cpp.
@@ -179,6 +185,15 @@ Future<Response> state(
{
LOG(INFO) << "HTTP request for '" << request.path << "'";
+ map<string, vector<string> > pairs =
+ strings::pairs(request.query, ";&", "=");
+
+ Option<string> jsonp;
+
+ if (pairs.count("jsonp") > 0 && pairs["jsonp"].size() > 0) {
+ jsonp = pairs["jsonp"].back();
+ }
+
JSON::Object object;
object.values["build_date"] = build::DATE;
object.values["build_user"] = build::USER;
@@ -187,6 +202,10 @@ Future<Response> state(
object.values["pid"] = string(slave.self());
object.values["resources"] = model(slave.resources);
+ if (slave.flags.log_dir.isSome()) {
+ object.values["log_dir"] = slave.flags.log_dir.get();
+ }
+
JSON::Array array;
// Model all of the frameworks.
@@ -198,12 +217,24 @@ Future<Response> state(
std::ostringstream out;
+ if (jsonp.isSome()) {
+ out << jsonp.get() << "(";
+ }
+
JSON::render(out, object);
OK response;
- response.headers["Content-Type"] = "application/json";
+
+ if (jsonp.isSome()) {
+ out << ");";
+ response.headers["Content-Type"] = "text/javascript";
+ } else {
+ response.headers["Content-Type"] = "application/json";
+ }
+
response.headers["Content-Length"] = stringify(out.str().size());
response.body = out.str().data();
+
return response;
}
Modified: incubator/mesos/trunk/src/slave/slave.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave/slave.cpp?rev=1371006&r1=1371005&r2=1371006&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave/slave.cpp (original)
+++ incubator/mesos/trunk/src/slave/slave.cpp Wed Aug 8 22:50:35 2012
@@ -50,7 +50,9 @@ using std::tr1::cref;
using std::tr1::bind;
-namespace mesos { namespace internal { namespace slave {
+namespace mesos {
+namespace internal {
+namespace slave {
// // Represents a pending status update that has been sent and we are
// // waiting for an acknowledgement. In pa
@@ -94,11 +96,12 @@ Slave::Slave(const Resources& _resources
: ProcessBase(ID::generate("slave")),
resources(_resources),
local(_local),
- isolationModule(_isolationModule)
+ isolationModule(_isolationModule),
+ flags()
{}
-Slave::Slave(const Flags& _flags,
+Slave::Slave(const flags::Flags<logging::Flags, slave::Flags>& _flags,
bool _local,
IsolationModule* _isolationModule)
: ProcessBase(ID::generate("slave")),
@@ -297,6 +300,11 @@ void Slave::initialize()
route("/vars", bind(&http::vars, cref(*this), params::_1));
route("/stats.json", bind(&http::json::stats, cref(*this), params::_1));
route("/state.json", bind(&http::json::state, cref(*this), params::_1));
+
+ // TODO(benh): Ask glog for file name (i.e., mesos-slave.INFO).
+ if (flags.log_dir.isSome()) {
+ files.attach(flags.log_dir.get() + "/mesos-slave.INFO", "/log");
+ }
}
Modified: incubator/mesos/trunk/src/slave/slave.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave/slave.hpp?rev=1371006&r1=1371005&r2=1371006&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave/slave.hpp (original)
+++ incubator/mesos/trunk/src/slave/slave.hpp Wed Aug 8 22:50:35 2012
@@ -37,6 +37,8 @@
#include "common/resources.hpp"
#include "common/type_utils.hpp"
+#include "files/files.hpp"
+
#include "messages/messages.hpp"
@@ -58,7 +60,7 @@ public:
bool local,
IsolationModule* isolationModule);
- Slave(const Flags& flags,
+ Slave(const flags::Flags<logging::Flags, slave::Flags>& flags,
bool local,
IsolationModule *isolationModule);
@@ -178,7 +180,7 @@ private:
const Slave& slave,
const process::http::Request& request);
- const Flags flags;
+ const flags::Flags<logging::Flags, slave::Flags> flags;
bool local;
@@ -206,6 +208,8 @@ private:
double startTime;
bool connected; // Flag to indicate if slave is registered.
+
+ Files files;
};
Modified: incubator/mesos/trunk/src/tests/slave_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/slave_tests.cpp?rev=1371006&r1=1371005&r2=1371006&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/slave_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/slave_tests.cpp Wed Aug 8 22:50:35 2012
@@ -29,6 +29,8 @@
#include "detector/detector.hpp"
+#include "logging/logging.hpp"
+
#include "local/local.hpp"
#include "master/master.hpp"
@@ -180,12 +182,12 @@ protected:
MockFilter filter;
PID<Master> master;
PID<Slave> slave;
- static slave::Flags flags;
+ static flags::Flags<logging::Flags, slave::Flags> flags;
};
// Initialize static members here.
-slave::Flags SlaveTest::flags;
+flags::Flags<logging::Flags, slave::Flags> SlaveTest::flags;
TEST_F(SlaveTest, GarbageCollectSlaveDirs)
Modified: incubator/mesos/trunk/src/webui/master/static/app.js
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/webui/master/static/app.js?rev=1371006&r1=1371005&r2=1371006&view=diff
==============================================================================
--- incubator/mesos/trunk/src/webui/master/static/app.js (original)
+++ incubator/mesos/trunk/src/webui/master/static/app.js Wed Aug 8 22:50:35 2012
@@ -8,6 +8,7 @@ angular.module('mesos', []).
.when('/frameworks', {template: 'static/frameworks.html', controller: FrameworksCtrl})
.when('/framework/:id', {template: 'static/framework.html', controller: FrameworkCtrl})
.when('/slaves', {template: 'static/slaves.html', controller: SlavesCtrl})
+ .when('/slave/:id', {template: 'static/slave.html', controller: SlaveCtrl})
.otherwise({redirectTo: '/'});
}])
.filter('truncateMesosID', function() {
Modified: incubator/mesos/trunk/src/webui/master/static/controllers.js
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/webui/master/static/controllers.js?rev=1371006&r1=1371005&r2=1371006&view=diff
==============================================================================
--- incubator/mesos/trunk/src/webui/master/static/controllers.js (original)
+++ incubator/mesos/trunk/src/webui/master/static/controllers.js Wed Aug 8 22:50:35 2012
@@ -179,9 +179,15 @@ function HomeCtrl($scope) {
if (!$scope.state.log_dir) {
$('#no-log-dir-modal').modal('show');
} else {
- window.open('/static/pailer.html',
- '/master/log.json',
- 'width=580px, height=700px');
+ var url = '/files/read.json?name=/log';
+ var pailer =
+ window.open('/static/pailer.html', url, 'width=580px, height=700px');
+
+ // Need to use window.onload instead of document.ready to make
+ // sure the title doesn't get overwritten.
+ pailer.onload = function() {
+ pailer.document.title = 'Mesos Master (' + location.host + ')';
+ }
}
}
}
@@ -240,3 +246,55 @@ function FrameworkCtrl($scope, $routePar
function SlavesCtrl($scope) {
setNavbarActiveTab('slaves');
}
+
+
+function SlaveCtrl($scope, $routeParams, $http) {
+ setNavbarActiveTab('slaves');
+
+ var host = undefined;
+
+ $scope.log = function($event) {
+ if (!$scope.state.log_dir) {
+ $('#no-log-dir-modal').modal('show');
+ } else {
+ var url = 'http://' + host + '/files/read.json?name=/log';
+ var pailer =
+ window.open('/static/pailer.html', url, 'width=580px, height=700px');
+
+ // Need to use window.onload instead of document.ready to make
+ // sure the title doesn't get overwritten.
+ pailer.onload = function() {
+ pailer.document.title = 'Mesos Slave (' + host + ')';
+ }
+ }
+ }
+
+ var update = function() {
+ if ($routeParams.id in $scope.slaves) {
+ var pid = $scope.slaves[$routeParams.id].pid;
+ var id = pid.substring(0, pid.indexOf('@'));
+ host = pid.substring(pid.indexOf('@') + 1);
+ var url = 'http://' + host + '/' + id
+ + '/state.json?jsonp=JSON_CALLBACK';
+ $http.jsonp(url)
+ .success(function(data) {
+ $scope.state = data;
+ $('#slave').show();
+ })
+ .error(function() {
+ alert('unimplemented');
+ });
+ } else {
+ $('#missing-alert').show();
+ }
+ }
+
+ if ($scope.state) {
+ update();
+ }
+
+ $(document).on('state_updated', update);
+ $scope.$on('$beforeRouteChange', function() {
+ $(document).off('state_updated', update);
+ });
+}
Modified: incubator/mesos/trunk/src/webui/master/static/home.html
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/webui/master/static/home.html?rev=1371006&r1=1371005&r2=1371006&view=diff
==============================================================================
--- incubator/mesos/trunk/src/webui/master/static/home.html (original)
+++ incubator/mesos/trunk/src/webui/master/static/home.html Wed Aug 8 22:50:35 2012
@@ -140,11 +140,7 @@
{{slave.id | truncateMesosID}}
</a>
</td>
- <td>
- <a href="http://{{slave.webui_hostname}}:{{slave.webui_port}}/">
- {{slave.hostname}}
- </a>
- </td>
+ <td><a href="#/slave/{{slave.id}}">{{slave.hostname}}</a></td>
<td>{{slave.resources.cpus}}</td>
<td>{{slave.resources.mem / 1024}} GB</td>
<td>
Modified: incubator/mesos/trunk/src/webui/master/static/pailer.html
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/webui/master/static/pailer.html?rev=1371006&r1=1371005&r2=1371006&view=diff
==============================================================================
--- incubator/mesos/trunk/src/webui/master/static/pailer.html (original)
+++ incubator/mesos/trunk/src/webui/master/static/pailer.html Wed Aug 8 22:50:35 2012
@@ -55,8 +55,6 @@
$(document).ready(function() {
resize();
- document.title = window.name;
-
$('#data').pailer({
'read': function(options) {
var settings = $.extend({
@@ -64,8 +62,9 @@
'length': -1
}, options);
var url = window.name
- + '?offset=' + settings.offset
- + '&length=' + settings.length;
+ + '&offset=' + settings.offset
+ + '&length=' + settings.length
+ + '&jsonp=?';
return $.getJSON(url);
},
'indicator': $('#indicator')
Added: incubator/mesos/trunk/src/webui/master/static/slave.html
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/webui/master/static/slave.html?rev=1371006&view=auto
==============================================================================
--- incubator/mesos/trunk/src/webui/master/static/slave.html (added)
+++ incubator/mesos/trunk/src/webui/master/static/slave.html Wed Aug 8 22:50:35 2012
@@ -0,0 +1,50 @@
+<ul class="breadcrumb">
+ <li>
+ <a href="#">Home</a> <span class="divider">/</span>
+ </li>
+ <li>
+ <a href="#/slaves">Slaves</a> <span class="divider">/</span>
+ </li>
+ <li class="active">
+ <em>({{slave.id}})</em>
+ </li>
+</ul>
+
+<div class="alert alert-error hide" id="missing-alert">
+ <button class="close" data-dismiss="alert">Ã</button>
+ <strong>No slave by that ID could be found!</strong>
+</div>
+
+<div class="modal hide fade" style="display: none;" id="no-log-dir-modal">
+ <div class="modal-header">
+ <button class="close" data-dismiss="modal">Ã</button>
+ <h3>Logging to a file is not enabled!</h3>
+ </div>
+ <div class="modal-body">
+ <p>Set the 'log_dir' option if you wish to access the logs.</p>
+ </div>
+ <div class="modal-footer">
+ </div>
+</div>
+
+<div class="row hide" id="slave">
+ <div class="span3">
+ <div class="well">
+ <dl class="inline clearfix">
+ <dt>Started:</dt>
+ <dd>
+ <a href="" rel="popover" ng-click="popover($event, 'right')" data-content="{{state.start_time * 1000 | mesosDate}}" data-original-title="Started">
+ {{state.start_time * 1000 | relativeDate}}
+ </a>
+ </dd>
+ <dt>ID:</dt>
+ <dd>
+ <a href="" rel="popover" ng-click="popover($event, 'right')" data-content="{{state.id}}" data-original-title="ID">
+ {{state.id | truncateMesosID}}
+ </a>
+ </dd>
+ </dl>
+ <p><a href="" ng-click="log($event)">LOG</a></p>
+ </div>
+ </div>
+</div>
Modified: incubator/mesos/trunk/src/webui/master/static/slaves.html
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/webui/master/static/slaves.html?rev=1371006&r1=1371005&r2=1371006&view=diff
==============================================================================
--- incubator/mesos/trunk/src/webui/master/static/slaves.html (original)
+++ incubator/mesos/trunk/src/webui/master/static/slaves.html Wed Aug 8 22:50:35 2012
@@ -1,4 +1,13 @@
-<h2>Active Slaves</h2>
+<ul class="breadcrumb">
+ <li>
+ <a href="#">Home</a> <span class="divider">/</span>
+ </li>
+ <li class="active">
+ Slaves
+ </li>
+</ul>
+
+<h2>Slaves</h2>
<table class="table table-striped table-bordered table-condensed">
<thead>
<tr>
@@ -15,11 +24,7 @@
{{slave.id | truncateMesosID}}
</a>
</td>
- <td>
- <a href="http://{{slave.webui_hostname}}:{{slave.webui_port}}/">
- {{slave.hostname}}
- </a>
- </td>
+ <td><a href="#/slave/{{slave.id}}">{{slave.hostname}}</a></td>
<td>{{slave.resources.cpus}}</td>
<td>{{slave.resources.mem / 1024}} GB</td>
<td>