Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-28832 Upgrade from bootstrap 3.4.1 to non vulnerable version 5.3.3 #6490

Merged
merged 20 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c618da0
HBASE-28832 Removed bootstrap-theme.min.css and Glyphicons icon font
PDavid Nov 18, 2024
6e14065
HBASE-28832 Upgrade to Bootstrap 4
PDavid Nov 18, 2024
bc3f074
HBASE-28832 Migrated Log Level forms
PDavid Nov 20, 2024
3517d67
HBASE-28832 Migrated REST web UI pages
PDavid Nov 20, 2024
b5977e1
HBASE-28832 Migrated canary status page navbar
PDavid Nov 20, 2024
8ce2a1d
HBASE-28832 Migrated Thrift UI pages
PDavid Nov 20, 2024
7371131
HBASE-28832 Replaced hbase_logo_small.png with hbase-server one
PDavid Nov 20, 2024
a2a269e
HBASE-28832 Upgraded Bootstrap to 5.3.3
PDavid Nov 20, 2024
0fa58a5
HBASE-28832 Migrated navbars
PDavid Nov 20, 2024
b1f9987
HBASE-28832 Migrated data attributes
PDavid Nov 20, 2024
cb9ed0d
HBASE-28832 Migrated inline forms - Log levels, table.jsp
PDavid Nov 20, 2024
aedfee5
HBASE-28832 Fixed checkstyle warnings
PDavid Nov 22, 2024
0ab71dd
HBASE-28832 Preserve original HBase UI colors
PDavid Dec 4, 2024
6bf9e93
HBASE-28832 Restore active navbar link background-color
PDavid Dec 4, 2024
7c9372a
HBASE-28832 Migrated pagination in jqSpager.js
PDavid Dec 4, 2024
396cbf4
HBASE-28832 Avoid double bottom borders with tables in tab contents
PDavid Dec 9, 2024
15a7b06
HBASE-28832 Fixed Tasks table row background colors were not visible
PDavid Dec 9, 2024
cbadb85
HBASE-28832 Added missing favicon for Thrift UI
PDavid Dec 9, 2024
8d443c5
HBASE-28832 Fixed unstyled pager link in jqSpager.js
PDavid Dec 11, 2024
bbe00c0
HBASE-28832 Styled Actions forms on Table Details page
PDavid Dec 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,11 @@ relicensed so we could use it as Creative Commons Attribution 3.0.
The license is bundled with the download available here:
http://www.vectorportal.com/subcategory/205/KILLER-WHALE-FREE-VECTOR.eps/ifile/9136/detailtest.asp
--
This product includes portions of the Bootstrap project v3.0.0
This product includes portions of the Bootstrap project v5.3.3

Copyright 2013 Twitter, Inc.
Copyright 2011-2024 The Bootstrap Authors

Licensed under the Apache License v2.0

This product uses the Glyphicons Halflings icon set.

http://glyphicons.com/

Copyright Jan Kovařík

Licensed under the Apache License v2.0 as a part of the Bootstrap project.
Licensed under the MIT license

--
This product includes portions of the Guava project v14 and v21, specifically
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ public void doGet(HttpServletRequest request, HttpServletResponse response)
String[] readOnlyLogLevels = conf.getStrings(READONLY_LOGGERS_CONF_KEY);

