2013-01-03 18:29:19 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorNotificationConfigOptions
|
|
|
|
extends PhabricatorApplicationConfigOptions {
|
|
|
|
|
|
|
|
public function getName() {
|
2014-06-09 20:36:49 +02:00
|
|
|
return pht('Notifications');
|
2013-01-03 18:29:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getDescription() {
|
2014-06-09 20:36:49 +02:00
|
|
|
return pht('Configure real-time notifications.');
|
2013-01-03 18:29:19 +01:00
|
|
|
}
|
|
|
|
|
2015-02-02 19:17:25 +01:00
|
|
|
public function getFontIcon() {
|
|
|
|
return 'fa-bell';
|
|
|
|
}
|
|
|
|
|
2015-02-09 22:10:56 +01:00
|
|
|
public function getGroup() {
|
|
|
|
return 'core';
|
|
|
|
}
|
|
|
|
|
2013-01-03 18:29:19 +01:00
|
|
|
public function getOptions() {
|
|
|
|
return array(
|
|
|
|
$this->newOption('notification.enabled', 'bool', false)
|
2013-01-09 17:14:26 +01:00
|
|
|
->setBoolOptions(
|
2013-01-03 18:29:19 +01:00
|
|
|
array(
|
2014-06-09 20:36:49 +02:00
|
|
|
pht('Enable Real-Time Notifications'),
|
|
|
|
pht('Disable Real-Time Notifications'),
|
2013-01-03 18:29:19 +01:00
|
|
|
))
|
|
|
|
->setSummary(pht('Enable real-time notifications.'))
|
|
|
|
->setDescription(
|
|
|
|
pht(
|
|
|
|
"Enable real-time notifications. You must also run a Node.js ".
|
|
|
|
"based notification server for this to work. Consult the ".
|
|
|
|
"documentation in 'Notifications User Guide: Setup and ".
|
|
|
|
"Configuration' for instructions.")),
|
|
|
|
$this->newOption(
|
|
|
|
'notification.client-uri',
|
|
|
|
'string',
|
2013-01-24 21:05:29 +01:00
|
|
|
'http://localhost:22280/')
|
2013-01-03 18:29:19 +01:00
|
|
|
->setDescription(pht('Location of the client server.')),
|
|
|
|
$this->newOption(
|
|
|
|
'notification.server-uri',
|
|
|
|
'string',
|
2013-01-24 21:05:29 +01:00
|
|
|
'http://localhost:22281/')
|
2013-01-03 18:29:19 +01:00
|
|
|
->setDescription(pht('Location of the notification receiver server.')),
|
|
|
|
$this->newOption('notification.log', 'string', '/var/log/aphlict.log')
|
|
|
|
->setDescription(pht('Location of the server log file.')),
|
Rewrite Aphlict to use Websockets
Summary:
Fixes T6559. No more flash, use Websockets. This is less aggressive than the earlier version, and retains more server logic.
- Support "wss".
- Make the client work.
- Remove "notification.user" entirely.
- Seems ok?
Test Plan:
In Safari, Firefox and Chrome, saw the browsers connect. Made a bunch of comments/updates and saw notifications.
Notable holes in the test plan:
- Haven't tested "wss" yet. I'll do this on secure.
- Notifications are //too fast// now, locally. I get them after I hit submit but before the page reloads.
- There are probably some other rough edges, this is a fairly big patch.
Reviewers: joshuaspence, btrahan
Reviewed By: joshuaspence, btrahan
Subscribers: fabe, btrahan, epriestley
Maniphest Tasks: T6713, T6559
Differential Revision: https://secure.phabricator.com/D11143
2015-01-08 19:03:00 +01:00
|
|
|
$this->newOption('notification.ssl-key', 'string', null)
|
|
|
|
->setLocked(true)
|
|
|
|
->setDescription(
|
|
|
|
pht('Path to SSL key to use for secure WebSockets.')),
|
|
|
|
$this->newOption('notification.ssl-cert', 'string', null)
|
|
|
|
->setLocked(true)
|
|
|
|
->setDescription(
|
|
|
|
pht('Path to SSL certificate to use for secure WebSockets.')),
|
2013-01-03 18:29:19 +01:00
|
|
|
$this->newOption(
|
|
|
|
'notification.pidfile',
|
|
|
|
'string',
|
Rewrite Aphlict to use Websockets
Summary:
Fixes T6559. No more flash, use Websockets. This is less aggressive than the earlier version, and retains more server logic.
- Support "wss".
- Make the client work.
- Remove "notification.user" entirely.
- Seems ok?
Test Plan:
In Safari, Firefox and Chrome, saw the browsers connect. Made a bunch of comments/updates and saw notifications.
Notable holes in the test plan:
- Haven't tested "wss" yet. I'll do this on secure.
- Notifications are //too fast// now, locally. I get them after I hit submit but before the page reloads.
- There are probably some other rough edges, this is a fairly big patch.
Reviewers: joshuaspence, btrahan
Reviewed By: joshuaspence, btrahan
Subscribers: fabe, btrahan, epriestley
Maniphest Tasks: T6713, T6559
Differential Revision: https://secure.phabricator.com/D11143
2015-01-08 19:03:00 +01:00
|
|
|
'/var/tmp/aphlict/pid/aphlict.pid')
|
2013-01-03 18:29:19 +01:00
|
|
|
->setDescription(pht('Location of the server PID file.')),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|