Page MenuHomePhabricator

D20335.id48531.diff
No OneTemporary

D20335.id48531.diff

diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php b/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php
--- a/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php
+++ b/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php
@@ -106,9 +106,45 @@
}
}
+ $query->setReturnPartialResultsOnOverheat(true);
+
$results = $engine->executeQuery($query, $pager);
+ $results_view = $engine->renderResults($results, $saved);
+
+ $is_overheated = $query->getIsOverheated();
+ $overheated_view = null;
+ if ($is_overheated) {
+ $content = $results_view->getContent();
+
+ if ($results) {
+ $overheated_message = pht(
+ 'Most objects matching the query for this panel are not visible '.
+ 'to you, so filtering results is taking a long time. Only some '.
+ 'results are shown. Refine the query to find more results.');
+ } else {
+ $overheated_message = pht(
+ 'Most objects matching the query for this panel are not visible '.
+ 'to you, so filtering results is taking a long time. Refine the '.
+ 'query to find results.');
+ }
+
+ $overheated_warning = id(new PHUIInfoView())
+ ->setSeverity(PHUIInfoView::SEVERITY_WARNING)
+ ->setTitle(pht('Query Overheated'))
+ ->setErrors(
+ array(
+ $overheated_message,
+ ));
+
+ $overheated_box = id(new PHUIBoxView())
+ ->addClass('mmt mmb')
+ ->appendChild($overheated_warning);
+
+ $content = array($content, $overheated_box);
+ $results_view->setContent($content);
+ }
- return $engine->renderResults($results, $saved);
+ return $results_view;
}
public function adjustPanelHeader(

File Metadata

Mime Type
text/plain
Expires
Oct 28 2025, 4:29 AM (8 w, 14 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8699457
Default Alt Text
D20335.id48531.diff (1 KB)

Event Timeline