The Banned switch is now a staged edit like the roles and ban reason,
so Apply sends one ban that includes the reason. The ban reason only
shows while Banned is on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rename save Copy to Duplicate, shorten the save buttons, move Load
scenario into the instance control button and Create template into
More, square off the online players table, show the bind address and
public URL on the controller page, restyle the user settings like the
role page, add a favicon with a controller.favicon_url override, and
put the page name in the tab title.
Closes#1260
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Add save selection, name search and bulk transfer to the saves table
Rows get checkboxes and the header checkbox selects every save matching
the name search, including those on other pages. Selected saves can be
copied or moved to another instance in one go, with copy on by default.
Closes#1253
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Add bulk copy, download and delete for selected saves
Copy picks name-2.zip, name-3.zip and so on, skipping names already
taken, because the host refuses to overwrite on copy. Downloads use a
link with the download attribute so several in a row do not cancel
each other.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Drop bulk copy from the selected saves actions
Copy on the same instance is rarely needed in bulk, and Transfer with
Copy ticked covers copying to another instance.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copy on the same instance is rarely needed in bulk, and Transfer with
Copy ticked covers copying to another instance.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy picks name-2.zip, name-3.zip and so on, skipping names already
taken, because the host refuses to overwrite on copy. Downloads use a
link with the download attribute so several in a row do not cancel
each other.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A plugin action can be disabled, and it becomes the main button when
the user has no restart permission. Only the main button is disabled so
the menu stays usable.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds control.hooks.pageActions. A plugin returns a function per page
(ControllerPage, HostViewPage, InstanceViewPage, UserViewPage) that is
called during render and returns menu items. Keys are prefixed with the
plugin name. Plugin items go after the built-in ones and before stop and
delete. The user page and instance templates get a More dropdown only
when a plugin adds actions.
Closes#1243
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rows get checkboxes and the header checkbox selects every save matching
the name search, including those on other pages. Selected saves can be
copied or moved to another instance in one go, with copy on by default.
Closes#1253
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Version column is now a dropdown of every version of that mod on
the controller, newest first. Versions built for a different Factorio
version than the pack say so, and a pack version missing from the
controller stays listed as "(missing)". Mods with no other version,
built-in mods and removed mods still show plain text.
Closes#1245
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Both pages share a useUploadProgress hook that wraps antd's default
request, lists each upload with bytes sent and a Cancel button, and
notifies with the controller's error message when an upload fails.
Mod uploads showed nothing before, and failures were silent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The effects now call a ScrollRestorer class and restoreScroll is exported,
so the tests can drive both against a fake window, sessionStorage and
ResizeObserver. The hook is three lines that wire them to the router.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BrowserRouter has no scroll handling and the browser's own restoration
runs before the page has loaded its data, so it lands short. Track the
window scroll per history entry in sessionStorage and restore it on POP,
retrying as the page grows until it fits, the user scrolls or 5 s pass.
Pushing a new pathname scrolls to the top; query-only pushes (table sort,
filter, page) keep the position.
Closes#1247
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PluginLoader.load takes the plugin type, context, export name and base
class as options and is used by the controller, host, instance, ctl, web
interface and migrations. Module imports go through #plugin_module so the
node variant stays out of the web bundle. loadPlugin.ts and the loading
half of plugin_loader.ts are merged into it.
The loader lives for one load. Plugins reach it through context.plugins,
with waitFor(name, timeoutMs) and checkInstalled(name), replacing the
waitForPlugin methods. Waiting on a plugin that is not in the load list or
failed to load settles right away, as loading can't finish while the
waiting entrypoint is still running.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fix the "Permamently" typo in the delete instance confirm.
The Search Mod Portal dialog now opens on the default mod pack's
Factorio version, or the newest known version when there is no default
pack. It used to always start on 2.0. A version the user picks still
sticks while the page is open.
The mod portal cache key used request.hide_deprecated directly, and the
web interface never sends it, so the controller logged "2.0-undefined".
A missing value now counts as false, the same default
fetchAllModsFromPortal already uses, so "2.1" and "2.1-false" share a
cache entry.
Closes#1209
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Restart on the Controller and host pages sent the request on click. A
host restart stops every running instance on it, and they stay down
unless instance.auto_start is set, so one misclick takes servers
offline. Both now open a confirm dialog first, and the host one names
the running instances it will stop.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Counts users per instance from the shared users subscription, the same
data the instance page's online players list reads, so the table adds
no per-row requests. The column is sortable and hidden without
core.user.subscribe.
Fixes#1193
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The list used to disappear when nobody was online. It is now a Collapse
that opens while players are online and closes when the last one leaves.
Once the user toggles it, their choice sticks for the page.
Fixes#1191
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The "Add mods" card on the mod pack view mounts when shown, so autoFocus
is enough there. The Search Mod Portal modal stays mounted after the
first open, so it focuses the name input from afterOpenChange instead.
Fixes#1194
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mod pack page only looked up mod-setting-name.<name>, so settings
with a localised_name showed the internal name, and rich text tags in
the locale showed up as raw text.
Resolve localised_name and localised_description from the exported
settings prototypes against the exported locale, falling back to the
mod-setting-name/mod-setting-description keys and then the internal
name. The resolver handles parameters, the "" and "?" keys and
__ITEM__/__ENTITY__/__TILE__/__FLUID__ references. Rich text
formatting tags are removed and prototype icons are replaced with
their name.
Fixes#768
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The instance picker on the users page and the search box on the icon
reference page held their value in component state, so leaving the page
and coming back with the browser history reset them. Both now go through
useTableQueryState like the table filters do, as user.instance and
icon.search.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Settings stored in a mod pack that no setting prototype in the export
data defines are now listed in a collapsed "Unknown settings" panel
under each scope instead of under an "Unknown Fields" heading. Each one
has a remove link, and a revert link once removed, matching what
`clusterioctl mod-pack edit --remove-setting` already allows. They are
never removed automatically.
Without export data nothing is called unknown and stored settings are
listed as before, without a mod heading.
Fixes#773
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
InstanceDetails now carries factorio.mod_pack_id as modPackId, so the
instance list and pages can show it without fetching each config. The
web UI resolves an unset value to the controller default and tags it
"Default". The name links to the mod pack page.
Closes#852
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
- Unlinking a field enables Apply on its own and sends the current value.
- The link button no longer toggles the checkbox of its label.
- Link and disconnect icons for all four states, pending ones highlighted.
- instance.is_template is hidden.
- ctl create takes --as-template.
- Clearer names for the InstanceManager inheritance helpers.
Part of #200
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Overridden values show a disconnect icon. Clicking it stages a link,
shown with a link icon, which is applied together with the other
changes instead of right away.
Part of #200
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The templates table shows name, inheritor count and a create instance
action instead of the instance status and start/stop columns.
factorio.rcon_password joins the ports as never inherited.
Part of #200
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review changes for #1142:
- base becomes template everywhere (is_template, template_id,
--template, --is-template, --templates, InstanceDetails.isTemplate).
- Object fields inherit per property. inherited_fields lists the
overridden properties for object fields and the template object is
merged with them.
- Linking a template also inherits fields that hold the default value.
The server name stays per instance.
- Ports are never inherited.
- InstanceDetails carries templateId.
Web UI: inherited values are locked until unlocked, overridden values
can be inherited again, templates are listed separately, the create
modal can create templates and instances from templates, and the
instance page has "Create template" which can link the source.
Part of #200
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mod pack view gave the settings form its values through the Form's
initialValues, which rc-field-form only applies when the form is
created. Settings added by a data export while the page was open were
shown empty, and color settings black, until the page was reloaded.
Each setting field now gets its saved value as its own initialValue,
which is applied when the field is created and when the form is reset.
Every view page handled a resource that can't be shown its own way, and
users without the subscribe permission were left on a spinner forever.
Adds useResourceState and a ResourceState component, used by the host,
instance, mod pack, icon reference, user, role and plugin pages and
exported for plugin pages. The single item hooks now also return the
subscription error.
Resolves#1165
Revoking a host now unassigns its instances instead of being refused
while it has any, and removes its system metrics.
Approving and revoking no longer force a save. Hosts are saved by
autosave and on exit like everything else, which also removes the
approving state from pairing requests.
The approval code and link are logged as warnings so they show up in
the systemd service, which only prints warnings and above. The pairing
limits are now the controller.host_pairing_timeout and
controller.host_pairing_max_pending config values, 0 removes the limit.
Subscribers take an optional permitted function, used for the pairing
requests instead of overrides in a subclass.
The list of waiting hosts opens the approval dialog instead of having its
own name input and buttons, so hosts are approved in one place. Removes
the limit on requests per minute, the limits on pending requests already
cap what an address can do.
Also updates text that still said the installer makes the requests.
* Take FieldData from antd instead of rc-field-form
web_ui depended on rc-field-form 1.x for a single type import, while
antd 5 uses rc-field-form 2.x. Derive the type from antd's FormProps
and drop the dependency.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Move typescript to web_ui devDependencies
web_ui only needs typescript to build its own types. The runtime
dependency is a leftover from webpack's ts-loader, Vite doesn't use it,
and it pulls in a 30 MB native compiler for anyone installing web_ui.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Use native FormData in controller route tests
Node's FormData and Blob do what the form-data package did here, and
fetch sets the multipart Content-Type header itself.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Remove leftover typedoc.json files
TypeDoc was dropped in #1147, but these configs still ship in the
published packages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A host waiting for approval logs a link to the Hosts page with the code
in it. Opening it shows a dialog with the code, the address of the host,
a name prefilled with the requested one and a large Approve button. A
code that is no longer waiting shows a message saying so.
The installer only writes the controller URL and host name. Running the
host requests to join the cluster if it has not been approved yet, or if
the controller no longer accepts its token, and waits until an admin
approves it. Once approved it saves its id and token and starts as
normal. A rejected host exits with code 8.
clusteriohost run --user-token approves the host right away with the
token of a user allowed to approve hosts. The token is not saved.
This moves the pairing client into the host package, where it uses the
same certificate setup as the host's connection to the controller, and
removes --no-pair and the rerun handling from the installer.