Closed lpil closed 6 years ago
Hi @lpil
I have a version in the works that uses Raxx as the webserver and is much more modular. The hold up is that there is a bit of complexity around templating since Phoenix provides a lot of nice helpers for this.
When this is done I can certainly expose a public function that renders HTML. Could you give an example of how you might like to call it?
For now, if you have dockerized infrastructure you should be able to deploy the phoenix-based UI without even needing to touch anything in the code. It won't integrate with your existing server, but maybe it doesn't have to.
Could you give an example of how you might like to call it?
I'd use it in my Elli handle callback.
def handle(_req, _config) do
{200, [], RihannaUI.html()}
end
If a Raxx version is added could it avoid the Raxx helper functions and just builds the maps directly? It's easy enough to work with that way and means we don't have to add another dependency.
Or alternatively having the plug/phoenix/raxxx/whatever specific config only compile when those libraries are loaded and making the deps optional.
Closing this since Rihanna relies on POST requests e.g. to retry jobs etc so the effort of generalising it is probably not worth it.
We use Elli in production.
Would be nice just to have a function I can call that returns the dashboard as a HTML string :)