Skip to content

Commit

Permalink
New chart feature, optimized report computation, updated dependencies…
Browse files Browse the repository at this point in the history
…, prepare release 1.0.1
  • Loading branch information
Christian Bauer committed Apr 8, 2018
1 parent 0ec42fc commit bb0c505
Show file tree
Hide file tree
Showing 64 changed files with 2,219 additions and 452 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*.iml
.idea
.local
.docker
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Konto

## Development IDE setup

* Import in IntelliJ IDEA
* Create Run Configuration, build and deploy `konto:war exploded` artifact to Wildfly 10.x
* Run GWT SDM code server in background: `mvn gwt:run-codeserver`
* Open http://localhost:8080/

## Deployment

* Make directory for installation: `mkdir .local/`
* Download dependencies JAR files: `mvn dependency:copy-dependencies -DoutputDirectory=.local/lib`
* Run database: `java -jar .local/lib/h2-1.3.158.jar -tcp -tcpPort 9093 -baseDir $PWD/.local/`
* Edit `src/main/resources/hibernate.cfg.xml`
* Either run in IDE or build and deploy WAR manually: `mvn clean package`

48 changes: 37 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<groupId>org.fourthline.konto</groupId>
<artifactId>konto</artifactId>
<version>1.0.1-SNAPSHOT</version>
<version>1.0.1</version>
<packaging>war</packaging>

<!-- ##################################################################################################### -->
Expand Down Expand Up @@ -58,10 +58,10 @@
<test-jul-config-file>${basedir}/src/test/logging.properties</test-jul-config-file>

<seamless.version>1.0.0</seamless.version>
<testng.version>5.14.9</testng.version>
<testng.version>6.14.2</testng.version>
<javax.inject.version>1</javax.inject.version>
<gwt.maven.plugin.version>2.7.0</gwt.maven.plugin.version>
<gwt.version>2.7.0</gwt.version>
<gwt.maven.plugin.version>2.8.2</gwt.maven.plugin.version>
<gwt.version>2.8.2</gwt.version>
<gin.version>2.1.2</gin.version>
<hibernate.core.version>3.6.0.Final</hibernate.core.version>
<hibernate.validator.version>4.1.0.Final</hibernate.validator.version>
Expand Down Expand Up @@ -130,14 +130,37 @@
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.maven.plugin.version}</version>
<configuration>
<style>OBFUSCATED</style>
<logLevel>INFO</logLevel>
<style>PRETTY</style>

<!--
Can't disable these unneeded artifacts, so compile
them outside of the target WAR
-->
<deploy>${project.build.directory}/gwt-deploy</deploy>
<outputDirectory>${project.build.directory}/${project.artifactId}.war</outputDirectory>

<!-- SDM configuration -->
<launcherDir>${project.build.directory}/konto.war/</launcherDir>
<incremental>false</incremental>
<precompile>false</precompile>

</configuration>
<executions>
<execution>
<id>gwt-compile</id>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>gwt-clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- Unit tests -->
Expand Down Expand Up @@ -310,9 +333,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>

Expand Down Expand Up @@ -358,10 +382,6 @@
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</exclusion>
<exclusion>
<groupId>org.beanshell</groupId>
<artifactId>bsh</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down Expand Up @@ -439,6 +459,12 @@
<version>${hibernate.core.version}</version>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>${hibernate.core.version}</version>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
Expand Down
22 changes: 22 additions & 0 deletions src/main/java/org/fourthline/konto/client/JsUtil.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package org.fourthline.konto.client;

public class JsUtil {

public native static void log(Object o) /*-{
console.dir(o);
}-*/;

public native static void printType(Object o) /*-{
console.log(({}).toString.call(o).match(/\s([a-zA-Z]+)/)[1].toLowerCase());
}-*/;

public native static String typeOf(Object o) /*-{
var type = typeof o;
if (type == 'object') {
return typeof (o.valueOf());
} else {
return type;
}
}-*/;

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.google.gwt.place.shared.PlaceHistoryHandler;
import com.google.web.bindery.event.shared.EventBus;
import org.fourthline.konto.client.bundle.Bundle;
import org.fourthline.konto.client.chart.ChartModule;
import org.fourthline.konto.client.currency.CurrencyModule;
import org.fourthline.konto.client.dashboard.DashboardModule;
import org.fourthline.konto.client.ledger.LedgerModule;
Expand All @@ -40,7 +41,8 @@
DashboardModule.class,
CurrencyModule.class,
LedgerModule.class,
ReportModule.class
ReportModule.class,
ChartModule.class
}
)
public interface KontoGinjector extends Ginjector {
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/org/fourthline/konto/client/NavigationMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import com.google.gwt.place.shared.WithTokenizers;
import javax.inject.Inject;
import com.google.inject.Provider;
import org.fourthline.konto.client.chart.ChartActivity;
import org.fourthline.konto.client.chart.ChartPlace;
import org.fourthline.konto.client.currency.CurrencyActivity;
import org.fourthline.konto.client.currency.CurrencyPlace;
import org.fourthline.konto.client.dashboard.DashboardActivity;
Expand Down Expand Up @@ -75,10 +77,11 @@ public class NavigationMapper implements ActivityMapper {
AccountPlace.Tokenizer.class,
CurrencyPlace.Tokenizer.class,
ReportPlace.Tokenizer.class,
ChartPlace.Tokenizer.class,
SettingsPlace.Tokenizer.class
}
)
static public interface History extends PlaceHistoryMapper {
public interface History extends PlaceHistoryMapper {
}

final MainPresenter mainPresenter;
Expand All @@ -87,6 +90,7 @@ static public interface History extends PlaceHistoryMapper {
final Provider<AccountActivity> accountActivityProvider;
final Provider<CurrencyActivity> currencyActivityProvider;
final Provider<ReportActivity> reportActivityProvider;
final Provider<ChartActivity> chartActivityProvider;
final Provider<SettingsActivity> settingsActivityProvider;

@Inject
Expand All @@ -96,6 +100,7 @@ public NavigationMapper(MainPresenter mainPresenter,
Provider<AccountActivity> accountActivityProvider,
Provider<CurrencyActivity> currencyActivityProvider,
Provider<ReportActivity> reportActivityProvider,
Provider<ChartActivity> chartActivityProvider,
Provider<SettingsActivity> settingsActivityProvider,
EventBus bus,
Notifications notifications) {
Expand All @@ -106,6 +111,7 @@ public NavigationMapper(MainPresenter mainPresenter,
this.accountActivityProvider = accountActivityProvider;
this.currencyActivityProvider = currencyActivityProvider;
this.reportActivityProvider = reportActivityProvider;
this.chartActivityProvider= chartActivityProvider;
this.settingsActivityProvider = settingsActivityProvider;

bus.addHandler(NotifyEvent.TYPE, notifications);
Expand All @@ -124,6 +130,8 @@ public Activity getActivity(Place place) {
return currencyActivityProvider.get().init((CurrencyPlace) place);
} else if (place instanceof ReportPlace) {
return reportActivityProvider.get().init((ReportPlace) place);
} else if (place instanceof ChartPlace) {
return chartActivityProvider.get().init((ChartPlace) place);
} else if (place instanceof SettingsPlace) {
return settingsActivityProvider.get().init((SettingsPlace) place);
}
Expand Down
Loading

0 comments on commit bb0c505

Please sign in to comment.