GithubHelp home page GithubHelp logo

yellowen / faalis Goto Github PK

View Code? Open in Web Editor NEW
54.0 14.0 15.0 7.36 MB

A RubyOnRails platform for rapid web application development. Containing a rich and flexible dashboard interface

License: GNU General Public License v2.0

Ruby 74.02% JavaScript 2.54% HTML 21.52% CoffeeScript 0.54% CSS 1.38%
ruby rails dashboard control-panel

faalis's People

Contributors

bitdeli-chef avatar gitter-badger avatar lxsameer avatar omilun avatar sadmad avatar seanhussey avatar yottanami avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

faalis's Issues

supports for relation fields in index section dashboard

Currently we have to provides a method on the model that returns a value inside the relation to allow proper view in index section. which can be easier by supporting relations some how. It's not that hard but needs a cool DSL representation.

Add a variables manifest for the stylesheets

Add a variables.scss file and collect all the variables needed for our customization on AdminLTE. Please bear in mind that we need different set of values for these variables based on the AdminLTE different themes.

Make a DSL to disable a section

Sometimes we don't want to have a certain section. There should be a DSL that allows us to disable it.

for example something like this:

#inside controller
disable_section :show

Runtime error undefined method `models_with_permission='

bundle exec rails server
warning: parser/current is loading parser/ruby22, which recognizes
warning: 2.2.3-compliant syntax, but you are running 2.2.1.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
=> Booting WEBrick
=> Rails 4.2.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/railtie.rb:196:in `method_missing': undefined method `models_with_permission=' for Faalis::Engine:Class (NoMethodError)
    from /home/mary/src/lovely_choices/config/initializers/faalis.rb:9:in `block in <top (required)>'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/bundler/gems/Faalis-d250a3f0bfe6/lib/faalis/engine.rb:70:in `setup'
    from /home/mary/src/lovely_choices/config/initializers/faalis.rb:1:in `<top (required)>'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/notifications.rb:166:in `instrument'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:651:in `load_config_initializer'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `each'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:420:in `block (2 levels) in each_strongly_connected_component_from'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:419:in `block in each_strongly_connected_component_from'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:413:in `call'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:413:in `each_strongly_connected_component_from'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `call'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
    from /home/mary/src/lovely_choices/config/environment.rb:5:in `<top (required)>'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
    from /home/mary/src/lovely_choices/config.ru:3:in `block in <main>'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
    from /home/mary/src/lovely_choices/config.ru:in `new'
    from /home/mary/src/lovely_choices/config.ru:in `<main>'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/server.rb:61:in `app'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/server.rb:139:in `log_to_stdout'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/server.rb:78:in `start'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:80:in `block in server'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `server'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands.rb:17:in `<top (required)>'
    from /home/mary/src/lovely_choices/bin/rails:8:in `require'
    from /home/mary/src/lovely_choices/bin/rails:8:in `<top (required)>'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/client/rails.rb:28:in `load'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/client/rails.rb:28:in `call'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/client/command.rb:7:in `call'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/client.rb:28:in `run'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/spring-1.4.0/bin/spring:49:in `<top (required)>'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/binstub.rb:11:in `load'
    from /home/mary/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/binstub.rb:11:in `<top (required)>'
    from /home/mary/src/lovely_choices/bin/spring:13:in `require'
    from /home/mary/src/lovely_choices/bin/spring:13:in `<top (required)>'
    from bin/rails:3:in `load'
    from bin/rails:3:in `<main>'

db migrate

bundle exec rake db:migrate db:seed
warning: parser/current is loading parser/ruby22, which recognizes
warning: 2.2.3-compliant syntax, but you are running 2.2.1.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
rake aborted!
NoMethodError: undefined method `models_with_permission=' for Faalis::Engine:Class
/home/mary/src/lovely_choices/config/initializers/faalis.rb:9:in `block in <top (required)>'
/home/mary/src/lovely_choices/config/initializers/faalis.rb:1:in `<top (required)>'
/home/mary/src/lovely_choices/config/environment.rb:5:in `<top (required)>'
Tasks: TOP => db:migrate => environment

Faalis should use `to` attribute of a field to guess the model name

Faalis should use to attribute of a relation field to guess the model name.
for example:

    {
        "name": "sections",
        "type": "has_many",
        "to": "work_steps"
    }

will generate this code in controller file:

  def create
    # Section should be replaced by WorkStep ---------------
    sections = Section.where({:id => params[:order][:sections]})
    # ---------------------------------------------------------------------------
    @order.sections = sections
    if @order.save
      respond_with(@order)
    else
      respond_to do |format|
        format.json { render :json => {:fields => @order.errors}, :status => :unprocessable_entity }
      end
    end
  end

Support for nested attributes

We have to provide support for nested attributes of active record.

Basically we have to add nested attributes form field into form section.

Wrong stylesheet urls

In your application layout, I think the:

<%= stylesheet_link_tag Faalis::I18n.direction(I18n.locale) + "/application", media: "all" %>

should be:

<%= stylesheet_link_tag "faalis/" + Faalis::I18n.direction(I18n.locale) + "/application", media: "all" %>

Many to many fields should not appear in strong paramaters

Any many to many fields that appears on resource_params will cause this error:

NoMethodError (undefined method `each' for nil:NilClass):
  app/controllers/api/v1/work_steps_controller.rb:51:in `build_resource'


  Rendered /home/mary/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.1.5/lib/action_dispatch/middleware/templates/rescues/_source.erb (7.8ms)
  Rendered /home/mary/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.1.5/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (19.3ms)
  Rendered /home/mary/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.1.5/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (21.7ms)
  Rendered /home/mary/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.1.5/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (171.4ms)

I think it's about a nil value for the M2M field

'Engines order' is required in order to run Faalis

Because we moved dashboard template to new gem (dashstrap) there is no app/assets/stylesheets/faalis/dashboard/ltr/application.css any more. So we have to reorder engines and move dashstrap to higher priority in order to run Faalis successfully.

We have to mention this it the read me file.

Angular manifest

The angular Javascript structure should change to angular-manifest.

Add rails assets gems in docs

Add this gems to installation guides ( wiki and web site)

source 'http://rails-assets.org' do
  gem 'rails-assets-bootstrap-rtl'
  gem 'rails-assets-jquery-knob'
  gem 'rails-assets-bootstrap-daterangepicker'
  gem 'rails-assets-jquery-sparkline'
  gem 'rails-assets-jquery-icheck'
  gem 'rails-assets-admin-lte'
end

Using outdated foundation-rails gem

You haven't specified the needed version of foundation-rails in your gemspec, so in applications the newest version will be used. This causes some problems while you're using older Foundation in your Engine.

In newer version foundation-global file is removed and you should only import foundation instead.

There are other issues like I guess there is a change in button-size mixin, which in the new version it only gets 2 arguments not 3.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.