MrDraw/docs
Gina Häußge eaadf8743b Allow multiple instances of the JS client
We now have a global OctoPrintClient, which is the class from which
all clients are derived, and a global OctoPrint, which is a single
instance already setup and ready to use in case we only need one.

It would be cleaner to have clients create that singular instance
themselves, but we need to maintain backward compatibility for now
with how we established the client to work with the 1.3.0 release.

New clients can be create with

    client = new OctoPrintClient({ /* options */ });

Alternatively the options can be left out and set at a later point:

    client = new OctoPrintClient();
    /* ... */
    client.options = { /* options */ };

Individual client components register themselves with OctoPrintClient
via OctoPrintClient.registerComponent(name, component) from the
component JS files. Just like before their instances are then
available in the individual client instances under "<client>.<name>",
 e.g. "OctoPrint.files".

Plugin components register themselves with OctoPrintClient via
OctoPrintClient.registerPluginComponent(name, component) from the
component JS files. Just like before their instances are then
available in the individual client instances under "<client>.plugins
.<name>", e.g. "OctoPrint.plugins.softwareupdate".

This should make it possible to create dashboard pages utilizing the
JS client that monitor the status of multiple OctoPrint instances,
without workarounds such as having to swap out the options globally
before each request.

See #1681 for the corresponding discussion.
2017-01-26 14:59:56 +01:00
..
_static [Docs] RTD needs a little extra help to get the code tag colors fixed... 2015-03-19 21:05:27 +01:00
api [Docs] Fix missing docs for recursive parameter on file API 2016-12-09 10:50:53 +01:00
bundledplugins Docs: Update cura_engine binary + compiling instructions for jessie 2016-10-14 14:35:22 +02:00
configuration Fixed two documentation bugs 2016-09-21 14:35:43 +02:00
development Simplified install process on Mac 2017-01-13 13:29:11 +01:00
events Docs: Fixed GCODE event docs 2016-11-15 11:57:09 +01:00
features Documentation for last_position, pause_position, cancel_position 2016-11-23 17:41:58 +01:00
images Docs: update screenshot of plugin manager 2016-10-14 14:43:38 +02:00
jsclientlib Allow multiple instances of the JS client 2017-01-26 14:59:56 +01:00
modules devel:newplugin => dev:plugin new, +dev:plugin install, +dev:plugin uninstall 2015-10-30 10:10:47 +01:00
plugins Docs for {Reload|Restart}NeedingPlugin 2016-10-14 14:15:33 +02:00
sphinxext Typo and spelling fixes 2016-01-28 18:59:38 +00:00
conf.py Typo and spelling fixes 2016-01-28 18:59:38 +00:00
index.rst Merge branch 'fix/pluginDocs' into dev/bundledPluginsDocs 2016-09-19 17:15:20 +02:00
make.bat Starting documentation based on Sphinx 2013-12-02 17:40:31 +01:00
Makefile Starting documentation based on Sphinx 2013-12-02 17:40:31 +01:00