博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[saiku] 简化/汉化/设置默认页
阅读量:7196 次
发布时间:2019-06-29

本文共 7442 字,大约阅读时间需要 24 分钟。

 

上一篇分析了schema文件 [ ]

 

在安装完毕Saiku后,由于是社区版本,所以界面上存在很多升级为商业版的文字。

这一篇就讲述下如何简化saiku的操作界面

 

1、去除查询页面的升级为商业版的提示

You are using Saiku Community Edition, please consider upgrading to Saiku Enterprise, or entering a sponsorship agreement with us to support development. info@meteorite.bi去掉上述提示的修改方法如下:1)在 saiku-server\tomcat\webapps\ROOT 目录下找到index.html文件,注释或者删除如下内容:2)在 saiku-server\tomcat\webapps\ROOT\js\saiku\views 目录下找到 Upgrade.js 文件,找到如下代码注释或者删除:$(self.workspace.el).find('.upgrade').append("....");

 

2、去除登陆页面的Evaluation Login

在 saiku-server\tomcat\webapps\ROOT\js\saiku\views 目录下找到 LoginForm.js 文件,找到如下代码注释或者删除:"<% if (Settings.EVALUATION_PANEL_LOGIN) { %>" +"
" +"
Evaluation Login" +"
" +"
" +"<% } %>" +

 

3、去除导航栏中无用按钮:关于

