ws: Show a login page for any .html resource being accessed

For other resources besides the main page, show a login page if user
doesn't have a cookie.

One big difference, we now refresh the page after completing a
sucessful login.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
static: Change the styles of login page when shown inline

When not logging into cockpit as a whole, just show a basic login
screen on a white background. This will help not confuse users as
to what they're logging into.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
tools: Ignore another glib leak

Closes #1335
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: Add cockpit-bridge --packages to list packages

This command line tool lists the installed packages, their
paths, checksums and aliases.

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: Fix checksum issues with packages

 * Make order of finalizing the checksums irrelevant
 * If a dependent package isn't cacheable or doesn't exist
   then don't allow a checksum

Closes #1350
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
Signed-off-by: Marius Vollmer <mvollmer@redhat.com>
 - Fixed memory leaks
examples: Add example for embedding terminal

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
examples: Add example for pinging the server

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
doc: Update guide to talk about integrating components

Closes #1359
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
examples: Reword the terminal component example

Closes #1360
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
Don't distribute our html guide in the tarball
doc: Add API Listing link when talking about API

Closes #1361
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
server: Fix layout of terminals resize to contents

Size the terminal to the contents properly, and tweak the margins
a bit. Other minor cleanup.

Closes #1362
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
base: Move patternfly into base package

This allows us to update it as with other dependencies, and have
stable versions, along with the ones where we track upstream more
closely.

The login page is now without external JS or CSS and pretty much
independent.

Closes #1363
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: Better debug messages when loading packages

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: Use g_hash_table_replace() so that keys match values

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
bridge: Hold refs on CockpitPackage while we add/replace

While adding and replacing packages with aliases, and putting
checksums in place, hold references to the packages themselves
so that if their main name gets replaced during processing,
we don't access invalid memory.

Closes #1372
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
tools: Simpler jslint when not processing HTML files

When processing HTML files our jslint invocation has to be rather
complex and hokey. But for javascript files, it can be pretty
simple.

Closes #1373
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
shell: Simplify realms code for System Information page

There were some leftovers from when the dedicated realms page was
removed.
shell: Make sure to update the menu when cockpit.user changes.

Also, don't show any items until the user info has been received.
shell: Fix paddings for storage

Fixes #1374
Closes #1375
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>