kevinrr888 commented on code in PR #5894:
URL: https://github.com/apache/accumulo/pull/5894#discussion_r2361180544


##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/manager.js:
##########
@@ -23,56 +23,29 @@
 */
 "use strict";
 
-var managerStatusTable, recoveryListTable;
+var managerStatusTable, recoveryListTable, managerStatus;
 
 function refreshManagerBanners() {
-  getStatus().then(function () {
-    const managerStatus = JSON.parse(sessionStorage.status).managerStatus;
-
-    // If manager status is error
-    if (managerStatus === 'ERROR') {
-      // show the manager error banner and hide table
-      $('#managerRunningBanner').show();
-      $('#managerStatus_wrapper').hide();
-    } else {
-      // otherwise, hide the error banner and show manager table
-      $('#managerRunningBanner').hide();
-      $('#managerStatus_wrapper').show();
-    }
-  });
-
-  getManager().then(function () {
-    const managerData = JSON.parse(sessionStorage.manager);
-    const managerState = managerData.managerState;
-    const managerGoalState = managerData.managerGoalState;
-
-    const isStateGoalSame = managerState === managerGoalState;
-
-    // if the manager state is normal and the goal state is the same as the 
current state,
-    // or of the manager is not running, hide the state banner and return early
-    if ((managerState === 'NORMAL' && isStateGoalSame) || managerState === 
null) {
-      $('#managerStateBanner').hide();
-      return;
-    }
-
-    // update the manager state banner message and show it
-    let bannerMessage = 'Manager state: ' + managerState;
-    if (!isStateGoalSame) {
-      // only show the goal state if it differs from the manager's current 
state
-      bannerMessage += '. Manager goal state: ' + managerGoalState;
-    }
-    $('#manager-banner-message').text(bannerMessage);
-    $('#managerStateBanner').show();
-  });
-
+  // If manager status is error
+  if (managerStatus === 'ERROR') {
+    // show the manager error banner and hide manager table
+    $('#managerRunningBanner').show();
+    $('#managerStatusTable').hide();
+  } else {
+    // otherwise, hide the error banner and show manager table
+    $('#managerRunningBanner').hide();
+    $('#managerStatusTable').show();
+  }

Review Comment:
   managerStatus_wrapper does not exist (preexisting bug). Fixed here



##########
server/monitor/src/main/java/org/apache/accumulo/monitor/rest/SummaryInformation.java:
##########
@@ -40,46 +35,23 @@
 public class SummaryInformation {

Review Comment:
   This class is used for summarizing Monitor info at `/xml` and `/json`. Maybe 
there's info in `rest-v2/manager` that we would want to include in the summary. 
For now, I just deleted all the `rest/manager` related data.



##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/manager.js:
##########
@@ -23,56 +23,29 @@
 */
 "use strict";
 
-var managerStatusTable, recoveryListTable;
+var managerStatusTable, recoveryListTable, managerStatus;
 
 function refreshManagerBanners() {
-  getStatus().then(function () {
-    const managerStatus = JSON.parse(sessionStorage.status).managerStatus;
-
-    // If manager status is error
-    if (managerStatus === 'ERROR') {
-      // show the manager error banner and hide table
-      $('#managerRunningBanner').show();
-      $('#managerStatus_wrapper').hide();
-    } else {
-      // otherwise, hide the error banner and show manager table
-      $('#managerRunningBanner').hide();
-      $('#managerStatus_wrapper').show();
-    }
-  });
-
-  getManager().then(function () {
-    const managerData = JSON.parse(sessionStorage.manager);
-    const managerState = managerData.managerState;
-    const managerGoalState = managerData.managerGoalState;
-
-    const isStateGoalSame = managerState === managerGoalState;
-
-    // if the manager state is normal and the goal state is the same as the 
current state,
-    // or of the manager is not running, hide the state banner and return early
-    if ((managerState === 'NORMAL' && isStateGoalSame) || managerState === 
null) {
-      $('#managerStateBanner').hide();
-      return;
-    }
-
-    // update the manager state banner message and show it
-    let bannerMessage = 'Manager state: ' + managerState;
-    if (!isStateGoalSame) {
-      // only show the goal state if it differs from the manager's current 
state
-      bannerMessage += '. Manager goal state: ' + managerGoalState;
-    }
-    $('#manager-banner-message').text(bannerMessage);
-    $('#managerStateBanner').show();
-  });

Review Comment:
   no longer applicable as the rest-v2/manager does not contain state of the 
manager.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to