Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello,
I have a mashup and two nodes,one central and on for usa.
do i need to use two mashups? since each server (node) has its own url?
thank.
ido.
Hi
assuming your installation is Central and rim
you can use the same mashup for the two servers ,
a folder with the mashup is created in the extension folder
so if you can use same extension on the same folder you should be able to use the same mashup
Hi liron,
But i have two different url for each node and the mashup extention can hold only one url wrriten inside the mashup js.
How can i make it work dynamicly so it doesnt matter from what url (server) i am connecting to the mashup it will work.
Currently i can access the mashup from the central node that its url is hard coded in the script.
Thanks.
Hi ido,
Try to avoid hard-coding the urls in your mashup, it is almost always possible, check out the mashup examples delivered with Qlik Sense for an example.
In html files you can use relative links:
In the javascript file you can use window.location:
var config = {
host: window.location.hostname,
prefix: prefix,
port: window.location.port,
isSecure: window.location.protocol === "https:"
};
require.config({
baseUrl: (config.isSecure ? "https://" : "http://") + config.host + (config.port ? ":" + config.port : "") + config.prefix + "resources"
});
Hope this helps
Erik Wetterberg