[Ovirt-devel] [PATCH server] Add time range and data type selection to flexchart.

Mark Wagner mwagner at redhat.com
Thu Nov 20 13:41:26 UTC 2008


Steve Linabery wrote:
> Also
> -change color scheme to match tallen prototype pallette
> -change SingleBar elements to dynamically resized Canvas objects instead of HBox objects
> -add new route to accept second-resolution timestamps for time range selection
> ---
>  src/app/controllers/graph_controller.rb        |   59 ++++-
>  src/app/util/stats/StatsTypes.rb               |    8 +-
>  src/app/views/graph/history_graphs.rhtml       |    2 +-
>  src/config/routes.rb                           |    1 +
>  src/flexchart/flexchart.mxml                   |   12 +-
>  src/flexchart/org/ovirt/ApplicationBus.as      |   39 ++++
>  src/flexchart/org/ovirt/Constants.as           |    2 +-
>  src/flexchart/org/ovirt/DataSource.as          |    7 +-
>  src/flexchart/org/ovirt/charts/BarChart.as     |  287 ++++++++++++++++++------
>  src/flexchart/org/ovirt/charts/Chart.as        |   38 +++-
>  src/flexchart/org/ovirt/data/DataPoint.as      |    7 +-
>  src/flexchart/org/ovirt/data/DataSeries.as     |   12 +-
>  src/flexchart/org/ovirt/elements/SingleBar.as  |   51 ++++-
>  src/flexchart/org/ovirt/elements/XAxisLabel.as |   66 ++++++
>  src/flexchart/org/ovirt/elements/YAxisLabel.as |   17 +--
>  15 files changed, 476 insertions(+), 132 deletions(-)
>  create mode 100644 src/flexchart/org/ovirt/ApplicationBus.as
>  create mode 100644 src/flexchart/org/ovirt/elements/XAxisLabel.as
>
>
>  
> diff --git a/src/app/util/stats/StatsTypes.rb b/src/app/util/stats/StatsTypes.rb
> index 41c2977..4896bb3 100644
> --- a/src/app/util/stats/StatsTypes.rb
> +++ b/src/app/util/stats/StatsTypes.rb
> @@ -324,10 +324,12 @@ class RRDResolution
>     end
>  
>     # Set up the resolutions for our rrd
> +   RRDResolution.add_item :Minimum, 10    # Ten secs
> +   RRDResolution.add_item :Short,   70    # Seventy secs
> +   RRDResolution.add_item :Medium,  500   # 500 secs ( 8minute, 20 sec)
> +   RRDResolution.add_item :Long,    2230
> +   RRDResolution.add_item :Maximum, 26350
>     RRDResolution.add_item :Default, 10    # Ten secs
> -   RRDResolution.add_item :Short, 500     # 500 secs ( 8minute, 20 sec)
> -   RRDResolution.add_item :Medium, 2230
> -   RRDResolution.add_item :Long, 26350
>  end
>  
Steve

We use the RRDResolution as the Ruby equiv of an enum.  So if you are 
changing
the values here, you will also need to change them in statsTest.rb or 
that will
break. I realize that most of the tests are commented out, but that was 
more
cuz I hadn't enabled them all before submittal. AFAIK, most of them 
should work
and in theory, they should be active and part of the test suite.

-mark




More information about the ovirt-devel mailing list