Refactored the way we store metrics
This commit is contained in:
committed by
James Brooks
parent
3730ca8811
commit
f9bc46b460
@@ -84,7 +84,8 @@ class MetricController extends AbstractApiController
|
||||
Binput::get('calc_type', 0),
|
||||
Binput::get('display_chart', true),
|
||||
Binput::get('places', 2),
|
||||
Binput::get('view', 1)
|
||||
Binput::get('view', 1),
|
||||
Binput::get('threshold', 5)
|
||||
));
|
||||
} catch (QueryException $e) {
|
||||
throw new BadRequestHttpException();
|
||||
@@ -112,7 +113,8 @@ class MetricController extends AbstractApiController
|
||||
Binput::get('calc_type'),
|
||||
Binput::get('display_chart'),
|
||||
Binput::get('places'),
|
||||
Binput::get('view')
|
||||
Binput::get('view'),
|
||||
Binput::get('threshold', 5)
|
||||
));
|
||||
} catch (QueryException $e) {
|
||||
throw new BadRequestHttpException();
|
||||
|
||||
@@ -48,8 +48,8 @@ class MetricPointController extends AbstractApiController
|
||||
$metricPoint = dispatch(new AddMetricPointCommand(
|
||||
$metric,
|
||||
Binput::get('value'),
|
||||
Binput::get('timestamp'))
|
||||
);
|
||||
Binput::get('timestamp')
|
||||
));
|
||||
} catch (QueryException $e) {
|
||||
throw new BadRequestHttpException();
|
||||
}
|
||||
|
||||
@@ -79,7 +79,8 @@ class MetricController extends Controller
|
||||
$metricData['calc_type'],
|
||||
$metricData['display_chart'],
|
||||
$metricData['places'],
|
||||
$metricData['default_view']
|
||||
$metricData['default_view'],
|
||||
$metricData['threshold']
|
||||
));
|
||||
} catch (ValidationException $e) {
|
||||
return Redirect::route('dashboard.metrics.add')
|
||||
@@ -151,7 +152,8 @@ class MetricController extends Controller
|
||||
Binput::get('calc_type', null, false),
|
||||
Binput::get('display_chart', null, false),
|
||||
Binput::get('places', null, false),
|
||||
Binput::get('default_view', null, false)
|
||||
Binput::get('default_view', null, false),
|
||||
Binput::get('threshold', null, false)
|
||||
));
|
||||
} catch (ValidationException $e) {
|
||||
return Redirect::route('dashboard.metrics.edit', ['id' => $metric->id])
|
||||
|
||||
Reference in New Issue
Block a user