mirror of
https://github.com/getredash/redash.git
synced 2025-12-22 19:03:26 -05:00
Humanize query runtime
This commit is contained in:
@@ -169,6 +169,15 @@
|
|||||||
|
|
||||||
var QueriesCtrl = function($scope, $http, $location, $filter, Query) {
|
var QueriesCtrl = function($scope, $http, $location, $filter, Query) {
|
||||||
$scope.$parent.pageTitle = "All Queries";
|
$scope.$parent.pageTitle = "All Queries";
|
||||||
|
$scope.gridConfig = {
|
||||||
|
isPaginationEnabled: true,
|
||||||
|
itemsByPage: 50,
|
||||||
|
maxSize: 8,
|
||||||
|
isGlobalSearchActivated: true
|
||||||
|
}
|
||||||
|
|
||||||
|
$scope.allQueries = [];
|
||||||
|
$scope.queries = [];
|
||||||
|
|
||||||
var dateFormatter = function (value) {
|
var dateFormatter = function (value) {
|
||||||
if (!value) return "-";
|
if (!value) return "-";
|
||||||
@@ -191,15 +200,6 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.gridConfig = {
|
|
||||||
isPaginationEnabled: true,
|
|
||||||
itemsByPage: 50,
|
|
||||||
maxSize: 8,
|
|
||||||
isGlobalSearchActivated: true
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.allQueries = [];
|
|
||||||
$scope.queries = [];
|
|
||||||
Query.query(function(queries) {
|
Query.query(function(queries) {
|
||||||
$scope.allQueries = _.map(queries, function(query) {
|
$scope.allQueries = _.map(queries, function(query) {
|
||||||
query.created_at = moment(query.created_at);
|
query.created_at = moment(query.created_at);
|
||||||
@@ -228,20 +228,23 @@
|
|||||||
{
|
{
|
||||||
'label': 'Runtime (avg)',
|
'label': 'Runtime (avg)',
|
||||||
'map': 'avg_runtime',
|
'map': 'avg_runtime',
|
||||||
'formatFunction': 'number',
|
'formatFunction': function(value) {
|
||||||
'formatParameter': 2
|
return $filter('durationHumanize')(value);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'label': 'Runtime (min)',
|
'label': 'Runtime (min)',
|
||||||
'map': 'min_runtime',
|
'map': 'min_runtime',
|
||||||
'formatFunction': 'number',
|
'formatFunction': function(value) {
|
||||||
'formatParameter': 2
|
return $filter('durationHumanize')(value);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'label': 'Runtime (max)',
|
'label': 'Runtime (max)',
|
||||||
'map': 'max_runtime',
|
'map': 'max_runtime',
|
||||||
'formatFunction': 'number',
|
'formatFunction': function(value) {
|
||||||
'formatParameter': 2
|
return $filter('durationHumanize')(value);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'label': 'Last Executed At',
|
'label': 'Last Executed At',
|
||||||
|
|||||||
Reference in New Issue
Block a user