use a single, shared timestamps array between all pings
This commit is contained in:
@ -102,7 +102,7 @@ export class App {
|
||||
.reduce((sum, current) => sum + current, 0)
|
||||
}
|
||||
|
||||
addServer = (pings) => {
|
||||
addServer = (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
|
||||
@ -114,14 +114,14 @@ export class App {
|
||||
|
||||
// Push the historical data into the graph
|
||||
// This will trim and format the data so it is ready for the graph to render once init
|
||||
serverRegistration.addGraphPoints(pings)
|
||||
serverRegistration.addGraphPoints(pings, timestampPoints)
|
||||
|
||||
// Create the plot instance internally with the restructured and cleaned data
|
||||
serverRegistration.buildPlotInstance()
|
||||
|
||||
// Handle the last known state (if any) as an incoming update
|
||||
// This triggers the main update pipeline and enables centralized update handling
|
||||
serverRegistration.updateServerStatus(latestPing, latestPing.timestamp, true, this.publicConfig.minecraftVersions)
|
||||
serverRegistration.updateServerStatus(latestPing, true, this.publicConfig.minecraftVersions)
|
||||
|
||||
// Allow the ServerRegistration to bind any DOM events with app instance context
|
||||
serverRegistration.initEventListeners()
|
||||
|
Reference in New Issue
Block a user