From cc31903047d694e3d78cbcffa4e3da634b6f917d Mon Sep 17 00:00:00 2001 From: Dave Marion Date: Mon, 11 May 2026 20:01:14 +0000 Subject: [PATCH 1/4] Moved About modal to overview page Moved the information in the About model page to the overview page. Increased the font size on the overview table. Closes #6365 --- .../accumulo/monitor/resources/css/screen.css | 2 +- .../accumulo/monitor/resources/js/modals.js | 30 -------- .../accumulo/monitor/resources/js/overview.js | 43 ++++++++---- .../accumulo/monitor/templates/default.ftl | 3 - .../accumulo/monitor/templates/modals.ftl | 68 ------------------- .../accumulo/monitor/templates/navbar.ftl | 1 - .../accumulo/monitor/templates/overview.ftl | 29 +++++++- 7 files changed, 58 insertions(+), 118 deletions(-) delete mode 100644 server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/modals.js delete mode 100644 server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/modals.ftl diff --git a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/css/screen.css b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/css/screen.css index 129f103f79b..57dee8d0d73 100644 --- a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/css/screen.css +++ b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/css/screen.css @@ -305,7 +305,7 @@ pre.logevent { .deployment-count-badge { min-width: 2.35rem; - padding: 0.3em 0.55em; + padding: 0.2em 0.55em; color: #333333; font-variant-numeric: tabular-nums; } 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 5d08e1b862b..00000000000 --- 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 e0f7bc43900..e1ea1e33139 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,11 @@ "use strict"; const deploymentTable = '#deployment-table'; +const instanceName = '#instance-name'; +const instanceVolumes = '#instance-volumes'; +const instanceUUID = '#instance-uuid'; +const instanceVersion = '#instance-version'; +const instanceZooKeepers = '#instance-zookeepers'; var deploymentBreakdown = []; @@ -35,7 +40,10 @@ $(function () { * Makes the REST calls, generates the table with the new information */ function refreshOverview() { - refreshDeploymentTables(); + $.when(getInstanceInfo(), getDeployment()).then(function () { + refreshInstanceInfo(); + refreshDeploymentTables(); + }); } /** @@ -45,24 +53,31 @@ 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); +} + /** * 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(''); - } 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(''); + } 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 d946c24e6a4..910f7d879bf 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 @@ - @@ -79,7 +78,5 @@
<#include "${template}">
- - <#include "modals.ftl"> 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 8d4aeed7a5a..00000000000 --- 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. - ---> - - -
  • About
  • 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 ada148dddfb..2bb9ad8f0b5 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,12 +23,39 @@

    ${title}

    +
    +
    +
    +
    + +
    +
    +
    +
    Volumes
    +
    +
    +
    +
    ZooKeepers
    +
    +
    +
    +
    Version
    +
    +
    +
    + +
    +
    +
    +
    +
    - +
    <#include "table_loading.ftl" >
    From 2195903c5bd67bcff8dd7a7a7bd37a51d2735d95 Mon Sep 17 00:00:00 2001 From: Dave Marion Date: Wed, 13 May 2026 13:02:12 +0000 Subject: [PATCH 2/4] Use the css class 'collapse' to hide/show the card --- .../org/apache/accumulo/monitor/resources/js/overview.js | 2 ++ .../org/apache/accumulo/monitor/templates/overview.ftl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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 e1ea1e33139..212dafdcd8e 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,7 @@ "use strict"; const deploymentTable = '#deployment-table'; +const instanceCard = '#instance-card'; const instanceName = '#instance-name'; const instanceVolumes = '#instance-volumes'; const instanceUUID = '#instance-uuid'; @@ -60,6 +61,7 @@ function refreshInstanceInfo() { $(instanceUUID).text(data.instanceUUID); $(instanceZooKeepers).text(data.zooKeepers); $(instanceVolumes).text(data.volumes); + $(instanceCard).removeClass('collapse'); } /** 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 2bb9ad8f0b5..f27d3fb054c 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 @@ -25,7 +25,7 @@
    -
    +
    From efbfa5cc3c99ae8336795c374f90fd4f5f0c9be6 Mon Sep 17 00:00:00 2001 From: Dave Marion Date: Wed, 13 May 2026 13:51:08 +0000 Subject: [PATCH 3/4] Reverted changes for overview table size --- .../org/apache/accumulo/monitor/resources/css/screen.css | 2 +- .../org/apache/accumulo/monitor/templates/overview.ftl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/css/screen.css b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/css/screen.css index 57dee8d0d73..129f103f79b 100644 --- a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/css/screen.css +++ b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/css/screen.css @@ -305,7 +305,7 @@ pre.logevent { .deployment-count-badge { min-width: 2.35rem; - padding: 0.2em 0.55em; + padding: 0.3em 0.55em; color: #333333; font-variant-numeric: tabular-nums; } 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 f27d3fb054c..fad9d4b1459 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 @@ -55,7 +55,7 @@
    - +
    <#include "table_loading.ftl" >
    From b29711370ad1b5089bfab8362fd80c856ffbe1ea Mon Sep 17 00:00:00 2001 From: Dave Marion Date: Wed, 13 May 2026 13:28:31 -0400 Subject: [PATCH 4/4] Update server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/overview.js Co-authored-by: Dom G. --- .../org/apache/accumulo/monitor/resources/js/overview.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 212dafdcd8e..60f36ad45ad 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 @@ -41,8 +41,10 @@ $(function () { * Makes the REST calls, generates the table with the new information */ function refreshOverview() { - $.when(getInstanceInfo(), getDeployment()).then(function () { + getInstanceInfo().then(function () { refreshInstanceInfo(); + }); + getDeployment().then(function () { refreshDeploymentTables(); }); }