OpenFactorioServerManager / factorio-server-manager

A tool to help manage Factorio multiplayer servers including mods and save games.
MIT License
556 stars 131 forks source link

The server visibility is not editable form the GUI (shows as object) #67

Closed EraYaN closed 6 years ago

EraYaN commented 7 years ago

The newer data layout for visibility is no longer a string but a dictionary of boolean values.

travisdieckmann commented 7 years ago

Confirmed as [Object object]

This is also an issue with perpetual upgrade situations... Upgraded factorio-server-manager and Factorio at the same time. The server-settings.json kept being overwritten with whatever was set previously. Ended up blowing away both install directories and starting over.

mroote commented 7 years ago

Thanks for the bug report, I'll take a look at the issue soon.

ayebear commented 7 years ago

I can verify this is an issue with the front-end. I modified the request the front-end was making when updating the settings, to include something like this:

"visibility":{"public":false,"lan":true}

The JSON file on the server was updated properly, which shows that the back-end can handle this request.

I would propose having two boolean fields, "Public visibility" and "LAN visibility", so the layout doesn't need to change much. The request format might have to be specialized for this case though.

mroote commented 7 years ago

Thanks for checking I get the same issue too. The server settings page is a bit of a mess right now, especially the front end code. Hopefully I'll get a chance to refactor it soon and fix this issue.

marchingphoenix commented 6 years ago

Definitely part of this file: factorio-server-manager/ui/App/components/ConfigContent.jsx Could add another check like you do for comments to pull out the Visibility fieldset and change that form field to a pair of check-boxes would probably be the easiest. Just store the True/False values based on those boxes.

mroote commented 6 years ago

Fixed in 0.7.1