1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-21 01:38:48 +02:00
phorge-phorge/webroot/rsrc/js/application
Joshua Spence 4135752490 Multiplex AJAX calls
Summary: Fixes T5344. Essentially, we only make the AJAX request to `/notification/individual/` if we are the leader tab (i.e. only one tab will make this request). Once a response has been received from the server (containing the contents of the notification), we broadcast the message contents back to all other tabs for rendering.

Test Plan:
Opened two tabs on `/notification/status/` and clicked "Send Test Notification".

**Before**
```lang=bash, name=tail -f /var/log/phabricator-access.log | grep /notification/individual/
[Tue, 13 Jan 2015 20:10:37 +1100]   17033   phabricator 10.0.0.1    josh    PhabricatorNotificationIndividualController -   /notification/individual/-200   236036
[Tue, 13 Jan 2015 20:10:37 +1100]   17657   phabricator 10.0.0.1    josh    PhabricatorNotificationIndividualController -   /notification/individual/-200   24130
```

**After**
```lang=bash, name=tail -f /var/log/phabricator-access.log | grep /notification/individual/
[Tue, 13 Jan 2015 20:11:15 +1100]   17657   phabricator 10.0.0.1    josh    PhabricatorNotificationIndividualController -   /notification/individual/-200   180217
```

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T5344

Differential Revision: https://secure.phabricator.com/D11360
2015-01-16 07:05:31 +11:00
..
aphlict Multiplex AJAX calls 2015-01-16 07:05:31 +11:00
auth Add Persona auth provider 2013-10-14 14:34:57 -07:00
config Remove unused JavaScript variables. 2014-06-24 03:27:47 +10:00
conpherence Multiplex AJAX calls 2015-01-16 07:05:31 +11:00
countdown Define JavaScript functions before they are used 2014-12-30 02:53:32 -08:00
dashboard Fix various spelling mistakes 2014-07-13 00:45:33 +10:00
differential Define diff as a local variable 2014-12-30 02:58:51 -08:00
diffusion Change double quotes to single quotes in JavaScript. 2014-06-24 03:35:39 +10:00
doorkeeper Various linter fixes. 2014-02-26 12:44:58 -08:00
files Various linter fixes. 2014-02-26 12:44:58 -08:00
herald T5015, Allow Herald rules for Maniphest to act on task status changes 2014-11-12 12:55:24 -08:00
maniphest Fix str being defined as a global variable 2014-12-30 02:57:53 -08:00
owners Change double quotes to single quotes in JavaScript. 2014-06-24 03:35:39 +10:00
passphrase Remove unused JavaScript variables. 2014-06-24 03:27:47 +10:00
phame Remove unused JavaScript variables. 2014-06-24 03:27:47 +10:00
pholio Fix next_src being defined as a global variable 2014-12-30 02:56:50 -08:00
phortune Define JavaScript functions before they are used 2014-12-30 02:53:32 -08:00
policy Mostly modernize the policy control typeahead 2014-07-17 15:56:20 -07:00
ponder Remove unused JavaScript variables. 2014-06-24 03:27:47 +10:00
projects Workboards - on edit, remove a task if no longer associated with workboard 2015-01-06 13:28:35 -08:00
releeph Remove @group annotations 2014-07-10 08:12:48 +10:00
repository Remove unused JavaScript variables. 2014-06-24 03:27:47 +10:00
search Remove unused JavaScript variables. 2014-06-24 03:27:47 +10:00
slowvote Remove unused JavaScript variables. 2014-06-24 03:27:47 +10:00
transactions Transactions - change show all key from "~" to "@" 2014-12-12 11:23:56 -08:00
uiexample Use window.confirm instead of confirm 2014-12-30 02:55:12 -08:00