在我们的 Web 应用程序中,我们使用“TIBCO Spotfire JavascriptAPI”集成 Spotfire 报告
我们需要显示来自多个 Spotfire 服务器的报告。例如,我们在“spotfire.cloud.tibco.com”中有一个可视化报告,另一个报告在“spotfire-next.cloud.tibco.com”
为了从这两个服务器加载报告,我需要包括两个 SF 服务器,如下所示
<script src="https://spotfire-next.cloud.tibco.com/spotfire/js-api/loader.js"></script>
<script src="https://spotfire.cloud.tibco.com/spotfire/wp/GetJavaScriptApi.ashx"></script>
那么如果我使用像“spotfire.webPlayer”这样的 Spotfire 实例实例化报告,哪个 Spotfire 服务器将触发?
var serverUrl = "https://spotfire-next.cloud.tibco.com/spotfire/wp/";
var analysisPath = "/Samples/Expense Analyzer Dashboard";
var customizationInfo = new spotfire.webPlayer.Customization();
var app = new spotfire.webPlayer.Application(serverUrl, customizationInfo,analysisPath);
var doc=app.openDocument("container");
var serverUrl2 = "https://spotfire.cloud.tibco.com/spotfire/wp/";
var analysisPath2 = "/Samples/Expense Analyzer Dashboard2";
var customizationInfo2 = new spotfire.webPlayer.Customization();
var app2 = new spotfire.webPlayer.Application(serverUrl2, customizationInfo2, analysisPath2);
var doc2=app2.openDocument("container2");
为了从两个不同的 Spotfire 服务器加载报告,我该如何实现这一目标?
最佳答案
so if i instantiate report using spotfire instance like "spotfire.webPlayer" which spotfire server will get trigger ?
Spotfire 7.6 及更高版本使用 Spotfire Server 作为作为节点安装的网络播放器的负载平衡。因此,基于 Spotfire 服务器的请求将转到该服务器管理的 Webplayer 节点。
如果您想在特定服务器/网络播放器实例上运行报告,请按照以下步骤操作:
- 创建 2 个资源池,名称为:“Dashboard”和“Dashboard1”
- 将“服务器 1”中的一些 Webplayer 实例分配到“仪表板”池
- 将“服务器 2”中的一些 Webplayer 实例分配给“Dashboard1”池
- 现在您可以将报告分配给适当的资源池
关于javascript - 从不同的 Spotfire 服务器动态加载不同的 Spotfire 报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54813854/