diff --git a/src/applications/multimeter/controller/MultimeterSampleController.php b/src/applications/multimeter/controller/MultimeterSampleController.php --- a/src/applications/multimeter/controller/MultimeterSampleController.php +++ b/src/applications/multimeter/controller/MultimeterSampleController.php @@ -84,6 +84,15 @@ $rows = array(); foreach ($data as $row) { + if ($row['N'] == 1) { + $events_col = $row['id']; + } else { + $events_col = $this->renderGroupingLink( + $group, + 'id', + pht('%s Events', new PhutilNumber($row['N']))); + } + if (isset($group['request'])) { $request_col = $row['requestKey']; if (!$with['request']) { @@ -168,9 +177,7 @@ } $rows[] = array( - ($row['N'] == 1) - ? $row['id'] - : pht('%s Events', new PhutilNumber($row['N'])), + $events_col, $request_col, $viewer_col, $context_col, @@ -209,7 +216,7 @@ )) ->setColumnClasses( array( - 'n', + null, null, null, null, @@ -241,6 +248,7 @@ 'viewer' => pht('By Viewer'), 'request' => pht('By Request'), 'label' => pht('By Label'), + 'id' => pht('By ID'), ); $parts = array(); @@ -264,17 +272,21 @@ )); } - private function renderGroupingLink(array $group, $key) { + private function renderGroupingLink(array $group, $key, $name = null) { $group[] = $key; $uri = $this->getGroupURI($group); + if ($name === null) { + $name = pht('(All)'); + } + return phutil_tag( 'a', array( 'href' => $uri, 'style' => 'font-weight: bold', ), - pht('(All)')); + $name); } private function getGroupURI(array $group, $wipe = false) { @@ -318,6 +330,7 @@ 'viewer' => 'eventViewerID', 'request' => 'requestKey', 'label' => 'eventLabelID', + 'id' => 'id', ); }