当前位置: 首页 > 工具软件 > Saiku > 使用案例 >

简化Saiku可视化面板(二)

商迪
2023-12-01

在安装完毕Saiku后,由于是社区版本,所以界面上存在很多升级为商业版的文字。可通过如下方式更改来去除相应的内容:(分享交流群548924174)
1、去除查询页面的升级为商业版的提示
You are usingSaiku Community Edition, please consider upgrading to Saiku Enterprise, or entering asponsorship agreement with us to support development. info@meteorite.bi
修改方法如下:
a、在 saiku-server\tomcat\webapps\ROOT目录下找到index.html文件,做如下修改:

注释或者删除如下内容
<script type="text/javascript" src="js/saiku/views/Upgrade.js"></script>

注释或者删除如下内容
<script type="text/x-jquery-tmpl" id="template-upgrade">
        <div class="upgradeheader">
            You are using Saiku Community Edition, please consider <a target="_blank" href="http://saiku.meteorite.bi/support">purchasing support, or entering a sponsorship agreement with us</a> to support development. <a href="mailto:info@meteorite.bi?subject=Supporting Saiku">info@meteorite.bi</a><span class="close_tab sprite"></span>
        </div>
</script>

<script type="text/x-jquery-tmpl" id="template-workspace">中的<div class="upgrade"></div>删除或去掉

b、在saiku-server\tomcat\webapps\ROOT\js\saiku\views目录下找到workspace.js文件,做如下修改:

删除或者注释如下内容
this.upgrade = new Upgrade({ workspace: this});
this.upgrade.render();
删除或者注释如下内容
$(self.el).find('.upgrade').append($(self.upgrade.el));
var upgradeHeight = $(this.el).find('.upgradeheader').is(':hidden') ? 0 : $(this.el).find('.upgrade').height();

$(this.el).find('.workspace_results').css({
            height: $("body").height() - heightReduction -
                $(this.el).find('.workspace_toolbar').height() -
                $(this.el).find('.workspace_results_info').height() -
                editorHeight - processingHeight - upgradeHeight - 20
        });中删除upgradeHeight

2、去除导航栏可在index.html中删除或注释如下代码,或者去掉部分无用按钮,可在模板中删除对应的li

<script type="text/x-jquery-tmpl" id="template-toolbar">
            <ul>
                    <li><a id='new_query' href='#new_query' title='New query' class='new_tab i18n sprite'></a></li>
                    <li class='separator'>&nbsp;</li>
                    <li><a id='open_query' href='#open_query' title='Open query' class='open_query i18n sprite'></a></li>
                    <li class='separator'>&nbsp;</li>
                    <li><a id='logout' href='#logout' title='Logout' class='logout i18n sprite'></a></li>
                    <li class='separator'>&nbsp;</li>
                    <li><a id='about' href='#about' title='About' class='about i18n sprite'></a></li>
                    <li class='separator'>&nbsp;</li>
                    <li><a id='help_icon' href='#help' target='_blank' title='Help' class='help i18n sprite'></a></li>

                    <li class='separator'>&nbsp;</li>
<!--                    <li><a id='issue_tracker' href='#issue_tracker' title='Issue Tracker' class='bug i18n sprite'></a></li>-->
            </ul>

            <%= data.logo %>
        </script>

3、删除其他无关代码
在 saiku-server\tomcat\webapps\ROOT目录下找到index.html文件,注释或者删除如下内容:

<script type="text/javascript"  src="js/ga.js"></script>
<script src="http://localhost:9000/livereload.js"></script>
 类似资料: