Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14844208
D21407.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D21407.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -1063,7 +1063,6 @@
'DiffusionSyncLogSearchEngine' => 'applications/diffusion/query/DiffusionSyncLogSearchEngine.php',
'DiffusionTagListController' => 'applications/diffusion/controller/DiffusionTagListController.php',
'DiffusionTagListView' => 'applications/diffusion/view/DiffusionTagListView.php',
- 'DiffusionTagTableView' => 'applications/diffusion/view/DiffusionTagTableView.php',
'DiffusionTaggedRepositoriesFunctionDatasource' => 'applications/diffusion/typeahead/DiffusionTaggedRepositoriesFunctionDatasource.php',
'DiffusionTagsQueryConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionTagsQueryConduitAPIMethod.php',
'DiffusionURIEditConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionURIEditConduitAPIMethod.php',
@@ -7157,7 +7156,6 @@
'DiffusionSyncLogSearchEngine' => 'PhabricatorApplicationSearchEngine',
'DiffusionTagListController' => 'DiffusionController',
'DiffusionTagListView' => 'DiffusionView',
- 'DiffusionTagTableView' => 'DiffusionView',
'DiffusionTaggedRepositoriesFunctionDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
'DiffusionTagsQueryConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
'DiffusionURIEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
diff --git a/src/applications/diffusion/view/DiffusionTagTableView.php b/src/applications/diffusion/view/DiffusionTagTableView.php
deleted file mode 100644
--- a/src/applications/diffusion/view/DiffusionTagTableView.php
+++ /dev/null
@@ -1,140 +0,0 @@
-<?php
-
-final class DiffusionTagTableView extends DiffusionView {
-
- private $tags;
- private $commits = array();
- private $handles = array();
-
- public function setTags($tags) {
- $this->tags = $tags;
- return $this;
- }
-
- public function setCommits(array $commits) {
- $this->commits = mpull($commits, null, 'getCommitIdentifier');
- return $this;
- }
-
- public function setHandles(array $handles) {
- $this->handles = $handles;
- return $this;
- }
-
- public function getRequiredHandlePHIDs() {
- return array_filter(mpull($this->commits, 'getAuthorPHID'));
- }
-
- public function render() {
- $drequest = $this->getDiffusionRequest();
- $repository = $drequest->getRepository();
- $viewer = $this->getViewer();
-
- $buildables = $this->loadBuildables($this->commits);
- $has_builds = false;
-
- $rows = array();
- foreach ($this->tags as $tag) {
- $commit = idx($this->commits, $tag->getCommitIdentifier());
-
- $tag_link = phutil_tag(
- 'a',
- array(
- 'href' => $drequest->generateURI(
- array(
- 'action' => 'browse',
- 'commit' => $tag->getName(),
- )),
- ),
- $tag->getName());
-
- $commit_link = phutil_tag(
- 'a',
- array(
- 'href' => $drequest->generateURI(
- array(
- 'action' => 'commit',
- 'commit' => $tag->getCommitIdentifier(),
- )),
- ),
- $repository->formatCommitName(
- $tag->getCommitIdentifier()));
-
- $author = null;
- if ($commit && $commit->getAuthorPHID()) {
- $author = $this->handles[$commit->getAuthorPHID()]->renderLink();
- } else if ($commit && $commit->getCommitData()) {
- $author = self::renderName($commit->getCommitData()->getAuthorName());
- } else {
- $author = self::renderName($tag->getAuthor());
- }
-
- $description = null;
- if ($tag->getType() == 'git/tag') {
- // In Git, a tag may be a "real" tag, or just a reference to a commit.
- // If it's a real tag, use the message on the tag, since this may be
- // unique data which isn't otherwise available.
- $description = $tag->getDescription();
- } else {
- if ($commit) {
- $description = $commit->getSummary();
- } else {
- $description = $tag->getDescription();
- }
- }
-
- $build = null;
- if ($commit) {
- $buildable = idx($buildables, $commit->getPHID());
- if ($buildable) {
- $build = $this->renderBuildable($buildable);
- $has_builds = true;
- }
- }
-
- $history = $this->linkTagHistory($tag->getName());
-
- $rows[] = array(
- $history,
- $tag_link,
- $commit_link,
- $build,
- $author,
- $description,
- $viewer->formatShortDateTime($tag->getEpoch()),
- );
- }
-
- $table = id(new AphrontTableView($rows))
- ->setHeaders(
- array(
- null,
- pht('Tag'),
- pht('Commit'),
- null,
- pht('Author'),
- pht('Description'),
- pht('Created'),
- ))
- ->setColumnClasses(
- array(
- 'nudgeright',
- 'pri',
- '',
- '',
- '',
- 'wide',
- 'right',
- ))
- ->setColumnVisibility(
- array(
- true,
- true,
- true,
- $has_builds,
- ));
-
- return $table->render();
- }
-
-}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 3, 2:01 PM (21 h, 9 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7087057
Default Alt Text
D21407.diff (5 KB)
Attached To
Mode
D21407: Remove "DiffusionTagTableView"
Attached
Detach File
Event Timeline
Log In to Comment