Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F17670564
D18386.id44191.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D18386.id44191.diff
View Options
diff --git a/src/applications/diffusion/management/DiffusionRepositoryBranchesManagementPanel.php b/src/applications/diffusion/management/DiffusionRepositoryBranchesManagementPanel.php
--- a/src/applications/diffusion/management/DiffusionRepositoryBranchesManagementPanel.php
+++ b/src/applications/diffusion/management/DiffusionRepositoryBranchesManagementPanel.php
@@ -67,6 +67,7 @@
public function buildManagementPanelContent() {
$repository = $this->getRepository();
$viewer = $this->getViewer();
+ $content = array();
$view = id(new PHUIPropertyListView())
->setViewer($viewer);
@@ -90,8 +91,63 @@
}
$view->addProperty(pht('Autoclose Only'), $autoclose_only);
+ $content[] = $this->newBox(pht('Branches'), $view);
- return $this->newBox(pht('Branches'), $view);
+ // Branch Autoclose Table
+ $params = array(
+ 'repository' => $repository->getID(),
+ );
+
+ $branches = id(new ConduitCall('diffusion.branchquery', $params))
+ ->setUser($viewer)
+ ->execute();
+ $branches = DiffusionRepositoryRef::loadAllFromDictionaries($branches);
+ $autoclose = $repository->getDetail('close-commits-filter');
+ $track = $repository->getDetail('branch-filter');
+
+ $rows = array();
+ foreach ($branches as $branch) {
+ if ($track) {
+ $tracking = idx($track, $branch->getShortName());
+ } else {
+ $tracking = true;
+ }
+
+ if ($autoclose) {
+ $autoclosing = idx($autoclose, $branch->getShortName());
+ } else {
+ $autoclosing = true;
+ }
+
+ $rows[] = array(
+ $branch->getShortName(),
+ $tracking ? pht('Tracking') : pht('Off'),
+ $autoclosing ? pht('Autoclose On') : pht('Off'),
+ );
+ }
+ $branch_table = new AphrontTableView($rows);
+ $branch_table->setHeaders(
+ array(
+ pht('Branch'),
+ pht('Track'),
+ pht('Autoclose'),
+ ));
+ $branch_table->setColumnClasses(
+ array(
+ 'pri',
+ 'narrow',
+ 'wide',
+ ));
+ $branch_table->setColumnVisibility(
+ array(
+ true,
+ true,
+ true,
+ ));
+
+ $content[] = $this->newBox(pht('Branch Status'), $branch_table);
+
+ return $content;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jul 14, 1:17 AM (2 d, 13 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8425220
Default Alt Text
D18386.id44191.diff (2 KB)
Attached To
Mode
D18386: Add status table to Diffusion Branch manage page
Attached
Detach File
Event Timeline
Log In to Comment