3 final class PhabricatorSearchApplicationStorageEnginePanel
4 extends PhabricatorApplicationConfigurationPanel
{
6 public function getPanelKey() {
10 public function shouldShowForApplication(
11 PhabricatorApplication
$application) {
12 return $application instanceof PhabricatorSearchApplication
;
15 public function buildConfigurationPagePanel() {
16 $viewer = $this->getViewer();
17 $application = $this->getApplication();
19 $services = PhabricatorSearchService
::getAllServices();
24 foreach ($services as $key => $service) {
26 $name = $service->getDisplayName();
27 } catch (Exception
$ex) {
28 $name = phutil_tag('em', array(), pht('Error'));
32 $can_read = $service->isReadable() ?
pht('Yes') : pht('No');
33 } catch (Exception
$ex) {
34 $can_read = pht('N/A');
38 $can_write = $service->isWritable() ?
pht('Yes') : pht('No');
39 } catch (Exception
$ex) {
40 $can_write = pht('N/A');
51 'To configure the search engines, edit [[ %s | `%s` ]] configuration. '.
52 'See **[[ %s | %s ]]** for documentation.',
53 '/config/edit/cluster.search/',
55 PhabricatorEnv
::getDoclink('Cluster: Search'),
56 pht('Cluster: Search'));
59 $table = id(new AphrontTableView($rows))
60 ->setNoDataString(pht('No search engines available.'))
61 ->setNotice(new PHUIRemarkupView($viewer, $instructions))
68 ->setRowClasses($rowc)
76 $box = id(new PHUIObjectBoxView())
77 ->setHeaderText(pht('Search Engines'))
78 ->appendChild($table);
83 public function handlePanelRequest(
84 AphrontRequest
$request,
85 PhabricatorController
$controller) {
86 return new Aphront404Response();