Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard Manifest generator #182

Closed
astamm78 opened this issue Nov 6, 2015 · 12 comments
Closed

Dashboard Manifest generator #182

astamm78 opened this issue Nov 6, 2015 · 12 comments

Comments

@astamm78
Copy link

astamm78 commented Nov 6, 2015

Rather than running rails generate administrate:install and going through the overwrite prompts for each model, would it be possible to have a single-model generator for when new models get added to an application?

@gpinkham
Copy link

gpinkham commented Nov 6, 2015

rails generate administrate:dashboard Foo

@astamm78
Copy link
Author

astamm78 commented Nov 9, 2015

Perfect. Missed that in the docs

@zamith
Copy link

zamith commented Dec 14, 2015

What about for projects that start using administrate pretty late in the game, when they already have dozens of models, but only want dashboards for some? Is that a solution as well?

@c-lliope
Copy link
Contributor

@zamith - you could take a couple approaches there.

  1. Run rails generate administrate:install, and delete the dashboards you don't want
  2. Run rails generate administrate:dashboard ModelName for each dashboard you do want.

If you go with option 2, you'll also need to define a DashboardManifest class that follows this structure.

@zamith
Copy link

zamith commented Dec 14, 2015

@Graysonwright Right, I was wondering about the manifest. I think I'll take number 2. Any interest/ideas to improve the flow in this situation, or is this not a regular use case at all?

@c-lliope
Copy link
Contributor

At the moment we don't have a generator for creating only a blank manifest - we could add that in as part of our generator push.

Thanks for the suggestion!

@zamith
Copy link

zamith commented Dec 14, 2015

That would be cool. Thanks.

@zamith
Copy link

zamith commented Dec 14, 2015

@Graysonwright Btw, is there a way to specify the directory administrate uses? I already have an admin directory for other things, I would like to change it.

@zamith
Copy link

zamith commented Dec 14, 2015

It seems you also need an Admin::ApplicationController, or to change the inheritance to something else.

@c-lliope
Copy link
Contributor

@zamith at the moment, admin is hard-coded. We'd like to change that, but haven't gotten to it yet. There's discussion in #281.

@c-lliope
Copy link
Contributor

follow-up to the admin namespace discussion in #339, #332.

@c-lliope c-lliope changed the title Feature Request: Be able to generate administrate dashboard files for a single model Dashboard Manifest generator Dec 15, 2015
@c-lliope c-lliope added the ready label Dec 15, 2015
@c-lliope
Copy link
Contributor

This should be fixed by #362.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants