javascript - 从不同的 Spotfire 服务器动态加载不同的 Spotfire 报告

标签 javascript spotfire tibco

在我们的 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/

相关文章:

javascript - 如何在 Spotfire 仪表板负载上运行 IronPython 脚本

ironpython - 如何根据 IronPython 中的当前用户 'hide' Spotfire 中的选项卡?

mysql - 连接 Spotfire Azure MySQL 数据库

java - Sun Solaris 服务器证书中的证书链验证程序错误被 ChainVerifier 拒绝

zeromq - 关于面向消息的中间件的图表/表格

javascript - 如何重新发出主题的最后一个值

javascript - 在javascript中的字典(关联数组)中使用变量

javascript - 如何检查 foo 是否存在?

.net - Tibco EMS 客户端如何获得许可?

javascript - 无法使用 Javascript/Jquery 动态检查单选按钮