Author: ornicar2
Date: 2010-02-03 11:42:08 +0100 (Wed, 03 Feb 2010)
New Revision: 27481
Removed:
plugins/diemPlugin/trunk/dmAdminPlugin/modules/dmChart/lib/
Modified:
plugins/diemPlugin/trunk/dmAdminPlugin/config/dm/services.yml
plugins/diemPlugin/trunk/dmAdminPlugin/lib/chart/dmLogChart.php
plugins/diemPlugin/trunk/dmAdminPlugin/lib/chart/generic/dmChart.php
plugins/diemPlugin/trunk/dmAdminPlugin/modules/dmChart/actions/components.class.php
plugins/diemPlugin/trunk/dmAdminPlugin/modules/dmChart/templates/_little.php
Log:
[Diem]
- improved ajax charts performances
Modified: plugins/diemPlugin/trunk/dmAdminPlugin/config/dm/services.yml
===================================================================
--- plugins/diemPlugin/trunk/dmAdminPlugin/config/dm/services.yml
2010-02-03 10:18:10 UTC (rev 27480)
+++ plugins/diemPlugin/trunk/dmAdminPlugin/config/dm/services.yml
2010-02-03 10:42:08 UTC (rev 27481)
@@ -8,26 +8,31 @@
log_chart.options:
name: Server # public name for this chart
lifetime: 1800 # time in seconds to keep a
cached version of the chart
+ credentials: see_chart
week_chart.class: dmWeekChart # Responsible for rendering
the week chart
week_chart.options:
name: This Week # public name for this chart
lifetime: 21600 # time in seconds to keep a
cached version of the chart
+ credentials: see_chart
visit_chart.class: dmVisitChart # Responsible for rendering
the visit chart
visit_chart.options:
name: This Year # public name for this chart
lifetime: 43200 # time in seconds to keep a
cached version of the chart
+ credentials: see_chart
content_chart.class: dmContentChart # Responsible for rendering
the content chart
content_chart.options:
name: Activity # public name for this chart
lifetime: 43200 # time in seconds to keep a
cached version of the chart
+ credentials: see_chart
browser_chart.class: dmBrowserChart # Responsible for rendering
the browser chart
browser_chart.options:
name: Browsers # public name for this chart
lifetime: 43200 # time in seconds to keep a
cached version of the chart
+ credentials: see_chart
gapi.class: dmGapi # Responsible for fetching
data from google analytics
Modified: plugins/diemPlugin/trunk/dmAdminPlugin/lib/chart/dmLogChart.php
===================================================================
--- plugins/diemPlugin/trunk/dmAdminPlugin/lib/chart/dmLogChart.php
2010-02-03 10:18:10 UTC (rev 27480)
+++ plugins/diemPlugin/trunk/dmAdminPlugin/lib/chart/dmLogChart.php
2010-02-03 10:42:08 UTC (rev 27481)
@@ -4,9 +4,7 @@
{
protected
$eventsFilter = array(
- 'clear cache',
-// 'update sitemap',
-// 'update search'
+ 'clear cache'
);
protected function configure()
Modified: plugins/diemPlugin/trunk/dmAdminPlugin/lib/chart/generic/dmChart.php
===================================================================
--- plugins/diemPlugin/trunk/dmAdminPlugin/lib/chart/generic/dmChart.php
2010-02-03 10:18:10 UTC (rev 27480)
+++ plugins/diemPlugin/trunk/dmAdminPlugin/lib/chart/generic/dmChart.php
2010-02-03 10:42:08 UTC (rev 27481)
@@ -20,7 +20,7 @@
$available = true,
$credentials;
- function dmChart(dmBaseServiceContainer $serviceContainer, array $options =
array())
+ function __construct(dmBaseServiceContainer $serviceContainer, array
$options = array())
{
$this->serviceContainer = $serviceContainer;
@@ -107,7 +107,7 @@
return
$this->serviceContainer->getService('helper')->media('/cache/'.$image);
}
- protected function getDefaultOptions()
+ public function getDefaultOptions()
{
return array(
'width' => 500,
Modified:
plugins/diemPlugin/trunk/dmAdminPlugin/modules/dmChart/actions/components.class.php
===================================================================
---
plugins/diemPlugin/trunk/dmAdminPlugin/modules/dmChart/actions/components.class.php
2010-02-03 10:18:10 UTC (rev 27480)
+++
plugins/diemPlugin/trunk/dmAdminPlugin/modules/dmChart/actions/components.class.php
2010-02-03 10:42:08 UTC (rev 27481)
@@ -7,6 +7,6 @@
{
$this->chartKey = $this->name;
- $this->chart = $this->context->get($this->name.'_chart');
+ $this->options =
$this->getServiceContainer()->getParameter($this->name.'_chart.options');
}
}
\ No newline at end of file
Modified:
plugins/diemPlugin/trunk/dmAdminPlugin/modules/dmChart/templates/_little.php
===================================================================
---
plugins/diemPlugin/trunk/dmAdminPlugin/modules/dmChart/templates/_little.php
2010-02-03 10:18:10 UTC (rev 27480)
+++
plugins/diemPlugin/trunk/dmAdminPlugin/modules/dmChart/templates/_little.php
2010-02-03 10:42:08 UTC (rev 27481)
@@ -1,16 +1,14 @@
<?php
-if (!$sf_user->can($chart->getCredentials()))
+if (!$sf_user->can($options['credentials']))
{
return;
}
echo _tag('div.dm_box',
_tag('div.title',
- _link('@dm_chart?name='.$chartKey)
- ->set('.s16block.s16_arrow_up_right')
- ->textTitle(__('Expanded view')).
- _tag('h2', __($chart->getName()))
+
_link('@dm_chart?name='.$chartKey)->set('.s16block.s16_arrow_up_right')->textTitle(__('Expanded
view')).
+ _tag('h2', __($options['name']))
).
_tag('div.dm_box_inner.dm_data.m5.dm_auto_loading', array('json' => array(
'url' => _link('@dm_chart?action=image&name='.$chartKey)->getHref()
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.