Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
import { App } from './app'
|
|
|
|
|
|
|
|
const app = new App()
|
|
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', function () {
|
2020-05-05 21:49:01 +00:00
|
|
|
const webSocket = new WebSocket('ws://' + location.host)
|
Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
|
|
|
|
// The backend will automatically push data once connected
|
2020-05-05 21:49:01 +00:00
|
|
|
webSocket.onopen = () => {
|
Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
app.caption.set('Loading...')
|
2020-05-05 21:49:01 +00:00
|
|
|
}
|
Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
|
2020-05-05 21:49:01 +00:00
|
|
|
webSocket.onclose = (event) => {
|
Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
app.handleDisconnect()
|
|
|
|
|
2020-05-05 21:49:01 +00:00
|
|
|
// Modify page state to display loading overlay
|
|
|
|
// Code 1006 denotes "Abnormal closure", most likely from the server or client losing connection
|
|
|
|
// See https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent
|
|
|
|
// Treat other codes as active errors (besides connectivity errors) when displaying the message
|
|
|
|
if (event.code === 1006) {
|
|
|
|
app.caption.set('Lost connection!')
|
|
|
|
} else {
|
|
|
|
app.caption.set('Disconnected due to error.')
|
|
|
|
}
|
|
|
|
|
Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
// Reset modified DOM structures
|
|
|
|
document.getElementById('big-graph-mobile-load-request').style.display = 'none'
|
|
|
|
|
2020-05-05 21:49:01 +00:00
|
|
|
// TODO: Reconnect behavior
|
|
|
|
}
|
|
|
|
|
|
|
|
webSocket.onmessage = (message) => {
|
|
|
|
const payload = JSON.parse(message.data)
|
|
|
|
|
|
|
|
switch (payload.message) {
|
|
|
|
case 'init':
|
|
|
|
app.setPublicConfig(payload.config)
|
|
|
|
|
|
|
|
// Display the main page component
|
|
|
|
// Called here instead of syncComplete so the DOM can be drawn prior to the graphs being drawn
|
|
|
|
// Otherwise flot.js will cause visual alignment bugs
|
|
|
|
app.setPageReady(true)
|
|
|
|
|
|
|
|
// Allow the graphDisplayManager to control whether or not the historical graph is loaded
|
|
|
|
// Defer to isGraphVisible from the publicConfig to understand if the frontend will ever receive a graph payload
|
|
|
|
if (app.publicConfig.isGraphVisible) {
|
|
|
|
if (app.graphDisplayManager.isVisible) {
|
|
|
|
// Send request as a plain text string to avoid the server needing to parse JSON
|
|
|
|
// This is mostly to simplify the backend server's need for error handling
|
|
|
|
webSocket.send('requestHistoryGraph')
|
|
|
|
} else {
|
|
|
|
document.getElementById('big-graph-mobile-load-request').style.display = 'block'
|
|
|
|
}
|
|
|
|
}
|
Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
|
2020-05-05 21:49:01 +00:00
|
|
|
payload.servers.forEach(app.addServer)
|
Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
|
2020-05-05 21:49:01 +00:00
|
|
|
if (payload.mojangServices) {
|
|
|
|
app.mojangUpdater.updateStatus(payload.mojangServices)
|
|
|
|
}
|
Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
|
2020-05-05 21:49:01 +00:00
|
|
|
// Init payload contains all data needed to render the page
|
|
|
|
// Alert the app it is ready
|
|
|
|
app.handleSyncComplete()
|
Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
|
2020-05-05 21:49:01 +00:00
|
|
|
break
|
Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
|
2020-05-05 21:49:01 +00:00
|
|
|
case 'updateServer': {
|
|
|
|
// The backend may send "update" events prior to receiving all "add" events
|
|
|
|
// A server has only been added once it's ServerRegistration is defined
|
|
|
|
// Checking undefined protects from this race condition
|
|
|
|
const serverRegistration = app.serverRegistry.getServerRegistration(payload.serverId)
|
|
|
|
|
|
|
|
if (serverRegistration) {
|
|
|
|
serverRegistration.updateServerStatus(payload, false, app.publicConfig.minecraftVersions)
|
2020-04-29 09:01:10 +00:00
|
|
|
}
|
Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
|
2020-05-05 21:49:01 +00:00
|
|
|
// Use update payloads to conditionally append data to graph
|
|
|
|
// Skip any incoming updates if the graph is disabled
|
|
|
|
if (payload.updateHistoryGraph && app.graphDisplayManager.isVisible) {
|
|
|
|
// Update may not be successful, safely append 0 points
|
|
|
|
const playerCount = payload.result ? payload.result.players.online : 0
|
Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
|
2020-05-05 21:49:01 +00:00
|
|
|
app.graphDisplayManager.addGraphPoint(serverRegistration.serverId, payload.timestamp, playerCount)
|
Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
|
2020-05-05 21:49:01 +00:00
|
|
|
// Only redraw the graph if not mutating hidden data
|
|
|
|
if (serverRegistration.isVisible) {
|
|
|
|
app.graphDisplayManager.requestRedraw()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break
|
|
|
|
}
|
Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
|
2020-05-05 21:49:01 +00:00
|
|
|
case 'updateMojangServices': {
|
|
|
|
app.mojangUpdater.updateStatus(payload)
|
|
|
|
break
|
|
|
|
}
|
Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
|
2020-05-05 21:49:01 +00:00
|
|
|
case 'historyGraph': {
|
|
|
|
// Consider the graph visible since a payload has been received
|
|
|
|
// This is used for the manual graph load request behavior
|
|
|
|
app.graphDisplayManager.isVisible = true
|
Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
|
2020-05-05 21:49:01 +00:00
|
|
|
app.graphDisplayManager.buildPlotInstance(payload.graphData)
|
2020-04-29 09:21:50 +00:00
|
|
|
|
2020-05-05 21:49:01 +00:00
|
|
|
// Build checkbox elements for graph controls
|
|
|
|
let lastRowCounter = 0
|
|
|
|
let controlsHTML = ''
|
2020-04-29 09:21:50 +00:00
|
|
|
|
2020-05-05 21:49:01 +00:00
|
|
|
app.serverRegistry.getServerRegistrations()
|
|
|
|
.map(serverRegistration => serverRegistration.data.name)
|
|
|
|
.sort()
|
|
|
|
.forEach(serverName => {
|
|
|
|
const serverRegistration = app.serverRegistry.getServerRegistration(serverName)
|
2020-04-29 09:21:50 +00:00
|
|
|
|
2020-05-05 21:49:01 +00:00
|
|
|
controlsHTML += '<td>' +
|
|
|
|
'<input type="checkbox" class="graph-control" minetrack-server-id="' + serverRegistration.serverId + '" ' + (serverRegistration.isVisible ? 'checked' : '') + '>' +
|
|
|
|
' ' + serverName +
|
|
|
|
'</input></td>'
|
|
|
|
|
|
|
|
// Occasionally break table rows using a magic number
|
|
|
|
if (++lastRowCounter % 6 === 0) {
|
|
|
|
controlsHTML += '</tr><tr>'
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
// Apply generated HTML and show controls
|
|
|
|
document.getElementById('big-graph-checkboxes').innerHTML = '<table><tr>' +
|
|
|
|
controlsHTML +
|
|
|
|
'</tr></table>'
|
|
|
|
|
|
|
|
document.getElementById('big-graph-controls').style.display = 'block'
|
|
|
|
|
|
|
|
// Bind click event for updating graph data
|
|
|
|
app.graphDisplayManager.initEventListeners()
|
|
|
|
break
|
Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
}
|
|
|
|
}
|
2020-05-05 21:49:01 +00:00
|
|
|
}
|
Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
|
|
|
|
window.addEventListener('resize', function () {
|
|
|
|
app.percentageBar.redraw()
|
|
|
|
|
|
|
|
// Delegate to GraphDisplayManager which can check if the resize is necessary
|
|
|
|
app.graphDisplayManager.requestResize()
|
|
|
|
}, false)
|
|
|
|
|
|
|
|
document.getElementById('big-graph-mobile-load-request-button').addEventListener('click', function () {
|
|
|
|
// Send a graph data request to the backend
|
2020-05-05 21:49:01 +00:00
|
|
|
// Send request as a plain text string to avoid the server needing to parse JSON
|
|
|
|
// This is mostly to simplify the backend server's need for error handling
|
|
|
|
webSocket.send('requestHistoryGraph')
|
Minetrack 5 (#143)
* remove unused #getServer methods, inline #roundToPoint
* replace #safeName regex with incremental ids
* remove legacy #setInterval based #updateMojangServices handling
* add Tooltip class, move faviconSize to css instead of js
* move server id assignment to ServerRegistry
* move printPort logic to formatMinecraftServerAddress, add MINECRAFT_DEFAULT_PORTS
* simplify ping tracking
* rework perc-bar tooltip to not use mousemove event
* begin moving graphing logic to GraphDisplayManager
* begin merge graph point tracking into graphDisplayManager
* centralizing graphing logic into GraphDisplayManager
* properly reset GraphDisplayManager when handling disconnects
* move individual server graph data into ServerGraph class
* constantly run sortServers loop to simplify logic
* inline #updateMojangServices method
* resize performance improvements
* remove legacy bootTime refresh behavior, require manual user refresh
* move class defs to core.js
* remove unused #isGraphDataVisible arg
* remove #toggleControlsDrawer
* dont call #updatePercentageBar in #updateServerStatus calls
* centralize caption handling
* inline #msToTime
* remove hackish seconds handling for timestamps
* reduce #forEach calls with filter/map
* safely fallback to errorMessage if errno/description does not match
* Add /images/missing_favicon.png path instead of putting base64 in js
* remove debug
* cleanup mojang status handling
* move historyPlot instance into GraphDisplayManager
* cleanup checkbox html generation
* cleanup #updateServerStatus
* fix up tooltip styling
* move jquery code out of core.js
* fix add server race condition when initially pinging servers
* send error.placeholder=true for pending pings so the frontend can discard later
* filter placeholder pings sent by the backend
* del assets/images/logo_2014.png
* move graph code into graph.js
* merge pingTracker into ServerRegistry+ServerGraph
* remove todos
* simplify getVisibleGraphData
* fix potential sortServers race condition when adding
* use #show instead of #fadeIn(0)
* remove publicConfig.json, send over socket
* update docs/CHANGELOG.md
* getOrAssign -> getOrCreateId
* dont delete graph controls when disconnected
* early work cleaning up HTML+CSS structures
* cleanup server css elements
* cleanup graph control css elements
* move base CSS color values into @media(prefers-color-scheme: light)
* move CSS magic colors to vars
* reduce duplicated CSS color rules
* inline body text color CSS
* WIP replacing jQuery calls with vanilla JS
* WIP replacing jQuery calls with vanilla JS
* replace getElementsByClass with querySelectorAll
* typeMarker -> serverTypeHTML
* use jQuery slim for remaining flot.js dependency
* merge setAllGraphVisibility into GraphDisplayManager
* break apart element update and redraw logic
* add eslint + parcel bundler
* auto lint assets/js when building
* statically serve favicons/ for faviconOverrides outside of dist/
* only send favicons when changed
* move faviconOverride behavior into entry in servers.json
* add warning to backend server files
* remove .server-favicon-missing class
* add Minetrack 5 migration guide
* add npm run build step to install.sh
* adjust package.json version to 5.0.0
* remove js references from index.html
* move logic and behavior out of site.js
* cleanup ServerRegistry methods
* prevent multiple history graph redraws
* add comments
* cleanup #addServer usage, move to App
* move graph control bindings into GraphDisplayManager
* site.js -> main.js, core.js -> servers.js
* move Tooltip/Caption into util.js
* spacing tweak
* format index.html
* ensure the frontend does not handling updateHistoryGraph events
* prevent versions/record updates if the same value
* avoid empty percbar updates, ensure versions are sorted
* only include main.js ref in index.html
* serve minified copy of font awesome directly
* bundle icons.css into main.css, remove Open Sans 400
* add new SVG logo
* update docs/CHANGELOG.md
* new design, server version grouping
* remove start.sh call from install.sh
* move graph controls into header with new button
* move #handleSettingsToggle back to graph
* fix legacy code behavior of currentVersionIndex applying globally
* fix header text color in light mode
* fix mojang status text color in light mode
* fix toggle settings and checkbox colors
* tweak button hover color
* tweak button hover color
* add new status-overlay to avoid complicated DOM management during loading
* fix initial graph rendering bug
* add comments
* update default graph tick sizes
* prevent #tooltip from overflowing page
* remove localhost spec
* prevent minor connection errors from reshuffling layout
* update CHANGELOG.md
* add message/button for manually loading historical graph on mobile devices
* send isGraphVisible to frontend to prevent alert if logToDatabase: false
* send timestamp data with record
* update docs/CHANGELOG.md
* remove clock icon
* remove 24h peak timestamp
* Only check favicon if present
* safely handle undefined/empty knownVersions in #formatMinecraftVersions
* merge config.versions and minecraft.json into minecraft_versions.json, simplify index matching behavior
* remove localhost url in socket.io config
* stub methods/linkage for FocusManager
* add #isObjectEqual hack, add event proxying to FocusManager
* wip extended stats box
* remove server-type badging
* tweak mojang unstable color
* serve socket.io-client using parcel
* fix incorrect mojang status colors
* remove legacy capitalization design
* redesign focus boxes
* update docs/CHANGELOG.md
* remove localhost ref
* color clock icon
* use background-color for hover effect, remove unused var
* improve stats focus box icons
* change mojang sessions icon to globe
* Add favorites system
* remove focus boxes
* update docs/CHANGELOG.md
* remove focus icons from font
* simplify graph related event binding
* Add Sort By button
* store current sortOption in localStorage
* update docs/CHANGELOG.md
* move magic 0 sortOption to SORT_OPTION_INDEX_DEFAULT
* remove localhost ref
* merge #settings-toggle, #sort-by and .mojang-status CSS
* remove .focus-box CSS
* use sortedServerIds for _lastSortedServers
* tweak --color-blue
* new missing_favicon design to match logo
* edit footer CSS/text, remove github icon
* replace player count diff counter with GROWTH sort option
* italize non-default sort options
* add Only Favorites button to auto sync favorites to the visible graph data
* add icons to graph control buttons
* update docs/CHANGELOG.md
* use * to denote non-default sort option instead
* remove localhost url in socket.io config
* add value highlighting to make sort by easier to read
* remove last remaining uppercase text
* remove serverTypesVisible from config.json
* simplify header CSS, fix spacing with logToDatabase=false
* fix inverted text color on highlighted values
* remove localhost url in socket.io config
* break header into rows on mobile devices
Co-authored-by: Hugo Manrique <contact@hugmanrique.me>
2020-04-20 00:27:59 +00:00
|
|
|
|
|
|
|
// Hide the activation link to avoid multiple requests
|
|
|
|
document.getElementById('big-graph-mobile-load-request').style.display = 'none'
|
|
|
|
}, false)
|
|
|
|
}, false)
|