Differential D9431 Diff 22523 src/applications/config/option/PhabricatorNotificationConfigOptions.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/option/PhabricatorNotificationConfigOptions.php
| <?php | <?php | ||||
| final class PhabricatorNotificationConfigOptions | final class PhabricatorNotificationConfigOptions | ||||
| extends PhabricatorApplicationConfigOptions { | extends PhabricatorApplicationConfigOptions { | ||||
| public function getName() { | public function getName() { | ||||
| return pht("Notifications"); | return pht('Notifications'); | ||||
| } | } | ||||
| public function getDescription() { | public function getDescription() { | ||||
| return pht("Configure real-time notifications."); | return pht('Configure real-time notifications.'); | ||||
| } | } | ||||
| public function getOptions() { | public function getOptions() { | ||||
| return array( | return array( | ||||
| $this->newOption('notification.enabled', 'bool', false) | $this->newOption('notification.enabled', 'bool', false) | ||||
| ->setBoolOptions( | ->setBoolOptions( | ||||
| array( | array( | ||||
| pht("Enable Real-Time Notifications"), | pht('Enable Real-Time Notifications'), | ||||
| pht("Disable Real-Time Notifications"), | pht('Disable Real-Time Notifications'), | ||||
| )) | )) | ||||
| ->setSummary(pht('Enable real-time notifications.')) | ->setSummary(pht('Enable real-time notifications.')) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht( | pht( | ||||
| "Enable real-time notifications. You must also run a Node.js ". | "Enable real-time notifications. You must also run a Node.js ". | ||||
| "based notification server for this to work. Consult the ". | "based notification server for this to work. Consult the ". | ||||
| "documentation in 'Notifications User Guide: Setup and ". | "documentation in 'Notifications User Guide: Setup and ". | ||||
| "Configuration' for instructions.")), | "Configuration' for instructions.")), | ||||
| $this->newOption( | $this->newOption( | ||||
| 'notification.client-uri', | 'notification.client-uri', | ||||
| 'string', | 'string', | ||||
| 'http://localhost:22280/') | 'http://localhost:22280/') | ||||
| ->setDescription(pht('Location of the client server.')), | ->setDescription(pht('Location of the client server.')), | ||||
| $this->newOption( | $this->newOption( | ||||
| 'notification.server-uri', | 'notification.server-uri', | ||||
| 'string', | 'string', | ||||
| 'http://localhost:22281/') | 'http://localhost:22281/') | ||||
| ->setDescription(pht('Location of the notification receiver server.')), | ->setDescription(pht('Location of the notification receiver server.')), | ||||
| $this->newOption('notification.user', 'string', null) | $this->newOption('notification.user', 'string', null) | ||||
| ->setSummary(pht('Drop permissions to a less-privileged user.')) | ->setSummary(pht('Drop permissions to a less-privileged user.')) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht( | pht( | ||||
| "The notifcation server must be started as root so it can bind ". | 'The notifcation server must be started as root so it can bind '. | ||||
| "to privileged ports, but if you specify a system user here it ". | 'to privileged ports, but if you specify a system user here it '. | ||||
| "will drop permissions to that user after binding to the ports ". | 'will drop permissions to that user after binding to the ports '. | ||||
| "it needs.")), | 'it needs.')), | ||||
| $this->newOption('notification.log', 'string', '/var/log/aphlict.log') | $this->newOption('notification.log', 'string', '/var/log/aphlict.log') | ||||
| ->setDescription(pht('Location of the server log file.')), | ->setDescription(pht('Location of the server log file.')), | ||||
| $this->newOption( | $this->newOption( | ||||
| 'notification.pidfile', | 'notification.pidfile', | ||||
| 'string', | 'string', | ||||
| '/var/run/aphlict.pid') | '/var/run/aphlict.pid') | ||||
| ->setDescription(pht('Location of the server PID file.')), | ->setDescription(pht('Location of the server PID file.')), | ||||
| $this->newOption('notification.debug', 'bool', false) | $this->newOption('notification.debug', 'bool', false) | ||||
| ->setDescription(pht('Enable debug output in the browser.')), | ->setDescription(pht('Enable debug output in the browser.')), | ||||
| ); | ); | ||||
| } | } | ||||
| } | } | ||||