Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.12.2 #75

Merged
merged 7 commits into from
May 31, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add default value for multi series charts
shzlw committed May 22, 2020

Verified

This commit was signed with the committer’s verified signature.
dovydas55 Dovydas Stankevicius
commit 75137ec7abc10ab83b4ca78f80cc1b581a653bd4
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ FROM openjdk:8-jre-alpine

WORKDIR /app

COPY --from=builder /app/src/target/poli-0.12.1.jar /app/poli-0.12.1.jar
COPY --from=builder /app/src/target/poli-0.12.2.jar /app/poli-0.12.2.jar
COPY --from=builder /app/src/db/poli.db /app/db/poli.db
COPY --from=builder /app/src/build_release/start.sh /app/start.sh
COPY --from=builder /app/src/config/poli.docker.properties /app/config/poli.properties
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.12.1-0065FF.svg)](#)
[![Version](https://img.shields.io/badge/Version-0.12.2-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)
@@ -56,13 +56,13 @@ Auto refresh, drill through, fullscreen, embeds, color themes + more features in
Windows/Linux

```sh
java -jar poli-0.12.1.jar
java -jar poli-0.12.2.jar
```

Docker

```sh
docker run -d -p 6688:6688 --name poli zhonglu/poli:0.12.1
docker run -d -p 6688:6688 --name poli zhonglu/poli:0.12.2
```

Check [installation guide](https://shzlw.github.io/poli/#/installation) for more details.
2 changes: 1 addition & 1 deletion build_release/start.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
java -jar poli-0.12.1.jar --spring.config.name=application,poli
java -jar poli-0.12.2.jar --spring.config.name=application,poli
2 changes: 1 addition & 1 deletion build_release/start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
set -e

java -jar poli-0.12.1.jar --spring.config.name=application,poli
java -jar poli-0.12.2.jar --spring.config.name=application,poli
6 changes: 6 additions & 0 deletions docs/change-logs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Logs

## v0.12.2

### Bug Fixes
- Add default value option for multi series charts (bar, line and area).


## v0.12.1

### Bug Fixes
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
@@ -96,7 +96,7 @@
1. Pull and run the Poli image.

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

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
<groupId>com.shzlw.poli</groupId>
<artifactId>poli</artifactId>
<packaging>jar</packaging>
<version>0.12.1</version>
<version>0.12.2</version>
<name>Poli</name>
<description>The SQL BI tool</description>

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
@@ -4,7 +4,7 @@ public final class Constants {

private Constants() {}

public static final String CURRENT_VERSION = "0.12.1";
public static final String CURRENT_VERSION = "0.12.2";

public static final String SUCCESS = "success";
public static final String GOOD = "";
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
VERSION=0.12.1
VERSION=0.12.2

echo $VERSION
16 changes: 12 additions & 4 deletions web-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.12.1",
"version": "0.12.2",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.28",
18 changes: 11 additions & 7 deletions web-app/src/api/EchartsApi.js
Original file line number Diff line number Diff line change
@@ -204,7 +204,8 @@ const getBarOption = (data, config, title) => {
yAxis,
hasMultiSeries = false,
isStacked = true,
colorPlatte = 'default'
colorPlatte = 'default',
multiSeriesDefaultValue = 0
} = config;

const type = 'bar';
@@ -215,7 +216,7 @@ const getBarOption = (data, config, title) => {
legendList,
xAxisList,
grid
} = dataListToGrid(data, xAxis, yAxis, legend);
} = dataListToGrid(data, xAxis, yAxis, legend, multiSeriesDefaultValue);

// From grid to series list.
for (let i = 0; i < legendList.length; i++) {
@@ -302,7 +303,8 @@ const getLineOption = (data, config) => {
yAxis,
hasMultiSeries = false,
isSmooth = false,
colorPlatte = 'default'
colorPlatte = 'default',
multiSeriesDefaultValue = 0
} = config;

const seriesData = [];
@@ -313,7 +315,7 @@ const getLineOption = (data, config) => {
legendList,
xAxisList,
grid
} = dataListToGrid(data, xAxis, yAxis, legend);
} = dataListToGrid(data, xAxis, yAxis, legend, multiSeriesDefaultValue);

// From grid to series list.
for (let i = 0; i < legendList.length; i++) {
@@ -398,7 +400,8 @@ const getAreaOption = (data, config) => {
yAxis,
hasMultiSeries = false,
isSmooth = false,
colorPlatte = 'default'
colorPlatte = 'default',
multiSeriesDefaultValue = 0
} = config;

const seriesData = [];
@@ -409,7 +412,7 @@ const getAreaOption = (data, config) => {
legendList,
xAxisList,
grid
} = dataListToGrid(data, xAxis, yAxis, legend);
} = dataListToGrid(data, xAxis, yAxis, legend, multiSeriesDefaultValue);

// From grid to series list.
for (let i = 0; i < legendList.length; i++) {
@@ -744,7 +747,7 @@ const getTimeLineOptionTemplate = (seriesData) => {
};


const dataListToGrid = (dataList = [], xAxis, yAxis, legend) => {
const dataListToGrid = (dataList = [], xAxis, yAxis, legend, defaultValue = 0) => {
const legendData = new Set();
const xAxisData = new Set();

@@ -763,6 +766,7 @@ const dataListToGrid = (dataList = [], xAxis, yAxis, legend) => {
const grid = new Array(legendList.length);
for (let i = 0; i < grid.length; i++) {
grid[i] = new Array(xAxisList.length);
grid[i].fill(defaultValue);
}

// Empty element in the grid is undefined.
15 changes: 12 additions & 3 deletions web-app/src/views/Report/ComponentEditPanel.js
Original file line number Diff line number Diff line change
@@ -376,8 +376,9 @@ class ComponentEditPanel extends React.Component {
legend,
yAxis,
hasMultiSeries = false,
multiSeriesDefaultValue = 0
} = data;
const seriesChartPanel = (
const multiSeriesChartPanel = (
<div>
<label>{t('X-Axis')}</label>
<Select
@@ -415,6 +416,14 @@ class ComponentEditPanel extends React.Component {
optionDisplay={'name'}
optionValue={'name'}
/>

<label>{t('Default value')}</label>
<input
className="form-input"
type="text"
value={multiSeriesDefaultValue}
onChange={(event) => this.handleComponentDataChange('multiSeriesDefaultValue', event.target.value)}
/>
</div>
)}
</div>
@@ -549,7 +558,7 @@ class ComponentEditPanel extends React.Component {

chartConfigPanel = (
<div>
{seriesChartPanel}
{multiSeriesChartPanel}

<label>{t('Is Smooth')}</label>
<div style={{marginBottom: '8px'}}>
@@ -575,7 +584,7 @@ class ComponentEditPanel extends React.Component {

chartConfigPanel = (
<div>
{seriesChartPanel}
{multiSeriesChartPanel}

{hasMultiSeries && (
<div>