Skip to content

Commit

Permalink
Complete demo environment for VTL-Pogues-Connector
Browse files Browse the repository at this point in the history
  • Loading branch information
trygu committed May 24, 2019
1 parent 6b71831 commit d6178ea
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10,091 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM openjdk:8-jre-alpine

ADD target/java-vtl-tools-*SNAPSHOT.jar java-vtl-tools.jar
RUN mkdir -p /src/main/resources
ADD ./src/main/resources/simpsons.xml /src/main/resources
RUN sh -c 'touch /java-vtl-tools.jar'
EXPOSE 8080
ENTRYPOINT ["java", "-Xmx300m", "-Djava.security.egd=file:/dev/./urandom","-jar","/java-vtl-tools.jar"]
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# java-vtl-tools
A collection of tools for Java VTL.

## Testing the VTL-Pogues-Connector

* Make sure the simpson.xml (in the resource directory) is available for the connector.

## Build and run as docker image
Run "mvn clean install" to build the application itself.

Build Docker image: docker build -t java-vtl-tools:{{tag}}
Build Docker image: docker build . -t i3sessnet/java-vtl-tools:latest

Run the application: docker run -p 8080:8080 i3sessnet/java-vtl-tools:latest

## Access the demo-application:

Run the application: docker run java-vtl-tools:{{tag}}
After starting the application/container it can be accessed from [http://localhost:8080/demo/index.html#](http://localhost:8080/demo/index.html#)
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@
<exclude>**/*.json</exclude>
<exclude>**/*.js</exclude>
<exclude>**/*.css</exclude>
<exclude>**/simpsons.xml</exclude>
</excludes>
</configuration>
<executions>
Expand Down
10 changes: 6 additions & 4 deletions src/main/resources/public/demo/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -20,8 +20,10 @@
angular.module('vtl', ['ui.codemirror', 'angular.filter'])
.controller('ExecutionController', ['$scope', '$http', '$q', function ($scope, $http, $q) {
"use strict";
$scope.expression = "ssbDataset := get(\"http://data.ssb.no/api/v0/dataset/1102\")\n" +
"klassDataset := get(\"http://data.ssb.no/api/klass/v1/classifications/20/codes?from=2013-01-01\")";
$scope.expression = "data := get(\"POGUES-TEST\")\n"+
"\ntest := [data] {\n" +
" measure VARIABLE := 3.14\n" +
"}\n";

$scope.editorOptions = {
lineWrapping: true,
Expand Down
Loading

0 comments on commit d6178ea

Please sign in to comment.