summaryrefslogtreecommitdiff
path: root/app/Controller/AnalyticController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controller/AnalyticController.php')
-rw-r--r--app/Controller/AnalyticController.php38
1 files changed, 17 insertions, 21 deletions
diff --git a/app/Controller/AnalyticController.php b/app/Controller/AnalyticController.php
index cf3ba034..38169fd7 100644
--- a/app/Controller/AnalyticController.php
+++ b/app/Controller/AnalyticController.php
@@ -31,9 +31,7 @@ class AnalyticController extends BaseController
'project' => $project,
'average' => $this->averageLeadCycleTimeAnalytic->build($project['id']),
'metrics' => $this->projectDailyStatsModel->getRawMetrics($project['id'], $from, $to),
- 'date_format' => $this->configModel->get('application_date_format'),
- 'date_formats' => $this->dateParser->getAvailableFormats($this->dateParser->getDateFormats()),
- 'title' => t('Lead and Cycle time for "%s"', $project['name']),
+ 'title' => t('Lead and cycle time'),
)));
}
@@ -42,12 +40,12 @@ class AnalyticController extends BaseController
*
* @access public
*/
- public function compareHours()
+ public function timeComparison()
{
$project = $this->getProject();
$paginator = $this->paginator
- ->setUrl('AnalyticController', 'compareHours', array('project_id' => $project['id']))
+ ->setUrl('AnalyticController', 'timeComparison', array('project_id' => $project['id']))
->setMax(30)
->setOrder(TaskModel::TABLE.'.id')
->setQuery($this->taskQuery
@@ -56,11 +54,11 @@ class AnalyticController extends BaseController
)
->calculate();
- $this->response->html($this->helper->layout->analytic('analytic/compare_hours', array(
+ $this->response->html($this->helper->layout->analytic('analytic/time_comparison', array(
'project' => $project,
'paginator' => $paginator,
'metrics' => $this->estimatedTimeComparisonAnalytic->build($project['id']),
- 'title' => t('Compare hours for "%s"', $project['name']),
+ 'title' => t('Estimated vs actual time'),
)));
}
@@ -76,7 +74,7 @@ class AnalyticController extends BaseController
$this->response->html($this->helper->layout->analytic('analytic/avg_time_columns', array(
'project' => $project,
'metrics' => $this->averageTimeSpentColumnAnalytic->build($project['id']),
- 'title' => t('Average time spent into each column for "%s"', $project['name']),
+ 'title' => t('Average time into each column'),
)));
}
@@ -85,14 +83,14 @@ class AnalyticController extends BaseController
*
* @access public
*/
- public function tasks()
+ public function taskDistribution()
{
$project = $this->getProject();
- $this->response->html($this->helper->layout->analytic('analytic/tasks', array(
+ $this->response->html($this->helper->layout->analytic('analytic/task_distribution', array(
'project' => $project,
'metrics' => $this->taskDistributionAnalytic->build($project['id']),
- 'title' => t('Task repartition for "%s"', $project['name']),
+ 'title' => t('Task distribution'),
)));
}
@@ -101,14 +99,14 @@ class AnalyticController extends BaseController
*
* @access public
*/
- public function users()
+ public function userDistribution()
{
$project = $this->getProject();
- $this->response->html($this->helper->layout->analytic('analytic/users', array(
+ $this->response->html($this->helper->layout->analytic('analytic/user_distribution', array(
'project' => $project,
'metrics' => $this->userDistributionAnalytic->build($project['id']),
- 'title' => t('User repartition for "%s"', $project['name']),
+ 'title' => t('User repartition'),
)));
}
@@ -119,7 +117,7 @@ class AnalyticController extends BaseController
*/
public function cfd()
{
- $this->commonAggregateMetrics('analytic/cfd', 'total', 'Cumulative flow diagram for "%s"');
+ $this->commonAggregateMetrics('analytic/cfd', 'total', t('Cumulative flow diagram'));
}
/**
@@ -129,7 +127,7 @@ class AnalyticController extends BaseController
*/
public function burndown()
{
- $this->commonAggregateMetrics('analytic/burndown', 'score', 'Burndown chart for "%s"');
+ $this->commonAggregateMetrics('analytic/burndown', 'score', t('Burndown chart'));
}
/**
@@ -155,9 +153,7 @@ class AnalyticController extends BaseController
'display_graph' => $display_graph,
'metrics' => $display_graph ? $this->projectDailyColumnStatsModel->getAggregatedMetrics($project['id'], $from, $to, $column) : array(),
'project' => $project,
- 'date_format' => $this->configModel->get('application_date_format'),
- 'date_formats' => $this->dateParser->getAvailableFormats($this->dateParser->getDateFormats()),
- 'title' => t($title, $project['name']),
+ 'title' => $title,
)));
}
@@ -169,8 +165,8 @@ class AnalyticController extends BaseController
$to = $this->request->getStringParam('to', date('Y-m-d'));
if (! empty($values)) {
- $from = $values['from'];
- $to = $values['to'];
+ $from = $this->dateParser->getIsoDate($values['from']);
+ $to = $this->dateParser->getIsoDate($values['to']);
}
return array($from, $to);