Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15396213
D9235.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
D9235.diff
View Options
diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardPanelTypeQuery.php b/src/applications/dashboard/paneltype/PhabricatorDashboardPanelTypeQuery.php
--- a/src/applications/dashboard/paneltype/PhabricatorDashboardPanelTypeQuery.php
+++ b/src/applications/dashboard/paneltype/PhabricatorDashboardPanelTypeQuery.php
@@ -27,6 +27,11 @@
'name' => pht('ApplicationSearch Key'),
'type' => 'text',
),
+ 'limit' => array(
+ 'name' => pht('Maximum Number of Items'),
+ 'caption' => pht('Leave this blank for the default number of items'),
+ 'type' => 'text',
+ ),
);
}
@@ -68,6 +73,14 @@
$query = $engine->buildQueryFromSavedQuery($saved);
$pager = $engine->newPagerForSavedQuery($saved);
+
+ if ($panel->getProperty('limit')) {
+ $limit = (int)$panel->getProperty('limit');
+ if ($pager->getPageSize() !== 0xFFFF) {
+ $pager->setPageSize($limit);
+ }
+ }
+
$results = $engine->executeQuery($query, $pager);
return $engine->renderResults($results, $saved);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 17, 12:40 PM (5 d, 13 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7309382
Default Alt Text
D9235.diff (1 KB)
Attached To
Mode
D9235: Allow a limit to be set on the number of results in a query panel
Attached
Detach File
Event Timeline
Log In to Comment