From ef8ddb59c94e24383531e52371b70b595dff8e24 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 3 Sep 2016 20:45:30 -0400 Subject: Convert user distribution chart to Vue.js component --- app/Controller/AnalyticController.php | 4 ++-- app/ServiceProvider/RouteProvider.php | 2 +- app/Template/analytic/sidebar.php | 4 ++-- app/Template/analytic/user_distribution.php | 30 +++++++++++++++++++++++++ app/Template/analytic/users.php | 34 ----------------------------- 5 files changed, 35 insertions(+), 39 deletions(-) create mode 100644 app/Template/analytic/user_distribution.php delete mode 100644 app/Template/analytic/users.php (limited to 'app') diff --git a/app/Controller/AnalyticController.php b/app/Controller/AnalyticController.php index 1949b6b8..e12de0c7 100644 --- a/app/Controller/AnalyticController.php +++ b/app/Controller/AnalyticController.php @@ -99,11 +99,11 @@ 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'), diff --git a/app/ServiceProvider/RouteProvider.php b/app/ServiceProvider/RouteProvider.php index 580ed6e5..0d1a7931 100644 --- a/app/ServiceProvider/RouteProvider.php +++ b/app/ServiceProvider/RouteProvider.php @@ -110,7 +110,7 @@ class RouteProvider implements ServiceProviderInterface // Analytics routes $container['route']->addRoute('analytics/tasks/:project_id', 'AnalyticController', 'taskDistribution'); - $container['route']->addRoute('analytics/users/:project_id', 'AnalyticController', 'users'); + $container['route']->addRoute('analytics/users/:project_id', 'AnalyticController', 'userDistribution'); $container['route']->addRoute('analytics/cfd/:project_id', 'AnalyticController', 'cfd'); $container['route']->addRoute('analytics/burndown/:project_id', 'AnalyticController', 'burndown'); $container['route']->addRoute('analytics/average-time-column/:project_id', 'AnalyticController', 'averageTimeByColumn'); diff --git a/app/Template/analytic/sidebar.php b/app/Template/analytic/sidebar.php index 1468cee5..ceb57fac 100644 --- a/app/Template/analytic/sidebar.php +++ b/app/Template/analytic/sidebar.php @@ -3,8 +3,8 @@
  • app->checkMenuSelection('AnalyticController', 'taskDistribution') ?>> url->link(t('Task distribution'), 'AnalyticController', 'taskDistribution', array('project_id' => $project['id'])) ?>
  • -
  • app->checkMenuSelection('AnalyticController', 'users') ?>> - url->link(t('User repartition'), 'AnalyticController', 'users', array('project_id' => $project['id'])) ?> +
  • app->checkMenuSelection('AnalyticController', 'userDistribution') ?>> + url->link(t('User repartition'), 'AnalyticController', 'userDistribution', array('project_id' => $project['id'])) ?>
  • app->checkMenuSelection('AnalyticController', 'cfd') ?>> url->link(t('Cumulative flow diagram'), 'AnalyticController', 'cfd', array('project_id' => $project['id'])) ?> diff --git a/app/Template/analytic/user_distribution.php b/app/Template/analytic/user_distribution.php new file mode 100644 index 00000000..c3cf4961 --- /dev/null +++ b/app/Template/analytic/user_distribution.php @@ -0,0 +1,30 @@ + + + +

    + + + + + + + + + + + + + + + + +
    + text->e($metric['user']) ?> + + + + % +
    + diff --git a/app/Template/analytic/users.php b/app/Template/analytic/users.php deleted file mode 100644 index 91bec11b..00000000 --- a/app/Template/analytic/users.php +++ /dev/null @@ -1,34 +0,0 @@ - - - -

    - -
    - -
    - - - - - - - - - - - - - - -
    - text->e($metric['user']) ?> - - - - % -
    - -
    - -- cgit v1.2.3