Skip to content
Extraits de code Groupes Projets
Valider 668ff6fb rédigé par Stefan Giehl's avatar Stefan Giehl Validation de GitHub
Parcourir les fichiers

use limit seletion for limitting exports (#11729)

parent 78364491
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -121,7 +121,6 @@ class Config ...@@ -121,7 +121,6 @@ class Config
'show_pagination_control', 'show_pagination_control',
'show_offset_information', 'show_offset_information',
'hide_annotations_view', 'hide_annotations_view',
'export_limit',
'columns_to_display' 'columns_to_display'
); );
...@@ -455,13 +454,6 @@ class Config ...@@ -455,13 +454,6 @@ class Config
*/ */
public $hide_annotations_view = true; public $hide_annotations_view = true;
/**
* The filter_limit query parameter value to use in export links.
*
* Defaulted to the value of the `[General] API_datatable_default_limit` INI config option.
*/
public $export_limit = '';
/** /**
* Message to show if not data is available for the report * Message to show if not data is available for the report
* Defaults to `CoreHome_ThereIsNoDataForThisReport` if not set * Defaults to `CoreHome_ThereIsNoDataForThisReport` if not set
...@@ -492,7 +484,6 @@ class Config ...@@ -492,7 +484,6 @@ class Config
*/ */
public function __construct() public function __construct()
{ {
$this->export_limit = \Piwik\Config::getInstance()->General['API_datatable_default_limit'];
$this->translations = array_merge( $this->translations = array_merge(
Metrics::getDefaultMetrics(), Metrics::getDefaultMetrics(),
Metrics::getDefaultProcessedMetrics() Metrics::getDefaultProcessedMetrics()
......
...@@ -70,13 +70,13 @@ ...@@ -70,13 +70,13 @@
<ul id='dropdownExport{{ randomIdForDropdown }}' class='dropdown-content exportToFormatItems'> <ul id='dropdownExport{{ randomIdForDropdown }}' class='dropdown-content exportToFormatItems'>
{% set requestParams = properties.request_parameters_to_modify|json_encode %} {% set requestParams = properties.request_parameters_to_modify|json_encode %}
<li><a target="_blank" requestParams="{{ requestParams|e('html_attr') }}" methodToCall="{{ properties.apiMethodToRequestDataTable }}" format="CSV" filter_limit="{{ properties.export_limit }}">CSV</a></li> <li><a target="_blank" requestParams="{{ requestParams|e('html_attr') }}" methodToCall="{{ properties.apiMethodToRequestDataTable }}" format="CSV" filter_limit="{{ properties.filter_limit }}">CSV</a></li>
<li><a target="_blank" requestParams="{{ requestParams|e('html_attr') }}" methodToCall="{{ properties.apiMethodToRequestDataTable }}" format="TSV" filter_limit="{{ properties.export_limit }}">TSV (Excel)</a></li> <li><a target="_blank" requestParams="{{ requestParams|e('html_attr') }}" methodToCall="{{ properties.apiMethodToRequestDataTable }}" format="TSV" filter_limit="{{ properties.filter_limit }}">TSV (Excel)</a></li>
<li><a target="_blank" requestParams="{{ requestParams|e('html_attr') }}" methodToCall="{{ properties.apiMethodToRequestDataTable }}" format="XML" filter_limit="{{ properties.export_limit }}">XML</a></li> <li><a target="_blank" requestParams="{{ requestParams|e('html_attr') }}" methodToCall="{{ properties.apiMethodToRequestDataTable }}" format="XML" filter_limit="{{ properties.filter_limit }}">XML</a></li>
<li><a target="_blank" requestParams="{{ requestParams|e('html_attr') }}" methodToCall="{{ properties.apiMethodToRequestDataTable }}" format="JSON" filter_limit="{{ properties.export_limit }}">Json</a></li> <li><a target="_blank" requestParams="{{ requestParams|e('html_attr') }}" methodToCall="{{ properties.apiMethodToRequestDataTable }}" format="JSON" filter_limit="{{ properties.filter_limit }}">Json</a></li>
<li><a target="_blank" requestParams="{{ requestParams|e('html_attr') }}" methodToCall="{{ properties.apiMethodToRequestDataTable }}" format="PHP" filter_limit="{{ properties.export_limit }}">Php</a></li> <li><a target="_blank" requestParams="{{ requestParams|e('html_attr') }}" methodToCall="{{ properties.apiMethodToRequestDataTable }}" format="PHP" filter_limit="{{ properties.filter_limit }}">Php</a></li>
{% if properties.show_export_as_rss_feed %} {% if properties.show_export_as_rss_feed %}
<li><a target="_blank" requestParams="{{ requestParams|e('html_attr') }}" methodToCall="{{ properties.apiMethodToRequestDataTable }}" format="RSS" filter_limit="{{ properties.export_limit }}" date="last10"> <li><a target="_blank" requestParams="{{ requestParams|e('html_attr') }}" methodToCall="{{ properties.apiMethodToRequestDataTable }}" format="RSS" filter_limit="{{ properties.filter_limit }}" date="last10">
<span class="icon-feed"></span> RSS <span class="icon-feed"></span> RSS
</a> </a>
</li> </li>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter