Differential D25091 Diff 395 src/applications/system/controller/PhabricatorSystemReadOnlyController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/system/controller/PhabricatorSystemReadOnlyController.php
Show All 10 Lines | public function handleRequest(AphrontRequest $request) { | ||||
$viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
$reason = $request->getURIData('reason'); | $reason = $request->getURIData('reason'); | ||||
$body = array(); | $body = array(); | ||||
switch ($reason) { | switch ($reason) { | ||||
case PhabricatorEnv::READONLY_CONFIG: | case PhabricatorEnv::READONLY_CONFIG: | ||||
$title = pht('Administrative Read-Only Mode'); | $title = pht('Administrative Read-Only Mode'); | ||||
$body[] = pht( | $body[] = pht( | ||||
'An administrator has placed this server into read-only mode.'); | 'An Administrator has placed this server into read-only mode.'); | ||||
$body[] = pht( | $body[] = pht( | ||||
'This mode may be used to perform temporary maintenance, test '. | 'This mode may be used to perform temporary maintenance, test '. | ||||
'configuration, or archive an installation permanently.'); | 'configuration, or archive an installation permanently.'); | ||||
$body[] = pht( | $body[] = pht( | ||||
'Read-only mode was enabled by the explicit action of a human '. | 'Read-only mode was enabled by the explicit action of a human '. | ||||
'administrator, so you can get more information about why it '. | 'administrator, so you can get more information about why it '. | ||||
'has been turned on by rolling your chair away from your desk and '. | 'has been turned on by rolling your chair away from your desk and '. | ||||
'yelling "Hey! Why is %s in read-only mode??!" using '. | 'yelling "Hey! Why is %s in read-only mode??!" using '. | ||||
'your very loudest outside voice.', | 'your very loudest outside voice.', | ||||
PlatformSymbols::getPlatformServerSymbol()); | PlatformSymbols::getPlatformServerName()); | ||||
$body[] = pht( | $body[] = pht( | ||||
'This mode is active because it is enabled in the configuration '. | 'This mode is active because it is enabled in the configuration '. | ||||
'option "%s".', | 'option "%s".', | ||||
phutil_tag('tt', array(), 'cluster.read-only')); | phutil_tag('tt', array(), 'cluster.read-only')); | ||||
$button = pht('Wait Patiently'); | $button = pht('Wait Patiently'); | ||||
break; | break; | ||||
case PhabricatorEnv::READONLY_MASTERLESS: | case PhabricatorEnv::READONLY_MASTERLESS: | ||||
$title = pht('No Writable Database'); | $title = pht('No Writable Database'); | ||||
▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | public function handleRequest(AphrontRequest $request) { | ||||
$body[] = pht( | $body[] = pht( | ||||
'In read-only mode you can read existing information, but you will not '. | 'In read-only mode you can read existing information, but you will not '. | ||||
'be able to edit objects or create new objects until this mode is '. | 'be able to edit objects or create new objects until this mode is '. | ||||
'disabled.'); | 'disabled.'); | ||||
if ($viewer->getIsAdmin()) { | if ($viewer->getIsAdmin()) { | ||||
$body[] = pht( | $body[] = pht( | ||||
'As an administrator, you can review status information from the '. | 'As an Administrator, you can review status information from the '. | ||||
'%s control panel. This may provide more information about the '. | '%s control panel. This may provide more information about the '. | ||||
'current state of affairs.', | 'current state of affairs.', | ||||
phutil_tag( | phutil_tag( | ||||
'a', | 'a', | ||||
array( | array( | ||||
'href' => '/config/cluster/databases/', | 'href' => '/config/cluster/databases/', | ||||
), | ), | ||||
pht('Cluster Database Status'))); | pht('Cluster Database Status'))); | ||||
Show All 14 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0