Would you mind submitting this as a github pull request for review at
https://github.com/ganglia/ganglia-web ?
On 06/25/2013 03:44 PM, Jochen Hein wrote:
>
> We'd like to have the optional graphs in the cluster and host view
> bigger. In the past, I just modified cluster_view.php and
> host_view.php. To avoid that modification and forward porting of my
> changes I've added a new configuration option.
>
> Comments are welcome.
>
> --- ganglia-webfrontend/conf_default.php.in.orig 2013-06-25
> 21:33:02.000000000 +0200
> +++ ganglia-webfrontend/conf_default.php.in 2013-06-25 21:42:35.000000000
> +0200
> @@ -310,6 +310,10 @@
> # the view .json file.
> $conf['default_view_graph_size'] = 'medium';
>
> +# sets a default graph size for optional graphs separate from the regular
> +# default graph size.
> +$conf['default_optional_graph_size'] = 'medium';
> +
> # The API can serve up graphs, but the URLs should be fully qualified.
> # The default value is a hack to serve up the called hostname when
> # possible. It is best to define this manually.
> --- ganglia-webfrontend/cluster_view.php.orig 2013-05-27 18:36:52.000000000
> +0200
> +++ ganglia-webfrontend/cluster_view.php 2013-06-25 21:25:45.000000000
> +0200
> @@ -416,7 +416,7 @@
> foreach ($reports["included_reports"] as $index => $report_name ) {
> if (! in_array( $report_name, $reports["excluded_reports"])) {
> $optional_reports .= "<A
> HREF=\"./graph_all_periods.php?$graph_args&g=" . $report_name .
> "&z=large\">
> - <IMG BORDER=0 style=\"padding:2px;\" $additional_cluster_img_html_args
> title=\"$cluster_url\" SRC=\"./graph.php?$graph_args&g=" . $report_name
> ."&z=medium\"></A>
> + <IMG BORDER=0 style=\"padding:2px;\" $additional_cluster_img_html_args
> title=\"$cluster_url\" SRC=\"./graph.php?$graph_args&g=" . $report_name
> ."&z=" . $conf['default_optional_graph_size'] . "\"></A>
> ";
> }
> }
> --- ganglia-webfrontend/host_view.php.orig 2013-05-27 18:37:08.000000000
> +0200
> +++ ganglia-webfrontend/host_view.php 2013-06-25 21:21:43.000000000 +0200
> @@ -127,7 +127,7 @@
> $showEventBtn = '<input title="Hide/Show Events" type="checkbox" id="'
> . $SHOW_EVENTS_BASE_ID . $report_name . '" onclick="showEvents(\'' . $graphId
> . '\', this.checked)"/><label class="show_event_text" for="' .
> $SHOW_EVENTS_BASE_ID . $report_name . '">Hide/Show Events</label>';
> if(checkAccess(GangliaAcl::ALL_VIEWS, GangliaAcl::EDIT, $conf))
> $optional_reports .= $addMetricBtn . ' ';
> - $optional_reports .= $csvBtn . ' ' . $jsonBtn . ' '
> .$inspectBtn . ' ' . $showEventBtn . "<br />" . $graph_anchor . "<img
> id=\"" . $graphId . "\" $additional_cluster_img_html_args border=\"0\"
> title=\"$cluster_url\" SRC=\"./graph.php?$graph_args&g=" . $report_name
> ."&z=medium&c=$cluster_url\" style=\"margin-top:5px;\" /></a></div>";
> + $optional_reports .= $csvBtn . ' ' . $jsonBtn . ' '
> .$inspectBtn . ' ' . $showEventBtn . "<br />" . $graph_anchor . "<img
> id=\"" . $graphId . "\" $additional_cluster_img_html_args border=\"0\"
> title=\"$cluster_url\" SRC=\"./graph.php?$graph_args&g=" . $report_name
> ."&z=" . $conf['default_optional_graph_size'] . "&c=$cluster_url\"
> style=\"margin-top:5px;\" /></a></div>";
> }
> }
> } // foreach
>
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ganglia-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-developers