ws: Disconnect cleanly from session transport when web service goes away

Previously we would get handlers getting called after the CockpitWebService
instance had been destroyed.

Closes #1389
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
ws: Don't complain if resource web response is already closed

Sometimes a web response closes for a failure such as a send.

Closes #1390
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
common: Don't include zero length blocks in template output

These just confuse all the other logic.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: Substitute package name even for unknown packages

Substituting with a zero-length string is just plain unhelpful here.

Closes #1391
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: Don't complain about names of non-package directories

If a directory without a manifest.json file has an invalid name
we shouldn't be complaining about it with a warning.

Closes #1392
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
base: Work around unreadable monospace fonts in PatternFly

https://github.com/patternfly/patternfly/issues/39

Closes #1394
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
Add meta charset UTF-8 tags to all HTML files

The server can't really know what kind of content a given
HTML file will have, so the HTML files need to declare that
themselves.

Fixes #1368
Closes #1397
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
base: window.debugging instead of cockpit.debugging

We want debugging to be usable during loading of Cockpit and
elsewhere.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
playground: Move the internal page into its own package

And rename it to #playground ... it has hammer.gif after all :)

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
tools: Use 'phantom-tap-xxx' as our TAP communication with phantomjs

Since these variables and canaries are not QUnit specific, rename them.
We'll want to run other phantom tests via our phantom driver.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
base: Add some javascript tests actually spawning processes

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: Add "directory" option to text stream protocol

This spawns the process in the right directory.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: Add "error": "output" to spawned textstream channels

This includes the error output in the textstream output.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
base: cockpit.js can be loaded without jQuery

This is necessary for the AMD module loader to work which will in
turn locate and load jQuery in later commits.

In addition this gives developers using things like dojo in packages
a small API for interacting with cockpit-ws and the message stream.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
doc: More spacing between entries in guide reference sections

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
examples: Add some examples of building a simple component

This currently uses the #playground task since we don't have a way
to add arbitrary tasks to the Cockpit UI.

Closes #1399
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: List canonical package name first

In the package listing always place the canonical package name first.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
pkg: An API in cockpit.js for package lookup

This will also be used by the AMD loader

Closes #1398
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
shell: Register dialogs separately from pages.

So that the upcoming refactoring can be done without having to bother
with dialogs.  Dialogs will get their own makeover.
shell: Make cockpit.loc private.

And refer to it as "page navigation parameters".