Open olinelson opened 1 month ago
Hmm, I have to ask what your goal is? Why are you including anything Mission Control related in your main application layout?
Mission Control is a Rails Engine that is supposed to have full control and management of it's own assets and layout.
Generally, you install the Gem, and then when you mount it into your Routes, you use that path and everything is taken care of for you! No need to modify anything in your application.
Hi @HamptonMakes, thanks for your response.
My goal is to simply display Mission Control at my application's /jobs
path.
I started going down the path of experimenting with assets as the default behaviour of Mission Control (with my css-bundling-rails setup) seems to not work...
I assume it's something to do with css-bundling-rails as Mission Control works fine on another project of mine with a no-build css setup.
Any pointers or theories greatly appreciated.
Cheers!
Hey @olinelson, sorry for the delay! I also don't quite understand very well what's happening here 😕 What happens if you simply mount Mission Control on /jobs
in your routes? What kind of error do you get?
If you have content_security_policy enabled in your app.
You will need to add the css 'bulma', used by mission_control to the style_src
,
otherwise it will not work.
Rails.application.configure do
config.content_security_policy do |policy|
policy.style_src :self, 'https://cdn.jsdelivr.net/npm/bulma@1.0.1/css/bulma.min.css'
end
end
It should be documented. Or added by default when loading mission_control.
@kivanio good point. I'm going to vendor https://cdn.jsdelivr.net/npm/bulma@1.0.1/css/bulma.min.css instead, so that you don't need to set your CSP to allow it.
I released 0.6.0 with that change and other changes I had pending. @olinelson do you think the CSP was your problem?
ohh that was fast 🚀 good work @rosa 👍🏻
I confirm it working now
I'm currently trying to use
mission_control-jobs
with a setup utilising cssbundling-rails.Whilst Sprockets seems to compile Mission Control's assets perfectly fine they aren't provided as stylesheet links to the application layout by default. I've tried adding stylesheet links to my layout manually but that seems to only partially fix the problem.
application.html.erb
Somewhat adding to my confusion is the fact that the view renders only the queues table not the tabs or navbar:
Is there an existing way for things to play nicely with cssbundling-rails?