Compare commits

..

17 Commits

Author SHA1 Message Date
Fabio Formosa
aecc1cab68 Update README.md 2021-02-07 13:22:32 +01:00
Fabio Formosa
4e63e0a833 Create .travis.yml 2021-02-07 13:19:14 +01:00
Fabio Formosa
4540165157 Update README.md 2021-02-07 13:10:59 +01:00
Fabio Formosa
a56f5284d1 Update README.md 2021-02-06 19:33:45 +01:00
Fabio Formosa
eb675f59a3 Update README.md 2021-02-06 19:30:53 +01:00
Fabio Formosa
35f8b6b52a Update README.md 2021-02-06 19:22:31 +01:00
Fabio Formosa
6c76f0a067 Update README.md 2021-02-06 19:12:15 +01:00
Fabio Formosa
48b626c08e Merge pull request #34 from fabioformosa/develop
#32 Renamed modules
2021-02-06 17:14:23 +01:00
fabio.formosa
b2f796cf73 [maven-release-plugin] prepare for next development iteration 2021-02-06 15:56:27 +01:00
fabio.formosa
b01f4b99e4 [maven-release-plugin] prepare release quartz-manager-parent-3.0.1 2021-02-06 15:56:24 +01:00
fabio.formosa
d11089c451 #32 Renamed maven modules 2021-02-06 15:50:27 +01:00
Fabio Formosa
8ecdb4f5a6 Merge pull request #33 from fabioformosa/develop
Released 3.0.0
2021-02-05 00:42:19 +01:00
fabio.formosa
86c2e86a12 [maven-release-plugin] prepare for next development iteration 2021-02-05 00:01:47 +01:00
Fabio Formosa
2b6dadd5f1 Update README.md 2021-02-03 00:06:47 +01:00
Fabio Formosa
bce1be698c Merge pull request #31 from fabioformosa/develop
Refactored project structure for pluggability
2021-02-03 00:01:46 +01:00
Fabio Formosa
b7d152a42a Merge pull request #29 from fabioformosa/develop
Develop
2020-12-26 17:56:56 +01:00
Fabio Formosa
25a5e808f2 Update README.md 2020-10-21 00:02:24 +02:00
53 changed files with 184 additions and 43 deletions

3
.travis.yml Normal file
View File

@@ -0,0 +1,3 @@
language: java
jdk: openjdk8
before_script: cd quartz-manager-parent

171
README.md
View File

