mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
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
This commit is contained in:
parent
a72ade9475
commit
cb481f36c5
11 changed files with 122 additions and 78 deletions
|
@ -2801,22 +2801,22 @@ phutil_register_library_map(array(
|
|||
'PhabricatorConfigAllController' => 'applications/config/controller/PhabricatorConfigAllController.php',
|
||||
'PhabricatorConfigApplication' => 'applications/config/application/PhabricatorConfigApplication.php',
|
||||
'PhabricatorConfigApplicationController' => 'applications/config/controller/PhabricatorConfigApplicationController.php',
|
||||
'PhabricatorConfigCacheController' => 'applications/config/controller/PhabricatorConfigCacheController.php',
|
||||
'PhabricatorConfigClusterDatabasesController' => 'applications/config/controller/PhabricatorConfigClusterDatabasesController.php',
|
||||
'PhabricatorConfigClusterNotificationsController' => 'applications/config/controller/PhabricatorConfigClusterNotificationsController.php',
|
||||
'PhabricatorConfigClusterRepositoriesController' => 'applications/config/controller/PhabricatorConfigClusterRepositoriesController.php',
|
||||
'PhabricatorConfigClusterSearchController' => 'applications/config/controller/PhabricatorConfigClusterSearchController.php',
|
||||
'PhabricatorConfigCacheController' => 'applications/config/controller/services/PhabricatorConfigCacheController.php',
|
||||
'PhabricatorConfigClusterDatabasesController' => 'applications/config/controller/services/PhabricatorConfigClusterDatabasesController.php',
|
||||
'PhabricatorConfigClusterNotificationsController' => 'applications/config/controller/services/PhabricatorConfigClusterNotificationsController.php',
|
||||
'PhabricatorConfigClusterRepositoriesController' => 'applications/config/controller/services/PhabricatorConfigClusterRepositoriesController.php',
|
||||
'PhabricatorConfigClusterSearchController' => 'applications/config/controller/services/PhabricatorConfigClusterSearchController.php',
|
||||
'PhabricatorConfigCollectorsModule' => 'applications/config/module/PhabricatorConfigCollectorsModule.php',
|
||||
'PhabricatorConfigColumnSchema' => 'applications/config/schema/PhabricatorConfigColumnSchema.php',
|
||||
'PhabricatorConfigConfigPHIDType' => 'applications/config/phid/PhabricatorConfigConfigPHIDType.php',
|
||||
'PhabricatorConfigConstants' => 'applications/config/constants/PhabricatorConfigConstants.php',
|
||||
'PhabricatorConfigController' => 'applications/config/controller/PhabricatorConfigController.php',
|
||||
'PhabricatorConfigCoreSchemaSpec' => 'applications/config/schema/PhabricatorConfigCoreSchemaSpec.php',
|
||||
'PhabricatorConfigDatabaseController' => 'applications/config/controller/PhabricatorConfigDatabaseController.php',
|
||||
'PhabricatorConfigDatabaseIssueController' => 'applications/config/controller/PhabricatorConfigDatabaseIssueController.php',
|
||||
'PhabricatorConfigDatabaseController' => 'applications/config/controller/services/PhabricatorConfigDatabaseController.php',
|
||||
'PhabricatorConfigDatabaseIssueController' => 'applications/config/controller/services/PhabricatorConfigDatabaseIssueController.php',
|
||||
'PhabricatorConfigDatabaseSchema' => 'applications/config/schema/PhabricatorConfigDatabaseSchema.php',
|
||||
'PhabricatorConfigDatabaseSource' => 'infrastructure/env/PhabricatorConfigDatabaseSource.php',
|
||||
'PhabricatorConfigDatabaseStatusController' => 'applications/config/controller/PhabricatorConfigDatabaseStatusController.php',
|
||||
'PhabricatorConfigDatabaseStatusController' => 'applications/config/controller/services/PhabricatorConfigDatabaseStatusController.php',
|
||||
'PhabricatorConfigDefaultSource' => 'infrastructure/env/PhabricatorConfigDefaultSource.php',
|
||||
'PhabricatorConfigDictionarySource' => 'infrastructure/env/PhabricatorConfigDictionarySource.php',
|
||||
'PhabricatorConfigEdgeModule' => 'applications/config/module/PhabricatorConfigEdgeModule.php',
|
||||
|
@ -2861,6 +2861,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorConfigSchemaQuery' => 'applications/config/schema/PhabricatorConfigSchemaQuery.php',
|
||||
'PhabricatorConfigSchemaSpec' => 'applications/config/schema/PhabricatorConfigSchemaSpec.php',
|
||||
'PhabricatorConfigServerSchema' => 'applications/config/schema/PhabricatorConfigServerSchema.php',
|
||||
'PhabricatorConfigServicesController' => 'applications/config/controller/services/PhabricatorConfigServicesController.php',
|
||||
'PhabricatorConfigSetupCheckModule' => 'applications/config/module/PhabricatorConfigSetupCheckModule.php',
|
||||
'PhabricatorConfigSiteModule' => 'applications/config/module/PhabricatorConfigSiteModule.php',
|
||||
'PhabricatorConfigSiteSource' => 'infrastructure/env/PhabricatorConfigSiteSource.php',
|
||||
|
@ -9134,18 +9135,18 @@ phutil_register_library_map(array(
|
|||
'PhabricatorConfigAllController' => 'PhabricatorConfigController',
|
||||
'PhabricatorConfigApplication' => 'PhabricatorApplication',
|
||||
'PhabricatorConfigApplicationController' => 'PhabricatorConfigController',
|
||||
'PhabricatorConfigCacheController' => 'PhabricatorConfigController',
|
||||
'PhabricatorConfigClusterDatabasesController' => 'PhabricatorConfigController',
|
||||
'PhabricatorConfigClusterNotificationsController' => 'PhabricatorConfigController',
|
||||
'PhabricatorConfigClusterRepositoriesController' => 'PhabricatorConfigController',
|
||||
'PhabricatorConfigClusterSearchController' => 'PhabricatorConfigController',
|
||||
'PhabricatorConfigCacheController' => 'PhabricatorConfigServicesController',
|
||||
'PhabricatorConfigClusterDatabasesController' => 'PhabricatorConfigServicesController',
|
||||
'PhabricatorConfigClusterNotificationsController' => 'PhabricatorConfigServicesController',
|
||||
'PhabricatorConfigClusterRepositoriesController' => 'PhabricatorConfigServicesController',
|
||||
'PhabricatorConfigClusterSearchController' => 'PhabricatorConfigServicesController',
|
||||
'PhabricatorConfigCollectorsModule' => 'PhabricatorConfigModule',
|
||||
'PhabricatorConfigColumnSchema' => 'PhabricatorConfigStorageSchema',
|
||||
'PhabricatorConfigConfigPHIDType' => 'PhabricatorPHIDType',
|
||||
'PhabricatorConfigConstants' => 'Phobject',
|
||||
'PhabricatorConfigController' => 'PhabricatorController',
|
||||
'PhabricatorConfigCoreSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||
'PhabricatorConfigDatabaseController' => 'PhabricatorConfigController',
|
||||
'PhabricatorConfigDatabaseController' => 'PhabricatorConfigServicesController',
|
||||
'PhabricatorConfigDatabaseIssueController' => 'PhabricatorConfigDatabaseController',
|
||||
'PhabricatorConfigDatabaseSchema' => 'PhabricatorConfigStorageSchema',
|
||||
'PhabricatorConfigDatabaseSource' => 'PhabricatorConfigProxySource',
|
||||
|
@ -9198,6 +9199,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorConfigSchemaQuery' => 'Phobject',
|
||||
'PhabricatorConfigSchemaSpec' => 'Phobject',
|
||||
'PhabricatorConfigServerSchema' => 'PhabricatorConfigStorageSchema',
|
||||
'PhabricatorConfigServicesController' => 'PhabricatorConfigController',
|
||||
'PhabricatorConfigSetupCheckModule' => 'PhabricatorConfigModule',
|
||||
'PhabricatorConfigSiteModule' => 'PhabricatorConfigModule',
|
||||
'PhabricatorConfigSiteSource' => 'PhabricatorConfigProxySource',
|
||||
|
|
|
@ -25,23 +25,6 @@ abstract class PhabricatorConfigController extends PhabricatorController {
|
|||
pht('Setup Issues'), null, 'fa-warning');
|
||||
$nav->addFilter(null,
|
||||
pht('Installation Guide'), $guide_href, 'fa-book');
|
||||
$nav->addLabel(pht('Database'));
|
||||
$nav->addFilter('database/',
|
||||
pht('Database Status'), null, 'fa-heartbeat');
|
||||
$nav->addFilter('dbissue/',
|
||||
pht('Database Issues'), null, 'fa-exclamation-circle');
|
||||
$nav->addLabel(pht('Cache'));
|
||||
$nav->addFilter('cache/',
|
||||
pht('Cache Status'), null, 'fa-home');
|
||||
$nav->addLabel(pht('Cluster'));
|
||||
$nav->addFilter('cluster/databases/',
|
||||
pht('Database Servers'), null, 'fa-database');
|
||||
$nav->addFilter('cluster/notifications/',
|
||||
pht('Notification Servers'), null, 'fa-bell-o');
|
||||
$nav->addFilter('cluster/repositories/',
|
||||
pht('Repository Servers'), null, 'fa-code');
|
||||
$nav->addFilter('cluster/search/',
|
||||
pht('Search Servers'), null, 'fa-search');
|
||||
|
||||
return $nav;
|
||||
}
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorConfigCacheController
|
||||
extends PhabricatorConfigController {
|
||||
extends PhabricatorConfigServicesController {
|
||||
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$nav = $this->buildSideNavView();
|
||||
$nav->selectFilter('cache/');
|
||||
|
||||
$purge_button = id(new PHUIButtonView())
|
||||
->setText(pht('Purge Caches'))
|
||||
|
@ -27,14 +25,15 @@ final class PhabricatorConfigCacheController
|
|||
$data_box,
|
||||
);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
$crumbs = $this->newCrumbs()
|
||||
->addTextCrumb($title);
|
||||
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter($page);
|
||||
|
||||
$nav = $this->newNavigation('cache');
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
|
@ -92,10 +91,12 @@ final class PhabricatorConfigCacheController
|
|||
'n',
|
||||
'n',
|
||||
));
|
||||
|
||||
$table = $this->buildConfigBoxView(pht('Cache Storage'), $table);
|
||||
}
|
||||
|
||||
$properties = $this->buildConfigBoxView(pht('Data Cache'), $properties);
|
||||
$table = $this->buildConfigBoxView(pht('Cache Storage'), $table);
|
||||
|
||||
return array($properties, $table);
|
||||
}
|
||||
|
|
@ -1,13 +1,12 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorConfigClusterDatabasesController
|
||||
extends PhabricatorConfigController {
|
||||
extends PhabricatorConfigServicesController {
|
||||
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$nav = $this->buildSideNavView();
|
||||
$nav->selectFilter('cluster/databases/');
|
||||
$nav = $this->newNavigation('database-servers');
|
||||
|
||||
$title = pht('Cluster Database Status');
|
||||
$title = pht('Database Servers');
|
||||
$doc_href = PhabricatorEnv::getDoclink('Cluster: Databases');
|
||||
$button = id(new PHUIButtonView())
|
||||
->setIcon('fa-book')
|
||||
|
@ -20,9 +19,8 @@ final class PhabricatorConfigClusterDatabasesController
|
|||
$database_status = $this->buildClusterDatabaseStatus();
|
||||
$status = $this->buildConfigBoxView(pht('Status'), $database_status);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
$crumbs = $this->newCrumbs()
|
||||
->addTextCrumb($title);
|
||||
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
|
@ -1,13 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorConfigClusterNotificationsController
|
||||
extends PhabricatorConfigController {
|
||||
extends PhabricatorConfigServicesController {
|
||||
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$nav = $this->buildSideNavView();
|
||||
$nav->selectFilter('cluster/notifications/');
|
||||
|
||||
$title = pht('Cluster Notifications');
|
||||
$title = pht('Notification Servers');
|
||||
$doc_href = PhabricatorEnv::getDoclink('Cluster: Notifications');
|
||||
$button = id(new PHUIButtonView())
|
||||
->setIcon('fa-book')
|
||||
|
@ -22,14 +19,15 @@ final class PhabricatorConfigClusterNotificationsController
|
|||
pht('Notifications Status'),
|
||||
$notification_status);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
$crumbs = $this->newCrumbs()
|
||||
->addTextCrumb($title);
|
||||
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter($status);
|
||||
|
||||
$nav = $this->newNavigation('notification-servers');
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
|
@ -1,13 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorConfigClusterRepositoriesController
|
||||
extends PhabricatorConfigController {
|
||||
extends PhabricatorConfigServicesController {
|
||||
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$nav = $this->buildSideNavView();
|
||||
$nav->selectFilter('cluster/repositories/');
|
||||
|
||||
$title = pht('Cluster Repository Status');
|
||||
$title = pht('Repository Services');
|
||||
|
||||
$doc_href = PhabricatorEnv::getDoclink('Cluster: Repositories');
|
||||
$button = id(new PHUIButtonView())
|
||||
|
@ -26,9 +23,8 @@ final class PhabricatorConfigClusterRepositoriesController
|
|||
$repo_errors = $this->buildConfigBoxView(
|
||||
pht('Repository Errors'), $repository_errors);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
$crumbs = $this->newCrumbs()
|
||||
->addTextCrumb($title);
|
||||
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
|
@ -38,6 +34,8 @@ final class PhabricatorConfigClusterRepositoriesController
|
|||
$repo_errors,
|
||||
));
|
||||
|
||||
$nav = $this->newNavigation('repository-servers');
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
|
@ -1,13 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorConfigClusterSearchController
|
||||
extends PhabricatorConfigController {
|
||||
extends PhabricatorConfigServicesController {
|
||||
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$nav = $this->buildSideNavView();
|
||||
$nav->selectFilter('cluster/search/');
|
||||
|
||||
$title = pht('Cluster Search');
|
||||
$title = pht('Search Servers');
|
||||
$doc_href = PhabricatorEnv::getDoclink('Cluster: Search');
|
||||
|
||||
$button = id(new PHUIButtonView())
|
||||
|
@ -20,14 +17,15 @@ final class PhabricatorConfigClusterSearchController
|
|||
|
||||
$search_status = $this->buildClusterSearchStatus();
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
$crumbs = $this->newCrumbs()
|
||||
->addTextCrumb($title);
|
||||
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter($search_status);
|
||||
|
||||
$nav = $this->newNavigation('search-servers');
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
abstract class PhabricatorConfigDatabaseController
|
||||
extends PhabricatorConfigController {
|
||||
extends PhabricatorConfigServicesController {
|
||||
|
||||
protected function renderIcon($status) {
|
||||
switch ($status) {
|
|
@ -153,15 +153,14 @@ final class PhabricatorConfigDatabaseIssueController
|
|||
new PhutilNumber($counts[PhabricatorConfigStorageSchema::STATUS_WARN]));
|
||||
}
|
||||
|
||||
$title = pht('Database Issues');
|
||||
$title = pht('Schemata Issues');
|
||||
$header = $this->buildHeaderView($title);
|
||||
|
||||
$nav = $this->buildSideNavView();
|
||||
$nav->selectFilter('dbissue/');
|
||||
$nav = $this->newNavigation('schemata-issues');
|
||||
|
||||
$view = $this->buildConfigBoxView(pht('Issues'), $table);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
$crumbs = $this->newCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
|
|
@ -71,8 +71,7 @@ final class PhabricatorConfigDatabaseStatusController
|
|||
}
|
||||
|
||||
private function buildResponse($title, $body) {
|
||||
$nav = $this->buildSideNavView();
|
||||
$nav->selectFilter('database/');
|
||||
$nav = $this->newNavigation('schemata');
|
||||
|
||||
if (!$title) {
|
||||
$title = pht('Database Status');
|
||||
|
@ -118,8 +117,7 @@ final class PhabricatorConfigDatabaseStatusController
|
|||
);
|
||||
}
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->setBorder(true);
|
||||
$crumbs = $this->newCrumbs();
|
||||
|
||||
$last_key = last_key($links);
|
||||
foreach ($links as $link_key => $link) {
|
|
@ -0,0 +1,69 @@
|
|||
<?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);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue