Skip to content

Commit

Permalink
Add doc and bump version to 0.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
shzlw committed Jul 30, 2019
1 parent 712ee50 commit 808dbf7
Show file tree
Hide file tree
Showing 18 changed files with 61 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM openjdk:8-jre-alpine

WORKDIR /app

COPY target/poli-0.9.0.jar /app/poli-0.9.0.jar
COPY target/poli-0.9.1.jar /app/poli-0.9.1.jar
COPY db/poli.db /app/db/poli.db
COPY start.sh /app/start.sh
COPY config/poli.docker.properties /app/config/poli.properties
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# **Poli**

[![Version](https://img.shields.io/badge/Version-0.9.0-0065FF.svg)](#)
[![Version](https://img.shields.io/badge/Version-0.9.1-0065FF.svg)](#)
[![license: MIT](https://img.shields.io/badge/license-MIT-FF5630.svg)](https://opensource.org/licenses/MIT)
[![Download](https://img.shields.io/github/downloads/shzlw/poli/total.svg?color=6554C0)](https://github.com/shzlw/poli/releases)
[![Docker Pulls](https://img.shields.io/docker/pulls/zhonglu/poli.svg)](https://cloud.docker.com/u/zhonglu/repository/docker/zhonglu/poli)
Expand Down Expand Up @@ -56,13 +56,13 @@ Auto refresh, drill through, fullscreen, embeds, color themes + more features in
Windows/Linux

```sh
java -jar poli-0.9.0.jar
java -jar poli-0.9.1.jar
```

Docker

```sh
docker run -d -p 6688:6688 --name poli zhonglu/poli:0.9.0
docker run -d -p 6688:6688 --name poli zhonglu/poli:0.9.1
```

Check [installation guide](https://shzlw.github.io/poli/#/installation) for more details.
Expand Down
6 changes: 5 additions & 1 deletion config/poli.docker.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ spring.datasource.url=jdbc:sqlite:/app/db/poli.db
# poli.maximum-query-records=1000

# The display language.
# poli.locale-language=en
# poli.locale-language=en

# Allow to run multiple SQL query statements in the query editor. If there are multiple SQL statements, only the
# last one will return query results.
# poli.allow-multiple-query-statements=false
6 changes: 5 additions & 1 deletion config/poli.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
# poli.maximum-query-records=-1

# The display language.
# poli.locale-language=en
# poli.locale-language=en

# Allow to run multiple SQL query statements in the query editor. If there are multiple SQL statements, only the
# last one will return query results.
# poli.allow-multiple-query-statements=false
2 changes: 1 addition & 1 deletion db/schema-postgresql.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- v0.9.0 for PostgreSQL
-- v0.9.1 for PostgreSQL
DROP TABLE IF EXISTS p_group_report;
DROP TABLE IF EXISTS p_component;
DROP TABLE IF EXISTS p_report;
Expand Down
2 changes: 1 addition & 1 deletion db/schema-sqlite.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- v0.9.0 for SQLite
-- v0.9.1 for SQLite
DROP TABLE IF EXISTS p_group_report;
DROP TABLE IF EXISTS p_component;
DROP TABLE IF EXISTS p_report;
Expand Down
23 changes: 19 additions & 4 deletions docs/change-logs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Change Logs

## v0.9.1

### Improvements
- Now press shift + arrow key to move component instead of pressing arrow key only.
- Add a pop up that allows renaming the CSV file before it is exported.
- Support multiple SQL statements in the query editor. Add a new global configuration value to enable/disable this feature. (poli.allow-multiple-query-statements)
- Set default maximum-query-records to unlimited.
- Add new script to build the release folder.

### Bug Fixes
- Fix an issue that heatmap displays wrong max and min value.
- Fix the wrong column types in schema-postgresql.sql.
- Fix the exception thrown from GeneratedKeyHolder when using PostgreSQL as data store.
- Fix an issue when hover over the CSV button in a titleless table, the cursor flips between pointer and resizer.
- Fix an issue that the URL parameters are not used in the query when the report is initialized.
- Fix an issue that accessing the full screen view will direct the user to the login page when remember me is not checked.

## v0.9.0

### Breaking Changes & Upgrade Steps
Expand All @@ -13,7 +30,6 @@
```

### New Features

- User attributes can be defined at per user level and be used in dynamic query to support row level security.
- The selected component can be moved by using arrow key in order to provide more precise control.
- New option to enable/disable auto filtering on report level.
Expand All @@ -34,9 +50,8 @@
- Fix an issue that the auth filter may throw an NPE.

### Improvements

* Allow Image to display in full scale.
* Add a new flag "Show All Axis Labels" for charts that support axis label to force the chart to display all labels.
- Allow Image to display in full scale.
- Add a new flag "Show All Axis Labels" for charts that support axis label to force the chart to display all labels.

## v0.8.0

Expand Down
4 changes: 2 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## Windows/Linux

1. Download the release zip file via the github [release page](https://github.com/shzlw/poli/releases).
1. Download the release poli-x.y.z.zip file via the github [release page](https://github.com/shzlw/poli/releases).
2. Unzip it. The folder structure should look like this:

```
Expand Down Expand Up @@ -68,7 +68,7 @@
1. Pull and run the Poli image.

```bash
docker run -d -p 6688:6688 --name poli zhonglu/poli:0.9.0
docker run -d -p 6688:6688 --name poli zhonglu/poli:0.9.1
```
2. Add JDBC drivers.

Expand Down
2 changes: 1 addition & 1 deletion docs/report-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Components can be repositioned and resized on the report. If you'd like to stack/overlap components, z index field can be used to control the stacking order.

> The selected component can be moved by using arrow key in order to provide more precise control.
> The selected component can be moved by pressing shift + arrow key in order to provide more precise control.
* Border
* Content background color
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.shzlw.poli</groupId>
<artifactId>poli</artifactId>
<packaging>jar</packaging>
<version>0.9.0</version>
<version>0.9.1</version>

<properties>
<java.version>1.8</java.version>
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/com/shzlw/poli/AppProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ public class AppProperties {

String localeLanguage;

Boolean allowMultipleQueryStatements;

public AppProperties() {
datasourceMaximumPoolSize = 50;
maximumQueryRecords = 1000;
localeLanguage = "en";
allowMultipleQueryStatements = false;
}

public Integer getDatasourceMaximumPoolSize() {
Expand All @@ -44,4 +47,12 @@ public String getLocaleLanguage() {
public void setLocaleLanguage(String localeLanguage) {
this.localeLanguage = localeLanguage;
}

public Boolean getAllowMultipleQueryStatements() {
return allowMultipleQueryStatements;
}

public void setAllowMultipleQueryStatements(Boolean allowMultipleQueryStatements) {
this.allowMultipleQueryStatements = allowMultipleQueryStatements;
}
}
8 changes: 5 additions & 3 deletions src/main/java/com/shzlw/poli/service/JdbcQueryService.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@ public QueryResult queryComponentByParams(
// If there are multiple sql statements, only return query results from the last query.
List<String> sqls = CommonUtil.getQueryStatements(sql);
int preQueryNumber = sqls.size() - 1;
for (int i = 0; i < preQueryNumber; i++) {
String parsedSql = parseSqlStatementWithParams(sqls.get(i), namedParameters);
npjt.execute(parsedSql, (ps) -> ps.execute());
if (appProperties.getAllowMultipleQueryStatements()) {
for (int i = 0; i < preQueryNumber; i++) {
String parsedSql = parseSqlStatementWithParams(sqls.get(i), namedParameters);
npjt.execute(parsedSql, (ps) -> ps.execute());
}
}

String parsedSql = parseSqlStatementWithParams(sqls.get(preQueryNumber), namedParameters);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/shzlw/poli/util/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ public final class Constants {

private Constants() {}

public static final String CURRENT_VERSION = "0.9.0";
public static final String CURRENT_VERSION = "0.9.1";

public static final String SUCCESS = "success";
public static final String GOOD = "";
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ spring.datasource.sql-script-encoding=UTF-8
poli.datasource-maximum-pool-size=50
poli.maximum-query-records=-1
poli.locale-language=en

poli.allow-multiple-query-statements=false
2 changes: 1 addition & 1 deletion src/test/resources/schema-sqlite.sql
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ IF NOT EXISTS p_canned_report (
FOREIGN KEY (user_id) REFERENCES p_user(id)
);

-- table added in v0.9.0
-- table added in v0.9.1
CREATE TABLE
IF NOT EXISTS p_user_attribute (
user_id INTEGER NOT NULL,
Expand Down
2 changes: 1 addition & 1 deletion start.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
java -jar poli-0.9.0.jar --spring.config.name=application,poli
java -jar poli-0.9.1.jar --spring.config.name=application,poli
2 changes: 1 addition & 1 deletion start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
set -e

java -jar poli-0.9.0.jar --spring.config.name=application,poli
java -jar poli-0.9.1.jar --spring.config.name=application,poli
2 changes: 1 addition & 1 deletion web-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "poli-web-app",
"version": "0.9.0",
"version": "0.9.1",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.17",
Expand Down

0 comments on commit 808dbf7

Please sign in to comment.