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