[英]How can I 'hide' a tab in Spotfire depending on the current user in IronPython?
I have a tab that contains a visualizations for data validation and testing.我有一个选项卡,其中包含用于数据验证和测试的可视化。 I'd like to leave that tab in there without showing to anyone but the devs.
我想把那个标签留在那里,除了开发人员外,不向任何人展示。
I can get the current user this way but can't find how to 'hide' the tab.我可以通过这种方式获取当前用户,但找不到如何“隐藏”选项卡。
from System.Threading import Thread
print Thread.CurrentPrincipal.Identity.Name
I'm quite sure that hiding a tab is not possible.我很确定隐藏标签是不可能的。 there are some other possible solutions, though.
不过,还有一些其他可能的解决方案。
Update for anyone who may be interested:更新给任何可能感兴趣的人:
In spotfire 10+, you can insert some code into a text area to hide tabs in a dashboard page when viewed on the web (this will not hide tabs on the Analyst client):在 spotfire 10+ 中,您可以在文本区域中插入一些代码,以便在 Web 上查看时隐藏仪表盘页面中的选项卡(这不会隐藏 Analyst 客户端上的选项卡):
navigationBar = $("#id10")
navigationBar.css("display", "none");
You can then get fancy with IPython
to check the user names and add or remove this code from the text area in real time.然后,您可以使用
IPython
来实时检查用户名并在文本区域中添加或删除此代码。 That will hide and show tabs based on user names.这将根据用户名隐藏和显示选项卡。
To show the other tabs, you follow option 1 from niko and just create your own navigation using additional HTML/CSS
in the text area.要显示其他选项卡,请遵循 niko 的选项 1,只需在文本区域中使用其他
HTML/CSS
创建自己的导航。
If you are on Spotfire 10.8 or higher you have a more robust solution , you can combine below two IronPython scripts into one which is executed on the load of the analysis.如果您使用的是 Spotfire 10.8 或更高版本,您有更强大的解决方案,您可以将以下两个 IronPython 脚本合并为一个,在分析负载时执行。
1)Get the username or group 2)Hide the page 3)CustomDateTime Fucntion to trigger IP on load of analysis. 1) 获取用户名或组 2) 隐藏页面 3) 自定义日期时间功能在分析加载时触发 IP。
This works for Consumer license Users.这适用于消费者许可证用户。
https://community.tibco.com/wiki/how-fetch-information-about-logged-user-tibco-spotfirer-using-ironpython-script https://community.tibco.com/wiki/how-fetch-information-about-logged-user-tibco-spotfirer-using-ironpython-script
https://community.tibco.com/wiki/how-show-or-hide-pages-consumer-users-viewing-mode-tibco-spotfirer-using-ironpython-script https://community.tibco.com/wiki/how-show-or-hide-pages-consumer-users-viewing-mode-tibco-spotfirer-using-ironpython-script
https://community.tibco.com/wiki/custom-datetime-data-function-tibco-spotfire https://community.tibco.com/wiki/custom-datetime-data-function-tibco-spotfire
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.