You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "dlmarion (via GitHub)" <gi...@apache.org> on 2026/05/01 15:12:29 UTC
[PR] Converted auto-refresh to a switch [accumulo]
dlmarion opened a new pull request, #6355:
URL: https://github.com/apache/accumulo/pull/6355
(no comment)
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Converted auto-refresh to a switch [accumulo]
Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on code in PR #6355:
URL: https://github.com/apache/accumulo/pull/6355#discussion_r3173761841
##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/functions.js:
##########
@@ -86,12 +79,9 @@ function refresh() {
* Global timer that checks for auto refresh status every 5 seconds
*/
TIMER = setInterval(function () {
- if (sessionStorage.autoRefresh === 'true') {
- $('.auto-refresh').parent().addClass('active');
+ if (localStorage.getItem(AUTO_REFRESH_KEY) === 'true') {
Review Comment:
There is a bug here and I'm not sure what's going on. If the stored value is true, then it's not refreshing. If it's false, then it is? What?
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Converted auto-refresh to a switch [accumulo]
Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on code in PR #6355:
URL: https://github.com/apache/accumulo/pull/6355#discussion_r3173940350
##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/functions.js:
##########
@@ -86,12 +79,9 @@ function refresh() {
* Global timer that checks for auto refresh status every 5 seconds
*/
TIMER = setInterval(function () {
- if (sessionStorage.autoRefresh === 'true') {
- $('.auto-refresh').parent().addClass('active');
+ if (localStorage.getItem(AUTO_REFRESH_KEY) === 'true') {
Review Comment:
Not a bug, I cleared all the saved state in my browser and reloaded and it worked.
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Converted auto-refresh to a switch [accumulo]
Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo commented on PR #6355:
URL: https://github.com/apache/accumulo/pull/6355#issuecomment-4360329465
This seems to be working as expected. The switch makes more sense here.
Looks like the styling got messed up a little:
<img width="316" height="246" alt="Screenshot_2026-05-01_12-16-26" src="https://github.com/user-attachments/assets/794c98a9-aa35-42c3-ac91-d558b5843294" />
Also important to note the change in behavior here with the switch from sessionStorage to localStorage. This will now affect all tabs that are open and persist between closes which I think is fine.
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Converted auto-refresh to a switch [accumulo]
Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on code in PR #6355:
URL: https://github.com/apache/accumulo/pull/6355#discussion_r3174121636
##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/navbar.ftl:
##########
@@ -78,7 +78,12 @@
<span style="font-size: 1.2em;" class="bi bi-three-dots-vertical"></span>
</a>
<ul class="dropdown-menu dropdown-menu-end">
- <li><a class="dropdown-item auto-refresh" style="cursor:pointer">Auto-Refresh</a></li>
+ <li>
+ <div class="form-check form-check-reverse form-switch">
+ <input id="autoRefreshSwitch" class="form-check-input" type="checkbox" role="switch">
+ <label class="form-check-label" for="autoRefreshSwitch">Auto-Refresh</label>
+ </div>
Review Comment:
Yeah, the `form-check-reverse` right aligns it, but also puts the switch on the right. I surprised the switch is still on the right with your changes.
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Converted auto-refresh to a switch [accumulo]
Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on code in PR #6355:
URL: https://github.com/apache/accumulo/pull/6355#discussion_r3174204402
##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/navbar.ftl:
##########
@@ -78,7 +78,12 @@
<span style="font-size: 1.2em;" class="bi bi-three-dots-vertical"></span>
</a>
<ul class="dropdown-menu dropdown-menu-end">
- <li><a class="dropdown-item auto-refresh" style="cursor:pointer">Auto-Refresh</a></li>
+ <li>
+ <div class="form-check form-check-reverse form-switch">
+ <input id="autoRefreshSwitch" class="form-check-input" type="checkbox" role="switch">
+ <label class="form-check-label" for="autoRefreshSwitch">Auto-Refresh</label>
+ </div>
Review Comment:
I'm good with your suggestion. I tried a couple different things and they didn't turn out better.
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Converted auto-refresh to a switch [accumulo]
Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion merged PR #6355:
URL: https://github.com/apache/accumulo/pull/6355
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Converted auto-refresh to a switch [accumulo]
Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo commented on code in PR #6355:
URL: https://github.com/apache/accumulo/pull/6355#discussion_r3174092654
##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/navbar.ftl:
##########
@@ -78,7 +78,12 @@
<span style="font-size: 1.2em;" class="bi bi-three-dots-vertical"></span>
</a>
<ul class="dropdown-menu dropdown-menu-end">
- <li><a class="dropdown-item auto-refresh" style="cursor:pointer">Auto-Refresh</a></li>
+ <li>
+ <div class="form-check form-check-reverse form-switch">
+ <input id="autoRefreshSwitch" class="form-check-input" type="checkbox" role="switch">
+ <label class="form-check-label" for="autoRefreshSwitch">Auto-Refresh</label>
+ </div>
Review Comment:
```suggestion
<div class="dropdown-item d-flex justify-content-between align-items-center">
<label class="mb-0" for="autoRefreshSwitch">Auto-Refresh</label>
<div class="form-check form-switch mb-0 ms-3">
<input id="autoRefreshSwitch" class="form-check-input mt-0" type="checkbox" role="switch">
</div>
</div>
```
Was able to get things to look a bit more centered (although not perfect) with the suggested changes. It took some finagling and I'm not certain all of this is needed but it seems to be looking okay and working well. Here is a screenshot with this extra `<li>` pasted into the browsers HTML:
<img width="349" height="293" alt="Image" src="https://github.com/user-attachments/assets/de2e9c5e-4f89-4da6-af7d-d0dc7ffc5861" />
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org