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..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 @@ -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('