angular-quartz-cron
v1.0.2
Published
UI Component For Creating Cron Job Syntax To Send To Server
Downloads
23
Readme
angular-quartz-cron
This is based on Jacob Carter's project angular-cron-jobs but provides us the Quartz compatible cron instead of the classic cron syntax.
Demo:
The demo is still in the works, sorry!
Installation:
Not there on bower yet, but you can directly install off this repository.
bower install RajanRastogi/angular-quartz-cron
Usage:
Include the component in the app:
angular.module('my-app', ['angular-quartz-cron'])
Insert the directive:
<quartz-cron-selection></quartz-cron-selection>
You can interact with the directive using the following attributes:
- output
- init(optional)
- template(optional)
- config(optional)
output
Binds the output cron generated by this directive to the provided variable.
init
Lets you initialize the UI based on the cron string provided. It can be set after the directive has loaded.
template
Lets you use custom templates. It should be set to the url of the custom template you are trying to use.
config
This is an object in your controller you can use to remove options from the user. For example if you would like the user to be able to set Minute, Hour, and Day but not Week, Month, and Year you would create the following object in your controller:
$scope.myConfig = {
options: {
allowWeek : false,
allowMonth : false,
allowYear : false
}
}
Currently the config object accepts an options property with an object of allowed selections. These include:
- allowMinute
- allowHour
- allowDay
- allowWeek
- allowMonth
- allowYear
Setting the keys as booleans will turn the selection on and off.