From 90f3b0b485d7fffa4cc3f9a9c675ad48f2b66058 Mon Sep 17 00:00:00 2001 From: Martin Rojas Miguel Angel Date: Wed, 20 Feb 2019 11:08:38 +0100 Subject: [PATCH] TSK-747 Add history.plugin profile to add history plugin --- .travis.yml | 2 +- ci/test.sh | 3 +-- rest/taskana-rest-spring-example/pom.xml | 26 ++++++++++++------- .../rest/controllers/ViewController.java | 2 +- .../task-query/task-query.component.html | 2 +- .../task-query/task-query.component.ts | 4 +-- .../request-in-progress.service.ts | 2 +- 7 files changed, 23 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 60e475b0b..8f258d324 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,7 +47,7 @@ jobs: script: - (cd web && npm run build:prod) && mvn clean install -q -f lib -DskipTests -Dmaven.javadoc.skip=true - && mvn clean install -q -f rest -DskipTests -Dmaven.javadoc.skip=true + && mvn clean install -q -f rest -DskipTests -Dmaven.javadoc.skip=true -P history.plugin - stage: "Release / Deploy" name: "Release stage" script: diff --git a/ci/test.sh b/ci/test.sh index bf08f647a..2524b592c 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -29,8 +29,7 @@ function main { if [[ "$1" == "H2" ]]; then (cd $REL/../web && npm run test) mvn clean verify -q -f $REL/../lib/ -B - mvn clean install -q -f $REL/../rest/ -B - mvn clean verify -q -f $REL/../rest/ -B -pl taskana-rest-spring-example -P history.plugin + mvn clean install -q -f $REL/../rest/ -B -P history.plugin elif [[ "$1" == "POSTGRES_10_4" ]]; then mvn clean verify -q -f $REL/../lib/taskana-core -B mvn clean install -q -f $REL/../rest/ -B -P postgres diff --git a/rest/taskana-rest-spring-example/pom.xml b/rest/taskana-rest-spring-example/pom.xml index d47a633ad..4973ac53d 100644 --- a/rest/taskana-rest-spring-example/pom.xml +++ b/rest/taskana-rest-spring-example/pom.xml @@ -28,6 +28,22 @@ --> + + + history.plugin + + false + + + + pro.taskana + taskana-history-rest-spring + ${project.version} + + + + + UTF-8 UTF-8 @@ -41,16 +57,6 @@ taskana-rest-spring ${project.version} - - pro.taskana - taskana-history-rest-spring - ${project.version} - - - pro.taskana.simplehistory - taskana-simplehistory-provider - 0.0.6 - org.springframework.boot spring-boot-starter-web diff --git a/rest/taskana-rest-spring-setup/src/main/java/pro/taskana/rest/controllers/ViewController.java b/rest/taskana-rest-spring-setup/src/main/java/pro/taskana/rest/controllers/ViewController.java index f8c93de9f..5be13c2e5 100644 --- a/rest/taskana-rest-spring-setup/src/main/java/pro/taskana/rest/controllers/ViewController.java +++ b/rest/taskana-rest-spring-setup/src/main/java/pro/taskana/rest/controllers/ViewController.java @@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.RequestMapping; @Controller public class ViewController { - @RequestMapping({"", "/administration*/**", "/workplace*/**", "/monitor*/**", "/no-role*/**"}) + @RequestMapping({"", "/administration*/**", "/workplace*/**", "/monitor*/**", "/history*/**", "/no-role*/**"}) public String index() { return "forward:/index.html"; } diff --git a/web/src/app/history/task-query/task-query.component.html b/web/src/app/history/task-query/task-query.component.html index f7bcb26e0..2a18bb23c 100644 --- a/web/src/app/history/task-query/task-query.component.html +++ b/web/src/app/history/task-query/task-query.component.html @@ -11,7 +11,7 @@

Taskana history query

-
+
diff --git a/web/src/app/history/task-query/task-query.component.ts b/web/src/app/history/task-query/task-query.component.ts index 6d6170e6f..63b680af5 100644 --- a/web/src/app/history/task-query/task-query.component.ts +++ b/web/src/app/history/task-query/task-query.component.ts @@ -170,7 +170,7 @@ export class TaskQueryComponent implements OnInit { } private performRequest() { - setTimeout(() => this.requestInProgressService.setRequestInProgress(true), 1) + this.requestInProgressService.setRequestInProgress(true); this.calculateQueryPages(); this.taskQuerySubscription = this.taskQueryService.queryTask( this.orderBy.sortBy.replace(/([A-Z])|([0-9])/g, (g) => `-${g[0].toLowerCase()}`), @@ -195,7 +195,7 @@ export class TaskQueryComponent implements OnInit { this.taskQueryForm.get('custom3') ? this.taskQueryForm.get('custom3').value : undefined, this.taskQueryForm.get('custom4') ? this.taskQueryForm.get('custom4').value : undefined, false).subscribe(taskQueryResource => { - this.requestInProgressService.setRequestInProgress(false) + this.requestInProgressService.setRequestInProgress(false); if (!taskQueryResource._embedded) { this.taskQuery = null; this.taskQueryResource = null; diff --git a/web/src/app/services/requestInProgress/request-in-progress.service.ts b/web/src/app/services/requestInProgress/request-in-progress.service.ts index 62f9c7c43..678eefdaf 100644 --- a/web/src/app/services/requestInProgress/request-in-progress.service.ts +++ b/web/src/app/services/requestInProgress/request-in-progress.service.ts @@ -9,7 +9,7 @@ export class RequestInProgressService { constructor() { } setRequestInProgress(value: boolean) { - this.requestInProgressTriggered.next(value); + setTimeout(() => this.requestInProgressTriggered.next(value), 0); } getRequestInProgress(): Observable {