在 saiku-server\tomcat\webapps\ROOT 目录下找到index.html文件,注释或者删除如下内容: 
  •  

    4、去除导航栏中无用按钮:帮助改进翻译

    在 saiku-server\tomcat\webapps\ROOT\js\saiku\plugins\I18n 目录下找到plugin.js文件,注释或者删除如下内容:
    " +"Your name:
    " +"

    Please fill in the appropriate translation in the blanks provided:

    " +"<% _.each(translation_table, function(val, key) { %>" +"

    <%= key %>
    " +"
    " +"
    " +"<% }); %>" +"
    " +"

     

    5、去除登陆后的欢迎页面

    在 saiku-server\tomcat\webapps\ROOT\js\saiku\views 目录下找到  SplashScreen.js 文件,找到如下代码注释或者删除:

    Saiku

    Saiku has the power to change the way you think about your business and make decisions. Saiku provides powerful, web based analytics for everyone in your organisation. Quickly and easily analyse data from any data source to discover what is really happening inside and outside your organisation.

    Quick Links

    Get Enterprise

    News

    Saiku

    Features

    Web Based Analysis

    Saiku provides the user with an entirely browser based experience. We support all modern browsers, and our user interface is 100% HTML and Javascript.

    Saiku uses REST based communications, this allows the development of custom user interfaces and facilitates the easy integration of the Saiku Server into other applications and services.

    Standards Compliant

    Saiku is based upon the Microsoft MDX query language and will work on most JDBC compliant data sources. We also provide a number of connectors to NOSQL data sources.

    Dynamic charting

    Saiku uses a flexible charting engine to provide a wide range of charts and graphs. These are all HTML & Javascript only and don't require flash to be installed on the computer.

    Pluggable visualisation engine

    Saiku Enterprise boasts a fully pluggable visualisation engine. This allows developers to build third party extensions and plug them into Saiku Enterprise to extend or replace the existing visualisations.

    Saiku

    Help

    We provide Training, Consulting and Support to ensure you get the most from Saiku and your data. Our services cover all aspects of data analysis including data strategy, design, architecture, deployment and application/software support.

    Wiki Forums Support
    Why not try our new Wiki site
    for community documentation.
    We also have our new forums
    for help and support.
    If you require more,
    contact us for support!.

    Saiku

    Enterprise

    Saiku Enterprise is our fully supported and tested server and Pentaho plugin system. Buy Saiku Enterprise from as little as $15 per user per month and enjoy the addtional features Saiku Enterprise has to offer

    To find out more visit our site or schedule a call with one of us and we can show you why you should choose Saiku Enterprise!

     

     6、删除其他无关代码

    在 saiku-server\tomcat\webapps\ROOT 目录下找到index.html文件,注释或者删除如下内容:  删除原因:ga.js是GA代码,用于统计的。livereload.js本身是不存在的,请求一直是404。

     

    7、修改或者删除LOGO

    在 saiku-server\tomcat\webapps\ROOT 目录下找到index.html文件,修改或者删除如下内容:

      Saiku

     

    8、汉化操作

    转载自:  

    Saiku-ui 为前端,使用 Backbone.js 框架,此框架为一个mvc模式的前端框架。

     

    可单独对saiku-ui进行修改

     

    1.找到中文对照的本地化json文件/saiku-ui/js/saiku/plugins/I18n/po/cn.json此文件采用的json串格式,在页面初始化第一次调用本地化操作时,会先初始化此文件到内存中,因此我们在操作本地化时,可以拿到Saiku.i18n.po_file 也就是 cn.json 2.找到汉化操作的js插件/saiku-ui/js/saiku/plugins/I18n/plugin.jssaiku处理本地化文件是对含有添加class=”i18n“的html标签进行文本替换,直接修改cn.json的本地化文件无法成功汉化,所以在全文汉化时需要:1)在全文汉化时需要找到汉化标签所在位置,对此标签添加i18n样式2)执行汉化代码方式1:查找所有的.i18n样式的标签进行替换$(".i18n").i18n(Saiku.i18n.po_file) ;方式2:自动查找i18n样式的标签进行替换 Saiku.i18n.translate() ;差异说明: 如果使用方法2,那么带有i18n的标签必须依据初始化了方法1为class中含有i18n的变量进行汉化然后替换到saiku模板中进行展示 备注: 如果需要汉化的标签中的class 同时出现"i18n","i18n_field","i18n_translate", 则说明本地化文件中没有或者中英文对照错误。

     

     

    9、设置默认页 ( 将saiku中登陆后的默认页面修改为"新建查询"窗口 ) 

    参考链接:

     

    1)设置默认窗口为打开查询窗口找到  /saiku-ui/js/saiku/models/SessionWorkspace.js此文件为初始化工作区的前端代码在 process_datasources 方法下,将Saiku.tab.add(new 。。。) 注释掉 改为$("#open_query).click(),这样每次刷新或登录后,默认打开的就是"打开查询"的tab页了if (!Settings.INITIAL_QUERY && paramsURI.splash) {    //Saiku.tabs.add(new SplashScreen());    //Saiku.tabs.add(new Workspace());    $("#open_query").click();} else if(!Settings.INITIAL_QUERY){    Saiku.tabs.add(new Workspace());}2)设置默认打开的Tab在 Tab.js 中配置if(Saiku.session.isAdmin){    menuitems = {        "new": {name: "New", i18n: true },        /* "duplicate": { name: "Duplicate", i18n: true},*/        /* "closeothers": {name: "Close Others", i18n: true },*/        "closethis": {name: "Close This", i18n: true }    };}else{     menuitems = {"closethis": {name: "Close This", i18n: true }};}在 menuitems中,可以增加自己的上下文,也可以去掉上下文。3)是否允许关闭TAB在Tab.js中如下代码:    template: function() {        // Create tab        return _.template("<%= caption %>" + (this.caption != 'Repository' ?  "Close tab" : "  "))            ({                id: this.id,                caption: this.caption            });    },此段代码判断了当前tab 的caption是否是Repository,如果是,则不显示Close tab,否则显示关闭链接 4)设置默认展开全部节点 A 修改样式

    class="sprite folder" 为文件夹的样式,去掉 collapsed 样式

    class="hide folder_content" 去掉hide样式

     

    B 将 <a href="#pager" class="pager sprite"></a> 标签删除掉 

    var TabSet = Backbone.View.extend({

    className: 'tabs',
    queryCount: 0,
    dashCount: 0,

    events: {

    'click a.pager': 'togglePager' ,
    'click a.new' : 'new_tab'
    },

    _tabs: [],

    /**

    * Render the tab containers
    * @returns tab_container
    */
    render: function() {
    /*$(this.el).html('<a href="#pager" class="pager sprite"></a><ul><li class="newtab"><a class="new">+&nbsp;&nbsp;</a></li></ul>')
    .appendTo($('#header'));*/
    $(this.el).html('<ul><li class="newtab"><a class="new">+&nbsp;&nbsp;</a></li></ul>')
    .appendTo($('#header'));
    this.content = $('<div id="tab_panel">').appendTo($('body'));
    this.pager = new TabPager({ tabset: this });
    return this;
    },

     

    这样设置完毕后,每次打开都是默认展开节点

     

    10 互换导航栏Cube和Dimention的位置

    将index.html里面的
    的两个div的位置互换即可

     

    11 互换位置后左侧底部某些cube项显示不全

    这个是CSS样式的问题在index.html里面class = "accordion-content" 的padding-bottom调大就行了  原来是10px  调整为50px;

     

    你可能感兴趣的文章
    收集的网络上大型的开源图像处理软件代码(提供下载链接)
    查看>>
    java 调度框架quartz
    查看>>
    hadoop exit code 退出码含义
    查看>>
    [C#基础知识系列]专题十:全面解析可空类型
    查看>>
    什么是.Net的异步机制(线程间通信) - step 5
    查看>>
    Lambda应用设计模式
    查看>>
    linux 内存使用情况详细信息(转)
    查看>>
    10月30日课堂随笔
    查看>>
    解决svn异常报错“”cleanup failed to process the following paths …… previous operation has not finished”...
    查看>>
    富文本框--FreeTextBox的使用
    查看>>
    koa2使用阿里云oss的nodejs sdk实现上传图片
    查看>>
    简单select(2)
    查看>>
    pandas基础学习
    查看>>
    论文阅读笔记四十一:Very Deep Convolutional Networks For Large-Scale Image Recongnition(VGG ICLR2015)...
    查看>>
    用实例一步步教你写Jquery插件
    查看>>
    Qt资源整理ING
    查看>>
    看看checksec
    查看>>
    1. Two Sum
    查看>>
    MySQL基础之 标准模式通配符
    查看>>
    聊一聊python的单例模式
    查看>>