mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 15:24:52 +09:00
Show the mod pack an instance uses in the web UI (#1177)
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>
This commit is contained in:
1 parent
6eaf48aefe
commit
d250394580
9 files changed
+138
-2
No files matched your search
@@ -153,6 +153,17 @@ describe("controller/InstanceRecord", function () {
|
||||
assert.equal(details.startedAtMs, 100);
|
||||
assert.equal(details.updatedAtMs, 200);
|
||||
assert.equal(details.excludeFromStartAll, false);
|
||||
assert.equal(details.modPackId, undefined);
|
||||
});
|
||||
|
||||
it("should include the mod pack set in the config", function () {
|
||||
const config = new lib.InstanceConfig("controller", {
|
||||
"instance.id": 1,
|
||||
"instance.name": "TestInstance",
|
||||
"factorio.mod_pack_id": 3,
|
||||
});
|
||||
const details = new InstanceRecord(config, "stopped").toInstanceDetails();
|
||||
assert.equal(details.modPackId, 3);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user