Skip to content

Commit

Permalink
refs #57 removed min impact control as it might be not clear what it …
Browse files Browse the repository at this point in the history
…is anyway and user can change the limit filter if he wants to see only entries with very high impact
  • Loading branch information
tsteur committed Mar 5, 2014
1 parent bb0377a commit 862e532
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 28 deletions.
3 changes: 1 addition & 2 deletions plugins/Insights/Visualizations/Insight/RequestConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class RequestConfig extends VisualizationRequestConfig
{
public $min_impact_percent = 1;
public $min_impact_percent = '0.1';
public $min_growth_percent = 20;
public $compared_to_x_periods_ago = 1;
public $order_by = 'absolute';
Expand All @@ -28,7 +28,6 @@ public function __construct()

$properties = array(
'min_growth_percent',
'min_impact_percent',
'order_by',
'compared_to_x_periods_ago',
'filter_by',
Expand Down
8 changes: 0 additions & 8 deletions plugins/Insights/javascripts/insightsDataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

_init: function (domElem) {
this.initMinGrowthPercentage(domElem);
this.initMinImpactPercent(domElem);
this.initShowIncreaseOrDecrease(domElem);
this.initOrderBy(domElem);
this.initComparedToXPeriodsAgo(domElem);
Expand Down Expand Up @@ -98,13 +97,6 @@
});
},

initMinImpactPercent: function (domElem) {
var self = this;
$('[name=minImpactPercent]', domElem).bind('change', function (event) {
self._changeParameterAndReload({min_impact_percent: getValueFromEvent(event)});
});
},

initComparedToXPeriodsAgo: function (domElem) {
var self = this;
$('[name=comparedToXPeriodsAgo]', domElem).bind('change', function (event) {
Expand Down
22 changes: 4 additions & 18 deletions plugins/Insights/templates/insightControls.twig
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
<div style="padding: 10px;padding-bottom: 0px;">
Minimum impact of
<select name="minImpactPercent" title="Based on a total of {{ dataTable.getMetadata('totalValue') }} visitors or metricname">
{% for i in range(0, 10) %}
<option {% if i == properties.min_impact_percent %}selected{% endif %} value="{{ i }}">{{ i }}%</option>
{% endfor %}
{% for i in range(12, 30, 2) %}
<option {% if i == properties.min_impact_percent %}selected{% endif %} value="{{ i }}">{{ i }}%</option>
{% endfor %}
{% for i in range(40, 100, 10) %}
<option {% if i == properties.min_impact_percent %}selected{% endif %} value="{{ i }}">{{ i }}%</option>
{% endfor %}
{% for i in range(200, 1000, 100) %}
<option {% if i == properties.min_impact_percent %}selected{% endif %} value="{{ i }}">{{ i }}%</option>
{% endfor %}
</select>

and growth of at least
Minimum growth of
<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>
Expand All @@ -28,7 +12,7 @@
{% endfor %}
</select>

{% if period == 'day' or period == 'month' %}
{% if period == 'day' or period == 'month' or period == 'week' %}
compared to
{% if period == 'day' %}
<select size="1" name="comparedToXPeriodsAgo">
Expand All @@ -51,6 +35,8 @@
same month in previous year
</option>
</select>
{% elseif period == 'week' %}
previous week
{% endif %}
{% endif %}

Expand Down

0 comments on commit 862e532

Please sign in to comment.