Skip to content
Snippets Groups Projects
Commit 0b6a2db1 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

cleanup; Fixed plotly dependency

parent dbd5fb71
No related branches found
No related tags found
No related merge requests found
...@@ -64,7 +64,6 @@ ...@@ -64,7 +64,6 @@
<fontawesome.version>5.0.10</fontawesome.version> <fontawesome.version>5.0.10</fontawesome.version>
<sortablejs.version>1.8.1</sortablejs.version> <sortablejs.version>1.8.1</sortablejs.version>
<mousetrap.version>1.6.1</mousetrap.version> <mousetrap.version>1.6.1</mousetrap.version>
<plotly.version>1.48.3</plotly.version>
<moment.version>2.24.0</moment.version> <moment.version>2.24.0</moment.version>
<webdrivermanager.version>2.2.1</webdrivermanager.version> <webdrivermanager.version>2.2.1</webdrivermanager.version>
<selenium.version>3.141.59</selenium.version> <selenium.version>3.141.59</selenium.version>
...@@ -191,11 +190,6 @@ ...@@ -191,11 +190,6 @@
<artifactId>mousetrap</artifactId> <artifactId>mousetrap</artifactId>
<version>${mousetrap.version}</version> <version>${mousetrap.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.webjars.bower</groupId>
<artifactId>plotly.js</artifactId>
<version>${plotly.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.webjars</groupId> <groupId>org.webjars</groupId>
<artifactId>momentjs</artifactId> <artifactId>momentjs</artifactId>
......
...@@ -28,7 +28,11 @@ import java.util.List; ...@@ -28,7 +28,11 @@ import java.util.List;
@Controller @Controller
public class ChartController extends BaseController public class ChartController extends BaseController
{ {
private static final Gson GSON = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().setPrettyPrinting().registerTypeAdapter(DateTime.class, (JsonSerializer<DateTime>) (json, typeOfSrc, context) -> new JsonPrimitive(ISODateTimeFormat.date().print(json))).create(); private static final Gson GSON = new GsonBuilder()
.excludeFieldsWithoutExposeAnnotation()
.setPrettyPrinting()
.registerTypeAdapter(DateTime.class, (JsonSerializer<DateTime>) (json, typeOfSrc, context) -> new JsonPrimitive(ISODateTimeFormat.date().print(json)))
.create();
private final ChartService chartService; private final ChartService chartService;
private final HelpersService helpers; private final HelpersService helpers;
......
...@@ -90,7 +90,11 @@ public class DatabaseService ...@@ -90,7 +90,11 @@ public class DatabaseService
Database database = new Database(categories, accounts, filteredTransactions); Database database = new Database(categories, accounts, filteredTransactions);
LOGGER.debug("Created database JSON with " + database.getTransactions().size() + " transactions, " + database.getCategories().size() + " categories and " + database.getAccounts().size() + " accounts"); LOGGER.debug("Created database JSON with " + database.getTransactions().size() + " transactions, " + database.getCategories().size() + " categories and " + database.getAccounts().size() + " accounts");
Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().setPrettyPrinting().registerTypeAdapter(DateTime.class, (JsonSerializer<DateTime>) (json, typeOfSrc, context) -> new JsonPrimitive(ISODateTimeFormat.date().print(json))).create(); Gson gson = new GsonBuilder()
.excludeFieldsWithoutExposeAnnotation()
.setPrettyPrinting()
.registerTypeAdapter(DateTime.class, (JsonSerializer<DateTime>) (json, typeOfSrc, context) -> new JsonPrimitive(ISODateTimeFormat.date().print(json)))
.create();
return gson.toJson(database); return gson.toJson(database);
} }
......
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
<!-- Scripts--> <!-- Scripts-->
<#import "../helpers/scripts.ftl" as scripts> <#import "../helpers/scripts.ftl" as scripts>
<@scripts.scripts/> <@scripts.scripts/>
<script src="<@s.url '/webjars/plotly/1.48.3/dist/plotly.min.js'/>"></script> <script src="<@s.url '/js/plotly.min.js'/>"></script>
<script src="<@s.url '/webjars/momentjs/2.24.0/min/moment.min.js'/>"></script> <script src="<@s.url '/webjars/momentjs/2.24.0/min/moment.min.js'/>"></script>
<script src="<@s.url '/js/charts.js'/>"></script> <script src="<@s.url '/js/charts.js'/>"></script>
<script src="<@s.url '/js/filter.js'/>"></script> <script src="<@s.url '/js/filter.js'/>"></script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment