@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.

Convert `./bin/storage status` to use `PhutilConsoleTable`.

Summary: Constructing tables manually just isn't fun.

Test Plan:
```
./bin/storage status
phabricator:db.audit Applied db audit
phabricator:db.calendar Applied db calendar
phabricator:db.chatlog Applied db chatlog
phabricator:db.conduit Applied db conduit
phabricator:db.countdown Applied db countdown
phabricator:db.daemon Applied db daemon
phabricator:db.differential Applied db differential
phabricator:db.draft Applied db draft
phabricator:db.drydock Applied db drydock
phabricator:db.feed Applied db feed
phabricator:db.file Applied db file
phabricator:db.flag Applied db flag
phabricator:db.harbormaster Applied db harbormaster
...
```

This probably isn't ready to land yet, we should fix `PhutilConsoleTable` to truncate columns which would otherwise cause overflow.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

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

+13 -15
+13 -15
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementStatusWorkflow.php
··· 24 24 return 1; 25 25 } 26 26 27 - $len = 0; 28 - foreach ($patches as $patch) { 29 - $len = max($len, strlen($patch->getFullKey())); 30 - } 27 + $table = id(new PhutilConsoleTable()) 28 + ->setShowHeader(false) 29 + ->addColumn('id', array('title' => 'ID')) 30 + ->addColumn('status', array('title' => 'Status')) 31 + ->addColumn('type', array('title' => 'Type')) 32 + ->addColumn('name', array('title' => 'Name')); 31 33 32 34 foreach ($patches as $patch) { 33 - printf( 34 - 35 - "% -".($len + 2)."s ". 36 - "%-".strlen('Not Applied')."s ". 37 - "%-4s ". 38 - "%s\n", 39 - 40 - $patch->getFullKey(), 41 - in_array($patch->getFullKey(), $applied) 35 + $table->addRow(array( 36 + 'id' => $patch->getFullKey(), 37 + 'status' => in_array($patch->getFullKey(), $applied) 42 38 ? 'Applied' 43 39 : 'Not Applied', 44 - $patch->getType(), 45 - $patch->getName()); 40 + 'type' => $patch->getType(), 41 + 'name' => $patch->getName(), 42 + )); 46 43 } 47 44 45 + $table->draw(); 48 46 return 0; 49 47 } 50 48