public function getMetrics(Metric $metric)
    {
        $type = Binput::get('filter', AutoPresenter::decorate($metric)->view_name);
        $metrics = app(MetricRepository::class);

        switch ($type) {
            case 'last_hour': $metricData = $metrics->listPointsLastHour($metric); break;
            case 'today': $metricData = $metrics->listPointsToday($metric); break;
            case 'week': $metricData = $metrics->listPointsForWeek($metric); break;
            case 'month': $metricData = $metrics->listPointsForMonth($metric); break;
            default: $metricData = [];
        }

        return $this->item([
            'metric' => $metric->toArray(),
            'items'  => $metricData,
        ]);
    }