Skip to content

JavaScript

Modules

octoprint_uptime/navbar

Frontend module for the navbar uptime widget.

octoprint_uptime/navbar

Frontend module for the navbar uptime widget.

octoprint_uptime/navbar

Frontend module for the navbar uptime widget.

octoprint_uptime/navbar.NavbarUptimeViewModel

Kind: static class of octoprint_uptime/navbar

new NavbarUptimeViewModel(parameters)

NavbarUptimeViewModel

Displays the system uptime in the navbar and keeps it updated via polling.

Param Type Description
parameters Array ViewModel parameters (expects settingsViewModel).

new NavbarUptimeViewModel(parameters)

NavbarUptimeViewModel

Displays the system uptime in the navbar and keeps it updated via polling.

Param Type Description
parameters Array ViewModel parameters (expects settingsViewModel).

OctoPrint lifecycle hook - called once after all ViewModels have been bound and the settings are fully populated.

Polling is deliberately deferred to this hook instead of starting immediately in the constructor, so that getPluginSettings() can resolve the Knockout observables from settingsViewModel.settings reliably on the very first call.

Kind: static method of NavbarUptimeViewModel

OctoPrint lifecycle hook - called every time the settings dialog is shown. Fetches the plugin API once and renders the "uptime could not be determined" note into the settings section when the server reports the uptime as unavailable.

This lives in the ViewModel rather than in an inline