Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Insights')
-rw-r--r--plugins/Insights/InsightReport.php7
-rw-r--r--plugins/Insights/Visualizations/Insight/RequestConfig.php2
-rw-r--r--plugins/Insights/javascripts/insightsDataTable.js8
-rw-r--r--plugins/Insights/stylesheets/insightVisualization.less1
-rw-r--r--plugins/Insights/templates/insightControls.twig14
5 files changed, 8 insertions, 24 deletions
diff --git a/plugins/Insights/InsightReport.php b/plugins/Insights/InsightReport.php
index e7937a4f55..5310ff1185 100644
--- a/plugins/Insights/InsightReport.php
+++ b/plugins/Insights/InsightReport.php
@@ -218,9 +218,14 @@ class InsightReport
)
);
+ $metricName = $metric;
+ if (!empty($reportMetadata['metrics'][$metric])) {
+ $metricName = $reportMetadata['metrics'][$metric];
+ }
+
$dataTable->setMetadataValues(array(
'reportName' => $reportMetadata['name'],
- 'metricName' => $reportMetadata['metrics'][$metric],
+ 'metricName' => $metricName,
'date' => $date,
'lastDate' => $lastDate,
'period' => $period,
diff --git a/plugins/Insights/Visualizations/Insight/RequestConfig.php b/plugins/Insights/Visualizations/Insight/RequestConfig.php
index 43aea4b766..ab771a51de 100644
--- a/plugins/Insights/Visualizations/Insight/RequestConfig.php
+++ b/plugins/Insights/Visualizations/Insight/RequestConfig.php
@@ -16,7 +16,7 @@ use Piwik\ViewDataTable\RequestConfig as VisualizationRequestConfig;
class RequestConfig extends VisualizationRequestConfig
{
public $min_impact_percent = '0.1';
- public $min_growth_percent = 20;
+ public $min_growth_percent = 1;
public $compared_to_x_periods_ago = 1;
public $order_by = InsightReport::ORDER_BY_ABSOLUTE;
public $filter_by = '';
diff --git a/plugins/Insights/javascripts/insightsDataTable.js b/plugins/Insights/javascripts/insightsDataTable.js
index 2ebfe04a72..7c2ca331a2 100644
--- a/plugins/Insights/javascripts/insightsDataTable.js
+++ b/plugins/Insights/javascripts/insightsDataTable.js
@@ -45,7 +45,6 @@
handleRowActions: function () {},
_init: function (domElem) {
- this.initMinGrowthPercentage(domElem);
this.initShowIncreaseOrDecrease(domElem);
this.initOrderBy(domElem);
this.initComparedToXPeriodsAgo(domElem);
@@ -91,13 +90,6 @@
});
},
- initMinGrowthPercentage: function (domElem) {
- var self = this;
- $('[name=minGrowthPercent]', domElem).bind('change', function (event) {
- self._changeParameterAndReload({min_growth_percent: getValueFromEvent(event)});
- });
- },
-
initOrderBy: function (domElem) {
var self = this;
$('[name=orderBy]', domElem).bind('change', function (event) {
diff --git a/plugins/Insights/stylesheets/insightVisualization.less b/plugins/Insights/stylesheets/insightVisualization.less
index fb79bbe8be..0d09f17944 100644
--- a/plugins/Insights/stylesheets/insightVisualization.less
+++ b/plugins/Insights/stylesheets/insightVisualization.less
@@ -4,6 +4,7 @@
}
}
+.dataTableVizInsight .dataTableFeatures,
.insightsDataTable {
.controls {
diff --git a/plugins/Insights/templates/insightControls.twig b/plugins/Insights/templates/insightControls.twig
index 3efd62acb2..e5fe930c20 100644
--- a/plugins/Insights/templates/insightControls.twig
+++ b/plugins/Insights/templates/insightControls.twig
@@ -1,19 +1,5 @@
<div class="controls">
- {{ 'Insights_ControlGrowthDescription'|translate }}
-
- <select size="1" name="minGrowthPercent">
- {% for i in range(0, 1, 1) %}
- <option {% if i == properties.min_growth_percent %}selected{% endif %} value="{{ i }}">{{ i }}%</option>
- {% endfor %}
- {% for i in range(5, 100, 5) %}
- <option {% if i == properties.min_growth_percent %}selected{% endif %} value="{{ i }}">{{ i }}%</option>
- {% endfor %}
- {% for i in range(200, 1000, 100) %}
- <option {% if i == properties.min_growth_percent %}selected{% endif %} value="{{ i }}">{{ i }}%</option>
- {% endfor %}
- </select>
-
{% if period != 'range' %}
{{ 'Insights_ControlComparedToDescription'|translate }}