-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1306 from getredash/pagination
Change: paginate queries page & add explicit urls.
- Loading branch information
Showing
17 changed files
with
315 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from redash.models import db | ||
from playhouse.migrate import PostgresqlMigrator, migrate | ||
|
||
if __name__ == '__main__': | ||
migrator = PostgresqlMigrator(db.database) | ||
|
||
with db.database.transaction(): | ||
migrate( | ||
migrator.add_index('queries', ('org_id',)), | ||
) | ||
|
||
db.close_db(None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<div class="bg-white"> | ||
<table class="table table-condensed table-hover"> | ||
<thead> | ||
<tr> | ||
<th>Name</th> | ||
<th>Created By</th> | ||
<th>Created At</th> | ||
<th>Runtime</th> | ||
<th>Last Executed At</th> | ||
<th>Update Schedule</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr ng-repeat="query in queries"> | ||
<td><a href="queries/{{query.id}}">{{query.name}}</a></td> | ||
<td>{{query.user.name}}</td> | ||
<td>{{query.created_at | dateTime}}</td> | ||
<td>{{query.runtime | durationHumanize}}</td> | ||
<td>{{query.retrieved_at | dateTime}}</td> | ||
<td>{{query.schedule | scheduleHumanize}}</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<div class="text-center"> | ||
<ul class="pagination"> | ||
<li ng-repeat="p in pages" ng-class="{active: p.active, disabled: p.disabled}"><a ng-click="selectPage(p.page)">{{p.title}}</a></li> | ||
</ul> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
<div class="container"> | ||
<page-header title="Queries"></page-header> | ||
|
||
<rd-tabs tabs-collection='tabs' selected-tab='selectedTab'></rd-tabs> | ||
<smart-table rows="queries" columns="gridColumns" | ||
config="gridConfig" | ||
class="table table-condensed table-hover"></smart-table> | ||
<tab-nav tabs="tabs"></tab-nav> | ||
<queries-list queries="queries" total="totalQueriesCount" page="page" select-page="selectPage" page-size="pageSize"></queries-list> | ||
</div> |
Oops, something went wrong.