Skip to content

Commit

Permalink
Merge pull request errbit#619 from soberstadt/619-handle-app-version-…
Browse files Browse the repository at this point in the history
…value

Handle App Version Value
  • Loading branch information
shingara committed Dec 4, 2013
2 parents 78b99e7 + 8545071 commit 9aa9249
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
6 changes: 6 additions & 0 deletions app/models/notice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ def project_root
end
end

def app_version
if server_environment
server_environment['app-version'] || ''
end
end

protected

def decrease_counter_cache
Expand Down
11 changes: 8 additions & 3 deletions app/views/notices/_summary.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@
%tr
%th Tenant
%td= tenant_graph(problem)
%tr
%th App Server
%td= notice.server_environment && notice.server_environment["hostname"]
- if notice.server_environment && notice.server_environment["hostname"]
%tr
%th App Server
%td= notice.server_environment && notice.server_environment["hostname"]
- if notice.app_version.present?
%tr
%th App Version
%td= notice.app_version
- if notice.framework
%tr
%th Framework
Expand Down
11 changes: 8 additions & 3 deletions public/javascripts/notifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ printStackTrace.implementation.prototype = {
'<server-environment>' +
'<project-root>{project_root}</project-root>' +
'<environment-name>{environment}</environment-name>' +
'<app-version>{appVersion}</app-version>' +
'</server-environment>' +
'<current-user>' +
'<id>{user_id}</id>' +
Expand Down Expand Up @@ -551,10 +552,11 @@ printStackTrace.implementation.prototype = {
"url": "{request_url}",
"rootDirectory": "{project_root}",
"action": "{request_action}",
"app-version": "{appVersion}",

"userId": "{user_id}",
"userName": "{user_name}",
"userEmail": "{user_email}",
"userId": "{user_id}",
"userName": "{user_name}",
"userEmail": "{user_email}",
},
"environment": {},
//"session": "",
Expand Down Expand Up @@ -859,6 +861,9 @@ printStackTrace.implementation.prototype = {
stack: e.stack
});
})
}, {
variable: 'appVersion',
namespace: 'xmlData'
}
];

Expand Down

0 comments on commit 9aa9249

Please sign in to comment.