fixes for dashboard
diff --git a/horizon/meta/sphinx.yml b/horizon/meta/sphinx.yml
index 1bf94fa..b71bf2d 100644
--- a/horizon/meta/sphinx.yml
+++ b/horizon/meta/sphinx.yml
@@ -5,6 +5,7 @@
   role:
     server:
       name: server
+      {%- if pillar.horizon.server is defined %}
       endpoint:
         {%- for app_name, app in server.get('app', {}).iteritems() %}
         horizon_{{ app_name }}:
@@ -25,6 +26,7 @@
         packages:
           value: |
             {%- for pkg in server.pkgs %}
-            {%- set pkg_version = "dpkg -l dashboard | grep dashboard | awk '{print $3}'" %}
+            {%- set pkg_version = "dpkg -l "+pkg+" | grep "+pkg+" | awk '{print $3}'" %}
             * {{ pkg }}: {{ salt['cmd.run'](pkg_version) }}
-            {%- endfor %}
\ No newline at end of file
+            {%- endfor %}
+      {%- endif %}
\ No newline at end of file