Sha256: c8aa3c37949c2f3f6ddb78419832a3d0ab1b80ab4f7d649a99d8d51275344631

Contents?: true

Size: 1.35 KB

Versions: 1

Compression:

Stored size: 1.35 KB

Contents

#--
# WebROaR - Ruby Application Server - http://webroar.in/
# Copyright (C) 2009  WebROaR
#
# This file is part of WebROaR.
#
# WebROaR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# WebROaR is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with WebROaR.  If not, see <http://www.gnu.org/licenses/>.
#++

# Methods added to this helper will be available to all view files for the graph controller.
module GraphHelper
  #This method is used to get the name of the partial to be rendered on selecting the Graph from the select box in the Analytics page.
  def get_partial(url_type)
    case url_type
    when "URL-Calls"
      partial = 'url_calls_graph'
    when "Database-Usage"
      partial = 'database_usage_graph'
    when "URL-Breakup"
      partial = 'url_breakup_graph'
    when "Throughput"
      partial = 'throughput_graph'
    when "Resource-Usage"
      partial='resource_usage_graph_app'
    end
    return partial
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
webroar-0.2.2 src/admin_panel/app/helpers/graph_helper.rb