-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SUI to support support webmks #1520
Comments
So as the WebMKS console isn't shipped OOTB and we cannot precompile assets on an already existing appliance, it cannot be included into the asset pipeline nor a webpack pack (sounds funny, you seriously say it like this?). So I think we could do the following: // Send a HEAD request to determine if the file exists, IMO it's enough to check for the JS
fetch('/webmks/wmks.min.js', {
method: 'HEAD'
}).then(() => new Promise((resolve, reject) => { // Create and return with a promise
// Create a <link> tag that loads the CSS file and append it to the page
let link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = '/webmks/css/wmks-all.css';
document.head.appendChild(link);
// Create a <script> tag that loads the JS file
let script = document.createElement('script');
script.src = '/webmks/wmks.min.js';
script.onload = () => resolve(); // Set an onload function that resolves the promise
document.head.appendChild(script); // Append the <script> tag to the page
})).then(() => {
// The code is loaded, we can do stuff with WebMKS
}).catch((error) => {
// some error handling
}); |
I suppose so, should work, yes :) (EDITed from something else, I was confused about fetch vs require) |
@himdel the fetch is just an example, I assume angular can do something similar in its own world. @AllenBW looking at the API code I think you can just ask for WebMKS consoles the same way as you do for VNC/SPICE, just use WebMKS as the console type. You will probably need my help with setting up a provider with WebMKS support, just ping me on IRC for the details. |
Is there any new about this feature? |
@AllenBW when will you have time to take a look? Do you have any questions about how and where to start? |
Heyoh pto caused the delayed response, if time is available later this week I can begin to give this some 👀 in earnest! 🤞 |
up |
@AllenBW ping? |
Yah, haven't had the time. 😔 |
up |
no update on my end |
Yes update on my end, final PR coming soon 😈 |
Description of problem:
☝️ January 29, 2019 9:51 AM
https://bugzilla.redhat.com/show_bug.cgi?id=1532720
The text was updated successfully, but these errors were encountered: