Permalink
Browse files

Removed the old Python-based webui.

From: Ben Mahler <benjamin.mahler@gmail.com>
Review: https://reviews.apache.org/r/7708

git-svn-id: https://svn.apache.org/repos/asf/incubator/mesos/trunk@1402722 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 538ce08 commit fd3f81148612b4464b3ae03388af4ca6798b975e @benh benh committed Oct 26, 2012
Showing with 18 additions and 4,861 deletions.
  1. +2 −2 include/mesos/mesos.proto
  2. +6 −36 src/Makefile.am
  3. +1 −1 src/deploy/mesos-start-cluster.sh.in
  4. +0 −6 src/local/main.cpp
  5. +0 −6 src/master/flags.hpp
  6. +0 −2 src/master/http.cpp
  7. +0 −5 src/master/main.cpp
  8. +0 −56 src/master/webui.cpp
  9. +0 −47 src/master/webui.hpp
  10. +0 −3 src/mesos/main.cpp
  11. +0 −6 src/slave/flags.hpp
  12. +0 −5 src/slave/main.cpp
  13. +1 −2 src/slave/slave.cpp
  14. +0 −58 src/slave/webui.cpp
  15. +0 −47 src/slave/webui.hpp
  16. +7 −33 src/tests/state_tests.cpp
  17. +0 −22 src/webui/bottle-0.8.3/PKG-INFO
  18. +0 −1,935 src/webui/bottle-0.8.3/bottle.py
  19. +0 −46 src/webui/bottle-0.8.3/setup.py
  20. +0 −241 src/webui/bottle-0.8.3/test/test_environ.py
  21. +0 −61 src/webui/bottle-0.8.3/test/test_jinja2.py
  22. +0 −45 src/webui/bottle-0.8.3/test/test_mako.py
  23. +0 −51 src/webui/bottle-0.8.3/test/test_mdict.py
  24. +0 −155 src/webui/bottle-0.8.3/test/test_outputfilter.py
  25. +0 −61 src/webui/bottle-0.8.3/test/test_router.py
  26. +0 −32 src/webui/bottle-0.8.3/test/test_securecookies.py
  27. +0 −90 src/webui/bottle-0.8.3/test/test_sendfile.py
  28. +0 −207 src/webui/bottle-0.8.3/test/test_stpl.py
  29. +0 −250 src/webui/bottle-0.8.3/test/test_wsgi.py
  30. +0 −26 src/webui/bottle-0.8.3/test/testall.py
  31. +0 −124 src/webui/bottle-0.8.3/test/tools.py
  32. +0 −1 src/webui/bottle-0.8.3/test/views/jinja2_base.tpl
  33. +0 −2 src/webui/bottle-0.8.3/test/views/jinja2_inherit.tpl
  34. +0 −1 src/webui/bottle-0.8.3/test/views/jinja2_simple.tpl
  35. +0 −1 src/webui/bottle-0.8.3/test/views/mako_base.tpl
  36. +0 −2 src/webui/bottle-0.8.3/test/views/mako_inherit.tpl
  37. +0 −1 src/webui/bottle-0.8.3/test/views/mako_simple.tpl
  38. +0 −3 src/webui/bottle-0.8.3/test/views/stpl_include.tpl
  39. +0 −1 src/webui/bottle-0.8.3/test/views/stpl_simple.tpl
  40. +0 −4 src/webui/bottle-0.8.3/test/views/stpl_t2base.tpl
  41. +0 −4 src/webui/bottle-0.8.3/test/views/stpl_t2inc.tpl
  42. +0 −8 src/webui/bottle-0.8.3/test/views/stpl_t2main.tpl
  43. +0 −1 src/webui/bottle-0.8.3/test/views/stpl_unicode.tpl
  44. +0 −43 src/webui/common/webui_lib.py
  45. +0 −118 src/webui/master/framework.tpl
  46. +0 −277 src/webui/master/index.tpl
  47. +1 −1 src/webui/master/static/home.html
  48. +0 −80 src/webui/master/webui.py
  49. +0 −60 src/webui/slave/executor.tpl
  50. +0 −91 src/webui/slave/framework.tpl
  51. +0 −91 src/webui/slave/index.tpl
  52. +0 −132 src/webui/slave/webui.py
  53. +0 −104 src/webui/static/stylesheet.css
  54. +0 −147 src/webui/webui.cpp
  55. +0 −27 src/webui/webui.hpp
@@ -156,8 +156,8 @@ message MasterInfo {
message SlaveInfo {
required string hostname = 1;
// TODO(benh,andyk): Send bound ports, not just hostname.
- required string webui_hostname = 2;
- optional int32 webui_port = 4 [default = 8081];
+ required string webui_hostname = 2; // Deprecated!
+ optional int32 webui_port = 4 [default = 8081]; // Deprecated!
repeated Resource resources = 3;
repeated Attribute attributes = 5;
optional SlaveID id = 6;
View
@@ -97,7 +97,7 @@ endif
# convenience libraries (that is, libraries that do not get installed
# but we can use as building blocks to vary compile flags as necessary
# and then aggregate into final archives): libmesos_no_third_party.la
-# libbuild.la, liblog.la, libwebui.la, libjava.la.
+# libbuild.la, liblog.la, libjava.la.
# First, let's define necessary protocol buffer files.
@@ -203,15 +203,15 @@ libmesos_no_third_party_la_SOURCES += common/attributes.hpp \
master/frameworks_manager.hpp \
master/hierarchical_allocator_process.hpp master/http.hpp \
master/master.hpp master/slaves_manager.hpp master/sorter.hpp \
- master/webui.hpp messages/messages.hpp slave/constants.hpp \
+ messages/messages.hpp slave/constants.hpp \
slave/flags.hpp slave/gc.hpp slave/http.hpp \
slave/isolation_module.hpp slave/isolation_module_factory.hpp \
slave/cgroups_isolation_module.hpp \
slave/lxc_isolation_module.hpp \
slave/paths.hpp slave/state.hpp \
slave/process_based_isolation_module.hpp slave/reaper.hpp \
slave/slave.hpp slave/solaris_project_isolation_module.hpp \
- slave/webui.hpp tests/environment.hpp tests/script.hpp \
+ tests/environment.hpp tests/script.hpp \
tests/zookeeper_test.hpp tests/flags.hpp tests/utils.hpp \
tests/filter.hpp \
tests/zookeeper_test_server.hpp zookeeper/authentication.hpp \
@@ -235,7 +235,7 @@ BUILD_FLAGS = $(echo $(MESOS_CPPFLAGS) $(CPPFLAGS) | sed 's/\"/\\\"/g') \
$(echo $(AM_CFLAGS) $(CFLAGS) | sed 's/\"/\\\"/g') \
$(echo $(AM_CXXFLAGS) $(CXXFLAGS) | sed 's/\"/\\\"/g')
-# TODO(benh): Provide other build flags such as WEBUI_FLAGS, etc.
+# TODO(benh): Provide other build flags.
libbuild_la_CPPFLAGS += -DBUILD_FLAGS="\"$$BUILD_FLAGS\""
@@ -266,27 +266,6 @@ libstate_la_CPPFLAGS = -I../$(LEVELDB)/include $(MESOS_CPPFLAGS)
libmesos_no_third_party_la_LIBADD += libstate.la
-
-# Convenience library for the webui to include Python specific flags.
-if WEBUI
-noinst_LTLIBRARIES += libwebui.la
-libwebui_la_SOURCES = master/webui.cpp slave/webui.cpp webui/webui.cpp
-libwebui_la_SOURCES += master/webui.hpp slave/webui.hpp webui/webui.hpp
-libwebui_la_CPPFLAGS = $(MESOS_CPPFLAGS) $(WEBUI_CPPFLAGS)
-libwebui_la_LIBADD = $(WEBUI_LDFLAGS)
-
-# Also define WEBUI_LIB to include the webui so when we build the
-# binaries (e.g., mesos-master, mesos-slave) the webui will get
-# included (we don't include it by default in either
-# libmesos_no_third_party.la or libmesos.la because that would force a
-# dependency on Python, but in the future we might want to support
-# this when we want a "local" run to include support for the webui).
-WEBUI_LIB = libwebui.la
-else
-WEBUI_LIB =
-endif
-
-
# The final result!
lib_LTLIBRARIES += libmesos.la
@@ -323,12 +302,12 @@ libmesos_la_LIBADD += ../$(LIBPROCESS)/libprocess.la
sbin_PROGRAMS += mesos-master
mesos_master_SOURCES = master/main.cpp
mesos_master_CPPFLAGS = $(MESOS_CPPFLAGS)
-mesos_master_LDADD = $(WEBUI_LIB) libmesos.la
+mesos_master_LDADD = libmesos.la
sbin_PROGRAMS += mesos-slave
mesos_slave_SOURCES = slave/main.cpp
mesos_slave_CPPFLAGS = $(MESOS_CPPFLAGS)
-mesos_slave_LDADD = $(WEBUI_LIB) libmesos.la
+mesos_slave_LDADD = libmesos.la
bin_PROGRAMS += mesos-local
mesos_local_SOURCES = local/main.cpp
@@ -361,15 +340,6 @@ mesos_mesos_SOURCES = mesos/main.cpp
mesos_mesos_CPPFLAGS = $(MESOS_CPPFLAGS)
mesos_mesos_LDADD = libmesos.la
-
-# Need to distribute/install Python webui.
-nobase_dist_webui_DATA += webui/bottle-0.8.3/bottle.py \
- webui/common/webui_lib.py webui/master/framework.tpl \
- webui/master/index.tpl webui/master/webui.py \
- webui/slave/framework.tpl webui/slave/executor.tpl \
- webui/slave/index.tpl webui/slave/webui.py \
- webui/static/stylesheet.css
-
# Need to distribute/install webui javascript.
nobase_dist_webui_DATA += webui/master/static/controllers.js \
webui/master/static/app.js webui/master/static/dashboard.js \
@@ -32,6 +32,6 @@ done
@sbindir@/mesos-start-masters.sh && sleep 1 && @sbindir@/mesos-start-slaves.sh
# TODO(benh): Check the health of the masters (and possibly slaves)
-# and print the masters webui address (or just the leading master).
+# and print the master's webui address (or just the leading master).
echo "Everything's started!"
View
@@ -60,12 +60,6 @@ int main(int argc, char **argv)
{
GOOGLE_PROTOBUF_VERIFY_VERSION;
- // TODO(benh): Add master and slave flags! This is impossible right
- // now because both have 'webui_dir' and 'webui_port' that
- // conflict. For now, all the flags will still get "validated" when
- // we load them (i.e., in local::launch), they just won't be visible
- // when you do '--help' (which is probably not a huge issue for
- // mesos-local).
flags::Flags<logging::Flags, local::Flags> flags;
// The following flags are executable specific (e.g., since we only
View
@@ -51,11 +51,6 @@ class Flags : public virtual flags::FlagsBase
"Location of the webui files/assets",
MESOS_WEBUI_DIR);
- add(&Flags::webui_port,
- "webui_port",
- "Web UI port (deprecated)",
- 8080);
-
add(&Flags::whitelist,
"whitelist",
"Path to a file with a list of slaves\n"
@@ -92,7 +87,6 @@ class Flags : public virtual flags::FlagsBase
bool root_submissions;
std::string slaves;
std::string webui_dir;
- uint16_t webui_port;
std::string whitelist;
std::string user_sorter;
std::string framework_sorter;
View
@@ -201,8 +201,6 @@ JSON::Object model(const Slave& slave)
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();
object.values["registered_time"] = slave.registeredTime;
object.values["resources"] = model(slave.info.resources());
object.values["attributes"] = model(slave.info.attributes());
View
@@ -34,7 +34,6 @@
#include "master/allocator.hpp"
#include "master/master.hpp"
-#include "master/webui.hpp"
using namespace mesos::internal;
using namespace mesos::internal::master;
@@ -127,10 +126,6 @@ int main(int argc, char** argv)
CHECK(detector.isSome())
<< "Failed to create a master detector: " << detector.error();
-#ifdef MESOS_WEBUI
- webui::start(master->self(), flags);
-#endif
-
process::wait(master->self());
delete master;
delete allocator;
View
@@ -1,56 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifdef MESOS_WEBUI
-
-#include <process/process.hpp>
-
-#include <stout/stringify.hpp>
-
-#include "flags/flags.hpp"
-
-#include "logging/flags.hpp"
-
-#include "master/flags.hpp"
-#include "master/master.hpp"
-#include "master/webui.hpp"
-
-#include "webui/webui.hpp"
-
-namespace mesos {
-namespace internal {
-namespace master {
-namespace webui {
-
-void start(const process::PID<Master>& master,
- const flags::Flags<logging::Flags, master::Flags>& flags)
-{
- std::vector<std::string> args(3);
- args[0] = "--master_port=" + stringify(master.port);
- args[1] = "--webui_port=" + stringify(flags.webui_port);
- args[2] = "--log_dir=" + (flags.log_dir.isSome() ? flags.log_dir.get() : "");
-
- mesos::internal::webui::start(flags.webui_dir, "master/webui.py", args);
-}
-
-} // namespace webui {
-} // namespace master {
-} // namespace internal {
-} // namespace mesos {
-
-#endif // MESOS_WEBUI
View
@@ -1,47 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __MASTER_WEBUI_HPP__
-#define __MASTER_WEBUI_HPP__
-
-#ifdef MESOS_WEBUI
-
-#include <process/process.hpp>
-
-#include "flags/flags.hpp"
-
-#include "logging/flags.hpp"
-
-#include "master/flags.hpp"
-#include "master/master.hpp"
-
-namespace mesos {
-namespace internal {
-namespace master {
-namespace webui {
-
-void start(const process::PID<Master>& master,
- const flags::Flags<logging::Flags, master::Flags>& flags);
-
-} // namespace webui {
-} // namespace master {
-} // namespace internal {
-} // namespace mesos {
-
-#endif // MESOS_WEBUI
-#endif // __MASTER_WEBUI_HPP__
View
@@ -37,9 +37,6 @@ int main(int argc, char** argv)
// to advertise the port and ip option once, here).
configurator.addOption<int>("port", 'p', "Port to listen on", 5050);
configurator.addOption<string>("ip", "IP address to listen on");
-#ifdef MESOS_WEBUI
- configurator.addOption<int>("webui_port", "Web UI port", 8080);
-#endif
configurator.addOption<string>(
"master",
'm',
View
@@ -61,11 +61,6 @@ class Flags : public virtual flags::FlagsBase
"Location of the webui files/assets",
MESOS_WEBUI_DIR);
- add(&Flags::webui_port,
- "webui_port",
- "Web UI port (deprecated)",
- 8081);
-
add(&Flags::hadoop_home,
"hadoop_home",
"Where to find Hadoop installed (for\n"
@@ -119,7 +114,6 @@ class Flags : public virtual flags::FlagsBase
std::string work_dir;
std::string launcher_dir;
std::string webui_dir;
- uint16_t webui_port;
std::string hadoop_home; // TODO(benh): Make an Option.
bool switch_user;
std::string frameworks_home; // TODO(benh): Make an Option.
View
@@ -34,7 +34,6 @@
#include "slave/isolation_module_factory.hpp"
#include "slave/slave.hpp"
-#include "slave/webui.hpp"
using namespace mesos::internal;
using namespace mesos::internal::slave;
@@ -141,10 +140,6 @@ int main(int argc, char** argv)
CHECK(detector.isSome())
<< "Failed to create a master detector: " << detector.error();
-#ifdef MESOS_WEBUI
- webui::start(slave->self(), flags);
-#endif
-
process::wait(slave->self());
delete slave;
View
@@ -187,8 +187,7 @@ void Slave::initialize()
// Initialize slave info.
info.set_hostname(hostname);
- info.set_webui_hostname(webui_hostname);
- info.set_webui_port(flags.webui_port);
+ info.set_webui_hostname(webui_hostname); // Deprecated!
info.mutable_resources()->MergeFrom(resources);
info.mutable_attributes()->MergeFrom(attributes);
View
@@ -1,58 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifdef MESOS_WEBUI
-
-#include <process/process.hpp>
-
-#include <stout/stringify.hpp>
-
-#include "flags/flags.hpp"
-
-#include "logging/flags.hpp"
-
-#include "slave/flags.hpp"
-#include "slave/webui.hpp"
-#include "slave/slave.hpp"
-
-#include "webui/webui.hpp"
-
-namespace mesos {
-namespace internal {
-namespace slave {
-namespace webui {
-
-void start(const process::PID<Slave>& slave,
- const flags::Flags<logging::Flags, slave::Flags>& flags)
-{
- std::vector<std::string> args(5);
- args[0] = "--slave_id=" + slave.id;
- args[1] = "--slave_port=" + stringify(slave.port);
- args[2] = "--webui_port=" + stringify(flags.webui_port);
- args[3] = "--log_dir=" + (flags.log_dir.isSome() ? flags.log_dir.get() : "");
- args[4] = "--work_dir=" + flags.work_dir;
-
- mesos::internal::webui::start(flags.webui_dir, "slave/webui.py", args);
-}
-
-} // namespace webui {
-} // namespace slave {
-} // namespace internal {
-} // namespace mesos {
-
-#endif // MESOS_WEBUI
Oops, something went wrong.

0 comments on commit fd3f811

Please sign in to comment.