Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18837124
D20335.id48531.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
D20335.id48531.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D20335: When query panels overheat, degrade them and show a warning
Attached
Detach File
Event Timeline
Log In to Comment