This is an automated email from the ASF dual-hosted git repository.
dlmarion pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new e5c84822a6 Moved About modal to overview page (#6366)
e5c84822a6 is described below
commit e5c84822a6b76738d345bee7893331536d18ec76
Author: Dave Marion <[email protected]>
AuthorDate: Wed May 13 13:42:50 2026 -0400
Moved About modal to overview page (#6366)
Moved the information in the About model page
to the overview page.
Closes #6365
Co-authored-by: Dom G. <[email protected]>
---
.../apache/accumulo/monitor/resources/js/modals.js | 30 ----------
.../accumulo/monitor/resources/js/overview.js | 47 ++++++++++-----
.../apache/accumulo/monitor/templates/default.ftl | 3 -
.../apache/accumulo/monitor/templates/modals.ftl | 68 ----------------------
.../apache/accumulo/monitor/templates/navbar.ftl | 1 -
.../apache/accumulo/monitor/templates/overview.ftl | 27 +++++++++
6 files changed, 60 insertions(+), 116 deletions(-)
diff --git
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/modals.js
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/modals.js
deleted file mode 100644
index 5d08e1b862..0000000000
---
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/modals.js
+++ /dev/null
@@ -1,30 +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
- *
- * https://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.
- */
-
-
-$(document).ready(function () {
- getInstanceInfo().then(function () {
- const data = JSON.parse(sessionStorage.instance);
- $('#modal-version').text(data.version);
- $('#modal-instance-name').text(data.instanceName);
- $('#modal-instance-id').text(data.instanceUUID);
- $('#modal-zk-hosts').text(data.zooKeepers);
- $('#modal-volumes').text(data.volumes);
- });
-});
diff --git
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/overview.js
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/overview.js
index e0f7bc4390..60f36ad45a 100644
---
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/overview.js
+++
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/overview.js
@@ -19,6 +19,12 @@
"use strict";
const deploymentTable = '#deployment-table';
+const instanceCard = '#instance-card';
+const instanceName = '#instance-name';
+const instanceVolumes = '#instance-volumes';
+const instanceUUID = '#instance-uuid';
+const instanceVersion = '#instance-version';
+const instanceZooKeepers = '#instance-zookeepers';
var deploymentBreakdown = [];
@@ -35,7 +41,12 @@ $(function () {
* Makes the REST calls, generates the table with the new information
*/
function refreshOverview() {
- refreshDeploymentTables();
+ getInstanceInfo().then(function () {
+ refreshInstanceInfo();
+ });
+ getDeployment().then(function () {
+ refreshDeploymentTables();
+ });
}
/**
@@ -45,24 +56,32 @@ function refresh() {
refreshOverview();
}
+function refreshInstanceInfo() {
+ const data = JSON.parse(sessionStorage.instance);
+ $(instanceVersion).text(data.version);
+ $(instanceName).text(data.instanceName);
+ $(instanceUUID).text(data.instanceUUID);
+ $(instanceZooKeepers).text(data.zooKeepers);
+ $(instanceVolumes).text(data.volumes);
+ $(instanceCard).removeClass('collapse');
+}
+
/**
* Refreshes the deployment overview tables
*/
function refreshDeploymentTables() {
- getDeployment().then(function () {
- var data = JSON.parse(sessionStorage.deployment);
- var breakdown = Array.isArray(data.breakdown) ? data.breakdown : [];
- deploymentBreakdown = breakdown;
-
- if (breakdown.length === 0) {
- $('#deploymentWarning').html('<div class="alert alert-warning"
role="alert">' +
- 'No deployment data is currently available.</div>');
- } else {
- $('#deploymentWarning').empty();
- }
+ var data = JSON.parse(sessionStorage.deployment);
+ var breakdown = Array.isArray(data.breakdown) ? data.breakdown : [];
+ deploymentBreakdown = breakdown;
- renderDeploymentMatrix(breakdown);
- });
+ if (breakdown.length === 0) {
+ $('#deploymentWarning').html('<div class="alert alert-warning"
role="alert">' +
+ 'No deployment data is currently available.</div>');
+ } else {
+ $('#deploymentWarning').empty();
+ }
+
+ renderDeploymentMatrix(breakdown);
}
function renderDeploymentMatrix(breakdown) {
diff --git
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/default.ftl
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/default.ftl
index d946c24e6a..910f7d879b 100644
---
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/default.ftl
+++
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/default.ftl
@@ -70,7 +70,6 @@
<script src="resources/js/${js}"></script>
</#if>
<script src="resources/js/navbar.js"></script>
- <script src="resources/js/modals.js"></script>
</head>
<body>
@@ -79,7 +78,5 @@
<div id="main" class="container-fluid">
<#include "${template}">
</div>
-
- <#include "modals.ftl">
</body>
</html>
diff --git
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/modals.ftl
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/modals.ftl
deleted file mode 100644
index 8d4aeed7a5..0000000000
---
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/modals.ftl
+++ /dev/null
@@ -1,68 +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
-
- https://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.
-
--->
- <!-- Modal -->
- <div id="aboutModal" data-target="#aboutModal" class="modal fade"
role="dialog">
- <div class="modal-dialog" role="document">
- <!-- Modal content -->
- <div class="modal-content">
- <div>
- <div class="modal-header justify-content-center">
- <span class="modal-title">
- <div class="text-center">
- <a href="https://accumulo.apache.org" target="_blank"><img
alt="Apache Accumulo" src="resources/images/accumulo-logo.png" /></a>
- </span>
- </div>
- </div>
- <div class="modal-body">
- <div class="container-fluid">
- <div class="row justify-content-evenly">
- <div class="col-sm-4 text-end">Software</div>
- <div class="col-sm-8 text-start"><a
href="https://accumulo.apache.org"
target="_blank">Apache Accumulo</a></div>
- </div>
- <div class="row justify-content-evenly">
- <div class="col-sm-4 text-end">Version</div>
- <div class="col-sm-8 text-start"><span
id="modal-version"></span></div>
- </div>
- <div class="row justify-content-evenly">
- <div class="col-sm-4 text-end">Instance Name</div>
- <div class="col-sm-8 text-start"><span
id="modal-instance-name"></span></div>
- </div>
- <div class="row justify-content-evenly">
- <div class="col-sm-4 text-end">Instance Id</div>
- <div class="col-sm-8 text-start"><span
id="modal-instance-id"></span></div>
- </div>
- <div class="row justify-content-evenly">
- <div class="col-sm-4 text-end">ZooKeeper Hosts</div>
- <div class="col-sm-8 text-start"><span
id="modal-zk-hosts"></span></div>
- </div>
- <div class="row justify-content-evenly">
- <div class="col-sm-4 text-end">Volumes</div>
- <div class="col-sm-8 text-start"><span
id="modal-volumes"></span></div>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn-close" data-bs-dismiss="modal"
aria-label="Close"></button>
- </div>
- </div>
- </div>
- </div>
-
\ No newline at end of file
diff --git
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/navbar.ftl
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/navbar.ftl
index d29518c380..81702525af 100644
---
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/navbar.ftl
+++
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/navbar.ftl
@@ -94,7 +94,6 @@
</div>
</div>
</li>
- <li><a class="link-body-emphasis dropdown-item"
data-bs-toggle="modal" href="#aboutModal">About</a></li>
</ul>
</li>
</ul>
diff --git
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/overview.ftl
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/overview.ftl
index ada148dddf..fad9d4b145 100644
---
a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/overview.ftl
+++
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/overview.ftl
@@ -23,6 +23,33 @@
<h3>${title}</h3>
</div>
</div>
+ <div class="row d-flex justify-content-center">
+ <div class="col-xs-12" id="instance-info">
+ <div class="card mx-auto collapse" style="width:
24rem;" id="instance-card">
+ <div class="card-header text-center">
+ <strong id="instance-name"></strong>
+ </div>
+ <div class="card-body">
+ <div class="row justify-content-evenly">
+ <div class="col-sm-4 text-end">Volumes</div>
+ <div id="instance-volumes" class="col-sm-8
text-start"></div>
+ </div>
+ <div class="row justify-content-evenly">
+ <div class="col-sm-4 text-end">ZooKeepers</div>
+ <div id="instance-zookeepers" class="col-sm-8
text-start"></div>
+ </div>
+ <div class="row justify-content-evenly">
+ <div class="col-sm-4 text-end">Version</div>
+ <div id="instance-version" class="col-sm-8
text-start"></div>
+ </div>
+ </div>
+ <div class="card-footer text-center text-muted"
id="instance-uuid">
+ </div>
+ </div>
+ </div>
+ </div>
+ <br />
+ <br />
<div class="row d-flex justify-content-center">
<div class="col-xs-12" id="deploymentOverview">
<div id="deploymentWarning"></div>