3 final class PhabricatorFilesApplicationStorageEnginePanel
4 extends PhabricatorApplicationConfigurationPanel
{
6 public function getPanelKey() {
10 public function shouldShowForApplication(
11 PhabricatorApplication
$application) {
12 return ($application instanceof PhabricatorFilesApplication
);
15 public function buildConfigurationPagePanel() {
16 $viewer = $this->getViewer();
17 $application = $this->getApplication();
19 $engines = PhabricatorFileStorageEngine
::loadAllEngines();
20 $writable_engines = PhabricatorFileStorageEngine
::loadWritableEngines();
21 $chunk_engines = PhabricatorFileStorageEngine
::loadWritableChunkEngines();
28 foreach ($engines as $key => $engine) {
29 if ($engine->isTestEngine()) {
34 if ($engine->hasFilesizeLimit()) {
35 $limit = phutil_format_bytes($engine->getFilesizeLimit());
37 $limit = pht('Unlimited');
40 if ($engine->canWriteFiles()) {
46 if (isset($writable_engines[$key]) ||
isset($chunk_engines[$key])) {
47 $rowc[] = 'highlighted';
60 $table = id(new AphrontTableView($rows))
61 ->setNoDataString(pht('No storage engines available.'))
69 ->setRowClasses($rowc)
78 $box = id(new PHUIObjectBoxView())
79 ->setHeaderText(pht('Storage Engines'))
85 public function handlePanelRequest(
86 AphrontRequest
$request,
87 PhabricatorController
$controller) {
88 return new Aphront404Response();