Commit 3a0066d38c2b0572f689d24b4afe25947b556af7
1 parent
04290491
Exists in
master
and in
1 other branch
Adds current user information to notifier.js
Showing
1 changed file
with
17 additions
and
3 deletions
Show diff stats
public/javascripts/notifier.js
| @@ -379,6 +379,11 @@ printStackTrace.implementation.prototype = { | @@ -379,6 +379,11 @@ printStackTrace.implementation.prototype = { | ||
| 379 | '<project-root>{project_root}</project-root>' + | 379 | '<project-root>{project_root}</project-root>' + |
| 380 | '<environment-name>{environment}</environment-name>' + | 380 | '<environment-name>{environment}</environment-name>' + |
| 381 | '</server-environment>' + | 381 | '</server-environment>' + |
| 382 | + '<current-user>' + | ||
| 383 | + '<id>{user_id}</id>' + | ||
| 384 | + '<name>{user_name}</name>' + | ||
| 385 | + '<email>{user_email}</email>' + | ||
| 386 | + '</current-user>' + | ||
| 382 | '</notice>', | 387 | '</notice>', |
| 383 | REQUEST_VARIABLE_GROUP_XML = '<{group_name}>{inner_content}</{group_name}>', | 388 | REQUEST_VARIABLE_GROUP_XML = '<{group_name}>{inner_content}</{group_name}>', |
| 384 | REQUEST_VARIABLE_XML = '<var key="{key}">{value}</var>', | 389 | REQUEST_VARIABLE_XML = '<var key="{key}">{value}</var>', |
| @@ -411,9 +416,9 @@ printStackTrace.implementation.prototype = { | @@ -411,9 +416,9 @@ printStackTrace.implementation.prototype = { | ||
| 411 | "rootDirectory": "{project_root}", | 416 | "rootDirectory": "{project_root}", |
| 412 | "action": "{request_action}", | 417 | "action": "{request_action}", |
| 413 | 418 | ||
| 414 | - "userId": "{}", | ||
| 415 | - "userName": "{}", | ||
| 416 | - "userEmail": "{}", | 419 | + "userId": "{user_id}", |
| 420 | + "userName": "{user_name}", | ||
| 421 | + "userEmail": "{user_email}", | ||
| 417 | }, | 422 | }, |
| 418 | "environment": {}, | 423 | "environment": {}, |
| 419 | //"session": "", | 424 | //"session": "", |
| @@ -683,6 +688,15 @@ printStackTrace.implementation.prototype = { | @@ -683,6 +688,15 @@ printStackTrace.implementation.prototype = { | ||
| 683 | variable: 'outputFormat', | 688 | variable: 'outputFormat', |
| 684 | namespace: 'options' | 689 | namespace: 'options' |
| 685 | }, { | 690 | }, { |
| 691 | + methodName: 'setCurrentUser', | ||
| 692 | + method: (function (value) { | ||
| 693 | + for (var key in value) { | ||
| 694 | + if (value.hasOwnProperty(key)) { | ||
| 695 | + Config.xmlData['user_' + key] = value[key]; | ||
| 696 | + } | ||
| 697 | + } | ||
| 698 | + }) | ||
| 699 | + }, { | ||
| 686 | methodName: 'setTrackJQ', | 700 | methodName: 'setTrackJQ', |
| 687 | variable: 'trackJQ', | 701 | variable: 'trackJQ', |
| 688 | namespace: 'options', | 702 | namespace: 'options', |