Hello,
I'm working on a plugin to support openstack v3 which can be found at
https://github.com/achevalet/foreman_openstack_v3.
Initially I've patched foreman (see pr #4254
<https://github.com/theforeman/foreman/pull/4254>) then I decided to write
a plugin so that it can be available faster and back-ported to older
releases.
I'm able to override the default provider model but it still uses the
built-in form (app/views/compute_resources/form/_openstack.html.erb)
I've tried to update the compute resource controller (ie Add New Controller
Action
<How to Create a Plugin - Foreman>
or Extending a Controller <goog_2083102707> or Add New View
<How to Create a Plugin - Foreman>)
or also using deface
<How to Create a Plugin - Foreman>without
success.
My current (dirty) workaround is to rename the built-in form
(app/views/compute_resources/form/_openstack.html.erb.ori) and create this
file at the same location within the plugin.
I'm wondering if there is a way to change the search path of the forms to
have the plugin directory before the built-in one?
Or any other solution?
Any help would be much appreciated.
Cheers,
Anthony
Anthony,
I have replied on your github issue for this and proposed a workaround
for this.
https://github.com/achevalet/foreman_openstack_v3/issues/1
···
Am 06.02.17 um 16:25 schrieb Anthony Chevalet:
> Hello,
>
> I'm working on a plugin to support openstack v3 which can be found at
> https://github.com/achevalet/foreman_openstack_v3.
> Initially I've patched foreman (see pr #4254
> ) then I decided to
> write a plugin so that it can be available faster and back-ported to
> older releases.
>
> I'm able to override the default provider model but it still uses the
> built-in form (app/views/compute_resources/form/_openstack.html.erb)
> I've tried to update the compute resource controller (ie Add New
> Controller Action
>
> or Extending a Controller or Add New View
> )
> or also using deface
> without
> success.
>
> My current (dirty) workaround is to rename the built-in form
> (app/views/compute_resources/form/_openstack.html.erb.ori) and create
> this file at the same location within the plugin.
> I'm wondering if there is a way to change the search path of the forms
> to have the plugin directory before the built-in one?
>
> Or any other solution?
>
> Any help would be much appreciated.
>
> Cheers,
> Anthony
>
> --
> You received this message because you are subscribed to the Google
> Groups "foreman-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to foreman-dev+unsubscribe@googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
Thanks a lot Timo, using prepend_view_path
<http://apidock.com/rails/ActionView/ViewPaths/prepend_view_path> does the
trick!
Really appreciated!
Anthony
···
Le mardi 7 février 2017 10:57:05 UTC+1, Timo Goebel a écrit :
>
> Anthony,
>
> I have replied on your github issue for this and proposed a workaround for
> this.
>
> https://github.com/achevalet/foreman_openstack_v3/issues/1
>
> - Timo
>
> Am 06.02.17 um 16:25 schrieb Anthony Chevalet:
>
> Hello,
>
> I'm working on a plugin to support openstack v3 which can be found at
> https://github.com/achevalet/foreman_openstack_v3.
> Initially I've patched foreman (see pr #4254
> ) then I decided to
> write a plugin so that it can be available faster and back-ported to older
> releases.
>
> I'm able to override the default provider model but it still uses the
> built-in form (app/views/compute_resources/form/_openstack.html.erb)
> I've tried to update the compute resource controller (ie Add New
> Controller Action
>
> or Extending a Controller or Add New View
> )
> or also using deface
> without
> success.
>
> My current (dirty) workaround is to rename the built-in form
> (app/views/compute_resources/form/_openstack.html.erb.ori) and create this
> file at the same location within the plugin.
> I'm wondering if there is a way to change the search path of the forms to
> have the plugin directory before the built-in one?
>
> Or any other solution?
>
> Any help would be much appreciated.
>
> Cheers,
> Anthony
>
> --
> You received this message because you are subscribed to the Google Groups
> "foreman-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to foreman-dev...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>
>