Commit 287fb6863389c376566741c713a1265a53e9a865
1 parent
a1ff86d6
Exists in
master
and in
1 other branch
adding links to gtalk and campfire if they are configured
Showing
4 changed files
with
15 additions
and
1 deletions
Show diff stats
app/models/notification_service.rb
@@ -20,6 +20,8 @@ class NotificationService | @@ -20,6 +20,8 @@ class NotificationService | ||
20 | def type; self._type; end | 20 | def type; self._type; end |
21 | def type=(t); self._type=t; end | 21 | def type=(t); self._type=t; end |
22 | 22 | ||
23 | + def url; nil; end | ||
24 | + | ||
23 | # Retrieve tracker label from either class or instance. | 25 | # Retrieve tracker label from either class or instance. |
24 | Label = '' | 26 | Label = '' |
25 | def self.label; self::Label; end | 27 | def self.label; self::Label; end |
app/models/notification_services/campfire_service.rb
@@ -19,6 +19,10 @@ class NotificationServices::CampfireService < NotificationService | @@ -19,6 +19,10 @@ class NotificationServices::CampfireService < NotificationService | ||
19 | end | 19 | end |
20 | end | 20 | end |
21 | 21 | ||
22 | + def url | ||
23 | + "http://campfirenow.com/" | ||
24 | + end | ||
25 | + | ||
22 | def create_notification(problem) | 26 | def create_notification(problem) |
23 | # build the campfire client | 27 | # build the campfire client |
24 | campy = Campy::Room.new(:account => subdomain, :token => api_token, :room_id => room_id) | 28 | campy = Campy::Room.new(:account => subdomain, :token => api_token, :room_id => room_id) |
app/models/notification_services/gtalk_service.rb
@@ -21,6 +21,10 @@ class NotificationServices::GtalkService < NotificationService | @@ -21,6 +21,10 @@ class NotificationServices::GtalkService < NotificationService | ||
21 | end | 21 | end |
22 | end | 22 | end |
23 | 23 | ||
24 | + def url | ||
25 | + "http://www.google.com/talk/" | ||
26 | + end | ||
27 | + | ||
24 | def create_notification(problem) | 28 | def create_notification(problem) |
25 | # build the xmpp client | 29 | # build the xmpp client |
26 | client = Jabber::Client.new(Jabber::JID.new(subdomain)) | 30 | client = Jabber::Client.new(Jabber::JID.new(subdomain)) |
app/views/apps/index.html.haml
@@ -28,7 +28,11 @@ | @@ -28,7 +28,11 @@ | ||
28 | - if any_notification_services? | 28 | - if any_notification_services? |
29 | %td.notification_service | 29 | %td.notification_service |
30 | - if app.notification_service_configured? | 30 | - if app.notification_service_configured? |
31 | - = image_tag("#{app.notification_service.label}_goto.png") | 31 | + - notification_service_img = image_tag("#{app.notification_service.label}_goto.png") |
32 | + - if app.notification_service.url | ||
33 | + = link_to( notification_service_img, app.notification_service.url, :target => "_blank" ) | ||
34 | + - else | ||
35 | + = notification_service_img | ||
32 | - if any_issue_trackers? | 36 | - if any_issue_trackers? |
33 | %td.issue_tracker | 37 | %td.issue_tracker |
34 | - if app.issue_tracker_configured? | 38 | - if app.issue_tracker_configured? |