ctubbsii commented on code in PR #2663:
URL: https://github.com/apache/accumulo/pull/2663#discussion_r861388097
##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/tservers.js:
##########
@@ -161,8 +161,39 @@ function clearDeadTServers(server) {
}
/**
- * Generates the tserver table
+ * Generates the tserver table and highlights rows that have recovering
tservers
*/
function refreshTServersTable() {
- if(tserversList) tserversList.ajax.reload(null, false ); // user paging is
not reset on reload
+ if (tserversList) tserversList.ajax.reload(null, false); // user paging is
not reset on reload
+
+ getRecoveryList().then(function () {
+
+ // reset background for all rows
+ const table = $('#tservers').DataTable();
+ table.rows().every(function (index) {
+ $(table.row(index).node()).css('background-color', '');
+ });
+
+ const recoveryList = []
+ JSON.parse(sessionStorage.recoveryList).recoveryList.forEach(entry => {
+ recoveryList.push(entry.server);
+ });
+
+ if (recoveryList.length === 0) {
+ $('#recovery-caption').text('');
+ return;
+ } else {
+ $('#recovery-caption').text('Highlighted rows represent recovering
tservers');
+ }
+
+
+ console.log('List of recovering tservers to be highlighted: ' +
recoveryList);
+
+ // highlight rows if thier tserver is recovering
Review Comment:
```suggestion
// highlight rows if their tserver is recovering
```
##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/tservers.ftl:
##########
@@ -49,6 +49,7 @@
</thead>
<tbody></tbody>
</table>
+ <span id="recovery-caption" style="background-color: gold;"></span>
Review Comment:
Instead of using a custom inline style, would it be possible to use the
built-in style from bootstrap?
https://getbootstrap.com/docs/4.0/utilities/colors/#background-color
--
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]