Merge pull request #2040 from CachetHQ/metric-repository-perf

Metric repository perf
This commit is contained in:
James Brooks
2016-10-30 17:36:01 +00:00
committed by GitHub
9 changed files with 220 additions and 318 deletions
+8 -16
View File
@@ -27,14 +27,10 @@ class MetricPresenter extends BasePresenter implements Arrayable
public function view_name()
{
switch ($this->wrappedObject->default_view) {
case 0:
return 'last_hour';
case 1:
return 'today';
case 2:
return 'week';
case 3:
return 'month';
case 0: return 'last_hour';
case 1: return 'today';
case 2: return 'week';
case 3: return 'month';
}
}
@@ -56,14 +52,10 @@ class MetricPresenter extends BasePresenter implements Arrayable
public function trans_string_name()
{
switch ($this->wrappedObject->default_view) {
case 0:
return 'last_hour';
case 1:
return 'hourly';
case 2:
return 'weekly';
case 3:
return 'monthly';
case 0: return 'last_hour';
case 1: return 'hourly';
case 2: return 'weekly';
case 3: return 'monthly';
}
}