Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15396919
D9604.id23019.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9604.id23019.diff
View Options
diff --git a/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementStatusWorkflow.php b/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementStatusWorkflow.php
--- a/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementStatusWorkflow.php
+++ b/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementStatusWorkflow.php
@@ -24,27 +24,25 @@
return 1;
}
- $len = 0;
- foreach ($patches as $patch) {
- $len = max($len, strlen($patch->getFullKey()));
- }
+ $table = id(new PhutilConsoleTable())
+ ->setShowHeader(false)
+ ->addColumn('id', array('title' => 'ID'))
+ ->addColumn('status', array('title' => 'Status'))
+ ->addColumn('type', array('title' => 'Type'))
+ ->addColumn('name', array('title' => 'Name'));
foreach ($patches as $patch) {
- printf(
-
- "% -".($len + 2)."s ".
- "%-".strlen('Not Applied')."s ".
- "%-4s ".
- "%s\n",
-
- $patch->getFullKey(),
- in_array($patch->getFullKey(), $applied)
+ $table->addRow(array(
+ 'id' => $patch->getFullKey(),
+ 'status' => in_array($patch->getFullKey(), $applied)
? 'Applied'
: 'Not Applied',
- $patch->getType(),
- $patch->getName());
+ 'patch' => $patch->getType(),
+ 'name' => $patch->getName(),
+ ));
}
+ $table->draw();
return 0;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 17, 4:58 PM (1 w, 1 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7708620
Default Alt Text
D9604.id23019.diff (1 KB)
Attached To
Mode
D9604: Convert `./bin/storage status` to use `PhutilConsoleTable`.
Attached
Detach File
Event Timeline
Log In to Comment