A draw.io integration in Phorge
Owns R5
A draw.io integration in Phorge
Owns R5
@mturdus Can you spare some time to review this diff?
I have a nice working version here, which renders the diagram with the drawio viewer javascript component:
(Credit to bekay indeed)
Nice :) Thanks
Yeah, there are some malformed URLs we should tackle for sure.
Thanks! It worked now! As mentioned in the chat, I'm quite sure that point n.3 and n.4 should be swapped in the README
@valerio.bozzolan Could you try again to install it? There is a readme with new instructions.
In D25577#16640, @mturdus wrote:Now it's working!
Now it's working!
@mturdus right, I don't have the whole picture of this little bit wild codebase 😁 Thanks for the pointer. As far as I can see, this image and the DOMContentLoaded event handler serves no purpose anymore. All is working without it. I have renamed the main js and some functions in it for clarity. Would love if you could give it a try.
This is the console log I got when running in Firefox:
Navigated to http://phorge.blackbird.turdus.local/diagram/ diagram-extension behavior called with config: Object { loadJsExtensionArgs: (4) […], toolbarCss: "http://phorge.blackbird.turdus.local/res/diagram-resources/35ad6f49/iframe-toolbtn.css", toolbarJs: "http://phorge.blackbird.turdus.local/res/diagram-resources/26d75a35/iframe-toolbtn.js" } loadJsExtensionArgs: Array(4) [ "", "", "", … ] 0: "" 1: "" 2: "" 3: "" length: 4 <prototype>: Array [] toolbarCss: "http://phorge.blackbird.turdus.local/res/diagram-resources/35ad6f49/iframe-toolbtn.css" toolbarJs: "http://phorge.blackbird.turdus.local/res/diagram-resources/26d75a35/iframe-toolbtn.js" <prototype>: Object { … } phorge_extension.js:8:11 loadJsExtension called with args: <empty string> <empty string> <empty string> <empty string> phorge_extension.js:95:13
@mturdus I have added some console logs in the js code (so patch and purge the caches on <phorge-base>config/cache/!)
Well I have worked the entire day on this (and I see your mentioned issues)... main problem is: extension is not working with security.alternate-file-domain. That I have fixed at least for the creation/editing of diagrams. I have changed pretty much and would love to send a diff.
The reason why I did not put all the draw.io js and css files in the repo is because
and 2) the draw.io people commit a lot (as in more than once a week).
(Working on fixing it...)
@valerio.bozzolan Are there any prehistoric traces that this extension has been successfully used in the past? :P