phorge/src/applications/config/controller/services/PhabricatorConfigServicesController.php
epriestley cb481f36c5 Carve out a separate "Services" section of Config
Summary: Depends on D20930. Ref T13362. Put all the "Services" parts of Config in their own section.

Test Plan: Clicked through each section. This is just an organization / UI change with no significant behavioral impact.

Maniphest Tasks: T13362

Differential Revision: https://secure.phabricator.com/D20931
2020-02-04 06:47:31 -08:00

70 lines
1.9 KiB
PHP

<?php
abstract class PhabricatorConfigServicesController
extends PhabricatorConfigController {
public function newNavigation($select_filter) {
$services_uri = $this->getApplicationURI();
$nav = id(new AphrontSideNavFilterView())
->setBaseURI(new PhutilURI($services_uri));
$nav->addLabel(pht('Databases'));
$nav->newLink('database-servers')
->setName(pht('Database Servers'))
->setIcon('fa-database')
->setHref(urisprintf('%s%s/', $services_uri, 'cluster/databases'));
$nav->newLink('schemata')
->setName(pht('Database Schemata'))
->setIcon('fa-table')
->setHref(urisprintf('%s%s/', $services_uri, 'database'));
$nav->newLink('schemata-issues')
->setName(pht('Schemata Issues'))
->setIcon('fa-exclamation-circle')
->setHref(urisprintf('%s%s/', $services_uri, 'dbissue'));
$nav->addLabel(pht('Cache'));
$nav->newLink('cache')
->setName(pht('Cache Status'))
->setIcon('fa-archive')
->setHref(urisprintf('%s%s/', $services_uri, 'cache'));
$nav->addLabel(pht('Other Services'));
$nav->newLink('notification-servers')
->setName(pht('Notification Servers'))
->setIcon('fa-bell-o')
->setHref(urisprintf('%s%s/', $services_uri, 'cluster/notifications'));
$nav->newLink('repository-servers')
->setName(pht('Repository Servers'))
->setIcon('fa-code')
->setHref(urisprintf('%s%s/', $services_uri, 'cluster/repositories'));
$nav->newLink('search-servers')
->setName(pht('Search Servers'))
->setIcon('fa-search')
->setHref(urisprintf('%s%s/', $services_uri, 'cluster/search'));
if ($select_filter) {
$nav->selectFilter($select_filter);
}
return $nav;
}
public function newCrumbs() {
$services_uri = $this->getApplicationURI('cluster/databases/');
return $this->buildApplicationCrumbs()
->addTextCrumb(pht('Services'))
->setBorder(true);
}
}