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 #6525

Draft
wants to merge 21 commits into
base: branch-2.5
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
0bd8e54
HBASE-28832 Removed bootstrap-theme.min.css and Glyphicons icon font
PDavid Nov 18, 2024
165af74
HBASE-28832 Upgrade to Bootstrap 4
PDavid Nov 18, 2024
a1478e9
HBASE-28832 Migrated Log Level forms
PDavid Nov 20, 2024
b35e42e
HBASE-28832 Migrated REST web UI pages
PDavid Nov 20, 2024
d43f46c
HBASE-28832 Migrated canary status page navbar
PDavid Nov 20, 2024
8e9b8ce
HBASE-28832 Migrated Thrift UI pages
PDavid Nov 20, 2024
3756345
HBASE-28832 Replaced hbase_logo_small.png with hbase-server one
PDavid Nov 20, 2024
d011259
HBASE-28832 Upgraded Bootstrap to 5.3.3
PDavid Nov 20, 2024
3d51dca
HBASE-28832 Migrated navbars
PDavid Nov 20, 2024
b3fc354
HBASE-28832 Migrated data attributes
PDavid Nov 20, 2024
7e75432
HBASE-28832 Migrated inline forms - Log levels, table.jsp
PDavid Nov 20, 2024
2ec8308
HBASE-28832 Fixed checkstyle warnings
PDavid Nov 22, 2024
3560bf6
HBASE-28832 Preserve original HBase UI colors
PDavid Dec 4, 2024
22eba1a
HBASE-28832 Restore active navbar link background-color
PDavid Dec 4, 2024
fd95a61
HBASE-28832 Migrated pagination in jqSpager.js
PDavid Dec 4, 2024
d7c34b1
HBASE-28832 Avoid double bottom borders with tables in tab contents
PDavid Dec 9, 2024
e803c9c
HBASE-28832 Fixed Tasks table row background colors were not visible
PDavid Dec 9, 2024
ecfa523
HBASE-28832 Added missing favicon for Thrift UI
PDavid Dec 9, 2024
f87e217
HBASE-28832 Added container-fluid div to REST and thrift navbars
PDavid Dec 10, 2024
db1ed86
HBASE-28832 Fixed unstyled pager link in jqSpager.js
PDavid Dec 11, 2024
8f248f1
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 @@ -372,24 +372,29 @@ private void sendError(HttpServletResponse response, int code, String message)
}

static final String FORMS = "<div class='container-fluid content'>\n"
+ "<div class='row inner_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";
+ "<div class='row inner_header top_header'>\n" + "<div class='page-header'>\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
46 changes: 21 additions & 25 deletions hbase-rest/src/main/resources/hbase-webapps/rest/rest.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -38,35 +38,31 @@ String listenPort = conf.get("hbase.rest.port", "8080");
<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">
<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>
<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="/logLevel">Log Level</a></li>
<li><a href="/jmx">Metrics Dump</a></li>
<li><a href="/prof">Profiler</a></li>
<% if (HBaseConfiguration.isShowConfInServlet()) { %>
<li><a href="/conf">HBase Configuration</a></li>
<% } %>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
<nav class="navbar navbar-expand-md navbar-light fixed-top bg-light">
<div class="container-fluid">
<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="navbar-nav">
<li class="nav-item"><a class="nav-link active" 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="/logLevel">Log Level</a></li>
<li class="nav-item"><a class="nav-link" href="/jmx">Metrics Dump</a></li>
<li class="nav-item"><a class="nav-link" href="/prof">Profiler</a></li>
<% if (HBaseConfiguration.isShowConfInServlet()) { %>
<li class="nav-item"><a class="nav-link" href="/conf">HBase Configuration</a></li>
<% } %>
</ul>
</div><!--/.navbar-collapse -->
</div><!--/.container-fluid -->
</nav>

<div class="container-fluid content">
<div class="row inner_header">
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