Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard should have clear messaging indicating enabled vs. disabled state. #104

Closed
cmacfarl opened this issue Nov 18, 2022 · 8 comments
Closed

Comments

@cmacfarl
Copy link
Contributor

When the dashboard is disabled, it looks like it simply hasn't been initialized. The opmode list is empty, there are no configuration items etc.

It would be useful to have either an overlay, or something in the blue banner indicating state, particularly when disabled so a user doesn't perhaps wonder why the dashboard appears broken.

@NoahBres
Copy link
Contributor

Doesn't disabling dashboard cut the server? So the client would not be able to indicate if it was disabled or if it simply wasn't connected?

@cmacfarl
Copy link
Contributor Author

It doesn't cut the server. The server is serving OnBot Java, Blocks, and the Program and Manage page as well, so you can't just shut down the server. So the dash route still returns a page. What it does cut is the websocket connection, so you don't get the ping updates and such. However, if you aren't intimately familiar with how the dashboard works it looks just like it's broken and you don't know why. I didn't look into it much further than that, but it does appear that server itself knows that the dashboard is disabled, and hence presumably the route, that is still serving the page, could send an indication that the dashboard is disabled with a little explanatory text explaining how to turn it back on.

@NoahBres
Copy link
Contributor

My apologies. I mis-spoke confusing server and socket.
The page is still served so perhaps it can serve an empty page with the appropriate indicator? Although I believe this would require a refresh? Or polling REST requests regarding status updates?
I'm sure Ryan has the proper solution. I am just trying to learn the workings.

@cmacfarl
Copy link
Contributor Author

I don't think it needs to be dynamic necessarily. The natural thing to do is to refresh the page if things look wonky, at which point the disabled message could be displayed.

Although I do believe that the client should be able to know when the websocket is down and display a message appropriately. Although I will admit to not having done any React development.

@rbrott
Copy link
Member

rbrott commented Nov 18, 2022

Cutting the websocket connection doesn't give much additional security. Cheating is still only a few changes away for determined teams. I'm leaning toward keeping the connection alive and displaying a proper help message when the client is disabled.

@wuzihaoo
Copy link

wuzihaoo commented Dec 2, 2022

When the dashboard is disabled, it looks like it simply hasn't been initialized. The opmode list is empty, there are no configuration items etc.

It would be useful to have either an overlay, or something in the blue banner indicating state, particularly when disabled so a user doesn't perhaps wonder why the dashboard appears broken.

This is exactly my question: how to turn it back on if I disabled it? I tried disconnecting but still disabled.

@rbrott
Copy link
Member

rbrott commented Dec 5, 2022

Try running the op mode called "Enable/Disable Dashboard"

@rbrott
Copy link
Member

rbrott commented Dec 5, 2022

Also this is fixed in master.

@rbrott rbrott closed this as completed Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants