mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-21 16:13:12 +09:00
Improved place stats identification
This commit is contained in:
1 parent
01b317006c
commit
e75931c4f3
2 files changed
+7
No files matched your search
@@ -590,6 +590,8 @@ function instanceManagement() {
|
|||||||
preparedPackage[items[i][0]] = {
|
preparedPackage[items[i][0]] = {
|
||||||
"name": items[i][0],
|
"name": items[i][0],
|
||||||
"count": Number(items[i][1]),
|
"count": Number(items[i][1]),
|
||||||
|
"instanceName":instance,
|
||||||
|
"instanceID":instanceconfig.unique,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -234,6 +234,11 @@ app.post("/api/place", function(req, res) {
|
|||||||
}
|
}
|
||||||
if(!x.instanceID) {
|
if(!x.instanceID) {
|
||||||
x.instanceID = "unknown";
|
x.instanceID = "unknown";
|
||||||
|
Object.keys(slaves).forEach(instanceID => {
|
||||||
|
if(slaves[instanceID].instanceName == req.body.instanceName) {
|
||||||
|
x.instanceID = instanceID;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if( x.instanceID
|
if( x.instanceID
|
||||||
&& x.instanceName
|
&& x.instanceName
|
||||||
|
|||||||
Reference in new issue
Block a user