@@ -1,21 +1,154 @@
[![Build Status](https://travis-ci.org/fabioformosa/quartz-manager.svg?branch=master)](https://travis-ci.org/fabioformosa/quartz-manager)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/it.fabioformosa.quartz-manager/quartz-manager-starter-api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/it.fabioformosa.quartz-manager/quartz-manager-starter-api)
[![Gitter](https://badges.gitter.im/quartz-manager/community.svg)](https://gitter.im/quartz-manager/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
# QUARTZ MANAGER
UI Manager for Quartz Scheduler.
Quartz Manager is a library you can import in your spring webapp to easily enable the [Quartz Scheduler](http://www.quartz-scheduler.org/) and to control it by REST APIs or by a UI Manager Panel (angular-based).
Through this webapp you can launch and control your scheduled job. The UI Console is composed by a management panel to set trigger, start/stop scheduler and a log panel with a progress bar to display the job output.
Your Spring Webapp should provide the java class of the job you want schedule. Importing the Quartz Manager your project will have the REST API and (optionally) the UI to launch and control the job.
The UI Dashboard is composed by a management panel to set the quartz trigger, to start/stop the scheduler and a log panel with a progress bar to display the job output.
![](https://github.com/fabioformosa/quartz-manager/blob/master/quartz-manager-api/src/main/resources/quartz-manager-2-screenshot_800.PNG)
![](https://github.com/fabioformosa/quartz-manager/blob/master/quartz-manager-parent/quartz-manager-web-showcase/src/main/resources/quartz-manager-2-screenshot_800.PNG)
## HOW IT WORKS
* Set up the trigger into the left sidebar in terms of: daily frequency and and max occurrences.
* Press the start button
* The GUI manager updates the progress bar and reports all logs of your quartz job.
## ROADMAP
Open the [Project Roadmap](https://github.com/fabioformosa/quartz-manager/projects) to take a look at the plan of Quartz Manager.
Currently this project might be useful to look how to import Quartz Library in a spring boot application. For this purpose, browse the folder `quartz-manager-parent/quartz-manager-api`.
We're just working to create a library, from project `quartz-manager-parent/quartz-manager-api`, to be imported in your spring boot where you have your job to be scheduled.
## QUICK START
* **Requirements**
Java 8+
* **add the dependency**
MAVEN
```
<dependency>
<groupId>it.fabioformosa.quartz-manager</groupId>
<artifactId>quartz-manager-starter-api</artifactId>
<version>3.0.1</version>
</dependency>
<!-- OPTIONALLY -->
<dependency>
<groupId>it.fabioformosa.quartz-manager</groupId>
<artifactId>quartz-manager-starter-ui</artifactId>
<version>3.0.1</version>
</dependency>
```
GRADLE
```
compile group: 'it.fabioformosa.quartz-manager', name: 'quartz-manager-starter-api', version: '3.0.1'
//optionally
compile group: 'it.fabioformosa.quartz-manager', name: 'quartz-manager-starter-ui', version: '3.0.1'
```
Import `quartz-manager-starter-ui` as well, if you want use the Quartz Manager API by the angular frontend.
* **add a `quartz.properties` file in the classpath (`src/main/resources`)**
```
org.quartz.scheduler.instanceName=example
org.quartz.scheduler.instanceId=AUTO
org.quartz.threadPool.threadCount=1
```
* **Create the job class that you want to schedule**
```
public class SampleJob extends AbstractLoggingJob {
@Override
public LogRecord doIt(JobExecutionContext jobExecutionContext) {
return new LogRecord(LogType.INFO, "Hello from QuartManagerDemo!");
}
}
```
Extend the super-class `AbstractLoggingJob`
* **Enable quartz-manager adding into the application.yml**
```
quartz:
enabled: true
job:
frequency: 4000
repeatCount: 19
quartz-manager:
jobClass: <QUALIFIED NAME OF THE YOUR JOB CLASS>
```
* **REST API**
You can access the REST API, through the swagger-ui. Open the URL:
[http://localhost:8080/swagger-ui.html](http://localhost:8080/swagger-ui.html)
(Change the port and the contextPath accordingly with the setup of your webapp)
* **Frontend**
If you've imported the `quartz-manager-starter-ui` you can open the UI at URL:
[http://localhost:8080/quartz-manager-ui/index.html](http://localhost:8080/quartz-manager-ui/index.html)
(Change the port and the contextPath accordingly with the setup of your webapp)
* **Security**
If you want enable a security layer and allow the access to the REST API and to the UI only to authenticated users, add the dependency:
MAVEN
```
<dependency>
<groupId>it.fabioformosa.quartz-manager</groupId>
<artifactId>quartz-manager-starter-security</artifactId>
<version>3.0.1</version>
</dependency>
```
GRADLE
```
compile group: 'it.fabioformosa.quartz-manager', name: 'quartz-manager-starter-security', version: '3.0.1'
```
and in your application.yml:
```
quartz-manager:
security:
login-model:
form-login-enabled: true
userpwd-filter-enabled : false
jwt:
enabled: true
secret: "PLEASE_TYPE_HERE_A_SECRET"
expiration-in-sec: 28800 # 8 hours
header-strategy:
enabled: false
header: "Authorization"
cookie-strategy:
enabled: true
cookie: AUTH-TOKEN
accounts:
in-memory:
enabled: true
users:
- name: admin
password: admin
roles:
- ADMIN
```
* **DEMO**
Take a loot to the project [Quartz-Manager Demo](https://github.com/fabioformosa/quartz-manager-demo), it is an example of how-to:
* import the quartz-manager-api library in your webapp
@@ -23,8 +156,9 @@ Take a loot to the project [Quartz-Manager Demo](https://github.com/fabioformosa
* set properties into the application.yml
* add a secure layer to allow the API only to logged users
* schedule a custom job (a dummy `hello world`)
**NB: In few days, we'll release the library jar of quartz-manager into the maven central repo.**
## ROADMAP
Open the [Project Roadmap](https://github.com/fabioformosa/quartz-manager/projects) to take a look at the plan of Quartz Manager.
Next steps in the roadmap are:
* to add a persistent layer to save all job setup.
@@ -32,14 +166,17 @@ Next steps in the roadmap are:
* to add CI/CD pipeline to ease the deploy pulling a docker container.
* Enabling adapters for integrations: kafka, etc.
## PROJECT STRUCTURE
* **quartz-parent/quartz-manager-api** is the library that can be imported in webapp to have the quartz-manager API.
* **quartz-parent/quartz-manager-webjar** is a maven module to build and package the angular frontend in a webjar.
* **quartz-parent/quartz-manager-security** is ther library that can be imported in a webapp to have a security layer (login) over the quartz-manager API.
## HOW-TO CONTRIBUTE
### PROJECT STRUCTURE
* **quartz-parent/quartz-manager-starter-api** is the library that can be imported in webapp to have the quartz-manager API.
* **quartz-parent/quartz-manager-starter-ui** is a maven module to build and package the angular frontend in a webjar.
* **quartz-parent/quartz-manager-starter-security** is ther library that can be imported in a webapp to have a security layer (login) over the quartz-manager API.
* **quartz-parent/quartz-manager-web-showcase** is an example of webapp that imports quartz-manager-api. Useful to develop the frontend started locally with the webpack dev server.
* **quartz-frontend** is the angular app that interacts with the Quartz Manager API.
## HOW-TO CONTRIBUTE
### PROJECT DETAILS
**[requirements]** Make sure you have installed
* [Java 8](https://java.com/download/) or greater
* [Maven](https://maven.apache.org/)
@@ -52,7 +189,9 @@ To build&run quartz-manager in your machine:
git clone https://github.com/fabioformosa/quartz-manager.git
# START QUARTZ-MANAGER-WEB
cd quartz-manager/quartz-parent/quartz-manager-web
cd quartz-manager/quartz-parent
mvn install
cd quartz-manager/quartz-parent/quartz-manager-web-showcase
mvn spring-boot:run
# START QUARTZ-MANAGER-FRONTEND
@@ -69,7 +208,7 @@ If you are not confident with maven CLI, you can start it by your IDE. For more
## HOW TO RUN YOUR SCHEDULED JOB
By default, quartz-manager-web executes the dummy job that logs "hello world!".
By default, `quartz-manager-web-showcase` executes the dummy job that logs "hello world!".
Replace the dummy job (class: `it.fabioformosa.quartzmanager.jobs.SampleJob`) with yours. Follow these steps:
1. Extend the super class `it.fabioformosa.quartzmanager.jobs.AbstractLoggingJob`

View File

@@ -9,7 +9,7 @@
<groupId>it.fabioformosa.quartz-manager</groupId>
<artifactId>quartz-manager-parent</artifactId>
<version>3.0.0</version>
<version>3.0.2-SNAPSHOT</version>
<packaging>pom</packaging>
@@ -29,7 +29,7 @@
<connection>scm:git:git://github.com/fabioformosa/quartz-manager.git</connection>
<developerConnection>scm:git:git@github.com:fabioformosa/quartz-manager.git</developerConnection>
<url>https://github.com/fabioformosa/quartz-manager</url>
<tag>quartz-manager-parent-3.0.0</tag>
<tag>HEAD</tag>
</scm>
<developers>
@@ -40,9 +40,9 @@
</developers>
<modules>
<module>quartz-manager-api</module>
<module>quartz-manager-ui-webjar</module>
<module>quartz-manager-security</module>
<module>quartz-manager-starter-api</module>
<module>quartz-manager-starter-ui</module>
<module>quartz-manager-starter-security</module>
<module>quartz-manager-web-showcase</module>
</modules>
@@ -50,18 +50,18 @@
<dependencies>
<dependency>
<groupId>it.fabioformosa.quartz-manager</groupId>
<artifactId>quartz-manager-api</artifactId>
<version>3.0.0</version>
<artifactId>quartz-manager-starter-api</artifactId>
<version>3.0.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>it.fabioformosa.quartz-manager</groupId>
<artifactId>quartz-manager-security</artifactId>
<version>3.0.0</version>
<artifactId>quartz-manager-starter-security</artifactId>
<version>3.0.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>it.fabioformosa.quartz-manager</groupId>
<artifactId>quartz-manager-ui-webjar</artifactId>
<version>3.0.0</version>
<artifactId>quartz-manager-starter-ui</artifactId>
<version>3.0.2-SNAPSHOT</version>
</dependency>
</dependencies>
</dependencyManagement>
@@ -83,7 +83,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>

View File

@@ -4,13 +4,13 @@
<parent>
<groupId>it.fabioformosa.quartz-manager</groupId>
<artifactId>quartz-manager-parent</artifactId>
<version>3.0.0</version>
<version>3.0.2-SNAPSHOT</version>
</parent>
<artifactId>quartz-manager-api</artifactId>
<artifactId>quartz-manager-starter-api</artifactId>
<name>Quartz Manager API</name>
<description>A library to manage your scheduled job by API</description>
<name>Quartz Manager Starter API</name>
<description>REST API layer for your scheduler and triggered jobs, to be included in your spring webapp</description>
<url>https://github.com/fabioformosa/quartz-manager</url>
<properties>

View File

@@ -3,13 +3,13 @@
<parent>
<groupId>it.fabioformosa.quartz-manager</groupId>
<artifactId>quartz-manager-parent</artifactId>
<version>3.0.0</version>
<version>3.0.2-SNAPSHOT</version>
</parent>
<artifactId>quartz-manager-security</artifactId>
<artifactId>quartz-manager-starter-security</artifactId>
<name>Quartz Manager Security</name>
<description>Security Layer for Quartz Manager</description>
<name>Quartz Manager Starter Security</name>
<description>Security Layer for Quartz Manager. Import it in your spring webapp</description>
<url>https://github.com/fabioformosa/quartz-manager</url>
<properties>

View File

@@ -4,13 +4,13 @@
<parent>
<groupId>it.fabioformosa.quartz-manager</groupId>
<artifactId>quartz-manager-parent</artifactId>
<version>3.0.0</version>
<version>3.0.2-SNAPSHOT</version>
</parent>
<artifactId>quartz-manager-ui-webjar</artifactId>
<artifactId>quartz-manager-starter-ui</artifactId>
<name>Quartz Manager UI webjar</name>
<description>webjar builder for quartz-manager frontend</description>
<description>Webjar to import the quartz-manager frontend in your spring webapp</description>
<url>https://github.com/fabioformosa/quartz-manager</url>
<properties>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>it.fabioformosa.quartz-manager</groupId>
<artifactId>quartz-manager-parent</artifactId>
<version>3.0.0</version>
<version>3.0.2-SNAPSHOT</version>
</parent>
<artifactId>quartz-manager-web-showcase</artifactId>
@@ -25,15 +25,15 @@
<dependencies>
<dependency>
<groupId>it.fabioformosa.quartz-manager</groupId>
<artifactId>quartz-manager-api</artifactId>
<artifactId>quartz-manager-starter-api</artifactId>
</dependency>
<dependency>
<groupId>it.fabioformosa.quartz-manager</groupId>
<artifactId>quartz-manager-ui-webjar</artifactId>
<artifactId>quartz-manager-starter-ui</artifactId>
</dependency>
<dependency>
<groupId>it.fabioformosa.quartz-manager</groupId>
<artifactId>quartz-manager-security</artifactId>
<artifactId>quartz-manager-starter-security</artifactId>
</dependency>
<!-- SPRING -->