Skip to content

Commit

Permalink
Fixes #27: Adjusted sorting defaults, removed row numbers from databa…
Browse files Browse the repository at this point in the history
…se, log and profiling panels
  • Loading branch information
samdark committed Nov 23, 2016
1 parent f29808f commit 5d57382
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Yii Framework 2 debug extension Change Log
- Enh #162: Added ability to config the trace file and line number (thiagotalma)
- Bug #152: Fixed log search to work with non-scalar values (samdark)
- Enh #8: Added ability to configure default sorting and filtering for Database panel (laszlovl)
- Enh #27: Adjusted sorting defaults, removed row numbers from database, log and profiling panels (samdark)

2.0.6 March 17, 2016
--------------------
Expand Down
3 changes: 3 additions & 0 deletions models/search/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ public function search($params, $models)
'pagination' => false,
'sort' => [
'attributes' => ['time', 'level', 'category', 'message'],
'defaultOrder' => [
'time' => SORT_ASC,
],
],
]);

Expand Down
2 changes: 1 addition & 1 deletion models/search/Profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function search($params, $models)
'sort' => [
'attributes' => ['category', 'seq', 'duration', 'info'],
'defaultOrder' => [
'seq' => SORT_ASC,
'duration' => SORT_DESC,
],
],
]);
Expand Down
2 changes: 1 addition & 1 deletion panels/DbPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class DbPanel extends Panel
* @since 2.0.7
*/
public $defaultOrder = [
'duration' => SORT_DESC
'seq' => SORT_ASC
];

/**
Expand Down
1 change: 0 additions & 1 deletion views/default/panels/db/detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
'filterModel' => $searchModel,
'filterUrl' => $panel->getUrl(),
'columns' => [
['class' => 'yii\grid\SerialColumn'],
[
'attribute' => 'seq',
'label' => 'Time',
Expand Down
1 change: 0 additions & 1 deletion views/default/panels/log/detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
}
},
'columns' => [
['class' => 'yii\grid\SerialColumn'],
[
'attribute' => 'time',
'value' => function ($data) {
Expand Down
1 change: 0 additions & 1 deletion views/default/panels/profile/detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
'filterModel' => $searchModel,
'filterUrl' => $panel->getUrl(),
'columns' => [
['class' => 'yii\grid\SerialColumn'],
[
'attribute' => 'seq',
'label' => 'Time',
Expand Down

1 comment on commit 5d57382

@cebe
Copy link
Member

@cebe cebe commented on 5d57382 Nov 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.