do not append serverId in getPingHistory entries
This commit is contained in:
parent
c2494af82d
commit
7993ac0077
@ -102,13 +102,13 @@ export class App {
|
|||||||
.reduce((sum, current) => sum + current, 0)
|
.reduce((sum, current) => sum + current, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
addServer = (pings, timestampPoints) => {
|
addServer = (serverId, pings, timestampPoints) => {
|
||||||
// Even if the backend has never pinged the server, the frontend is promised a placeholder object.
|
// Even if the backend has never pinged the server, the frontend is promised a placeholder object.
|
||||||
// result = undefined
|
// result = undefined
|
||||||
// error = defined with "Waiting" description
|
// error = defined with "Waiting" description
|
||||||
// info = safely defined with configured data
|
// info = safely defined with configured data
|
||||||
const latestPing = pings[pings.length - 1]
|
const latestPing = pings[pings.length - 1]
|
||||||
const serverRegistration = this.serverRegistry.createServerRegistration(latestPing.serverId)
|
const serverRegistration = this.serverRegistry.createServerRegistration(serverId)
|
||||||
|
|
||||||
serverRegistration.initServerStatus(latestPing)
|
serverRegistration.initServerStatus(latestPing)
|
||||||
|
|
||||||
|
@ -67,8 +67,8 @@ export class SocketManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
payload.servers.forEach(server => {
|
payload.servers.forEach((pings, serverId) => {
|
||||||
this._app.addServer(server, payload.timestampPoints)
|
this._app.addServer(serverId, pings, payload.timestampPoints)
|
||||||
})
|
})
|
||||||
|
|
||||||
if (payload.mojangServices) {
|
if (payload.mojangServices) {
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
"connectTimeout": 2500
|
"connectTimeout": 2500
|
||||||
},
|
},
|
||||||
"performance": {
|
"performance": {
|
||||||
"skipUnfurlSrv": false
|
"skipUnfurlSrv": true
|
||||||
},
|
},
|
||||||
"logToDatabase": false,
|
"logToDatabase": true,
|
||||||
"graphDuration": 86400000
|
"graphDuration": 86400000
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,6 @@ class ServerRegistration {
|
|||||||
const lastPing = this._pingHistory[this._pingHistory.length - 1]
|
const lastPing = this._pingHistory[this._pingHistory.length - 1]
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
serverId: this.serverId,
|
|
||||||
versions: this.versions,
|
versions: this.versions,
|
||||||
recordData: this.recordData,
|
recordData: this.recordData,
|
||||||
favicon: this.lastFavicon
|
favicon: this.lastFavicon
|
||||||
@ -153,7 +152,6 @@ class ServerRegistration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return [{
|
return [{
|
||||||
serverId: this.serverId,
|
|
||||||
error: {
|
error: {
|
||||||
message: 'Waiting...',
|
message: 'Waiting...',
|
||||||
placeholder: true
|
placeholder: true
|
||||||
|
Loading…
Reference in New Issue
Block a user