mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
Remove the repositories application
Summary: Fixes T7603. This application is no longer used. Test Plan: Went to `/repository/` and got a 404. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley Maniphest Tasks: T7603 Differential Revision: https://secure.phabricator.com/D12734
This commit is contained in:
parent
7bea116b00
commit
c4bcfc85f1
4 changed files with 0 additions and 159 deletions
|
@ -2388,7 +2388,6 @@ phutil_register_library_map(array(
|
|||
'PhabricatorRemarkupFigletBlockInterpreter' => 'infrastructure/markup/interpreter/PhabricatorRemarkupFigletBlockInterpreter.php',
|
||||
'PhabricatorRemarkupGraphvizBlockInterpreter' => 'infrastructure/markup/interpreter/PhabricatorRemarkupGraphvizBlockInterpreter.php',
|
||||
'PhabricatorRemarkupUIExample' => 'applications/uiexample/examples/PhabricatorRemarkupUIExample.php',
|
||||
'PhabricatorRepositoriesApplication' => 'applications/repository/application/PhabricatorRepositoriesApplication.php',
|
||||
'PhabricatorRepositoriesSetupCheck' => 'applications/config/check/PhabricatorRepositoriesSetupCheck.php',
|
||||
'PhabricatorRepository' => 'applications/repository/storage/PhabricatorRepository.php',
|
||||
'PhabricatorRepositoryArcanistProject' => 'applications/repository/storage/PhabricatorRepositoryArcanistProject.php',
|
||||
|
@ -2407,7 +2406,6 @@ phutil_register_library_map(array(
|
|||
'PhabricatorRepositoryCommitRef' => 'applications/repository/engine/PhabricatorRepositoryCommitRef.php',
|
||||
'PhabricatorRepositoryCommitSearchIndexer' => 'applications/repository/search/PhabricatorRepositoryCommitSearchIndexer.php',
|
||||
'PhabricatorRepositoryConfigOptions' => 'applications/repository/config/PhabricatorRepositoryConfigOptions.php',
|
||||
'PhabricatorRepositoryController' => 'applications/repository/controller/PhabricatorRepositoryController.php',
|
||||
'PhabricatorRepositoryDAO' => 'applications/repository/storage/PhabricatorRepositoryDAO.php',
|
||||
'PhabricatorRepositoryDiscoveryEngine' => 'applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php',
|
||||
'PhabricatorRepositoryEditor' => 'applications/repository/editor/PhabricatorRepositoryEditor.php',
|
||||
|
@ -2416,7 +2414,6 @@ phutil_register_library_map(array(
|
|||
'PhabricatorRepositoryGitCommitMessageParserWorker' => 'applications/repository/worker/commitmessageparser/PhabricatorRepositoryGitCommitMessageParserWorker.php',
|
||||
'PhabricatorRepositoryGraphCache' => 'applications/repository/graphcache/PhabricatorRepositoryGraphCache.php',
|
||||
'PhabricatorRepositoryGraphStream' => 'applications/repository/daemon/PhabricatorRepositoryGraphStream.php',
|
||||
'PhabricatorRepositoryListController' => 'applications/repository/controller/PhabricatorRepositoryListController.php',
|
||||
'PhabricatorRepositoryManagementCacheWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementCacheWorkflow.php',
|
||||
'PhabricatorRepositoryManagementDiscoverWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementDiscoverWorkflow.php',
|
||||
'PhabricatorRepositoryManagementEditWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementEditWorkflow.php',
|
||||
|
@ -5824,7 +5821,6 @@ phutil_register_library_map(array(
|
|||
'PhabricatorRemarkupFigletBlockInterpreter' => 'PhutilRemarkupBlockInterpreter',
|
||||
'PhabricatorRemarkupGraphvizBlockInterpreter' => 'PhutilRemarkupBlockInterpreter',
|
||||
'PhabricatorRemarkupUIExample' => 'PhabricatorUIExample',
|
||||
'PhabricatorRepositoriesApplication' => 'PhabricatorApplication',
|
||||
'PhabricatorRepositoriesSetupCheck' => 'PhabricatorSetupCheck',
|
||||
'PhabricatorRepository' => array(
|
||||
'PhabricatorRepositoryDAO',
|
||||
|
@ -5868,14 +5864,12 @@ phutil_register_library_map(array(
|
|||
'PhabricatorRepositoryCommitParserWorker' => 'PhabricatorWorker',
|
||||
'PhabricatorRepositoryCommitSearchIndexer' => 'PhabricatorSearchDocumentIndexer',
|
||||
'PhabricatorRepositoryConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
||||
'PhabricatorRepositoryController' => 'PhabricatorController',
|
||||
'PhabricatorRepositoryDAO' => 'PhabricatorLiskDAO',
|
||||
'PhabricatorRepositoryDiscoveryEngine' => 'PhabricatorRepositoryEngine',
|
||||
'PhabricatorRepositoryEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||
'PhabricatorRepositoryGitCommitChangeParserWorker' => 'PhabricatorRepositoryCommitChangeParserWorker',
|
||||
'PhabricatorRepositoryGitCommitMessageParserWorker' => 'PhabricatorRepositoryCommitMessageParserWorker',
|
||||
'PhabricatorRepositoryGraphStream' => 'Phobject',
|
||||
'PhabricatorRepositoryListController' => 'PhabricatorRepositoryController',
|
||||
'PhabricatorRepositoryManagementCacheWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
|
||||
'PhabricatorRepositoryManagementDiscoverWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
|
||||
'PhabricatorRepositoryManagementEditWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorRepositoriesApplication extends PhabricatorApplication {
|
||||
|
||||
public function getBaseURI() {
|
||||
return '/repository/';
|
||||
}
|
||||
|
||||
public function getFontIcon() {
|
||||
return 'fa-hdd-o';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Repositories');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('(Deprecated)');
|
||||
}
|
||||
|
||||
public function getTitleGlyph() {
|
||||
return 'rX';
|
||||
}
|
||||
|
||||
public function getApplicationGroup() {
|
||||
return self::GROUP_ADMIN;
|
||||
}
|
||||
|
||||
public function getRoutes() {
|
||||
return array(
|
||||
'/repository/' => array(
|
||||
'' => 'PhabricatorRepositoryListController',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
|
||||
abstract class PhabricatorRepositoryController extends PhabricatorController {
|
||||
|
||||
public function shouldRequireAdmin() {
|
||||
// Most of these controllers are admin-only.
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function buildApplicationCrumbs() {
|
||||
$crumbs = parent::buildApplicationCrumbs();
|
||||
return $crumbs;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,101 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorRepositoryListController
|
||||
extends PhabricatorRepositoryController {
|
||||
|
||||
public function processRequest() {
|
||||
|
||||
$request = $this->getRequest();
|
||||
$user = $request->getUser();
|
||||
$is_admin = $user->getIsAdmin();
|
||||
|
||||
$repos = id(new PhabricatorRepositoryQuery())
|
||||
->setViewer($user)
|
||||
->execute();
|
||||
$repos = msort($repos, 'getName');
|
||||
|
||||
$rows = array();
|
||||
foreach ($repos as $repo) {
|
||||
|
||||
if ($repo->isTracked()) {
|
||||
$diffusion_link = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/diffusion/'.$repo->getCallsign().'/',
|
||||
),
|
||||
pht('View in Diffusion'));
|
||||
} else {
|
||||
$diffusion_link = phutil_tag('em', array(), pht('Not Tracked'));
|
||||
}
|
||||
|
||||
$rows[] = array(
|
||||
$repo->getCallsign(),
|
||||
$repo->getName(),
|
||||
PhabricatorRepositoryType::getNameForRepositoryType(
|
||||
$repo->getVersionControlSystem()),
|
||||
$diffusion_link,
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'class' => 'button small grey',
|
||||
'href' => '/diffusion/'.$repo->getCallsign().'/edit/',
|
||||
),
|
||||
pht('Edit')),
|
||||
);
|
||||
}
|
||||
|
||||
$table = new AphrontTableView($rows);
|
||||
$table->setNoDataString(pht('No Repositories'));
|
||||
$table->setHeaders(
|
||||
array(
|
||||
pht('Callsign'),
|
||||
pht('Repository'),
|
||||
pht('Type'),
|
||||
pht('Diffusion'),
|
||||
'',
|
||||
));
|
||||
$table->setColumnClasses(
|
||||
array(
|
||||
null,
|
||||
'wide',
|
||||
null,
|
||||
null,
|
||||
'action',
|
||||
));
|
||||
|
||||
$table->setColumnVisibility(
|
||||
array(
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
$is_admin,
|
||||
));
|
||||
|
||||
$panel = new PHUIObjectBoxView();
|
||||
$header = new PHUIHeaderView();
|
||||
$header->setHeader(pht('Repositories'));
|
||||
if ($is_admin) {
|
||||
$button = id(new PHUIButtonView())
|
||||
->setTag('a')
|
||||
->setText(pht('Create New Repository'))
|
||||
->setHref('/diffusion/new/');
|
||||
$header->addActionLink($button);
|
||||
}
|
||||
$panel->setHeader($header);
|
||||
$panel->appendChild($table);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb(pht('Repository List'));
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
$panel,
|
||||
),
|
||||
array(
|
||||
'title' => pht('Repository List'),
|
||||
));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue