Skip to content

Commit

Permalink
Fix Dashboard UI styling issues
Browse files Browse the repository at this point in the history
Summary:
- Add Icons for tserver pages
- Fix the footer position issue

Test Plan: Went to the UI page and validated

Reviewers: sid, karthik

Reviewed By: karthik

Subscribers: bogdan, ybase, bharat

Differential Revision: https://phabricator.dev.yugabyte.com/D3462
  • Loading branch information
ramkumarvs committed Nov 15, 2017
1 parent 072b765 commit 5900826
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/yb/master/master-path-handlers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ void MasterPathHandlers::RootHandler(const Webserver::WebRequest& req,
(*output) << "<div class='row dashboard-content'>\n";

(*output) << "<div class='col-xs-12 col-md-8 col-lg-6'>\n";
(*output) << "<div class='panel panel-default'>\n"
(*output) << "<div class='panel panel-primary'>\n"
<< "<div class='panel-heading'><h2 class='panel-title'> Overview</h2></div>\n";
(*output) << "<div class='panel-body'>";
(*output) << "<table class='table'>\n";
Expand Down Expand Up @@ -513,7 +513,7 @@ void MasterPathHandlers::HandleMasters(const Webserver::WebRequest& req,
*output << "<h1>" << s.ToString() << "</h1>\n";
return;
}
(*output) << "<div class='panel panel-default'>\n"
(*output) << "<div class='panel panel-primary'>\n"
<< "<div class='panel-heading'><h2 class='panel-title'>Masters</h2></div>\n";
(*output) << "<div class='panel-body'>";
(*output) << "<table class='table'>\n";
Expand Down Expand Up @@ -752,7 +752,7 @@ Status MasterPathHandlers::Register(Webserver* server) {
// The set of handlers visible on the nav bar.
server->RegisterPathHandler(
"/", "Home", std::bind(&MasterPathHandlers::RootHandler, this, _1, _2), is_styled,
is_on_nav_bar, "fa fa-home");
false);
Webserver::PathHandlerCallback cb =
std::bind(&MasterPathHandlers::HandleTabletServers, this, _1, _2);
server->RegisterPathHandler(
Expand Down
2 changes: 1 addition & 1 deletion src/yb/server/webserver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ Status Webserver::Start() {
PathHandlerCallback default_callback =
std::bind(boost::mem_fn(&Webserver::RootHandler), this, _1, _2);

RegisterPathHandler("/", "Home", default_callback);
RegisterPathHandler("/", "Home", default_callback, true, false);

std::vector<Endpoint> addrs;
RETURN_NOT_OK(GetBoundAddresses(&addrs));
Expand Down
6 changes: 3 additions & 3 deletions src/yb/tserver/tserver-path-handlers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Status TabletServerPathHandlers::Register(Webserver* server) {
true /* styled */, false /* is_on_nav_bar */);
server->RegisterPathHandler(
"/tablets", "Tablets", std::bind(&TabletServerPathHandlers::HandleTabletsPage, this, _1, _2),
true /* styled */, true /* is_on_nav_bar */);
true /* styled */, true /* is_on_nav_bar */, "fa fa-server");
server->RegisterPathHandler(
"/tablet", "", std::bind(&TabletServerPathHandlers::HandleTabletPage, this, _1, _2),
true /* styled */, false /* is_on_nav_bar */);
Expand All @@ -107,9 +107,9 @@ Status TabletServerPathHandlers::Register(Webserver* server) {
"/log-anchors", "", std::bind(&TabletServerPathHandlers::HandleLogAnchorsPage, this, _1, _2),
true /* styled */, false /* is_on_nav_bar */);
server->RegisterPathHandler(
"/dashboards", "Dashboards",
"/", "Dashboards",
std::bind(&TabletServerPathHandlers::HandleDashboardsPage, this, _1, _2), true /* styled */,
true /* is_on_nav_bar */);
false /* is_on_nav_bar */);
server->RegisterPathHandler(
"/maintenance-manager", "",
std::bind(&TabletServerPathHandlers::HandleMaintenanceManagerPage, this, _1, _2),
Expand Down
5 changes: 5 additions & 0 deletions www/yb.css
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ body {
/* Set the fixed height of the footer here */
height: 60px;
background-color: #f5f5f5;
/* Pin the footer to the bottom */
position: absolute;
bottom: 0;
margin-left: -35px;
}
.footer pre {
border: none;
Expand All @@ -139,6 +143,7 @@ body {

.dashboard-content {
margin-top: 25px;
margin-bottom: 60px;
}

.table > tbody > tr:first-child > td {
Expand Down

0 comments on commit 5900826

Please sign in to comment.