Skip to content

Commit

Permalink
Add link to table if hosts or services
Browse files Browse the repository at this point in the history
Refs #12 Now links to Webui are separate for hosts and services.
  • Loading branch information
algorys committed Jul 15, 2016
1 parent cfe1254 commit 38e9900
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion alignak_app/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,12 @@ def open_url(self, source):
:param source: source of connector
"""
assert isinstance(source, Gtk.ImageMenuItem)
webui_url = self.Config.get('Webui', 'webui_url')
webbrowser.open(webui_url + '/hosts')
if "Hosts" in source.get_label():
webbrowser.open(webui_url + '/hosts_table')
if "Services" in source.get_label():
webbrowser.open(webui_url + '/services_table')

def create_items(self, style):
"""
Expand Down Expand Up @@ -199,6 +203,7 @@ def create_items(self, style):
else:
img.set_from_stock(Gtk.STOCK_CLOSE, 2)
item.connect('activate', self.quit_app)

item.set_image(img)
item.set_always_show_image(True)

Expand Down

0 comments on commit 38e9900

Please sign in to comment.