cockpithandlers: Be defensive if PrettyHostname is not set
cockpithandlers: Be defensive if PrettyHostname is not set

The JS code will crash if the variables aren't defined; let's emit the
empty string in this case.

The real bug was that I had SELinux enforcing but with no policy for
Cockpit, so cockpitd couldn't talk to systemd-hostnamed.  But let's
still submit this defensive patch.

Closes #149

Signed-off-by: Stef Walter <8a7fbf0f15d3ad982af54ef28f5c117d2494b76c@redhat.com>

Armstrong1992/cockpit,arilivigni/cockpit,deryni/cockpit,martinpitt/cockpit,darioajr/cockpit,Scribery/cockpit,mareklibra/cockpit,FireDrunk/cockpit,Armstrong1992/cockpit,moolitayer/cockpit,cockpituous/cockpit,sgallagher/cockpit,sgallagher/cockpit,xhad/cockpit,deryni/cockpit,petervo/cockpit,larsu/cockpit,harishanand95/cockpit,moraleslazaro/cockpit,maxamillion/cockpit,kkaempf/cockpit,larskarlitski/cockpit,mvollmer/cockpit,cockpit-project/cockpit,Scribery/cockpit,FireDrunk/cockpit,moolitayer/cockpit,martinpitt/cockpit,mvollmer/cockpit,dperpeet/cockpit,cockpituous/cockpit,netzvieh/cockpit,cockpituous/cockpit,larsu/cockpit,mareklibra/cockpit,vanloswang/cockpit,larsu/cockpit,SotolitoLabs/cockpit,mareklibra/cockpit,andreasn/cockpit,michalskrivanek/cockpit,sub-mod/cockpit,Thermionix/cockpit,kkaempf/cockpit,maxamillion/cockpit,evol262/cockpit,vbatts/cockpit,denysvitali/cockpit,firebitsbr/cockpit,jscotka/cockpit,SotolitoLabs/cockpit,fridex/cockpit,larsu/cockpit,haiyangd/cockpit_view,jscotka/cockpit,firebitsbr/cockpit,mvollmer/cockpit,xhad/cockpit,jscotka/cockpit,michalskrivanek/cockpit,dperpeet/cockpit,FireDrunk/cockpit,harishanand95/cockpit,cockpituous/cockpit,nmav/cockpit,moolitayer/cockpit,firebitsbr/cockpit,michalskrivanek/cockpit,dperpeet/cockpit,larskarlitski/cockpit,sgallagher/cockpit,fridex/cockpit,michalskrivanek/cockpit,arilivigni/cockpit,SotolitoLabs/cockpit,xhad/cockpit,netzvieh/cockpit,garrett/cockpit,moolitayer/cockpit,darioajr/cockpit,Thermionix/cockpit,larskarlitski/cockpit,zigitax/cockpit,moraleslazaro/cockpit,stefwalter/cockpit,firebitsbr/cockpit,kkaempf/cockpit,garrett/cockpit,Scribery/cockpit,xhad/cockpit,deryni/cockpit,arilivigni/cockpit,xhad/cockpit,haiyangd/cockpit_view,sub-mod/cockpit,harishanand95/cockpit,sgallagher/cockpit,evol262/cockpit,moraleslazaro/cockpit,cockpit-project/cockpit,vanloswang/cockpit,stefwalter/cockpit,harishanand95/cockpit,petervo/cockpit,Armstrong1992/cockpit,jscotka/cockpit,petervo/cockpit,sub-mod/cockpit,vanloswang/cockpit,xhad/cockpit,arilivigni/cockpit,maxamillion/cockpit,FireDrunk/cockpit,Armstrong1992/cockpit,mareklibra/cockpit,mareklibra/cockpit,andreasn/cockpit,Thermionix/cockpit,petervo/cockpit,fridex/cockpit,matobet/cockpit,vbatts/cockpit,larskarlitski/cockpit,darioajr/cockpit,matobet/cockpit,petervo/cockpit,zigitax/cockpit,stefwalter/cockpit,petervo/cockpit,arilivigni/cockpit,dperpeet/cockpit,andreasn/cockpit,zigitax/cockpit,FireDrunk/cockpit,larskarlitski/cockpit,moraleslazaro/cockpit,sgallagher/cockpit,vanloswang/cockpit,harishanand95/cockpit,michalskrivanek/cockpit,andreasn/cockpit,kkaempf/cockpit,maxamillion/cockpit,firebitsbr/cockpit,nmav/cockpit,andreasn/cockpit,matobet/cockpit,matobet/cockpit,vanloswang/cockpit,petervo/cockpit,zigitax/cockpit,SotolitoLabs/cockpit,sgallagher/cockpit,fridex/cockpit,evol262/cockpit,cockpit-project/cockpit,Thermionix/cockpit,denysvitali/cockpit,denysvitali/cockpit,Scribery/cockpit,harishanand95/cockpit,moolitayer/cockpit,matobet/cockpit,xhad/cockpit,SotolitoLabs/cockpit,arilivigni/cockpit,stefwalter/cockpit,dperpeet/cockpit,sub-mod/cockpit,vbatts/cockpit,cockpit-project/cockpit,matobet/cockpit,jscotka/cockpit,larskarlitski/cockpit,cockpit-project/cockpit,michalskrivanek/cockpit,andreasn/cockpit,martinpitt/cockpit,netzvieh/cockpit,michalskrivanek/cockpit,evol262/cockpit,denysvitali/cockpit,sgallagher/cockpit,dperpeet/cockpit,netzvieh/cockpit,mareklibra/cockpit,haiyangd/cockpit_view,haiyangd/cockpit_view,garrett/cockpit,evol262/cockpit,mvollmer/cockpit,zigitax/cockpit,deryni/cockpit,darioajr/cockpit,SotolitoLabs/cockpit,cockpituous/cockpit,evol262/cockpit,deryni/cockpit,moraleslazaro/cockpit,haiyangd/cockpit_view,mareklibra/cockpit,darioajr/cockpit,Scribery/cockpit,fridex/cockpit,Thermionix/cockpit,netzvieh/cockpit,larsu/cockpit,martinpitt/cockpit,netzvieh/cockpit,kkaempf/cockpit,vanloswang/cockpit,denysvitali/cockpit,vanloswang/cockpit,garrett/cockpit,jscotka/cockpit,Scribery/cockpit,sub-mod/cockpit,mvollmer/cockpit,nmav/cockpit,nmav/cockpit,vbatts/cockpit,SotolitoLabs/cockpit,dperpeet/cockpit,maxamillion/cockpit,harishanand95/cockpit,vbatts/cockpit,moraleslazaro/cockpit,larskarlitski/cockpit,Scribery/cockpit,martinpitt/cockpit,stefwalter/cockpit,nmav/cockpit,moraleslazaro/cockpit,deryni/cockpit,stefwalter/cockpit,cockpituous/cockpit,arilivigni/cockpit,vbatts/cockpit,fridex/cockpit,Armstrong1992/cockpit,garrett/cockpit,stefwalter/cockpit,deryni/cockpit,Thermionix/cockpit,larsu/cockpit,andreasn/cockpit