@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix Search Application Config

Summary: Fix T12924. Looks like this melted in D17384, and nobody noticed yet.

Test Plan: Visit page, see fancy table.

Reviewers: epriestley, 20after4, #blessed_reviewers

Reviewed By: epriestley, 20after4, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T12924

Differential Revision: https://secure.phabricator.com/D18230

authored by

Aviv Eyal and committed by
avivey
d1f144b2 887ac740

+27 -20
+27 -20
src/applications/search/applicationpanel/PhabricatorSearchApplicationStorageEnginePanel.php
··· 16 16 $viewer = $this->getViewer(); 17 17 $application = $this->getApplication(); 18 18 19 - $active_engine = PhabricatorFulltextStorageEngine::loadEngine(); 20 - $engines = PhabricatorFulltextStorageEngine::loadAllEngines(); 19 + $services = PhabricatorSearchService::getAllServices(); 21 20 22 21 $rows = array(); 23 22 $rowc = array(); 24 23 25 - foreach ($engines as $key => $engine) { 24 + foreach ($services as $key => $service) { 26 25 try { 27 - $index_exists = $engine->indexExists() ? pht('Yes') : pht('No'); 26 + $name = $service->getDisplayName(); 28 27 } catch (Exception $ex) { 29 - $index_exists = pht('N/A'); 28 + $name = phutil_tag('em', array(), pht('Error')); 30 29 } 31 30 32 31 try { 33 - $index_is_sane = $engine->indexIsSane() ? pht('Yes') : pht('No'); 32 + $can_read = $service->isReadable() ? pht('Yes') : pht('No'); 34 33 } catch (Exception $ex) { 35 - $index_is_sane = pht('N/A'); 34 + $can_read = pht('N/A'); 36 35 } 37 36 38 - if ($engine == $active_engine) { 39 - $rowc[] = 'highlighted'; 40 - } else { 41 - $rowc[] = null; 37 + try { 38 + $can_write = $service->isWritable() ? pht('Yes') : pht('No'); 39 + } catch (Exception $ex) { 40 + $can_write = pht('N/A'); 42 41 } 43 42 44 43 $rows[] = array( 45 - $key, 46 - get_class($engine), 47 - $index_exists, 48 - $index_is_sane, 44 + $name, 45 + $can_read, 46 + $can_write, 49 47 ); 50 48 } 51 49 50 + $instructions = pht( 51 + 'To configure the search engines, edit [[ %s | `%s` ]] configuration. '. 52 + 'See **[[ %s | %s ]]** for documentation.', 53 + '/config/edit/cluster.search/', 54 + 'cluster.search', 55 + PhabricatorEnv::getDoclink('Cluster: Search'), 56 + pht('Cluster: Search')); 57 + 58 + 52 59 $table = id(new AphrontTableView($rows)) 53 60 ->setNoDataString(pht('No search engines available.')) 61 + ->setNotice(new PHUIRemarkupView($viewer, $instructions)) 54 62 ->setHeaders( 55 63 array( 56 - pht('Key'), 57 - pht('Class'), 58 - pht('Index Exists'), 59 - pht('Index Is Sane'), 64 + pht('Engine Name'), 65 + pht('Writable'), 66 + pht('Readable'), 60 67 )) 61 68 ->setRowClasses($rowc) 62 69 ->setColumnClasses( 63 70 array( 64 - '', 65 71 'wide', 72 + '', 66 73 '', 67 74 )); 68 75