`

Pentaho Ctools 动态布局

 
阅读更多

 

原创文章,转载请注明出处: http://qq85609655.iteye.com/blog/2444142

 

Pentaho 社区版 8.2 终于提供了动态布局插件LayoutEditor

 

 

下载地址:

 

下载后

有bug无法正常使用,

cd /opt/pentaho/pentaho-server

vim pentaho-solutions/system/layoutEditor/resources/amd-components/LayoutEditor/resources/js/editor.js

 

变量名包点号(.),需要替换:

 

$elem.data('group').replace(/ /g, '_') + '_' + $elem.data('title').replace(/ /g, '_') + '_' + a_id.toString();

替换如下

$elem.data('group').replace(/ /g, '_') + '_' + $elem.data('title').replace(/[. ]/g, '_') + '_' + a_id.toString();

 

替换后,结果如下:

root@b189494a75af:/opt/pentaho/pentaho-server# vim pentaho-solutions/system/layoutEditor/resources/amd-components/LayoutEditor/resources/js/editor.js

 

                        selectWidget: {
                            elemSelector: '.widgetSelectorButton',
                            eventName: 'click',
                            eventFunction: function (event, editor, status, $html) {
                                event.stopPropagation();
                                Logger.info('Widget selected clicked');
                                var $elem = $(event.currentTarget),
                                d = new Date(),
                                a_id = +d,
                                title = $elem.data('title'),
                                key = $elem.data('group').replace(/ /g, '_') + '_' + $elem.data('title').replace(/[. ]/g, '_') + '_' + a_id.toString();
                                //a_widget = $elem.data('group').replace(/ /g, '_') + '_' + $elem.data('title').replace(/ /g, '_');
                                if ($elem.hasClass('active')) {
                                    var widgetId = $elem.attr('widgetId');
                                    editor.status.removeFromStatus('widgets', widgetId);
                                    $elem.children().eq(3).removeClass('active');
                                    $elem.removeClass('active');
                                    $elem.removeAttr('widgetId');
                                    if (_.isEmpty(editor.status.getStatus()['widgets'])) {
                                        $('.addButton').prop('disabled', true);
                                        $('.addButton').addClass('disabled');
                                    }
                                } 
                                else {
                                    var value = {
                                        id: $elem.data('group').replace(/ /g, '_') + '_' + $elem.data('title').replace(/[. ]/g, '_') + '_' + a_id.toString(),
                                        group: $elem.data('group'),
                                        title: $elem.data('title'),
                                        desc: $elem.data('desc'),
                                        link: $elem.data('link'),
                                        placeholder: $elem.data('group').replace(/ /g, '_') + '_' + $elem.data('title').replace(/[. ]/g, '_') + '_' + a_id.toString(),
                                        type: 'wcdf',
                                        rendered: false
                                    };
                                    editor.status.addToStatus('widgets', key, value);
                                    $('.addButton').prop('disabled', false);
                                    $('.addButton').removeClass('disabled');
                                    $elem.addClass('active');
                                    $elem.attr('widgetId',key);
                                    $elem.children().eq(3).addClass('active');
                                }
                            }
                        }

 

 

...

  • 大小: 122.8 KB
分享到:
评论

相关推荐

    Learning Pentaho CTools Color Images

    Learning Pentaho CTools Color Images Learning Pentaho CTools Color Images pentaho数据可视化 CTools 套件学习 使用书籍

    Learning Pentaho CTools(2016)(随书代码)

    Being an introductory chapter Chapter 1, Getting Started with CTools andChapter 9: Pentaho App Builder, Chapter 10, Embed, Deploy, and Debugdoes not contain code files. Chapter 1, Getting Started ...

    learning-pentaho-ctools

    learning-pentaho-ctoolslearning-pentaho-ctoolslearning-pentaho-ctoolslearning-pentaho-ctoolslearning-pentaho-ctoolslearning-pentaho-ctoolslearning-pentaho-ctools

    Learning Pentaho CTools(PACKT,2016)

    Pentaho and CTools are two of the fastest and most rapidly growing tools for practical solutions not found in any other tool available on the market. Using Pentaho allows you to build a complete ...

    Learning Pentaho CTools.pdf

    Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, ...

    Learning-Pentaho-CTools:Packt Publishing学习Pentaho CTools

    作为介绍性章节,第1章,CTools入门和第9章:Pentaho App Builder,第10章,嵌入,部署和调试不包含代码文件。 第1章“ CTools入门”简要介绍了CTools的历史。 它还将向您介绍该工具的用途,并教您安装社区工具...

    kettle资料6本

    1:Learning Pentaho CTools(PACKT,2016).pdf 2:Pentaho Data Integration Beginner's Guide, Second Edition.pdf 3:Packt.Pentaho for Big Data Analytics.2013.pdf 4:pentaho kettle solutions.pdf 5:[Packt ...

    Pentaho cde整合Birt

    1. **Pentaho CDE**:CDE是Pentaho Data Integration (Kettle) 平台的一部分,它提供了一个基于Ajax的用户界面,用于创建动态的、交互式的BI仪表板。CDE支持多种数据源,包括SQL查询、MDX查询、Excel文件、Web服务等...

    pentaho-kettle-8.2.zip

    Pentaho Kettle是一款强大的ETL(提取、转换、加载)工具,由Pentaho公司开发。这个名为“pentaho-kettle-8.2.zip”的压缩包文件包含了Pentaho Data Integration(Kettle)的第8.2版本。Pentaho Kettle通过图形化的...

    pentaho kettle中文开发手册

    Pentaho Kettle是一款强大的数据集成工具,也被称为Kettle或Pentaho Data Integration(PDI)。它是开源软件,由Pentaho公司开发,主要用于ETL(Extract, Transform, Load)过程,即数据抽取、转换和加载。这个中文...

    pentaho经典中文资料

    Pentaho是一款开源的企业级商业智能(BI)平台,它提供了数据集成、数据分析和报表等多种功能。这个压缩包中包含的是一系列经典的中文资料,涵盖了Pentaho的不同方面,旨在帮助用户深入理解和使用Pentaho。 1. **...

    Pentaho-8-Reporting-for-Java-Developers-master_Pentaho-8-Reporti

    报表定义通常以PRPT文件格式存储,这是一种XML文件,包含报表的布局、样式、查询和数据源等信息。 在开始开发之前,你需要熟悉Java编程语言和基本的SQL知识,因为Pentaho Reporting通常与数据库进行交互来获取数据...

    pentaho-aggdesigner-algorithm-5.1.5-jhyde-API文档-中文版.zip

    赠送jar包:pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar; 赠送原API文档:pentaho-aggdesigner-algorithm-5.1.5-jhyde-javadoc.jar; 赠送源代码:pentaho-aggdesigner-algorithm-5.1.5-jhyde-sources.jar; ...

    Pentaho Reporting(2014)

    2. **强大的设计工具**:2014年的版本提供了直观的拖放式报告设计器,允许用户创建复杂的布局,包括表格、图表、图像和自由格式文本。同时,支持WYSIWYG(所见即所得)编辑,使非技术人员也能轻松设计报表。 3. **...

    pentaho 4.5工具使用手册

    它支持多种数据源,可以生成静态或动态报表,并提供了丰富的样式和格式选项,以满足不同用户的定制需求。 4. Saiku Saiku 是 Pentaho 产品线中的一个OLAP(在线分析处理)工具,它允许用户对多维数据集进行交互式...

    pentaho4.8汉化总结

    Pentaho 4.8汉化是一个针对这款开源商业智能套件进行本地化的过程,以适应中文用户的需求。Pentaho提供了丰富的数据分析和报告功能,但默认界面为英文,对于中文用户来说可能存在理解上的困扰。以下是对Pentaho 4.8...

    pentaho初学中文文档

    【Pentaho初学中文文档】是一份针对Pentaho初学者整理的指南,涵盖了Pentaho BI Server的安装、使用以及Report Designer和Design Studio的基础操作。以下是对这些知识点的详细说明: 一、BI Server安装及用法 1. BI...

    Pentaho常见问题小结

    问题可能涵盖报表布局、数据绑定、动态内容和样式设置等。 - SQL查询:使用内置的SQL编辑器进行数据查询,可能会遇到查询效率、JOIN操作和子查询的问题。 - 数据透视表与图表:学习如何创建交互式数据透视表和图表...

    [Pentaho] Pentaho 5.0 报表实例开发 初学者指南 (英文版)

    [Packt Publishing] Pentaho 5.0 报表实例开发 初学者指南 (英文版) [Packt Publishing] Pentaho 5.0 Reporting by Example Beginner's Guide (E-Book) ☆ 图书概要:☆ Create high-quality, professional, ...

Global site tag (gtag.js) - Google Analytics