shzlw / poli Goto Github PK
View Code? Open in Web Editor NEWAn easy-to-use BI server built for SQL lovers. Power data analysis in SQL and gain faster business insights.
Home Page: https://shzlw.github.io/poli
License: MIT License
An easy-to-use BI server built for SQL lovers. Power data analysis in SQL and gain faster business insights.
Home Page: https://shzlw.github.io/poli
License: MIT License
目前把0.5.0的数据库复制到0.6.0中报了很多错误
纯表格的改进需求,表格自动翻页或者是自动滚动,表格填充颜色,可以当生产展览板,工厂或者监控平台展示数据,直接电视机打开网页全屏显示充当看板。
Trying to set this up for a Mysql Data Source required some trial and error in the Data Source
configuration. It could be useful to others to add to the documentation/readme some notes on that.
After downloading the JDBC Mysql connector and placing it in jdbc-drivers
according to the instructions, In Data Source
I had to set the Connection Url
to jdbc:mysql://[ip]:[port]/[db]
but more importantly I had to set the Driver Class Name
to com.mysql.cj.jdbc.Driver
.
Attempting to Ping
the database gives me a ERROR: java.sql.SQLException: SQL String cannot be empty
but I can use the Data Source for Reports.
DB:postgres
创建报表、数据源、群组时报异常:
The getKey method should only be used when a single key is returned. The current key entry contains multiple keys:
创建用户时没有问题。
原因:
创建时会返回table的所有列,直接通过keyHolder.getKey().longValue()就会报异常,
所以其他的dao中都应该按照userdao的代码修改下:
KeyHolder keyHolder = new GeneratedKeyHolder();
npjt.update(sql, params, keyHolder, new String[] { User.ID});
return keyHolder.getKey().longValue();
而不是
KeyHolder keyHolder = new GeneratedKeyHolder();
jt.update(connection -> {
PreparedStatement ps = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
ps.setString(1, name);
return ps;
}, keyHolder);
return keyHolder.getKey().longValue();
目前的报表列表是一下子罗列所有报表,是否以目录树方式存放会更好些?
Would be great if we could integrate with existing Keycloak instance and grab it's roles and users as of built-in ones.
Jar file runs, but login doesn't work
Here's the config file on windows:
spring.datasource.url= jdbc:sqlite:c:/tmp/poli-0.11.0/db/poli.db
poli.allow-multiple-query-statements=false
Here's the error from server.txt
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT id, username, name, sys_role FROM p_user WHERE username=? AND password=?]; SQL state [null]; error code [1]; [SQLITE_ERROR] SQL error or missing database (no such table: p_user); nested exception is org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such table: p_user)] with root cause
org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such table: p_user)
For example.
User account belong to USA can only see USA data and UK to UK data etc.
Metabase enterprise version implement RLS maybe like this:
在Report中定义drill through,运行时点击进入钻取的report,table的数据查询范围是全部,钻取条件不起作用,只有点击apply filters才能起作用,钻取的参数在url中能够看到。
Hey Folks,
Thanks so much for using Poli! We'd like to hear more about how you use Poli in your product/company/organization/project and how it helps to solve your problems.
Feel free to leave your product/company/organization/project information below so we can show them on our website(coming soon) and readme file!
Thanks again!
1.安全问题:当分享一个报表给其他应用系统时,url为:http://localhost:6688/poli/workspace/report/fullscreen?$toReport=reportname&$apiKey=apikey
这里的$apiKey目的是登录验证,但是也带来一个问题,我用以下地址:
http://localhost:6688/poli/workspace/report?$apiKey=apikey
同样可以访问分享人的report页面,导致报表权限泄露。如下图(未登录状态):
http://ww1.sinaimg.cn/large/006y4X83gy1g5k2lykea1j31hc0smgn9.jpg
2. i18n问题:当分享报表时,使用的是默认en语言,不是应用定义的zh语言。
by the way , @shzlw ,这个项目挺好,多谢开源!
Zhonglu,
Created a couple of table components with queries against our DB2 database on the iSeries. Noticed that it is consistently only returning 1000 rows of data. I don't see anywhere to configure number of rows returned. Is this a hard-coded limitation?
Thanks,
Mike
eclipse加载项目源码后,怎么通过run spring boot app的形式启动?或者有相关说明不?
想通过二次开发追加些内容,通过ide进行调试。
不胜感激。
图表配置sql的时候,用了as但是列名称还是原始的数据库里的字段名称,现阶段采用cast的方式进行转换后,把展现的列名变了。
How hard would it be to create a war instead of a jar? I want Poli to run along side other war files within a tomcat server.
You can export a chart contents to CSV but not a table? This project is 99% of what we need for some internal reporting, this would be the remaining 1%...
Great project, btw. Been using ART (Another Reporting Tool), but your report creation process is much easier for end users.
Does the data source support Oracle? How to create a connection URL and other information?
Would it be possible to create a Dynamic component type that allows for a query input and a plain text, or html output can can be customized to display the query results?
example:
Component to display the number of currently active sessions.
Currently the only way to achieve this is to put it out to a table.
It has newline + carriage return line endings. It should have Unix line endings since it is a shell script.
$ cat -vet start.sh
#!/bin/sh^M$
set -e^M$
^M$
java -jar poli-0.9.0.jar --spring.config.name=application,poli^M$
$ dos2unix start.sh
dos2unix: converting file start.sh to Unix format...
$ cat -e start.sh
#!/bin/sh$
set -vet$
$
java -jar poli-0.9.0.jar --spring.config.name=application,poli$
X轴为日期2019-11-04,2019-11-05,2019-11-06,2019-11-07,2019-11-08
Y轴想显示不同类型数据的count总数曲线
Was able to connect to AWS Redshift using a Postgres compatible JDBC driver (https://docs.aws.amazon.com/redshift/latest/mgmt/configure-jdbc-connection.html)
However, my data is partitioned into multiple schemas. Need to select the schema before running the query. e.g.
set search_path to mySchema;
select count(*) from myTable;
The error I get is:
Internal Server Error: PreparedStatementCallback; bad SQL grammar [set search_path to xyzz; select * from....
Please suggest a way to do this either while creating the query or when setting up the data source (I can then create multiple datasources - one database per schema.)
1、当设置fileter后为slicer后,在query里编写自己的查询条件,但是slicer只是多选,能否添加一个下拉组件。谢谢
2、当数据量很大时,默认的1000行加载不太满足,
解决方案:能否让用户获取 “当前页数”和“下一页数” 来让用户实现真分页。谢谢
Hi,
How I can retrieve password admin or any password ?
Same option with "lost passsword" in login page ?
thk
你好,我想在报表配置语句中,限制当前登录的用户只能查看自己归属的区域数据,应该要怎么配置?
0.9.0中postgresql的p_report、p_component、p_canned_report表中定义了相关json类型,虽然有bug,但是修正下即可,例如ReportDao的insert:
PGobject jsonObject = new PGobject();
jsonObject.setType("json");
try {
jsonObject.setValue(style);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
params.addValue(Report.STYLE, jsonObject);
0.9.1中将相关json类型都变更为varchar了,这样做会产生一些问题:
长度限制、varchar不能像json那样进行检索等等
poli-0.10.1, Arch Linux, OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.4+11)
java.sql.SQLException: path to 'c:/test/poli.db': '/home/***/poli-0.10.1/c:' does not exist
Only windows? but there is db/poli.db in the package.
I am using Windows for server. I have been setting inbound port in the firewall, but still can't show the page. On localhost is working properly.
I have an idea, how to split IP:6688/static/js/2.39a8b735.chunk.js ? because that file size is 1.8 MB
Thanks in advance
数据报表为table ,当数据增多后,下拉滚动看数据后,表头的字段看不到了,能否固定一下表头,滚动数据后,表头不滚动
从0.10.0 升级到0.11.0 后 ,poli 都为docker 启动
11版mysql数据源无法连接,10版数据源正常
myql版本 5.6.46
It would be nice to be able to have a drill through that will refresh only the current report and not go to a different report. Currently, if I add a drill through and point it to the current report, I still need to click refresh to be able to update the other chart's data.
Thank you developing this software.
错误信息如下:环境 mac +jdk1.8+Eclipse sts4
[main] INFO org.springframework.core.KotlinDetector - Kotlin reflection implementation not found at runtime, related features won't be available.
增加pom.xml 文件
org.jetbrains.kotlin
kotlin-reflect
1.3.50
后,启动无日志输出,无报错信息。页面无法访问
full screen全屏模式不能用,点击后请进入登录页面
登录几分钟,就会自动退出登录,
分享连接打开显示 The report is no longer available.
按照文档docker安装的
hi i am trying to connect mssql but getting below error.
2019-07-02 14:22:57 [http-nio-6688-exec-3] ERROR o.a.c.c.C.[.[.[.[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.google.common.util.concurrent.UncheckedExecutionException: java.lang.RuntimeException: Failed to load driver class com.microsoft.sqlserver.jdbc.SQLServerDriver in either of HikariConfig class loader or Thread context classloader] with root cause java.lang.RuntimeException: Failed to load driver class com.microsoft.sqlserver.jdbc.SQLServerDriver in either of HikariConfig class loader or Thread context classloader at com.zaxxer.hikari.HikariConfig.setDriverClassName(HikariConfig.java:485) at com.shzlw.poli.service.JdbcDataSourceService.lambda$getDataSource$1(JdbcDataSourceService.java:78) at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4876) at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3528) at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2277) at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154) at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044) at com.google.common.cache.LocalCache.get(LocalCache.java:3952) at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4871) at com.shzlw.poli.service.JdbcDataSourceService.getDataSource(JdbcDataSourceService.java:68) at com.shzlw.poli.rest.JdbcDataSourceWs.ping(JdbcDataSourceWs.java:75) at com.shzlw.poli.rest.JdbcDataSourceWs$$FastClassBySpringCGLIB$$9a4f096f.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) at com.shzlw.poli.rest.JdbcDataSourceWs$$EnhancerBySpringCGLIB$$6f59819b.ping(<generated>) at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1039) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897) at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.shzlw.poli.filter.AuthFilter.doFilter(AuthFilter.java:64) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:836) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1747) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source)
any suggetion. i am using the below drivers in drivers folder.
mssql-jdbc-7.2.0.jre8.jar
with below driver class name:
com.microsoft.sqlserver.jdbc.SQLServerDriver
First of all, thanks. That is a very interesting project you made. I setup the mysql driver jar in the jdbc-drivers folder in the project.
When I added a datasource and ping it works well. And then made a report, it works very well when check the datasorce schema. But when I edit the query to fetch data, it went wrong with this error:
My platform is Windows. And I have already added the mysql driver jar into the java classpath. What I'm curious is it works well for datasource schema read, but failed for query execution, due to driver load failed. Any idea?
2019-06-13 14:56:18 [http-nio-6688-exec-3] ERROR com.zaxxer.hikari.HikariConfig - Failed to load driver class mysql from HikariConfig class classloader org.springframework.boot.loader.LaunchedURLClassLoader@6433a2
2019-06-13 14:56:18 [http-nio-6688-exec-3] ERROR o.a.c.c.C.[.[.[.[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.google.common.util.concurrent.UncheckedExecutionException: java.lang.RuntimeException: Failed to load driver class mysql in either of HikariConfig class loader or Thread context classloader] with root cause
java.lang.RuntimeException: Failed to load driver class mysql in either of HikariConfig class loader or Thread context classloader
at com.zaxxer.hikari.HikariConfig.setDriverClassName(HikariConfig.java:485)
at com.shzlw.poli.service.JdbcDataSourceService.lambda$getDataSource$1(JdbcDataSourceService.java:75)
at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4876)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3528)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2277)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044)
at com.google.common.cache.LocalCache.get(LocalCache.java:3952)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4871)
at com.shzlw.poli.service.JdbcDataSourceService.getDataSource(JdbcDataSourceService.java:65)
at com.shzlw.poli.rest.JdbcQueryWs.queryComponent(JdbcQueryWs.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
中文环境时添加组件选择静态、图表、过滤器子类型都不能选择,这应该是个BUG吧,调成英文没问题
Would be great if we could use map components, like heat maps with basemaps (like OpenStreetMap) - based on lat/long or spatial fields.
Is there a way to export the data into a pdf format?
使用docker注意加驱动程序mssql可能会连接错误,需要到容器中修改java.security屏蔽3DES_EDE_CBC
提示如下
ERROR: com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error:
"SQL Server did not return a response. The connection has been closed.
打开文件夹(JAVA_HOME)/jre/lib/security中的安全策略文件:Java.security
修改jdk.tls.disabledAlgorithms选项。
Java 8的jdk.tls.disabledAlgorithms默认值:
jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 1024,
EC keySize < 224, DES40_CBC, RC4_40,3DES_EDE_CBC
为了开启SSL_RSA_WITH_3DES_EDE_CBC_SHA,将3DES_EDE_CBC注释掉:
Java 8的jdk.tls.disabledAlgorithms默认值:
jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 1024,
EC keySize < 224, DES40_CBC, RC4_40
#,3DES_EDE_CBC
is there setting to configure that another PC can access this Poli on the same LAN ?
best regards
Poli is awesome project, thank you.
Can you add default value for filter commponent? Sometimes parametr without value will cause heavy query or internal error.
Save each row width scale when editing table data
when add drill jdbc driver, poli exit without any tips.
same as another BI , davinci from 宜信
It would be very useful if you can print the reports generated by poli
Apply some CSS media queries to be able to print the report. Also responsive to work well on tablet and mobile devices.
我修改了一版源码,其中涉及到一个私有jar包,已经pr,请看下是否合并
$ ./build.sh
> [email protected] build /home/chrism/dev/poli/web-app
> react-scripts build
sh: 1: react-scripts: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] build: `react-scripts build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /home/chrism/.npm/_logs/2019-07-26T03_16_34_384Z-debug.log
cp: cannot stat ‘build/*’: No such file or directory
It is possible and common to set up postgres to trust local users to connect to their own databases with no password. Poli does not allow for this. Even if the username is left blank:
It still tries to connect with an empty username (whereas it should connect without trying username/password auth):
I'm able to connect to the same database with psql
and no username/password:
$ psql culturecounts
psql (9.4.22)
Type "help" for help.
culturecounts=#
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.