[Rt-commit] rt branch, 4.2/saved-chart-show-partly, created. rt-4.2.9-25-gb2a3f09
? sunnavy
sunnavy at bestpractical.com
Tue Nov 18 11:25:15 EST 2014
The branch, 4.2/saved-chart-show-partly has been created
at b2a3f09c43aada35951c367e1f3e5044d2216178 (commit)
- Log -----------------------------------------------------------------
commit b2a3f09c43aada35951c367e1f3e5044d2216178
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Nov 13 01:11:34 2014 +0800
pie/bar/table only chart styles
sometimes users want to show part of it.
(e.g. when the charts are added to a dashboard)
diff --git a/share/html/Search/Chart b/share/html/Search/Chart
index c011635..88203ac 100644
--- a/share/html/Search/Chart
+++ b/share/html/Search/Chart
@@ -64,7 +64,7 @@ my $font = $font_config{ $session{CurrentUser}->UserObj->Lang || '' }
s/\D//g for grep defined, $Width, $Height;
$Width ||= 600;
-$Height ||= ($ChartStyle eq 'pie' ? $Width : 400);
+$Height ||= ($ChartStyle =~ /pie/ ? $Width : 400);
$Height = $Width if $ChartStyle eq 'pie';
my $plot_error = sub {
diff --git a/share/html/Search/Elements/Chart b/share/html/Search/Elements/Chart
index d377f88..d17e9f9 100644
--- a/share/html/Search/Elements/Chart
+++ b/share/html/Search/Elements/Chart
@@ -67,6 +67,7 @@ $report->SortEntries;
my $query_string = $m->comp('/Elements/QueryString', %ARGS, GroupBy => \@GroupBy );
</%init>
<div class="chart-wrapper">
+% if ( ($ChartStyle || '') ne 'table only' ) {
<span class="chart image">
% if (RT->Config->Get('DisableGD')) {
<% loc('Graphical charts are not available.') %><br />
@@ -77,6 +78,13 @@ my $query_string = $m->comp('/Elements/QueryString', %ARGS, GroupBy => \@GroupBy
<img src="<% RT->Config->Get('WebPath') %>/Search/Chart?Cache=<% $key |un %>&<% $query_string |n %>" />
% }
</span>
+% }
+
+% if ( ($ChartStyle || '') !~ /^(?:pie|bar) only$/ ) {
<& ChartTable, %ARGS, Table => { $report->FormatTable( %columns ) } &>
+% }
+
+% if ( ($ChartStyle || '') !~ / only$/ ) {
<div class="query"><span class="label"><% loc('Query') %>:</span><span class="value"><% $Query %></span></div>
+% }
</div>
diff --git a/share/html/Search/Elements/SelectChartType b/share/html/Search/Elements/SelectChartType
index 1e8f2ec..f367530 100644
--- a/share/html/Search/Elements/SelectChartType
+++ b/share/html/Search/Elements/SelectChartType
@@ -50,9 +50,12 @@ $Name => 'ChartType'
$Default => 'bar'
</%args>
<select id="<%$Name%>" name="<%$Name%>">
-% foreach my $option (qw(bar pie)) {
+% foreach my $option ('bar', 'bar only', 'pie', 'pie only', 'table only') {
% # 'bar' # loc
+% # 'bar only' # loc
% # 'pie' # loc
+% # 'pie only' # loc
+% # 'table only' # loc
<option value="<%$option%>"<% $option eq $Default ? qq[ selected="selected"] : '' |n %>><%loc($option)%></option>
% }
</select>
diff --git a/share/static/css/aileron/ticket-lists.css b/share/static/css/aileron/ticket-lists.css
index 3e55cfc..de86164 100644
--- a/share/static/css/aileron/ticket-lists.css
+++ b/share/static/css/aileron/ticket-lists.css
@@ -177,6 +177,7 @@ padding-bottom: 1em;
.chart-meta {
padding-top: 2em;
border-top: 1px solid #ccc;
+ clear: both;
}
.chart-meta .chart-type {
diff --git a/share/static/css/ballard/ticket-lists.css b/share/static/css/ballard/ticket-lists.css
index 4bb616c..be83108 100644
--- a/share/static/css/ballard/ticket-lists.css
+++ b/share/static/css/ballard/ticket-lists.css
@@ -176,6 +176,7 @@ padding-bottom: 1em;
.chart-meta {
padding-top: 2em;
border-top: 1px solid #ccc;
+ clear: both;
}
.chart-meta .chart-type {
diff --git a/share/static/css/rudder/ticket-lists.css b/share/static/css/rudder/ticket-lists.css
index 94e6070..5645dc5 100644
--- a/share/static/css/rudder/ticket-lists.css
+++ b/share/static/css/rudder/ticket-lists.css
@@ -211,6 +211,7 @@ div.paging {
.chart-meta {
padding-top: 2em;
border-top: 1px solid #ccc;
+ clear: both;
}
.chart-meta .chart-type {
diff --git a/share/static/css/web2/ticket-lists.css b/share/static/css/web2/ticket-lists.css
index 4bb616c..be83108 100644
--- a/share/static/css/web2/ticket-lists.css
+++ b/share/static/css/web2/ticket-lists.css
@@ -176,6 +176,7 @@ padding-bottom: 1em;
.chart-meta {
padding-top: 2em;
border-top: 1px solid #ccc;
+ clear: both;
}
.chart-meta .chart-type {
-----------------------------------------------------------------------
More information about the rt-commit
mailing list