Plugins - Dashboard Engine

StarAdd to favorites

DashboardEngine is a rails engine that reads through all the controllers, obtains views from each of them which are candidates for being on dashboard, collects the parameters for the view (if any), and puts all of them on the dashboard settings page.

Usage:

        1) Views without parameters.
                class MyController < ApplicationController
                         dashboard_actions :action1, :action2, :action3
                         ...
                end

        2) Views with parameters.
                class MyController < ApplicationController
                        dashboard_actions (:action1,  {:action2 => [:param1, :param2]})
                        ...
                end

This software package is developed using the Engines plugin. To find out more about how to use engines in general, go to http://rails-engines.rubyforge.org for general documentation about the Engines mechanism.

Installation

  1. Create your Rails application, set up your databases, grab the Engines plugin and the DashboardEngine, and install them.
  2. Install the DashboardEngine into your vendor/plugins directory

    You can do it using, ruby script/plugin install svn://rubyforge.org/var/svn/dashboardengine/trunk

    Then rename the engine from dashboardengine to dashboard_engine. mv vendor/plugins/dashboardengine/ vendor/plugins/dashboard_engine/

    REASON:

                 *) By convention engines are named xyz_engine.
                 *) RubyForge doesnot allow any underscores '_' in project names.
                 *) DashboardEngine is hosted on RubyForge.
    
  3. Modify your Engines.start call in config/environment.rb
     Engines.start :dashboard # or :dashboard_engine
    
  4. Edit your application.rb file so it looks something like the following:
     class ApplicationController < ActionController::Base
       include DashboardEngine
     end
    
  5. Edit your application_helper.rb file:
     module ApplicationHelper
       include DashboardEngine
     end
    
  6. Perform any configuration you might need. You’ll probably want to set these values in environment.rb (before the call to Engines.start):
     module DashboardEngine
       config :some_option, "some_value"
     end
    
  7. Initialize the database tables. You can either use the engine migrations by calling:
     rake engine_migrate
    
      to move all engines to their latest versions, or
    
        rake engine_migrate ENGINE=dashboard
    
      to migrate only this engine.
    
  8. The DashboardEngine provides a default stylesheet and a small javascript helper file, so you’ll probably want to include the former and almost certainly the latter in your application’s layout. Add the following lines:
       <%= engine_stylesheet "dashboard_engine" %>
       <%= engine_javascript "dashboard_engine" %>
    

Configuration

A number of configuration parameters are available to allow to you control how the data is stored, should you be unhappy with the defaults. These are outlined below.

  module DashboardEngine
    config :some_option, "some_value"
  end

Pramod K P

svn://rubyforge.org/var/svn/dashboardengine

LGPL

  • Currently 3.6/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Rails Engines

Tags

Comments

Add a comment

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.

Have a comment?