Commit 9aa92494de573bfec4185afeaa474196808dfab0
Exists in
master
and in
1 other branch
Merge pull request #619 from soberstadt/619-handle-app-version-value
Handle App Version Value
Showing
3 changed files
with
22 additions
and
6 deletions
Show diff stats
app/models/notice.rb
| @@ -119,6 +119,12 @@ class Notice | @@ -119,6 +119,12 @@ class Notice | ||
| 119 | end | 119 | end |
| 120 | end | 120 | end |
| 121 | 121 | ||
| 122 | + def app_version | ||
| 123 | + if server_environment | ||
| 124 | + server_environment['app-version'] || '' | ||
| 125 | + end | ||
| 126 | + end | ||
| 127 | + | ||
| 122 | protected | 128 | protected |
| 123 | 129 | ||
| 124 | def decrease_counter_cache | 130 | def decrease_counter_cache |
app/views/notices/_summary.html.haml
| @@ -25,9 +25,14 @@ | @@ -25,9 +25,14 @@ | ||
| 25 | %tr | 25 | %tr |
| 26 | %th Tenant | 26 | %th Tenant |
| 27 | %td= tenant_graph(problem) | 27 | %td= tenant_graph(problem) |
| 28 | - %tr | ||
| 29 | - %th App Server | ||
| 30 | - %td= notice.server_environment && notice.server_environment["hostname"] | 28 | + - if notice.server_environment && notice.server_environment["hostname"] |
| 29 | + %tr | ||
| 30 | + %th App Server | ||
| 31 | + %td= notice.server_environment && notice.server_environment["hostname"] | ||
| 32 | + - if notice.app_version.present? | ||
| 33 | + %tr | ||
| 34 | + %th App Version | ||
| 35 | + %td= notice.app_version | ||
| 31 | - if notice.framework | 36 | - if notice.framework |
| 32 | %tr | 37 | %tr |
| 33 | %th Framework | 38 | %th Framework |
public/javascripts/notifier.js
| @@ -514,6 +514,7 @@ printStackTrace.implementation.prototype = { | @@ -514,6 +514,7 @@ printStackTrace.implementation.prototype = { | ||
| 514 | '<server-environment>' + | 514 | '<server-environment>' + |
| 515 | '<project-root>{project_root}</project-root>' + | 515 | '<project-root>{project_root}</project-root>' + |
| 516 | '<environment-name>{environment}</environment-name>' + | 516 | '<environment-name>{environment}</environment-name>' + |
| 517 | + '<app-version>{appVersion}</app-version>' + | ||
| 517 | '</server-environment>' + | 518 | '</server-environment>' + |
| 518 | '<current-user>' + | 519 | '<current-user>' + |
| 519 | '<id>{user_id}</id>' + | 520 | '<id>{user_id}</id>' + |
| @@ -551,10 +552,11 @@ printStackTrace.implementation.prototype = { | @@ -551,10 +552,11 @@ printStackTrace.implementation.prototype = { | ||
| 551 | "url": "{request_url}", | 552 | "url": "{request_url}", |
| 552 | "rootDirectory": "{project_root}", | 553 | "rootDirectory": "{project_root}", |
| 553 | "action": "{request_action}", | 554 | "action": "{request_action}", |
| 555 | + "app-version": "{appVersion}", | ||
| 554 | 556 | ||
| 555 | - "userId": "{user_id}", | ||
| 556 | - "userName": "{user_name}", | ||
| 557 | - "userEmail": "{user_email}", | 557 | + "userId": "{user_id}", |
| 558 | + "userName": "{user_name}", | ||
| 559 | + "userEmail": "{user_email}", | ||
| 558 | }, | 560 | }, |
| 559 | "environment": {}, | 561 | "environment": {}, |
| 560 | //"session": "", | 562 | //"session": "", |
| @@ -859,6 +861,9 @@ printStackTrace.implementation.prototype = { | @@ -859,6 +861,9 @@ printStackTrace.implementation.prototype = { | ||
| 859 | stack: e.stack | 861 | stack: e.stack |
| 860 | }); | 862 | }); |
| 861 | }) | 863 | }) |
| 864 | + }, { | ||
| 865 | + variable: 'appVersion', | ||
| 866 | + namespace: 'xmlData' | ||
| 862 | } | 867 | } |
| 863 | ]; | 868 | ]; |
| 864 | 869 |