Set an order on metrics via the API. Closes #1874
This commit is contained in:
@@ -85,7 +85,8 @@ class MetricController extends AbstractApiController
|
||||
Binput::get('display_chart', true),
|
||||
Binput::get('places', 2),
|
||||
Binput::get('view', 1),
|
||||
Binput::get('threshold', 5)
|
||||
Binput::get('threshold', 5),
|
||||
Binput::get('order', 0)
|
||||
));
|
||||
} catch (QueryException $e) {
|
||||
throw new BadRequestHttpException();
|
||||
@@ -114,7 +115,8 @@ class MetricController extends AbstractApiController
|
||||
Binput::get('display_chart'),
|
||||
Binput::get('places'),
|
||||
Binput::get('view'),
|
||||
Binput::get('threshold')
|
||||
Binput::get('threshold'),
|
||||
Binput::get('order')
|
||||
));
|
||||
} catch (QueryException $e) {
|
||||
throw new BadRequestHttpException();
|
||||
|
||||
@@ -31,7 +31,7 @@ class MetricController extends Controller
|
||||
*/
|
||||
public function showMetrics()
|
||||
{
|
||||
$metrics = Metric::orderBy('created_at', 'desc')->get();
|
||||
$metrics = Metric::orderBy('order')->get();
|
||||
|
||||
return View::make('dashboard.metrics.index')
|
||||
->withPageTitle(trans('dashboard.metrics.metrics').' - '.trans('dashboard.dashboard'))
|
||||
|
||||
Reference in New Issue
Block a user