Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15411771
D19555.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
D19555.diff
View Options
diff --git a/src/applications/diffusion/view/DiffusionPushLogListView.php b/src/applications/diffusion/view/DiffusionPushLogListView.php
--- a/src/applications/diffusion/view/DiffusionPushLogListView.php
+++ b/src/applications/diffusion/view/DiffusionPushLogListView.php
@@ -14,6 +14,8 @@
$logs = $this->logs;
$viewer = $this->getViewer();
+ $reject_herald = PhabricatorRepositoryPushLog::REJECT_HERALD;
+
$handle_phids = array();
foreach ($logs as $log) {
$handle_phids[] = $log->getPusherPHID();
@@ -21,9 +23,13 @@
if ($device_phid) {
$handle_phids[] = $device_phid;
}
+
+ if ($log->getPushEvent()->getRejectCode() == $reject_herald) {
+ $handle_phids[] = $log->getPushEvent()->getRejectDetails();
+ }
}
- $handles = $viewer->loadHandles($handle_phids);
+ $viewer->loadHandles($handle_phids);
// Only administrators can view remote addresses.
$remotes_visible = $viewer->getIsAdmin();
@@ -74,10 +80,17 @@
$flag_names);
$reject_code = $log->getPushEvent()->getRejectCode();
- $reject_label = idx(
- $reject_map,
- $reject_code,
- pht('Unknown ("%s")', $reject_code));
+
+ if ($reject_code == $reject_herald) {
+ $rule_phid = $log->getPushEvent()->getRejectDetails();
+ $handle = $viewer->renderHandle($rule_phid);
+ $reject_label = pht('Blocked: %s', $handle);
+ } else {
+ $reject_label = idx(
+ $reject_map,
+ $reject_code,
+ pht('Unknown ("%s")', $reject_code));
+ }
$rows[] = array(
phutil_tag(
diff --git a/src/applications/repository/query/PhabricatorRepositoryPushLogSearchEngine.php b/src/applications/repository/query/PhabricatorRepositoryPushLogSearchEngine.php
--- a/src/applications/repository/query/PhabricatorRepositoryPushLogSearchEngine.php
+++ b/src/applications/repository/query/PhabricatorRepositoryPushLogSearchEngine.php
@@ -149,6 +149,9 @@
id(new PhabricatorStringExportField())
->setKey('resultName')
->setLabel(pht('Result Name')),
+ id(new PhabricatorStringExportField())
+ ->setKey('resultDetails')
+ ->setLabel(pht('Result Details')),
id(new PhabricatorIntExportField())
->setKey('writeWait')
->setLabel(pht('Write Wait (us)')),
@@ -237,6 +240,7 @@
'flagNames' => $flag_names,
'result' => $result,
'resultName' => $result_name,
+ 'resultDetails' => $event->getRejectDetails(),
'writeWait' => $event->getWriteWait(),
'readWait' => $event->getReadWait(),
'hostWait' => $event->getHostWait(),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 9:45 AM (4 d, 6 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7712917
Default Alt Text
D19555.diff (2 KB)
Attached To
Mode
D19555: When a Herald rule blocks a push, show which rule fired in the push log UI
Attached
Detach File
Event Timeline
Log In to Comment