if (logName != null) {
out.println("<p>Results:</p>");
out.println("<h2>Results</h2>");
out.println(MARKER + "Submitted Log Name: <b>" + logName + "</b><br />");

Logger log = LoggerFactory.getLogger(logName);
Expand Down Expand Up @@ -373,23 +373,28 @@ private void sendError(HttpServletResponse response, int code, String message)

static final String FORMS = "<div class='container-fluid content'>\n"
+ "<div class='row inner_header top_header'>\n" + "<div class='page-header'>\n"
+ "<h1>Get/Set Log Level</h1>\n" + "</div>\n" + "</div>\n" + "Actions:" + "<p>" + "<center>\n"
+ "<table class='table' style='border: 0;' width='95%' >\n" + "<tr>\n" + "<form>\n"
+ "<td class='centered'>\n"
+ "<input style='font-size: 12pt; width: 10em' type='submit' value='Get Log Level'"
+ " class='btn' />\n" + "</td>\n" + "<td style='text-align: center;'>\n"
+ "<input type='text' name='log' size='50' required='required'"
+ " placeholder='Log Name (required)' />\n" + "</td>\n" + "<td width=\"40%\">"
+ "Get the current log level for the specified log name." + "</td>\n" + "</form>\n"
+ "</tr>\n" + "<tr>\n" + "<form>\n" + "<td class='centered'>\n"
+ "<input style='font-size: 12pt; width: 10em' type='submit'"
+ " value='Set Log Level' class='btn' />\n" + "</td>\n" + "<td style='text-align: center;'>\n"
+ "<input type='text' name='log' size='50' required='required'"
+ " placeholder='Log Name (required)' />\n"
+ "<input type='text' name='level' size='50' required='required'"
+ " placeholder='Log Level (required)' />\n" + "</td>\n" + "<td width=\"40%\" style=\"\">"
+ "Set the specified log level for the specified log name." + "</td>\n" + "</form>\n"
+ "</tr>\n" + "</table>\n" + "</center>\n" + "</p>\n" + "<hr/>\n";
+ "<h1>Get/Set Log Level</h1>\n" + "</div>\n" + "</div>\n" + "\n" + "<h2>Actions</h2>\n"
+ "\n" + "<div class='row mb-4'>\n" + "<div class='col'>\n"
+ "<form class='row g-3 align-items-center justify-content-center'>\n"
+ "<div class='col-sm-auto'>\n"
+ "<button type='submit' class='btn btn-primary'>Get Log Level</button>\n" + "</div>\n"
+ " <div class='col-sm-auto'>\n"
+ "<input type='text' name='log' class='form-control' size='50'"
+ " required='required' placeholder='Log Name (required)'>\n" + "</div>\n"
+ " <div class='col-sm-auto'>\n"
+ "<span>Gets the current log level for the specified log name.</span>\n" + "</div>\n"
+ "</form>\n" + "</div>\n" + "</div>\n" + "\n" + "<div class='row'>\n" + "<div class='col'>\n"
+ "\n" + "<form class='row g-3 align-items-center justify-content-center'>\n"
+ "<div class='col-sm-auto'>\n"
+ "<button type='submit' class='btn btn-primary'>Set Log Level</button>\n" + "</div>\n"
+ "<div class='col-sm-auto'>\n"
+ "<input type='text' name='log' class='form-control mb-2' size='50'"
+ " required='required' placeholder='Log Name (required)'>\n"
+ "<input type='text' name='level' class='form-control' size='50'"
+ " required='required' placeholder='Log Level (required)'>\n" + "</div>\n"
+ "<div class='col-sm-auto'>\n"
+ "<span>Sets the specified log level for the specified log name.</span>\n" + "</div>\n"
+ "</form>\n" + "\n" + "</div>\n" + "</div>" + "<hr>\n";

private static void process(Logger logger, String levelName, PrintWriter out) {
if (levelName != null) {
Expand Down
14 changes: 3 additions & 11 deletions hbase-resource-bundle/src/main/resources/META-INF/NOTICE.vm
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,11 @@ http://www.vectorportal.com/subcategory/205/KILLER-WHALE-FREE-VECTOR.eps/ifile/9
## For modules that have bootstrap in their source tree
#macro(bootstrap_notice)
--
This product includes portions of the Bootstrap project v3.0.0
This product includes portions of the Bootstrap project v5.3.3

Copyright 2013 Twitter, Inc.
Copyright 2011-2024 The Bootstrap Authors

Licensed under the Apache License v2.0

This product uses the Glyphicons Halflings icon set.

http://glyphicons.com/

Copyright Jan Kovařík

Licensed under the Apache License v2.0 as a part of the Bootstrap project.
Licensed under the MIT license
#end
## no NOTICE file.
#macro(findbugs_cleanroom_notice)
Expand Down
4 changes: 2 additions & 2 deletions hbase-rest/src/main/resources/hbase-webapps/rest/footer.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<script src="/static/js/tab.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$('div.navbar li.active').removeClass('active');
$('a[href="' + location.pathname + '"]').closest('li').addClass('active');
$('nav.navbar li.active').removeClass('active');
$('a[href="' + location.pathname + '"]').addClass('active');
});
</script>
</body>
Expand Down
52 changes: 24 additions & 28 deletions hbase-rest/src/main/resources/hbase-webapps/rest/header.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -30,45 +30,41 @@
<meta name="description" content="">

<link href="/static/css/bootstrap.min.css" rel="stylesheet">
<link href="/static/css/bootstrap-theme.min.css" rel="stylesheet">
<link href="/static/css/hbase.css" rel="stylesheet">
<link rel="shortcut icon" href="/static/favicon.ico">
</head>

<body>
<div class="navbar navbar-fixed-top navbar-default">
<nav class="navbar navbar-expand-md navbar-light fixed-top bg-light">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/rest.jsp"><img src="/static/hbase_logo_small.png" alt="HBase Logo"/></a>
</div>
<a class="navbar-brand" href="/rest.jsp"><img src="/static/hbase_logo_small.png" alt="HBase Logo"/></a>
<button type="button" class="navbar-toggler" data-bs-toggle="collapse" data-bs-target=".navbar-collapse">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="/rest.jsp">Home</a></li>
<li><a href="/logs/">Local logs</a></li>
<li><a href="/processRest.jsp">Process Metrics</a></li>
<li><a href="/logLevel">Log Level</a></li>
<li><a href="/dump">Debug Dump</a></li>
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link" href="/rest.jsp">Home</a></li>
<li class="nav-item"><a class="nav-link" href="/logs/">Local logs</a></li>
<li class="nav-item"><a class="nav-link" href="/processRest.jsp">Process Metrics</a></li>
<li class="nav-item"><a class="nav-link" href="/logLevel">Log Level</a></li>
<li class="nav-item"><a class="nav-link" href="/dump">Debug Dump</a></li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Metrics <span class="caret"></span>
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<li><a target="_blank" href="/jmx">JMX</a></li>
<li><a target="_blank" href="/jmx?description=true">JMX with description</a></li>
<li><a target="_blank" href="/prometheus">Prometheus</a></li>
<li><a target="_blank" href="/prometheus?description=true">Prometheus with description</a></li>
</ul>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" target="_blank" href="/jmx">JMX</a>
<a class="dropdown-item" target="_blank" href="/jmx?description=true">JMX with description</a>
<a class="dropdown-item" target="_blank" href="/prometheus">Prometheus</a>
<a class="dropdown-item" target="_blank" href="/prometheus?description=true">Prometheus with description</a>
</div>
</li>
<li><a href="/prof">Profiler</a></li>
<li class="nav-item"><a class="nav-link" href="/prof">Profiler</a></li>
<% if (HBaseConfiguration.isShowConfInServlet()) { %>
<li><a href="/conf">HBase Configuration</a></li>
<li class="nav-item"><a class="nav-link" href="/conf">HBase Configuration</a></li>
<% } %>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div><!--/.navbar-collapse -->
</div><!--/.container-fluid -->
</nav>

18 changes: 9 additions & 9 deletions hbase-rest/src/main/resources/hbase-webapps/rest/processRest.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,16 @@ pageContext.setAttribute("pageTitle", "Process info for PID: " + JSONMetricUtil.
</div>
<% if (gcBeans.size() == 2) { %>
<div class="tabbable">
<ul class="nav nav-pills">
<li class="active">
<a href="#tab_gc1" data-toggle="tab"><%=collector1.getName() %></a>
<ul class="nav nav-pills" role="tablist">
<li class="nav-item">
<a class="nav-link active" href="#tab_gc1" data-bs-toggle="tab" role="tab"><%=collector1.getName() %></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#tab_gc2" data-bs-toggle="tab" role="tab"><%=collector2.getName() %></a>
</li>
<li class="">
<a href="#tab_gc2" data-toggle="tab"><%=collector2.getName() %></a>
</li>
</ul>
<div class="tab-content" style="padding-bottom: 9px; border-bottom: 1px solid #ddd;">
<div class="tab-pane active" id="tab_gc1">
<div class="tab-content">
<div class="tab-pane active" id="tab_gc1" role="tabpanel">
<table class="table table-striped">
<tr>
<th>Collection Count</th>
Expand All @@ -129,7 +129,7 @@ pageContext.setAttribute("pageTitle", "Process info for PID: " + JSONMetricUtil.
</tr>
</table>
</div>
<div class="tab-pane" id="tab_gc2">
<div class="tab-pane" id="tab_gc2" role="tabpanel">
<table class="table table-striped">
<tr>
<th>Collection Count</th>
Expand Down
2 changes: 1 addition & 1 deletion hbase-rest/src/main/resources/hbase-webapps/rest/rest.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

final RESTServer restServer = (RESTServer) getServletContext().getAttribute(RESTServer.REST_SERVER);
final String hostName = restServer.getServerName().getHostname();
pageContext.setAttribute("pageTitle", "HBase REST Server" + hostName);
pageContext.setAttribute("pageTitle", "HBase REST Server: " + hostName);
%>

<jsp:include page="header.jsp">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,41 +34,41 @@ String parent = "";
<h2><a name="tasks">Tasks</a></h2>

<div class="tabbable">
<ul class="nav nav-pills">
<li class="">
<a href="#tab_alltasks" data-toggle="tab">Show All Monitored Tasks</a>
<ul class="nav nav-pills" role="tablist">
<li class="nav-item">
<a class="nav-link" href="#tab_alltasks" data-bs-toggle="tab" role="tab">Show All Monitored Tasks</a>
</li>
<li class="active">
<a href="#tab_generaltasks" data-toggle="tab">Show non-RPC Tasks</a>
<li class="nav-item">
<a class="nav-link active" href="#tab_generaltasks" data-bs-toggle="tab" role="tab">Show non-RPC Tasks</a>
</li>
<li class="">
<a href="#tab_handlertasks" data-toggle="tab">Show All RPC Handler Tasks</a>
<li class="nav-item">
<a class="nav-link" href="#tab_handlertasks" data-bs-toggle="tab" role="tab">Show All RPC Handler Tasks</a>
</li>
<li class="">
<a href="#tab_rpctasks" data-toggle="tab">Show Active RPC Calls</a>
<li class="nav-item">
<a class="nav-link" href="#tab_rpctasks" data-bs-toggle="tab" role="tab">Show Active RPC Calls</a>
</li>
<li>
<a href="#tab_operationtasks" data-toggle="tab">Show Client Operations</a>
<li class="nav-item">
<a class="nav-link" href="#tab_operationtasks" data-bs-toggle="tab" role="tab">Show Client Operations</a>
</li>
</ul>
<div class="tab-content" style="padding-bottom: 9px; border-bottom: 1px solid #ddd;">
<div class="tab-pane" id="tab_alltasks">
<div class="tab-content">
<div class="tab-pane" id="tab_alltasks" role="tabpanel">
<& jsonView; filter="all" &>
<& renderTasks; filter="all" &>
</div>
<div class="tab-pane active" id="tab_generaltasks">
<div class="tab-pane active" id="tab_generaltasks" role="tabpanel">
<& jsonView; filter="general" &>
<& renderTasks; filter="general" &>
</div>
<div class="tab-pane" id="tab_handlertasks">
<div class="tab-pane" id="tab_handlertasks" role="tabpanel">
<& jsonView; filter="handler" &>
<& renderTasks; filter="handler" &>
</div>
<div class="tab-pane" id="tab_rpctasks">
<div class="tab-pane" id="tab_rpctasks" role="tabpanel">
<& jsonView; filter="rpc" &>
<& renderTasks; filter="rpc" &>
</div>
<div class="tab-pane" id="tab_operationtasks">
<div class="tab-pane" id="tab_operationtasks" role="tabpanel">
<& jsonView; filter="operation" &>
<& renderTasks; filter="operation" &>
</div>
Expand Down Expand Up @@ -136,5 +136,5 @@ String parent = "";
MonitoredTask.State state;
</%args>
<%java> if (state == MonitoredTask.State.COMPLETE) { </%java>alert alert-success<%java> } </%java>
<%java> else if (state == MonitoredTask.State.ABORTED) { </%java>alert alert-error<%java> } </%java>
<%java> else if (state == MonitoredTask.State.ABORTED) { </%java>alert alert-danger<%java> } </%java>
</%def>
Loading