I am currently writing a plugin to integrate OctoPrint with JW Player & JW Dashboard.
I have modified: src/octoprint/templates/dialogs/timelapse.jinja2 src/octoprint/static/js/app/viewmodels/timelapse.js src/octoprint/templates/javascripts.jinja2
These changes work locally to support using JW Player in OctoPrint. I wanted to know if there was a way to override these files using my plugin. I looked at get_template_configs but nothing there worked.
EDIT: After looking at the docs, I don't think generic will do it as a replacement, but will allow you to include your own. You may have to modify the template accordingly for different include pathing.
I was able to get the jinja2 files to be replaced but now I am left with the Timelapse tab empty. I would need to also override the js/timelapse.js how would I do that?
And copied the timelapse.js with the same path to my plugin.
This is what my screen is looking like now. I read that when you override core components the plugin is required to maintain functionality. So I assume there is more I will need to copy from OctoPrint into my plugin and setup.
Yeah, you basically have to re-create all the same files and functionality that are available in the original view model. Another example I thought of that uses replaces is GitHub - cp2004/OctoPrint-VirtualPrinterSettings: Add configurable settings to the virtual printer in OctoPrint. Not sure if it will help in understanding it a little more. I know personally with PlotlyTempGraph I copied all the files related to the original temperature view model and just whittled away at errors that popped up in the developers tools console tab.
Thanks so much! This makes sense even if I don’t understand the “why”, I most certainly understand the “how”! Many thanks! I will respond back with my solution!