yellowen / faalis Goto Github PK
View Code? Open in Web Editor NEWA RubyOnRails platform for rapid web application development. Containing a rich and flexible dashboard interface
License: GNU General Public License v2.0
A RubyOnRails platform for rapid web application development. Containing a rich and flexible dashboard interface
License: GNU General Public License v2.0
Add a functionality to allow user to select the internal generator he/she wants to use with faalis:scaffold
.
We have to provide a dsl for show
action
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.
We need to provide an integration for ElasticSearch.
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.
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
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 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
I'm not sure that we need such functionality or not, because user simply can control this by scoping but it worth mentioning it.
New Formtastic version does't suppor Jalali date input
If we do not include i18n language js file it can not work.
Current models_with_permissions
is not a good solution find a better way even with a auto load or auto discovery.
It's obvious.
many to many table proxy migration won't install with installer
We have to provide support for nested attributes of active record.
Basically we have to add nested attributes form field into form section.
messy lines in index.json.jbuilder
cause syntax error on run-time. some lines are missing \n
Provide a solution to cache user permissions and validating permission cache on some events like changing user permissions
Current list view directive can be act as a table view by a little enhancement
We have to use our permission system to populate the sidebar. Not everyone have to see every item.
Users need to know what they are using by including faalis
manifests.
Devise
uses the default_url_options
inside host project application controller to get the url options and specially the locale
option.
Using --namespace
with faalis:resource
does not work very well. for example does not add the namespace name on controller.
Improve the controller api to reponsone with better HTTP headers. Currently we just response with 200
which is bad.
The engine of dashboard and home should separate
Pagination widget in RTL layout is not good at all. @sadmad please take a look and fix it. Thanks in advance
It seems that turbolinks.jquery
fire the document ready events more that once. probably because the are some events binding defined on document
inside the ready event.
more info on ColorlibHQ/AdminLTE#718
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" %>
Assets of control panel required in main application because of require tree, It should remove.
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
Currently our create
and update
actions of dashboard_controller
do not support many to many relations in model. We have to support that as well.
Review readme file of dashboard generators. It contains several errors.
we have to provide a solution to translate field names in form_error
message.
We need a dynamic assets managment
For example each layout should include its required js or stylesheet based on an specific standard.
We need some kind of hook ability to allow manipulate the functionality of each section of dashboard.
We accidentally overwrite the db/seeds.rb
of the host project when we want to put Faalis data which we should not.
Right now it's possible for a user to be a member of a group twice. Stupid right ?
remove mailboxer from install generator of 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.
Force install
generator to use :orm
class option in generated content. For example we have to specify the default ORM
based on this option.
We need one for dashboard interface.
We need a generator to generate the corresponding template to each dashboard index for easier overriding. e.g:
rails generate faalis:dashboard:view [section_name]
The angular Javascript structure should change to angular-manifest.
This is bug because generally we have to use turbolinks
redirect, and don't force the page to refresh and lose state.
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
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.
Checkout both Pundit and Authority gems and replace cancan
with one of them.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.