├── .gitignore ├── LICENSE ├── README.md └── spring-batch-admin-angularjs ├── .gitignore ├── README.md ├── build.gradle ├── client ├── .bowerrc ├── .editorconfig ├── .gitattributes ├── .gitignore ├── .jshintrc ├── .travis.yml ├── .yo-rc.json ├── Gruntfile.js ├── app │ ├── .buildignore │ ├── .htaccess │ ├── 404.html │ ├── favicon.ico │ ├── fonts │ │ ├── montserrat-webfont.eot │ │ ├── montserrat-webfont.svg │ │ ├── montserrat-webfont.ttf │ │ ├── montserrat-webfont.woff │ │ ├── varela_round-webfont.eot │ │ ├── varela_round-webfont.svg │ │ ├── varela_round-webfont.ttf │ │ └── varela_round-webfont.woff │ ├── images │ │ ├── spring-logo.png │ │ └── yeoman.png │ ├── index.html │ ├── robots.txt │ ├── scripts │ │ ├── app.js │ │ ├── controllers │ │ │ ├── fileUpload.js │ │ │ ├── jobExecutionDetail.js │ │ │ ├── jobExecutions.js │ │ │ ├── jobSummary.js │ │ │ ├── main.js │ │ │ └── stepExecutionDetail.js │ │ ├── directives │ │ │ └── duration.js │ │ └── services │ │ │ ├── config.js │ │ │ └── jobService.js │ ├── styles │ │ └── main.css │ └── views │ │ ├── about.html │ │ ├── fileUpload.html │ │ ├── jobExecutionDetail.html │ │ ├── jobExecutions.html │ │ ├── jobSummary.html │ │ ├── main.html │ │ └── stepExecutionDetail.html ├── bower.json ├── dump.rdb ├── npm-debug.log ├── package.json └── test │ ├── .jshintrc │ ├── karma.conf.js │ └── spec │ └── controllers │ ├── about.js │ └── main.js ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src └── main ├── java └── org │ └── springframework │ └── batch │ └── admin │ └── sample │ ├── Main.java │ ├── jobs │ └── SampleJob.java │ └── web │ └── CORSFilter.java └── resources ├── META-INF └── spring │ └── batch │ └── jobs │ └── xmlJob.xml ├── application.properties ├── batch-hsql.properties └── business-schema-hsqldb.sql /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | .classpath 3 | .project 4 | .settings 5 | bin 6 | build.log 7 | integration-repo 8 | ivy-cache 9 | spring-build 10 | derby-home 11 | derbydb 12 | derby.log 13 | derbydb 14 | com.springsource.sts.config.flow.prefs 15 | s3.properties 16 | .idea 17 | *.iml 18 | *.ipr 19 | *.iws 20 | .*.swp 21 | .DS_Store 22 | .springBeans 23 | build 24 | .gradle 25 | pom.xml 26 | out 27 | 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, and 10 | distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by the copyright 13 | owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all other entities 16 | that control, are controlled by, or are under common control with that entity. 17 | For the purposes of this definition, "control" means (i) the power, direct or 18 | indirect, to cause the direction or management of such entity, whether by 19 | contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the 20 | outstanding shares, or (iii) beneficial ownership of such entity. 21 | 22 | "You" (or "Your") shall mean an individual or Legal Entity exercising 23 | permissions granted by this License. 24 | 25 | "Source" form shall mean the preferred form for making modifications, including 26 | but not limited to software source code, documentation source, and configuration 27 | files. 28 | 29 | "Object" form shall mean any form resulting from mechanical transformation or 30 | translation of a Source form, including but not limited to compiled object code, 31 | generated documentation, and conversions to other media types. 32 | 33 | "Work" shall mean the work of authorship, whether in Source or Object form, made 34 | available under the License, as indicated by a copyright notice that is included 35 | in or attached to the work (an example is provided in the Appendix below). 36 | 37 | "Derivative Works" shall mean any work, whether in Source or Object form, that 38 | is based on (or derived from) the Work and for which the editorial revisions, 39 | annotations, elaborations, or other modifications represent, as a whole, an 40 | original work of authorship. For the purposes of this License, Derivative Works 41 | shall not include works that remain separable from, or merely link (or bind by 42 | name) to the interfaces of, the Work and Derivative Works thereof. 43 | 44 | "Contribution" shall mean any work of authorship, including the original version 45 | of the Work and any modifications or additions to that Work or Derivative Works 46 | thereof, that is intentionally submitted to Licensor for inclusion in the Work 47 | by the copyright owner or by an individual or Legal Entity authorized to submit 48 | on behalf of the copyright owner. For the purposes of this definition, 49 | "submitted" means any form of electronic, verbal, or written communication sent 50 | to the Licensor or its representatives, including but not limited to 51 | communication on electronic mailing lists, source code control systems, and 52 | issue tracking systems that are managed by, or on behalf of, the Licensor for 53 | the purpose of discussing and improving the Work, but excluding communication 54 | that is conspicuously marked or otherwise designated in writing by the copyright 55 | owner as "Not a Contribution." 56 | 57 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf 58 | of whom a Contribution has been received by Licensor and subsequently 59 | incorporated within the Work. 60 | 61 | 2. Grant of Copyright License. 62 | 63 | Subject to the terms and conditions of this License, each Contributor hereby 64 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, 65 | irrevocable copyright license to reproduce, prepare Derivative Works of, 66 | publicly display, publicly perform, sublicense, and distribute the Work and such 67 | Derivative Works in Source or Object form. 68 | 69 | 3. Grant of Patent License. 70 | 71 | Subject to the terms and conditions of this License, each Contributor hereby 72 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, 73 | irrevocable (except as stated in this section) patent license to make, have 74 | made, use, offer to sell, sell, import, and otherwise transfer the Work, where 75 | such license applies only to those patent claims licensable by such Contributor 76 | that are necessarily infringed by their Contribution(s) alone or by combination 77 | of their Contribution(s) with the Work to which such Contribution(s) was 78 | submitted. If You institute patent litigation against any entity (including a 79 | cross-claim or counterclaim in a lawsuit) alleging that the Work or a 80 | Contribution incorporated within the Work constitutes direct or contributory 81 | patent infringement, then any patent licenses granted to You under this License 82 | for that Work shall terminate as of the date such litigation is filed. 83 | 84 | 4. Redistribution. 85 | 86 | You may reproduce and distribute copies of the Work or Derivative Works thereof 87 | in any medium, with or without modifications, and in Source or Object form, 88 | provided that You meet the following conditions: 89 | 90 | You must give any other recipients of the Work or Derivative Works a copy of 91 | this License; and 92 | You must cause any modified files to carry prominent notices stating that You 93 | changed the files; and 94 | You must retain, in the Source form of any Derivative Works that You distribute, 95 | all copyright, patent, trademark, and attribution notices from the Source form 96 | of the Work, excluding those notices that do not pertain to any part of the 97 | Derivative Works; and 98 | If the Work includes a "NOTICE" text file as part of its distribution, then any 99 | Derivative Works that You distribute must include a readable copy of the 100 | attribution notices contained within such NOTICE file, excluding those notices 101 | that do not pertain to any part of the Derivative Works, in at least one of the 102 | following places: within a NOTICE text file distributed as part of the 103 | Derivative Works; within the Source form or documentation, if provided along 104 | with the Derivative Works; or, within a display generated by the Derivative 105 | Works, if and wherever such third-party notices normally appear. The contents of 106 | the NOTICE file are for informational purposes only and do not modify the 107 | License. You may add Your own attribution notices within Derivative Works that 108 | You distribute, alongside or as an addendum to the NOTICE text from the Work, 109 | provided that such additional attribution notices cannot be construed as 110 | modifying the License. 111 | You may add Your own copyright statement to Your modifications and may provide 112 | additional or different license terms and conditions for use, reproduction, or 113 | distribution of Your modifications, or for any such Derivative Works as a whole, 114 | provided Your use, reproduction, and distribution of the Work otherwise complies 115 | with the conditions stated in this License. 116 | 117 | 5. Submission of Contributions. 118 | 119 | Unless You explicitly state otherwise, any Contribution intentionally submitted 120 | for inclusion in the Work by You to the Licensor shall be under the terms and 121 | conditions of this License, without any additional terms or conditions. 122 | Notwithstanding the above, nothing herein shall supersede or modify the terms of 123 | any separate license agreement you may have executed with Licensor regarding 124 | such Contributions. 125 | 126 | 6. Trademarks. 127 | 128 | This License does not grant permission to use the trade names, trademarks, 129 | service marks, or product names of the Licensor, except as required for 130 | reasonable and customary use in describing the origin of the Work and 131 | reproducing the content of the NOTICE file. 132 | 133 | 7. Disclaimer of Warranty. 134 | 135 | Unless required by applicable law or agreed to in writing, Licensor provides the 136 | Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, 137 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, 138 | including, without limitation, any warranties or conditions of TITLE, 139 | NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are 140 | solely responsible for determining the appropriateness of using or 141 | redistributing the Work and assume any risks associated with Your exercise of 142 | permissions under this License. 143 | 144 | 8. Limitation of Liability. 145 | 146 | In no event and under no legal theory, whether in tort (including negligence), 147 | contract, or otherwise, unless required by applicable law (such as deliberate 148 | and grossly negligent acts) or agreed to in writing, shall any Contributor be 149 | liable to You for damages, including any direct, indirect, special, incidental, 150 | or consequential damages of any character arising as a result of this License or 151 | out of the use or inability to use the Work (including but not limited to 152 | damages for loss of goodwill, work stoppage, computer failure or malfunction, or 153 | any and all other commercial damages or losses), even if such Contributor has 154 | been advised of the possibility of such damages. 155 | 156 | 9. Accepting Warranty or Additional Liability. 157 | 158 | While redistributing the Work or Derivative Works thereof, You may choose to 159 | offer, and charge a fee for, acceptance of support, warranty, indemnity, or 160 | other liability obligations and/or rights consistent with this License. However, 161 | in accepting such obligations, You may act only on Your own behalf and on Your 162 | sole responsibility, not on behalf of any other Contributor, and only if You 163 | agree to indemnify, defend, and hold each Contributor harmless for any liability 164 | incurred by, or claims asserted against, such Contributor by reason of your 165 | accepting any such warranty or additional liability. 166 | 167 | END OF TERMS AND CONDITIONS 168 | 169 | APPENDIX: How to apply the Apache License to your work 170 | 171 | To apply the Apache License to your work, attach the following boilerplate 172 | notice, with the fields enclosed by brackets "[]" replaced with your own 173 | identifying information. (Don't include the brackets!) The text should be 174 | enclosed in the appropriate comment syntax for the file format. We also 175 | recommend that a file or class name and description of purpose be included on 176 | the same "printed page" as the copyright notice for easier identification within 177 | third-party archives. 178 | 179 | Copyright [yyyy] [name of copyright owner] 180 | 181 | Licensed under the Apache License, Version 2.0 (the "License"); 182 | you may not use this file except in compliance with the License. 183 | You may obtain a copy of the License at 184 | 185 | http://www.apache.org/licenses/LICENSE-2.0 186 | 187 | Unless required by applicable law or agreed to in writing, software 188 | distributed under the License is distributed on an "AS IS" BASIS, 189 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 190 | See the License for the specific language governing permissions and 191 | limitations under the License. 192 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NOTE: This project is being moved to the Spring Attic and is not maintained anymore 2 | 3 | # Spring Batch Admin Samples 4 | 5 | This repository provides sample starter applications and code for use with the Spring Batch Admin project. All samples are based on the Spring Batch Admin 2.0 or later. The following samples are available: 6 | 7 | ## Spring Batch Admin - AngularJS 8 | A Spring Boot based application with a front end developed with AngularJS. 9 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/.gitignore: -------------------------------------------------------------------------------- 1 | src/main/resources/public/ 2 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/README.md: -------------------------------------------------------------------------------- 1 | ## Spring Batch Admin - AngularJS 2 | 3 | AngularJS is a popular javascript MVC framework developed by Google. This sample 4 | application demonstrates a sample UI developed using AngularJS consuming Spring Batch 5 | Admin's REST endpoints. 6 | 7 | ### Dependencies 8 | 9 | This project requires the following to be built: 10 | 11 | * Java 7 or higher 12 | * NPM 1.4.24 or higher 13 | 14 | ### Configuration 15 | 16 | This sample app contains two configuration files, all residing in `src/main/resources`: 17 | 18 | **application.properties** 19 | This is the standard Spring Boot configuration file used to specify environment specific values. 20 | 21 | **batch-*.properties** 22 | This file is used to configure your database. The * is replaced with whatever the database type you're using. This should match the value of the `ENVIRONMENT` property in the `application.properties` file. This project comes with an HSQLDB preconfigured. 23 | 24 | ### Building 25 | 26 | To build this project, is a two step process: 27 | 28 | **Build the client** 29 | The first time you build the front end, you'll need to install the dependencies. To do 30 | that: 31 | 32 | ``` 33 | $ cd client 34 | $ npm install 35 | $ bower install 36 | ``` 37 | With the dependencies installed, you can compile the static resources with `$ grunt build`. The result of this will place all the compiled static resources into `src/main/resources/public`. 38 | 39 | **Building the executable jar** 40 | Once the client has been built, you can build the executable jar file. This is done via `$ ./gradlew build` from the root of the project. 41 | 42 | ### Launching the application 43 | Once the project has been built, you can launch the application via the command line `$ java -jar build/libs/spring-batch-admin-angularjs-0.1.0.jar`. Once started, navigate your browser to [http://localhost:8080](http://localhost:8080) for the home page. 44 | 45 | ### Sample jobs 46 | There are two sample jobs provided in this example. One is XML based and can be found in `src/main/resources/META-INF/spring/batch/jobs`. The other is a Java config based job. The Java configured job (`job`), takes an optional parameter `fail` to indicate if it should fail or not. 47 | 48 | ### Development Profile 49 | The front end for this project was generated using [Yeoman](http://yeoman.io) and uses the [Grunt](http://gruntjs.com) build system. The development profile provides the ability to iterate on the front end independently of the back end. To do so: 50 | 51 | * Run the Spring Boot based app using your method of choice (`java -jar`, IDE, etc) with the `spring.profiles.active=development` configured in the `application.properties`. 52 | * From the client directory, run `$ grunt serve`. This will launch a separate server on port 9000 that will serve the static resources. It includes functionality like automatic reloading of the page in the browser as changes are made, etc. 53 | 54 | The development profile makes this dual server configuration possible via the CORSFilter. It is disabled by default and should not be run in a production environment. 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | maven { 4 | mavenCentral() 5 | url 'http://repo.springsource.org/libs-milestone/' 6 | } 7 | } 8 | dependencies { 9 | classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.2.RELEASE") 10 | } 11 | } 12 | 13 | ext { 14 | springBatchAdminVersion = '2.0.0.BUILD-SNAPSHOT' 15 | } 16 | 17 | apply plugin: 'java' 18 | apply plugin: 'eclipse' 19 | apply plugin: 'idea' 20 | apply plugin: 'spring-boot' 21 | 22 | jar { 23 | baseName = 'spring-batch-admin-angularjs' 24 | version = '0.1.0' 25 | } 26 | 27 | repositories { 28 | mavenCentral() 29 | maven { 30 | url 'https://repo.spring.io/libs-snapshot-local/' 31 | } 32 | } 33 | 34 | dependencies { 35 | compile("org.springframework.boot:spring-boot-starter-web") 36 | compile("org.springframework.boot:spring-boot-starter-actuator") 37 | compile("org.springframework.boot:spring-boot-starter-batch") 38 | compile("org.springframework.batch:spring-batch-core:3.0.4.RELEASE") 39 | compile("org.springframework.batch:spring-batch-admin-manager:$springBatchAdminVersion") { 40 | exclude group: 'org.slf4j', module:'slf4j-log4j12' 41 | } 42 | testCompile("junit:junit") 43 | } 44 | 45 | task wrapper(type: Wrapper) { 46 | gradleVersion = '2.3' 47 | } 48 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "bower_components" 3 | } 4 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | 10 | # Change these settings to your own preference 11 | indent_style = space 12 | indent_size = 2 13 | 14 | # We recommend you to keep these unchanged 15 | end_of_line = lf 16 | charset = utf-8 17 | trim_trailing_whitespace = true 18 | insert_final_newline = true 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | .tmp 4 | .sass-cache 5 | bower_components 6 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "browser": true, 4 | "esnext": true, 5 | "bitwise": true, 6 | "camelcase": true, 7 | "curly": true, 8 | "eqeqeq": true, 9 | "immed": true, 10 | "indent": 2, 11 | "latedef": true, 12 | "newcap": false, 13 | "noarg": true, 14 | "quotmark": "single", 15 | "undef": true, 16 | "unused": true, 17 | "strict": true, 18 | "trailing": true, 19 | "smarttabs": true, 20 | "globals": { 21 | "angular": false, 22 | "moment": false 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - 'iojs' 5 | - '0.12' 6 | - '0.10' 7 | before_script: 8 | - 'npm install -g bower grunt-cli' 9 | - 'bower install' 10 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/.yo-rc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/Gruntfile.js: -------------------------------------------------------------------------------- 1 | // Generated on 2015-05-27 using generator-angular 0.11.1 2 | 'use strict'; 3 | 4 | // # Globbing 5 | // for performance reasons we're only matching one level down: 6 | // 'test/spec/{,*/}*.js' 7 | // use this if you want to recursively match all subfolders: 8 | // 'test/spec/**/*.js' 9 | 10 | module.exports = function (grunt) { 11 | 12 | // Load grunt tasks automatically 13 | require('load-grunt-tasks')(grunt); 14 | 15 | // Time how long tasks take. Can help when optimizing build times 16 | require('time-grunt')(grunt); 17 | 18 | // Configurable paths for the application 19 | var appConfig = { 20 | app: require('./bower.json').appPath || 'app', 21 | dist: '../src/main/resources/public' 22 | }; 23 | 24 | // Define the configuration for all the tasks 25 | grunt.initConfig({ 26 | 27 | // Project settings 28 | yeoman: appConfig, 29 | 30 | // Watches files for changes and runs tasks based on the changed files 31 | watch: { 32 | bower: { 33 | files: ['bower.json'], 34 | tasks: ['wiredep'] 35 | }, 36 | js: { 37 | files: ['<%= yeoman.app %>/scripts/{,*/}*.js'], 38 | tasks: ['newer:jshint:all'], 39 | options: { 40 | livereload: '<%= connect.options.livereload %>' 41 | } 42 | }, 43 | jsTest: { 44 | files: ['test/spec/{,*/}*.js'], 45 | tasks: ['newer:jshint:test', 'karma'] 46 | }, 47 | styles: { 48 | files: ['<%= yeoman.app %>/styles/{,*/}*.css'], 49 | tasks: ['newer:copy:styles', 'autoprefixer'] 50 | }, 51 | gruntfile: { 52 | files: ['Gruntfile.js'] 53 | }, 54 | livereload: { 55 | options: { 56 | livereload: '<%= connect.options.livereload %>' 57 | }, 58 | files: [ 59 | '<%= yeoman.app %>/{,*/}*.html', 60 | '.tmp/styles/{,*/}*.css', 61 | '<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}' 62 | ] 63 | } 64 | }, 65 | 66 | // The actual grunt server settings 67 | connect: { 68 | options: { 69 | port: 9000, 70 | // Change this to '0.0.0.0' to access the server from outside. 71 | hostname: 'localhost', 72 | livereload: 35729 73 | }, 74 | livereload: { 75 | options: { 76 | open: true, 77 | middleware: function (connect) { 78 | return [ 79 | connect.static('.tmp'), 80 | connect().use( 81 | '/bower_components', 82 | connect.static('./bower_components') 83 | ), 84 | connect().use( 85 | '/app/styles', 86 | connect.static('./app/styles') 87 | ), 88 | connect.static(appConfig.app) 89 | ]; 90 | } 91 | } 92 | }, 93 | test: { 94 | options: { 95 | port: 9001, 96 | middleware: function (connect) { 97 | return [ 98 | connect.static('.tmp'), 99 | connect.static('test'), 100 | connect().use( 101 | '/bower_components', 102 | connect.static('./bower_components') 103 | ), 104 | connect.static(appConfig.app) 105 | ]; 106 | } 107 | } 108 | }, 109 | dist: { 110 | options: { 111 | open: true, 112 | base: '<%= yeoman.dist %>' 113 | } 114 | } 115 | }, 116 | 117 | // Make sure code styles are up to par and there are no obvious mistakes 118 | jshint: { 119 | options: { 120 | jshintrc: '.jshintrc', 121 | reporter: require('jshint-stylish') 122 | }, 123 | all: { 124 | src: [ 125 | 'Gruntfile.js', 126 | '<%= yeoman.app %>/scripts/{,*/}*.js' 127 | ] 128 | }, 129 | test: { 130 | options: { 131 | jshintrc: 'test/.jshintrc' 132 | }, 133 | src: ['test/spec/{,*/}*.js'] 134 | } 135 | }, 136 | 137 | // Empties folders to start fresh 138 | clean: { 139 | dist: { 140 | files: [{ 141 | dot: true, 142 | src: [ 143 | '.tmp', 144 | '<%= yeoman.dist %>/{,*/}*', 145 | '!<%= yeoman.dist %>/.git{,*/}*' 146 | ] 147 | }] 148 | }, 149 | server: '.tmp' 150 | }, 151 | 152 | // Add vendor prefixed styles 153 | autoprefixer: { 154 | options: { 155 | browsers: ['last 1 version'] 156 | }, 157 | server: { 158 | options: { 159 | map: true, 160 | }, 161 | files: [{ 162 | expand: true, 163 | cwd: '.tmp/styles/', 164 | src: '{,*/}*.css', 165 | dest: '.tmp/styles/' 166 | }] 167 | }, 168 | dist: { 169 | files: [{ 170 | expand: true, 171 | cwd: '.tmp/styles/', 172 | src: '{,*/}*.css', 173 | dest: '.tmp/styles/' 174 | }] 175 | } 176 | }, 177 | 178 | // Automatically inject Bower components into the app 179 | wiredep: { 180 | app: { 181 | src: ['<%= yeoman.app %>/index.html'], 182 | ignorePath: /\.\.\// 183 | }, 184 | test: { 185 | devDependencies: true, 186 | src: '<%= karma.unit.configFile %>', 187 | ignorePath: /\.\.\//, 188 | fileTypes:{ 189 | js: { 190 | block: /(([\s\t]*)\/{2}\s*?bower:\s*?(\S*))(\n|\r|.)*?(\/{2}\s*endbower)/gi, 191 | detect: { 192 | js: /'(.*\.js)'/gi 193 | }, 194 | replace: { 195 | js: '\'{{filePath}}\',' 196 | } 197 | } 198 | } 199 | } 200 | }, 201 | 202 | // Renames files for browser caching purposes 203 | filerev: { 204 | dist: { 205 | src: [ 206 | '<%= yeoman.dist %>/scripts/{,*/}*.js', 207 | '<%= yeoman.dist %>/styles/{,*/}*.css', 208 | '<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}', 209 | '<%= yeoman.dist %>/styles/fonts/*' 210 | ] 211 | } 212 | }, 213 | 214 | // Reads HTML for usemin blocks to enable smart builds that automatically 215 | // concat, minify and revision files. Creates configurations in memory so 216 | // additional tasks can operate on them 217 | useminPrepare: { 218 | html: '<%= yeoman.app %>/index.html', 219 | options: { 220 | dest: '<%= yeoman.dist %>', 221 | flow: { 222 | html: { 223 | steps: { 224 | js: ['concat', 'uglifyjs'], 225 | css: ['cssmin'] 226 | }, 227 | post: {} 228 | } 229 | } 230 | } 231 | }, 232 | 233 | // Performs rewrites based on filerev and the useminPrepare configuration 234 | usemin: { 235 | html: ['<%= yeoman.dist %>/{,*/}*.html'], 236 | css: ['<%= yeoman.dist %>/styles/{,*/}*.css'], 237 | options: { 238 | assetsDirs: [ 239 | '<%= yeoman.dist %>', 240 | '<%= yeoman.dist %>/images', 241 | '<%= yeoman.dist %>/styles' 242 | ] 243 | } 244 | }, 245 | 246 | // The following *-min tasks will produce minified files in the dist folder 247 | // By default, your `index.html`'s will take care of 248 | // minification. These next options are pre-configured if you do not wish 249 | // to use the Usemin blocks. 250 | // cssmin: { 251 | // dist: { 252 | // files: { 253 | // '<%= yeoman.dist %>/styles/main.css': [ 254 | // '.tmp/styles/{,*/}*.css' 255 | // ] 256 | // } 257 | // } 258 | // }, 259 | // uglify: { 260 | // dist: { 261 | // files: { 262 | // '<%= yeoman.dist %>/scripts/scripts.js': [ 263 | // '<%= yeoman.dist %>/scripts/scripts.js' 264 | // ] 265 | // } 266 | // } 267 | // }, 268 | // concat: { 269 | // dist: {} 270 | // }, 271 | 272 | imagemin: { 273 | dist: { 274 | files: [{ 275 | expand: true, 276 | cwd: '<%= yeoman.app %>/images', 277 | src: '{,*/}*.{png,jpg,jpeg,gif}', 278 | dest: '<%= yeoman.dist %>/images' 279 | }] 280 | } 281 | }, 282 | 283 | svgmin: { 284 | dist: { 285 | files: [{ 286 | expand: true, 287 | cwd: '<%= yeoman.app %>/images', 288 | src: '{,*/}*.svg', 289 | dest: '<%= yeoman.dist %>/images' 290 | }] 291 | } 292 | }, 293 | 294 | htmlmin: { 295 | dist: { 296 | options: { 297 | collapseWhitespace: true, 298 | conservativeCollapse: true, 299 | collapseBooleanAttributes: true, 300 | removeCommentsFromCDATA: true, 301 | removeOptionalTags: true 302 | }, 303 | files: [{ 304 | expand: true, 305 | cwd: '<%= yeoman.dist %>', 306 | src: ['*.html', 'views/{,*/}*.html'], 307 | dest: '<%= yeoman.dist %>' 308 | }] 309 | } 310 | }, 311 | 312 | // ng-annotate tries to make the code safe for minification automatically 313 | // by using the Angular long form for dependency injection. 314 | ngAnnotate: { 315 | dist: { 316 | files: [{ 317 | expand: true, 318 | cwd: '.tmp/concat/scripts', 319 | src: '*.js', 320 | dest: '.tmp/concat/scripts' 321 | }] 322 | } 323 | }, 324 | 325 | // Replace Google CDN references 326 | cdnify: { 327 | dist: { 328 | html: ['<%= yeoman.dist %>/*.html'] 329 | } 330 | }, 331 | 332 | // Copies remaining files to places other tasks can use 333 | copy: { 334 | dist: { 335 | files: [{ 336 | expand: true, 337 | dot: true, 338 | cwd: '<%= yeoman.app %>', 339 | dest: '<%= yeoman.dist %>', 340 | src: [ 341 | '*.{ico,png,txt}', 342 | '.htaccess', 343 | '*.html', 344 | 'views/{,*/}*.html', 345 | 'images/{,*/}*.{webp}', 346 | 'styles/fonts/{,*/}*.*' 347 | ] 348 | }, { 349 | expand: true, 350 | cwd: '.tmp/images', 351 | dest: '<%= yeoman.dist %>/images', 352 | src: ['generated/*'] 353 | }, { 354 | expand: true, 355 | cwd: 'bower_components/bootstrap/dist', 356 | src: 'fonts/*', 357 | dest: '<%= yeoman.dist %>' 358 | }] 359 | }, 360 | styles: { 361 | expand: true, 362 | cwd: '<%= yeoman.app %>/styles', 363 | dest: '.tmp/styles/', 364 | src: '{,*/}*.css' 365 | } 366 | }, 367 | 368 | // Run some tasks in parallel to speed up the build process 369 | concurrent: { 370 | server: [ 371 | 'copy:styles' 372 | ], 373 | test: [ 374 | 'copy:styles' 375 | ], 376 | dist: [ 377 | 'copy:styles', 378 | 'imagemin', 379 | 'svgmin' 380 | ] 381 | }, 382 | 383 | // Test settings 384 | karma: { 385 | unit: { 386 | configFile: 'test/karma.conf.js', 387 | singleRun: true 388 | } 389 | } 390 | }); 391 | 392 | 393 | grunt.registerTask('serve', 'Compile then start a connect web server', function (target) { 394 | if (target === 'dist') { 395 | return grunt.task.run(['build', 'connect:dist:keepalive']); 396 | } 397 | 398 | grunt.task.run([ 399 | 'clean:server', 400 | 'wiredep', 401 | 'concurrent:server', 402 | 'autoprefixer:server', 403 | 'connect:livereload', 404 | 'watch' 405 | ]); 406 | }); 407 | 408 | grunt.registerTask('server', 'DEPRECATED TASK. Use the "serve" task instead', function (target) { 409 | grunt.log.warn('The `server` task has been deprecated. Use `grunt serve` to start a server.'); 410 | grunt.task.run(['serve:' + target]); 411 | }); 412 | 413 | grunt.registerTask('test', [ 414 | 'clean:server', 415 | 'wiredep', 416 | 'concurrent:test', 417 | 'autoprefixer', 418 | 'connect:test', 419 | 'karma' 420 | ]); 421 | 422 | grunt.registerTask('build', [ 423 | 'clean:dist', 424 | 'wiredep', 425 | 'useminPrepare', 426 | 'concurrent:dist', 427 | 'autoprefixer', 428 | 'concat', 429 | 'ngAnnotate', 430 | 'copy:dist', 431 | 'cdnify', 432 | 'cssmin', 433 | 'uglify', 434 | 'filerev', 435 | 'usemin', 436 | 'htmlmin' 437 | ]); 438 | 439 | grunt.registerTask('default', [ 440 | 'newer:jshint', 441 | 'test', 442 | 'build' 443 | ]); 444 | }; 445 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/.buildignore: -------------------------------------------------------------------------------- 1 | *.coffee -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/.htaccess: -------------------------------------------------------------------------------- 1 | # Apache Configuration File 2 | 3 | # (!) Using `.htaccess` files slows down Apache, therefore, if you have access 4 | # to the main server config file (usually called `httpd.conf`), you should add 5 | # this logic there: http://httpd.apache.org/docs/current/howto/htaccess.html. 6 | 7 | # ############################################################################## 8 | # # CROSS-ORIGIN RESOURCE SHARING (CORS) # 9 | # ############################################################################## 10 | 11 | # ------------------------------------------------------------------------------ 12 | # | Cross-domain AJAX requests | 13 | # ------------------------------------------------------------------------------ 14 | 15 | # Enable cross-origin AJAX requests. 16 | # http://code.google.com/p/html5security/wiki/CrossOriginRequestSecurity 17 | # http://enable-cors.org/ 18 | 19 | # 20 | # Header set Access-Control-Allow-Origin "*" 21 | # 22 | 23 | # ------------------------------------------------------------------------------ 24 | # | CORS-enabled images | 25 | # ------------------------------------------------------------------------------ 26 | 27 | # Send the CORS header for images when browsers request it. 28 | # https://developer.mozilla.org/en/CORS_Enabled_Image 29 | # http://blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html 30 | # http://hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/ 31 | 32 | 33 | 34 | 35 | SetEnvIf Origin ":" IS_CORS 36 | Header set Access-Control-Allow-Origin "*" env=IS_CORS 37 | 38 | 39 | 40 | 41 | # ------------------------------------------------------------------------------ 42 | # | Web fonts access | 43 | # ------------------------------------------------------------------------------ 44 | 45 | # Allow access from all domains for web fonts 46 | 47 | 48 | 49 | Header set Access-Control-Allow-Origin "*" 50 | 51 | 52 | 53 | 54 | # ############################################################################## 55 | # # ERRORS # 56 | # ############################################################################## 57 | 58 | # ------------------------------------------------------------------------------ 59 | # | 404 error prevention for non-existing redirected folders | 60 | # ------------------------------------------------------------------------------ 61 | 62 | # Prevent Apache from returning a 404 error for a rewrite if a directory 63 | # with the same name does not exist. 64 | # http://httpd.apache.org/docs/current/content-negotiation.html#multiviews 65 | # http://www.webmasterworld.com/apache/3808792.htm 66 | 67 | Options -MultiViews 68 | 69 | # ------------------------------------------------------------------------------ 70 | # | Custom error messages / pages | 71 | # ------------------------------------------------------------------------------ 72 | 73 | # You can customize what Apache returns to the client in case of an error (see 74 | # http://httpd.apache.org/docs/current/mod/core.html#errordocument), e.g.: 75 | 76 | ErrorDocument 404 /404.html 77 | 78 | 79 | # ############################################################################## 80 | # # INTERNET EXPLORER # 81 | # ############################################################################## 82 | 83 | # ------------------------------------------------------------------------------ 84 | # | Better website experience | 85 | # ------------------------------------------------------------------------------ 86 | 87 | # Force IE to render pages in the highest available mode in the various 88 | # cases when it may not: http://hsivonen.iki.fi/doctype/ie-mode.pdf. 89 | 90 | 91 | Header set X-UA-Compatible "IE=edge" 92 | # `mod_headers` can't match based on the content-type, however, we only 93 | # want to send this header for HTML pages and not for the other resources 94 | 95 | Header unset X-UA-Compatible 96 | 97 | 98 | 99 | # ------------------------------------------------------------------------------ 100 | # | Cookie setting from iframes | 101 | # ------------------------------------------------------------------------------ 102 | 103 | # Allow cookies to be set from iframes in IE. 104 | 105 | # 106 | # Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"" 107 | # 108 | 109 | # ------------------------------------------------------------------------------ 110 | # | Screen flicker | 111 | # ------------------------------------------------------------------------------ 112 | 113 | # Stop screen flicker in IE on CSS rollovers (this only works in 114 | # combination with the `ExpiresByType` directives for images from below). 115 | 116 | # BrowserMatch "MSIE" brokenvary=1 117 | # BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1 118 | # BrowserMatch "Opera" !brokenvary 119 | # SetEnvIf brokenvary 1 force-no-vary 120 | 121 | 122 | # ############################################################################## 123 | # # MIME TYPES AND ENCODING # 124 | # ############################################################################## 125 | 126 | # ------------------------------------------------------------------------------ 127 | # | Proper MIME types for all files | 128 | # ------------------------------------------------------------------------------ 129 | 130 | 131 | 132 | # Audio 133 | AddType audio/mp4 m4a f4a f4b 134 | AddType audio/ogg oga ogg 135 | 136 | # JavaScript 137 | # Normalize to standard type (it's sniffed in IE anyways): 138 | # http://tools.ietf.org/html/rfc4329#section-7.2 139 | AddType application/javascript js jsonp 140 | AddType application/json json 141 | 142 | # Video 143 | AddType video/mp4 mp4 m4v f4v f4p 144 | AddType video/ogg ogv 145 | AddType video/webm webm 146 | AddType video/x-flv flv 147 | 148 | # Web fonts 149 | AddType application/font-woff woff 150 | AddType application/vnd.ms-fontobject eot 151 | 152 | # Browsers usually ignore the font MIME types and sniff the content, 153 | # however, Chrome shows a warning if other MIME types are used for the 154 | # following fonts. 155 | AddType application/x-font-ttf ttc ttf 156 | AddType font/opentype otf 157 | 158 | # Make SVGZ fonts work on iPad: 159 | # https://twitter.com/FontSquirrel/status/14855840545 160 | AddType image/svg+xml svg svgz 161 | AddEncoding gzip svgz 162 | 163 | # Other 164 | AddType application/octet-stream safariextz 165 | AddType application/x-chrome-extension crx 166 | AddType application/x-opera-extension oex 167 | AddType application/x-shockwave-flash swf 168 | AddType application/x-web-app-manifest+json webapp 169 | AddType application/x-xpinstall xpi 170 | AddType application/xml atom rdf rss xml 171 | AddType image/webp webp 172 | AddType image/x-icon ico 173 | AddType text/cache-manifest appcache manifest 174 | AddType text/vtt vtt 175 | AddType text/x-component htc 176 | AddType text/x-vcard vcf 177 | 178 | 179 | 180 | # ------------------------------------------------------------------------------ 181 | # | UTF-8 encoding | 182 | # ------------------------------------------------------------------------------ 183 | 184 | # Use UTF-8 encoding for anything served as `text/html` or `text/plain`. 185 | AddDefaultCharset utf-8 186 | 187 | # Force UTF-8 for certain file formats. 188 | 189 | AddCharset utf-8 .atom .css .js .json .rss .vtt .webapp .xml 190 | 191 | 192 | 193 | # ############################################################################## 194 | # # URL REWRITES # 195 | # ############################################################################## 196 | 197 | # ------------------------------------------------------------------------------ 198 | # | Rewrite engine | 199 | # ------------------------------------------------------------------------------ 200 | 201 | # Turning on the rewrite engine and enabling the `FollowSymLinks` option is 202 | # necessary for the following directives to work. 203 | 204 | # If your web host doesn't allow the `FollowSymlinks` option, you may need to 205 | # comment it out and use `Options +SymLinksIfOwnerMatch` but, be aware of the 206 | # performance impact: http://httpd.apache.org/docs/current/misc/perf-tuning.html#symlinks 207 | 208 | # Also, some cloud hosting services require `RewriteBase` to be set: 209 | # http://www.rackspace.com/knowledge_center/frequently-asked-question/why-is-mod-rewrite-not-working-on-my-site 210 | 211 | 212 | Options +FollowSymlinks 213 | # Options +SymLinksIfOwnerMatch 214 | RewriteEngine On 215 | # RewriteBase / 216 | 217 | 218 | # ------------------------------------------------------------------------------ 219 | # | Suppressing / Forcing the "www." at the beginning of URLs | 220 | # ------------------------------------------------------------------------------ 221 | 222 | # The same content should never be available under two different URLs especially 223 | # not with and without "www." at the beginning. This can cause SEO problems 224 | # (duplicate content), therefore, you should choose one of the alternatives and 225 | # redirect the other one. 226 | 227 | # By default option 1 (no "www.") is activated: 228 | # http://no-www.org/faq.php?q=class_b 229 | 230 | # If you'd prefer to use option 2, just comment out all the lines from option 1 231 | # and uncomment the ones from option 2. 232 | 233 | # IMPORTANT: NEVER USE BOTH RULES AT THE SAME TIME! 234 | 235 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 236 | 237 | # Option 1: rewrite www.example.com → example.com 238 | 239 | 240 | RewriteCond %{HTTPS} !=on 241 | RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] 242 | RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L] 243 | 244 | 245 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 246 | 247 | # Option 2: rewrite example.com → www.example.com 248 | 249 | # Be aware that the following might not be a good idea if you use "real" 250 | # subdomains for certain parts of your website. 251 | 252 | # 253 | # RewriteCond %{HTTPS} !=on 254 | # RewriteCond %{HTTP_HOST} !^www\..+$ [NC] 255 | # RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] 256 | # 257 | 258 | 259 | # ############################################################################## 260 | # # SECURITY # 261 | # ############################################################################## 262 | 263 | # ------------------------------------------------------------------------------ 264 | # | Content Security Policy (CSP) | 265 | # ------------------------------------------------------------------------------ 266 | 267 | # You can mitigate the risk of cross-site scripting and other content-injection 268 | # attacks by setting a Content Security Policy which whitelists trusted sources 269 | # of content for your site. 270 | 271 | # The example header below allows ONLY scripts that are loaded from the current 272 | # site's origin (no inline scripts, no CDN, etc). This almost certainly won't 273 | # work as-is for your site! 274 | 275 | # To get all the details you'll need to craft a reasonable policy for your site, 276 | # read: http://html5rocks.com/en/tutorials/security/content-security-policy (or 277 | # see the specification: http://w3.org/TR/CSP). 278 | 279 | # 280 | # Header set Content-Security-Policy "script-src 'self'; object-src 'self'" 281 | # 282 | # Header unset Content-Security-Policy 283 | # 284 | # 285 | 286 | # ------------------------------------------------------------------------------ 287 | # | File access | 288 | # ------------------------------------------------------------------------------ 289 | 290 | # Block access to directories without a default document. 291 | # Usually you should leave this uncommented because you shouldn't allow anyone 292 | # to surf through every directory on your server (which may includes rather 293 | # private places like the CMS's directories). 294 | 295 | 296 | Options -Indexes 297 | 298 | 299 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 300 | 301 | # Block access to hidden files and directories. 302 | # This includes directories used by version control systems such as Git and SVN. 303 | 304 | 305 | RewriteCond %{SCRIPT_FILENAME} -d [OR] 306 | RewriteCond %{SCRIPT_FILENAME} -f 307 | RewriteRule "(^|/)\." - [F] 308 | 309 | 310 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 311 | 312 | # Block access to backup and source files. 313 | # These files may be left by some text editors and can pose a great security 314 | # danger when anyone has access to them. 315 | 316 | 317 | Order allow,deny 318 | Deny from all 319 | Satisfy All 320 | 321 | 322 | # ------------------------------------------------------------------------------ 323 | # | Secure Sockets Layer (SSL) | 324 | # ------------------------------------------------------------------------------ 325 | 326 | # Rewrite secure requests properly to prevent SSL certificate warnings, e.g.: 327 | # prevent `https://www.example.com` when your certificate only allows 328 | # `https://secure.example.com`. 329 | 330 | # 331 | # RewriteCond %{SERVER_PORT} !^443 332 | # RewriteRule ^ https://example-domain-please-change-me.com%{REQUEST_URI} [R=301,L] 333 | # 334 | 335 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 336 | 337 | # Force client-side SSL redirection. 338 | 339 | # If a user types "example.com" in his browser, the above rule will redirect him 340 | # to the secure version of the site. That still leaves a window of opportunity 341 | # (the initial HTTP connection) for an attacker to downgrade or redirect the 342 | # request. The following header ensures that browser will ONLY connect to your 343 | # server via HTTPS, regardless of what the users type in the address bar. 344 | # http://www.html5rocks.com/en/tutorials/security/transport-layer-security/ 345 | 346 | # 347 | # Header set Strict-Transport-Security max-age=16070400; 348 | # 349 | 350 | # ------------------------------------------------------------------------------ 351 | # | Server software information | 352 | # ------------------------------------------------------------------------------ 353 | 354 | # Avoid displaying the exact Apache version number, the description of the 355 | # generic OS-type and the information about Apache's compiled-in modules. 356 | 357 | # ADD THIS DIRECTIVE IN THE `httpd.conf` AS IT WILL NOT WORK IN THE `.htaccess`! 358 | 359 | # ServerTokens Prod 360 | 361 | 362 | # ############################################################################## 363 | # # WEB PERFORMANCE # 364 | # ############################################################################## 365 | 366 | # ------------------------------------------------------------------------------ 367 | # | Compression | 368 | # ------------------------------------------------------------------------------ 369 | 370 | 371 | 372 | # Force compression for mangled headers. 373 | # http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping 374 | 375 | 376 | SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding 377 | RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding 378 | 379 | 380 | 381 | # Compress all output labeled with one of the following MIME-types 382 | # (for Apache versions below 2.3.7, you don't need to enable `mod_filter` 383 | # and can remove the `` and `` lines 384 | # as `AddOutputFilterByType` is still in the core directives). 385 | 386 | AddOutputFilterByType DEFLATE application/atom+xml \ 387 | application/javascript \ 388 | application/json \ 389 | application/rss+xml \ 390 | application/vnd.ms-fontobject \ 391 | application/x-font-ttf \ 392 | application/x-web-app-manifest+json \ 393 | application/xhtml+xml \ 394 | application/xml \ 395 | font/opentype \ 396 | image/svg+xml \ 397 | image/x-icon \ 398 | text/css \ 399 | text/html \ 400 | text/plain \ 401 | text/x-component \ 402 | text/xml 403 | 404 | 405 | 406 | 407 | # ------------------------------------------------------------------------------ 408 | # | Content transformations | 409 | # ------------------------------------------------------------------------------ 410 | 411 | # Prevent some of the mobile network providers from modifying the content of 412 | # your site: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.5. 413 | 414 | # 415 | # Header set Cache-Control "no-transform" 416 | # 417 | 418 | # ------------------------------------------------------------------------------ 419 | # | ETag removal | 420 | # ------------------------------------------------------------------------------ 421 | 422 | # Since we're sending far-future expires headers (see below), ETags can 423 | # be removed: http://developer.yahoo.com/performance/rules.html#etags. 424 | 425 | # `FileETag None` is not enough for every server. 426 | 427 | Header unset ETag 428 | 429 | 430 | FileETag None 431 | 432 | # ------------------------------------------------------------------------------ 433 | # | Expires headers (for better cache control) | 434 | # ------------------------------------------------------------------------------ 435 | 436 | # The following expires headers are set pretty far in the future. If you don't 437 | # control versioning with filename-based cache busting, consider lowering the 438 | # cache time for resources like CSS and JS to something like 1 week. 439 | 440 | 441 | 442 | ExpiresActive on 443 | ExpiresDefault "access plus 1 month" 444 | 445 | # CSS 446 | ExpiresByType text/css "access plus 1 year" 447 | 448 | # Data interchange 449 | ExpiresByType application/json "access plus 0 seconds" 450 | ExpiresByType application/xml "access plus 0 seconds" 451 | ExpiresByType text/xml "access plus 0 seconds" 452 | 453 | # Favicon (cannot be renamed!) 454 | ExpiresByType image/x-icon "access plus 1 week" 455 | 456 | # HTML components (HTCs) 457 | ExpiresByType text/x-component "access plus 1 month" 458 | 459 | # HTML 460 | ExpiresByType text/html "access plus 0 seconds" 461 | 462 | # JavaScript 463 | ExpiresByType application/javascript "access plus 1 year" 464 | 465 | # Manifest files 466 | ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" 467 | ExpiresByType text/cache-manifest "access plus 0 seconds" 468 | 469 | # Media 470 | ExpiresByType audio/ogg "access plus 1 month" 471 | ExpiresByType image/gif "access plus 1 month" 472 | ExpiresByType image/jpeg "access plus 1 month" 473 | ExpiresByType image/png "access plus 1 month" 474 | ExpiresByType video/mp4 "access plus 1 month" 475 | ExpiresByType video/ogg "access plus 1 month" 476 | ExpiresByType video/webm "access plus 1 month" 477 | 478 | # Web feeds 479 | ExpiresByType application/atom+xml "access plus 1 hour" 480 | ExpiresByType application/rss+xml "access plus 1 hour" 481 | 482 | # Web fonts 483 | ExpiresByType application/font-woff "access plus 1 month" 484 | ExpiresByType application/vnd.ms-fontobject "access plus 1 month" 485 | ExpiresByType application/x-font-ttf "access plus 1 month" 486 | ExpiresByType font/opentype "access plus 1 month" 487 | ExpiresByType image/svg+xml "access plus 1 month" 488 | 489 | 490 | 491 | # ------------------------------------------------------------------------------ 492 | # | Filename-based cache busting | 493 | # ------------------------------------------------------------------------------ 494 | 495 | # If you're not using a build process to manage your filename version revving, 496 | # you might want to consider enabling the following directives to route all 497 | # requests such as `/css/style.12345.css` to `/css/style.css`. 498 | 499 | # To understand why this is important and a better idea than `*.css?v231`, read: 500 | # http://stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring 501 | 502 | # 503 | # RewriteCond %{REQUEST_FILENAME} !-f 504 | # RewriteCond %{REQUEST_FILENAME} !-d 505 | # RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L] 506 | # 507 | 508 | # ------------------------------------------------------------------------------ 509 | # | File concatenation | 510 | # ------------------------------------------------------------------------------ 511 | 512 | # Allow concatenation from within specific CSS and JS files, e.g.: 513 | # Inside of `script.combined.js` you could have 514 | # 515 | # 516 | # and they would be included into this single file. 517 | 518 | # 519 | # 520 | # Options +Includes 521 | # AddOutputFilterByType INCLUDES application/javascript application/json 522 | # SetOutputFilter INCLUDES 523 | # 524 | # 525 | # Options +Includes 526 | # AddOutputFilterByType INCLUDES text/css 527 | # SetOutputFilter INCLUDES 528 | # 529 | # 530 | 531 | # ------------------------------------------------------------------------------ 532 | # | Persistent connections | 533 | # ------------------------------------------------------------------------------ 534 | 535 | # Allow multiple requests to be sent over the same TCP connection: 536 | # http://httpd.apache.org/docs/current/en/mod/core.html#keepalive. 537 | 538 | # Enable if you serve a lot of static content but, be aware of the 539 | # possible disadvantages! 540 | 541 | # 542 | # Header set Connection Keep-Alive 543 | # 544 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Page Not Found :( 6 | 141 | 142 | 143 |
144 |

Not found :(

145 |

Sorry, but the page you were trying to view does not exist.

146 |

It looks like this was the result of either:

147 | 151 | 154 | 155 |
156 | 157 | 158 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/spring-batch-admin-samples/207720048a076052c8ec13ef03ec325650cc52f6/spring-batch-admin-angularjs/client/app/favicon.ico -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/fonts/montserrat-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/spring-batch-admin-samples/207720048a076052c8ec13ef03ec325650cc52f6/spring-batch-admin-angularjs/client/app/fonts/montserrat-webfont.eot -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/fonts/montserrat-webfont.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 | 894 | 895 | 896 | 897 | 898 | 899 | 900 | 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | 922 | 923 | 924 | 925 | 926 | 927 | 928 | 929 | 930 | 931 | 932 | 933 | 934 | 935 | 936 | 937 | 938 | 939 | 940 | 941 | 942 | 943 | 944 | 945 | 946 | 947 | 948 | 949 | 950 | 951 | 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 | 960 | 961 | 962 | 963 | 964 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 973 | 974 | 975 | 976 | 977 | 978 | 979 | 980 | 981 | 982 | 983 | 984 | 985 | 986 | 987 | 988 | 989 | 990 | 991 | 992 | 993 | 994 | 995 | 996 | 997 | 998 | 999 | 1000 | 1001 | 1002 | 1003 | 1004 | 1005 | 1006 | 1007 | 1008 | 1009 | 1010 | 1011 | 1012 | 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | 1021 | 1022 | 1023 | 1024 | 1025 | 1026 | 1027 | 1028 | 1029 | 1030 | 1031 | 1032 | 1033 | 1034 | 1035 | 1036 | 1037 | 1038 | 1039 | 1040 | 1041 | 1042 | 1043 | 1044 | 1045 | 1046 | 1047 | 1048 | 1049 | 1050 | 1051 | 1052 | 1053 | 1054 | 1055 | 1056 | 1057 | 1058 | 1059 | 1060 | 1061 | 1062 | 1063 | 1064 | 1065 | 1066 | 1067 | 1068 | 1069 | 1070 | 1071 | 1072 | 1073 | 1074 | 1075 | 1076 | 1077 | 1078 | 1079 | 1080 | 1081 | 1082 | 1083 | 1084 | 1085 | 1086 | 1087 | 1088 | 1089 | 1090 | 1091 | 1092 | 1093 | 1094 | 1095 | 1096 | 1097 | 1098 | 1099 | 1100 | 1101 | 1102 | 1103 | 1104 | 1105 | 1106 | 1107 | 1108 | 1109 | 1110 | 1111 | 1112 | 1113 | 1114 | 1115 | 1116 | 1117 | 1118 | 1119 | 1120 | 1121 | 1122 | 1123 | 1124 | 1125 | 1126 | 1127 | 1128 | 1129 | 1130 | 1131 | 1132 | 1133 | 1134 | 1135 | 1136 | 1137 | 1138 | 1139 | 1140 | 1141 | 1142 | 1143 | 1144 | 1145 | 1146 | 1147 | 1148 | 1149 | 1150 | 1151 | 1152 | 1153 | 1154 | 1155 | 1156 | 1157 | 1158 | 1159 | 1160 | 1161 | 1162 | 1163 | 1164 | 1165 | 1166 | 1167 | 1168 | 1169 | 1170 | 1171 | 1172 | 1173 | 1174 | 1175 | 1176 | 1177 | 1178 | 1179 | 1180 | 1181 | 1182 | 1183 | 1184 | 1185 | 1186 | 1187 | 1188 | 1189 | 1190 | 1191 | 1192 | 1193 | 1194 | 1195 | 1196 | 1197 | 1198 | 1199 | 1200 | 1201 | 1202 | 1203 | 1204 | 1205 | 1206 | 1207 | 1208 | 1209 | 1210 | 1211 | 1212 | 1213 | 1214 | 1215 | 1216 | 1217 | 1218 | 1219 | 1220 | 1221 | 1222 | 1223 | 1224 | 1225 | 1226 | 1227 | 1228 | 1229 | 1230 | 1231 | 1232 | 1233 | 1234 | 1235 | 1236 | 1237 | 1238 | 1239 | 1240 | 1241 | 1242 | 1243 | 1244 | 1245 | 1246 | 1247 | 1248 | 1249 | 1250 | 1251 | 1252 | 1253 | 1254 | 1255 | 1256 | 1257 | 1258 | 1259 | 1260 | 1261 | 1262 | 1263 | 1264 | 1265 | 1266 | 1267 | 1268 | 1269 | 1270 | 1271 | 1272 | 1273 | 1274 | 1275 | 1276 | 1277 | 1278 | 1279 | 1280 | 1281 | 1282 | 1283 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/fonts/montserrat-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/spring-batch-admin-samples/207720048a076052c8ec13ef03ec325650cc52f6/spring-batch-admin-angularjs/client/app/fonts/montserrat-webfont.ttf -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/fonts/montserrat-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/spring-batch-admin-samples/207720048a076052c8ec13ef03ec325650cc52f6/spring-batch-admin-angularjs/client/app/fonts/montserrat-webfont.woff -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/fonts/varela_round-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/spring-batch-admin-samples/207720048a076052c8ec13ef03ec325650cc52f6/spring-batch-admin-angularjs/client/app/fonts/varela_round-webfont.eot -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/fonts/varela_round-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/spring-batch-admin-samples/207720048a076052c8ec13ef03ec325650cc52f6/spring-batch-admin-angularjs/client/app/fonts/varela_round-webfont.ttf -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/fonts/varela_round-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/spring-batch-admin-samples/207720048a076052c8ec13ef03ec325650cc52f6/spring-batch-admin-angularjs/client/app/fonts/varela_round-webfont.woff -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/images/spring-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/spring-batch-admin-samples/207720048a076052c8ec13ef03ec325650cc52f6/spring-batch-admin-angularjs/client/app/images/spring-logo.png -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/images/yeoman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/spring-batch-admin-samples/207720048a076052c8ec13ef03ec325650cc52f6/spring-batch-admin-angularjs/client/app/images/yeoman.png -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 |
26 |
Loading...
27 |
28 | 29 | 55 |
56 |
57 |
58 |
59 |
60 |
61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/robots.txt: -------------------------------------------------------------------------------- 1 | # robotstxt.org 2 | 3 | User-agent: * 4 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/scripts/app.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * @ngdoc overview 5 | * @name clientApp 6 | * @description 7 | * # clientApp 8 | * 9 | * Main module of the application. 10 | */ 11 | angular 12 | .module('batchAdmin', [ 13 | 'ui.router', 14 | 'ngTable', 15 | 'services.config', 16 | 'angular-growl', 17 | 'angularFileUpload' 18 | ]) 19 | .config(function ($stateProvider, $urlRouterProvider, $httpProvider, growlProvider) { 20 | 21 | growlProvider.globalTimeToLive(5000); 22 | 23 | $httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'; 24 | $httpProvider.defaults.headers.put['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'; 25 | 26 | $urlRouterProvider.otherwise('/'); 27 | 28 | $stateProvider 29 | .state('home', { 30 | url: '/', 31 | templateUrl: 'views/main.html', 32 | controller: 'MainCtrl' 33 | }) 34 | .state('jobSummary', { 35 | url: '/jobSummary?jobname', 36 | templateUrl: 'views/jobSummary.html', 37 | controller: 'JobSummaryCtrl' 38 | }) 39 | .state('jobExecution', { 40 | url: '/jobExecution?jobName&jobInstanceId', 41 | templateUrl: 'views/jobExecutions.html', 42 | controller: 'JobExecutionsCtrl' 43 | }) 44 | .state('jobExecutionDetail', { 45 | url: '/jobExecutionDetail?executionId', 46 | templateUrl: 'views/jobExecutionDetail.html', 47 | controller: 'JobExecutionDetailCtrl' 48 | }) 49 | .state('stepExecutionDetail', { 50 | url: '/stepExecutionDetail?jobExecutionId&stepExecutionId', 51 | templateUrl: 'views/stepExecutionDetail.html', 52 | controller: 'StepExecutionDetailCtrl' 53 | }) 54 | .state('fileUpload', { 55 | url: '/fileUpload', 56 | templateUrl: 'views/fileUpload.html', 57 | controller: 'FileUploadCtrl' 58 | }); 59 | }) 60 | .run(function($rootScope, $state, $stateParams) { 61 | $rootScope.$state = $state; 62 | $rootScope.$stateParams = $stateParams; 63 | }); 64 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/scripts/controllers/fileUpload.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * @ngdoc function 5 | * @name clientApp.controller:FileUploadCtrl 6 | * @description 7 | * # FileUploadCtrl 8 | * Controller for the file upload functionality 9 | */ 10 | angular.module('batchAdmin') 11 | .controller('FileUploadCtrl', ['$scope', 'FileUploader', 'configuration', 'jobService', 'ngTableParams', function ($scope, FileUploader, configuration, jobService, ngTableParams) { 12 | 13 | var uploader = $scope.uploader = new FileUploader({ 14 | url: configuration.baseUrl + '/batch/files', 15 | method: 'POST' 16 | }); 17 | 18 | uploader.onBeforeUploadItem = function (item) { 19 | var definedPath = ''; 20 | 21 | if($scope.path) { 22 | definedPath = $scope.path; 23 | } 24 | 25 | item.formData = [{ path: definedPath }]; 26 | }; 27 | 28 | uploader.onCompleteAll = function() { 29 | $scope.tableParams.reload(); 30 | }; 31 | 32 | $scope.tableParams = new ngTableParams({ 33 | page: 0, // show first page 34 | count: 10 // count per page 35 | }, { 36 | getData: function ($defer, params) { 37 | jobService.getFiles(params.page() - 1, params.count()).then(function (response) { 38 | params.total(response.data.pagedResources.page.totalElements); 39 | $defer.resolve(response.data.pagedResources.content); 40 | $scope.tableData = response.data.pagedResources.page.totalElements > 0; 41 | }); 42 | } 43 | }); 44 | 45 | $scope.deleteFiles = function() { 46 | jobService.deleteFiles($scope.path); 47 | $scope.tableParams.reload(); 48 | }; 49 | }]); 50 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/scripts/controllers/jobExecutionDetail.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * @ngdoc function 5 | * @name clientApp.controller:JobExecutionDetailCtrl 6 | * @description 7 | * # JobExecutionDetailCtrl 8 | * Controller of job execution detail page's functionality 9 | */ 10 | angular.module('batchAdmin') 11 | .controller('JobExecutionDetailCtrl', ['$stateParams', '$scope', 'jobService', function ($stateParams, $scope, jobService) { 12 | jobService.getJobExecutionInfo($stateParams.executionId).then(function (response) { 13 | $scope.jobExecutionDetails = response.data.jobExecutionInfoResource; 14 | }); 15 | }]); 16 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/scripts/controllers/jobExecutions.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * @ngdoc function 5 | * @name clientApp.controller:JobExecutionsCtrl 6 | * @description 7 | * # JobExecutionsCtrl 8 | * Controller of job executions page functionality 9 | */ 10 | angular.module('batchAdmin') 11 | .controller('JobExecutionsCtrl', ['$stateParams', '$scope', 'ngTableParams', 'jobService', function ($stateParams, $scope, ngTableParams, jobService) { 12 | 13 | $scope.tableParams = new ngTableParams({ 14 | page: 0, // show first page 15 | count: 10 // count per page 16 | }, { 17 | getData: function ($defer, params) { 18 | if($stateParams.jobInstanceId) { 19 | jobService.getJobExecutionsForInstance($stateParams.jobName, $stateParams.jobInstanceId).then(function (response) { 20 | params.total(response.data.jobExecutionInfoResourceList.length); 21 | $defer.resolve(response.data.jobExecutionInfoResourceList); 22 | }); 23 | } else { 24 | jobService.getJobExecutions($stateParams.jobName, params.page() - 1, params.count()).then(function (response) { 25 | params.total(response.data.pagedResources.page.totalElements); 26 | $defer.resolve(response.data.pagedResources.content); 27 | }); 28 | } 29 | } 30 | }); 31 | 32 | $scope.stopAll = function() { 33 | jobService.stopAll().then(function() { 34 | $scope.tableParams.reload(); 35 | }); 36 | }; 37 | }]); 38 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/scripts/controllers/jobSummary.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * @ngdoc function 5 | * @name clientApp.controller:JobSummaryCtrl 6 | * @description 7 | * # JobSummaryCtrl 8 | * Controller of the job summary page's functionality 9 | */ 10 | angular.module('batchAdmin') 11 | .controller('JobSummaryCtrl', ['$scope', 'ngTableParams', 'jobService', '$stateParams', function ($scope, ngTableParams, jobService, $stateParams) { 12 | $scope.jobName = $stateParams.jobname; 13 | 14 | $scope.tableParams = new ngTableParams({ 15 | page: 0, // show first page 16 | count: 10 // count per page 17 | }, { 18 | getData: function ($defer, params) { 19 | jobService.getJobInstances($stateParams.jobname, params.page() - 1, params.count()).then(function (response) { 20 | params.total(response.data.pagedResources.page.totalElements); 21 | $defer.resolve(response.data.pagedResources.content); 22 | }); 23 | } 24 | }); 25 | 26 | $scope.launch = function(launchRequest) { 27 | var jobParameters = ''; 28 | 29 | if(launchRequest) { 30 | jobParameters = launchRequest.jobParameters; 31 | } 32 | 33 | jobService.launchJob($scope.jobName, jobParameters).then(function() { 34 | 35 | $scope.tableParams.reload(); 36 | 37 | }); 38 | }; 39 | }]); 40 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/scripts/controllers/main.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * @ngdoc function 5 | * @name clientApp.controller:MainCtrl 6 | * @description 7 | * # MainCtrl 8 | * Controller of the home page 9 | */ 10 | angular.module('batchAdmin') 11 | .controller('MainCtrl', ['$scope', 'ngTableParams', 'jobService', function ($scope, ngTableParams, jobService) { 12 | $scope.tableParams = new ngTableParams({ 13 | page: 0, // show first page 14 | count: 10 // count per page 15 | }, { 16 | getData: function ($defer, params) { 17 | jobService.getBatchConfigurations(params.page() - 1, params.count()).then(function (response) { 18 | params.total(response.data.pagedResources.page.totalElements); 19 | $defer.resolve(response.data.pagedResources.content); 20 | }); 21 | } 22 | }); 23 | }]); 24 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/scripts/controllers/stepExecutionDetail.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * @ngdoc function 5 | * @name clientApp.controller:JobExecutionDetailCtrl 6 | * @description 7 | * # StepExecutionDetailCtrl 8 | * Controller of the step execution detail page 9 | */ 10 | angular.module('batchAdmin') 11 | .controller('StepExecutionDetailCtrl', ['$stateParams', '$scope', 'jobService', function ($stateParams, $scope, jobService) { 12 | jobService.getStepExecutionInfo($stateParams.jobExecutionId, $stateParams.stepExecutionId).then(function (response) { 13 | $scope.stepExecutionDetails = response.data.stepExecutionInfoResource; 14 | }); 15 | }]); 16 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/scripts/directives/duration.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * @ngdoc function 5 | * @name clientApp.directive:duration 6 | * @description 7 | * # duration 8 | * Duration calculations 9 | */ 10 | angular.module('batchAdmin') 11 | .directive('duration', [function() { 12 | 13 | var linkFunction = function(scope, el) { 14 | var startDateTime; 15 | var endDateTime; 16 | var element; 17 | 18 | function updateDuration() { 19 | if (startDateTime && endDateTime) { 20 | var duration = moment.duration(endDateTime - startDateTime); 21 | element.html(duration.asMilliseconds() + ' ms'); 22 | } 23 | } 24 | element = el; 25 | scope.$watch('start', function(value){ 26 | if (value) { 27 | startDateTime = moment(value); 28 | updateDuration(); 29 | } 30 | }); 31 | scope.$watch('end', function(value){ 32 | if (value) { 33 | endDateTime = moment(value); 34 | updateDuration(); 35 | } 36 | }); 37 | 38 | }; 39 | return { 40 | restrict: 'A', 41 | scope: { 42 | duration: '=', 43 | start: '=', 44 | end: '=' 45 | }, 46 | link: linkFunction, 47 | }; 48 | }]); 49 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/scripts/services/config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('services.config', []) 4 | .constant('configuration', { 5 | // If the app is served via grunt, point to the typical tomcat location. Otherwise, use relitive URLs 6 | baseUrl: window.location.href.indexOf('http://localhost:9000') === 0 ? 'http://localhost:8080' : '' 7 | }); 8 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/scripts/services/jobService.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('batchAdmin') 4 | .factory('jobService', ['$http', 'configuration', 'growl', function($http, configuration, growl) { 5 | 6 | function getBatchConfigurations(page, size) { 7 | return $http.get(configuration.baseUrl + '/batch/configurations', { 8 | params: { 9 | page: page, 10 | size: size 11 | } 12 | }); 13 | } 14 | 15 | function getJobInstances(jobname, page, size) { 16 | return $http.get(configuration.baseUrl + '/batch/instances', { 17 | params: { 18 | page: page, 19 | size: size, 20 | jobname: jobname 21 | } 22 | }); 23 | } 24 | 25 | function launchJob(jobName, jobParameters) { 26 | var data = 'jobname=' + jobName + '&jobParameters=' + jobParameters; 27 | 28 | return $http.post(configuration.baseUrl + '/batch/executions', data) 29 | .success(function() { 30 | growl.success('Job ' + jobName + ' launched.'); 31 | }) 32 | .error(function() { 33 | growl.error('Job ' + jobName + ' was unable to be launched.'); 34 | }); 35 | } 36 | 37 | function getJobExecutions(jobName, page, size) { 38 | var params = { 39 | page: page, 40 | size: size 41 | }; 42 | 43 | if(jobName) { 44 | params.jobname = jobName; 45 | } 46 | 47 | return $http.get(configuration.baseUrl + '/batch/executions', { 48 | params: params 49 | }); 50 | } 51 | 52 | function getJobExecutionsForInstance(jobName, jobInstanceId) { 53 | return $http.get(configuration.baseUrl + '/batch/executions', { 54 | params: { 55 | jobname: jobName, 56 | jobinstanceid: jobInstanceId 57 | } 58 | }); 59 | } 60 | 61 | function stopAll() { 62 | return $http.put(configuration.baseUrl + '/batch/executions', 'stop=true') 63 | .success(function() { 64 | growl.success('All jobs have been requested to stop'); 65 | }) 66 | .error(function() { 67 | growl.error('There was an error requesting the jobs stop'); 68 | }); 69 | } 70 | 71 | function getJobExecutionInfo(executionId) { 72 | return $http.get(configuration.baseUrl + '/batch/executions/' + executionId); 73 | } 74 | 75 | function getStepExecutionInfo(jobExecutionId, stepExecutionId) { 76 | return $http.get(configuration.baseUrl + '/batch/executions/' + jobExecutionId + '/steps/' + stepExecutionId); 77 | } 78 | 79 | function getFiles(page, size) { 80 | return $http.get(configuration.baseUrl + '/batch/files', { 81 | params: { 82 | page: page, 83 | size: size 84 | } 85 | }); 86 | } 87 | 88 | function deleteFiles(path) { 89 | return $http.delete(configuration.baseUrl + '/batch/files', { 90 | params: { 91 | path: path 92 | } 93 | }); 94 | } 95 | 96 | return { 97 | getBatchConfigurations: getBatchConfigurations, 98 | getJobInstances: getJobInstances, 99 | launchJob: launchJob, 100 | getJobExecutions: getJobExecutions, 101 | stopAll: stopAll, 102 | getJobExecutionInfo: getJobExecutionInfo, 103 | getStepExecutionInfo: getStepExecutionInfo, 104 | getJobExecutionsForInstance: getJobExecutionsForInstance, 105 | getFiles: getFiles, 106 | deleteFiles: deleteFiles 107 | }; 108 | 109 | }]); 110 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/views/about.html: -------------------------------------------------------------------------------- 1 |

This is the about view.

2 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/views/fileUpload.html: -------------------------------------------------------------------------------- 1 |

File Upload

2 |

This page allows for the uploading of data files. 3 |

4 |
5 | 6 |
7 | 8 |

Enter Path

9 | 10 |
11 | 12 |  Required 13 |
14 | 15 |

Select files

16 | 17 | 23 | 24 | 25 | 26 |
27 | 28 | Select Files 29 |
30 |
31 |
32 | 33 |
34 | 35 |

Upload queue

36 |

Queue length: {{ uploader.queue.length }}

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 57 | 62 | 73 | 74 | 75 |
NameSizeProgressStatusActions
{{ item.file.name }}{{ item.file.size/1024/1024|number:2 }} MB 53 |
54 |
55 |
56 |
58 | 59 | 60 | 61 | 63 | 66 | 69 | 72 |
76 | 77 |
78 |
79 | Queue progress: 80 |
81 |
82 |
83 |
84 | 87 | 90 | 93 |
94 | 95 |
96 | 97 |
98 |

Data Files

99 | 100 |
101 | 102 |  Required 103 | 106 |
107 | 108 | 109 | 110 | 113 | 116 | 117 |
111 | {{file.local}} 112 | 114 | {{file.path}} 115 |
118 |
119 | 120 |
121 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/views/jobExecutionDetail.html: -------------------------------------------------------------------------------- 1 | 2 | 7 |
8 |
9 |
10 |

Job Execution Details

11 |
12 |
13 |
14 |
15 |

Execution ID: {{jobExecutionDetails.executionId}}

16 |
17 |
18 |
19 | 20 |

The Job Execution Details for Execution ID {{executionId}} could not be found.

21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 |
PropertyValue
Id{{jobExecutionDetails.executionId}}
Job Name{{jobExecutionDetails.name}}
Job Instance{{jobExecutionDetails.jobId}}
Job Parameters{{jobExecutionDetails.jobParameters}}
Start Date{{jobExecutionDetails.startTime | date:'MM/dd/yyyy'}}
Start Time{{jobExecutionDetails.startTime | date:'h:mm:ss.sss a Z'}}
End Date{{jobExecutionDetails.endTime | date:'MM/dd/yyyy'}}
End Time{{jobExecutionDetails.endTime | date:'h:mm:ss.sss a Z'}}
Duration
Status{{jobExecutionDetails.status}}
Exit Code{{jobExecutionDetails.exitStatus.exitCode}}
Exit Message{{jobExecutionDetails.exitStatus.exitDescription || 'N/A'}}
Step Execution Count{{jobExecutionDetails.stepExecutionCount}}
83 | 84 |

Steps

85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 106 | 107 | 108 | 109 |
Step IdStep NameReadsWritesCommitsRollbacksDurationStatusDetails
{{stepExecution.executionId}}{{stepExecution.stepName}}{{stepExecution.readCount}}{{stepExecution.writeCount}}{{stepExecution.commitCount}}{{stepExecution.rollbackCount}}{{stepExecution.exitStatus.exitCode}}
110 | 111 | 128 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/views/jobExecutions.html: -------------------------------------------------------------------------------- 1 |

Batch Jobs

2 | 3 |

This section lists all 4 | available job executions previously or currently run. 5 |

6 |
7 |
8 |
9 | 10 |
11 |
12 |
13 |
14 | 15 | 16 | 19 | 22 | 25 | 28 | 31 | 32 | 33 | 34 | 37 | 40 | 41 |
17 | {{job.executionId}} 18 | 20 | {{job.jobId}} 21 | 23 | {{job.name}} 24 | 26 | {{job.createDate | date:'MM/dd/yyyy'}} 27 | 29 | {{job.startTime | date:'h:mma'}} 30 | 35 | {{job.status}} 36 | 38 | {{job.exitStatus.exitCode}} 39 |
42 |
43 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/views/jobSummary.html: -------------------------------------------------------------------------------- 1 |

Batch Jobs

2 | 3 |

This section lists all 4 | available batch jobs deployed with this instance of Spring Batch Admin. 5 |

6 |
7 |
8 |
9 |

{{jobName}}

10 | 11 | 12 | 13 |
14 |
15 |
16 |
17 | 18 | 19 | 22 | 25 | 28 | 31 | 34 | 35 | 38 | 39 |
20 | {{job.instanceId}} 21 | 23 | {{job.jobExecutions.length}} 24 | 26 | {{job.jobExecutions[job.jobExecutions.length - 1].exitStatus.exitCode}} 27 | 29 | {{job.jobExecutions[job.jobExecutions.length - 1].createDate | date:'MM/dd/yyyy'}} 30 | 32 | {{job.jobExecutions[job.jobExecutions.length - 1].startTime | date:'h:mma'}} 33 | 36 | {{job.jobExecutions[job.jobExecutions.length - 1].jobParameters.parameters}} 37 |
40 |
41 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/views/main.html: -------------------------------------------------------------------------------- 1 |

Batch Jobs

2 |

This section lists all 3 | available batch jobs deployed with this instance of Spring Batch Admin. 4 |

5 |
6 | 7 | 8 | 11 | 14 | 17 | 20 | 21 |
9 | {{job.name}} 10 | 12 | {{job.executionCount}} 13 | 15 | {{job.launchable}} 16 | 18 | {{job.incrementable}} 19 |
22 |
23 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/app/views/stepExecutionDetail.html: -------------------------------------------------------------------------------- 1 |

Step Execution Details - Step Execution ID: {{stepExecutionDetails.executionId}}

2 | 3 |

The Step Execution Details for Step Execution ID {{stepExecutionId}} could not be found.

4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 |
PropertyValue
Step Execution Id{{stepExecutionDetails.executionId}}
Job Execution Id{{stepExecutionDetails.jobExecutionId}}
Step Name{{stepExecutionDetails.stepName}}
Step Type{{stepExecutionDetails.stepType}}
Status{{stepExecutionDetails.status}}
Commits{{stepExecutionDetails.commitCount}}
Duration
Filter Count{{stepExecutionDetails.filterCount}}
Process Skips{{stepExecutionDetails.processSkipCount}}
Reads{{stepExecutionDetails.readCount}}
Read Skips{{stepExecutionDetails.readSkipCount}}
Rollbacks{{stepExecutionDetails.rollbackCount}}
Skips{{stepExecutionDetails.readSkipCount + stepExecutionDetails.processSkipCount + stepExecutionDetails.writeSkipCount}}
Writes{{stepExecutionDetails.writeCount}}
Write Skips{{stepExecutionDetails.writeSkipCount}}
74 | 75 |

Exit Description

76 | 77 |
78 |
{{stepExecutionDetails.stepExecution.exitStatus.exitDescription || 'N/A'}}
79 |
80 | 81 |

Step Execution Context

82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 |
KeyValue
{{key}}{{value}}
No Execution Context values are available.
100 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "client", 3 | "version": "0.0.0", 4 | "dependencies": { 5 | "angular": "^1.3.0", 6 | "bootstrap": "^3.2.0", 7 | "angular-animate": "^1.3.0", 8 | "angular-cookies": "^1.3.0", 9 | "angular-resource": "^1.3.0", 10 | "angular-route": "^1.3.0", 11 | "angular-sanitize": "^1.3.0", 12 | "angular-touch": "^1.3.0", 13 | "angular-ui-router": "~0.2.15", 14 | "ng-table": "~0.5.4", 15 | "moment": "~2.10.3", 16 | "angular-growl-v2": "~0.7.5", 17 | "angular-file-upload": "~1.1.5" 18 | }, 19 | "devDependencies": { 20 | "angular-mocks": "^1.3.0" 21 | }, 22 | "appPath": "app", 23 | "moduleName": "clientApp", 24 | "resolutions": { 25 | "angular": "~1" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/dump.rdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/spring-batch-admin-samples/207720048a076052c8ec13ef03ec325650cc52f6/spring-batch-admin-angularjs/client/dump.rdb -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "client", 3 | "version": "0.0.0", 4 | "dependencies": {}, 5 | "repository": {}, 6 | "devDependencies": { 7 | "grunt": "^0.4.5", 8 | "grunt-autoprefixer": "^2.0.0", 9 | "grunt-concurrent": "^1.0.0", 10 | "grunt-contrib-clean": "^0.6.0", 11 | "grunt-contrib-concat": "^0.5.0", 12 | "grunt-contrib-connect": "^0.9.0", 13 | "grunt-contrib-copy": "^0.7.0", 14 | "grunt-contrib-cssmin": "^0.12.0", 15 | "grunt-contrib-htmlmin": "^0.4.0", 16 | "grunt-contrib-imagemin": "^0.9.2", 17 | "grunt-contrib-jshint": "^0.11.0", 18 | "grunt-contrib-uglify": "^0.7.0", 19 | "grunt-contrib-watch": "^0.6.1", 20 | "grunt-filerev": "^2.1.2", 21 | "grunt-google-cdn": "^0.4.3", 22 | "grunt-karma": "*", 23 | "grunt-newer": "^1.1.0", 24 | "grunt-ng-annotate": "^0.9.2", 25 | "grunt-svgmin": "^2.0.0", 26 | "grunt-usemin": "^3.0.0", 27 | "grunt-wiredep": "^2.0.0", 28 | "jshint-stylish": "^1.0.0", 29 | "karma-jasmine": "*", 30 | "karma-phantomjs-launcher": "*", 31 | "load-grunt-tasks": "^3.1.0", 32 | "time-grunt": "^1.0.0" 33 | }, 34 | "engines": { 35 | "node": ">=0.10.0" 36 | }, 37 | "scripts": { 38 | "test": "grunt test" 39 | } 40 | } -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/test/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "browser": true, 4 | "esnext": true, 5 | "bitwise": true, 6 | "camelcase": true, 7 | "curly": true, 8 | "eqeqeq": true, 9 | "immed": true, 10 | "indent": 2, 11 | "latedef": true, 12 | // "newcap": false, 13 | "noarg": true, 14 | "quotmark": "single", 15 | "regexp": true, 16 | "undef": true, 17 | "unused": true, 18 | "strict": true, 19 | "trailing": true, 20 | "smarttabs": true, 21 | "jasmine": true, 22 | "globals": { 23 | "angular": false, 24 | "browser": false, 25 | "inject": false 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/test/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // http://karma-runner.github.io/0.12/config/configuration-file.html 3 | // Generated on 2015-05-27 using 4 | // generator-karma 1.0.0 5 | 6 | module.exports = function(config) { 7 | 'use strict'; 8 | 9 | config.set({ 10 | // enable / disable watching file and executing tests whenever any file changes 11 | autoWatch: true, 12 | 13 | // base path, that will be used to resolve files and exclude 14 | basePath: '../', 15 | 16 | // testing framework to use (jasmine/mocha/qunit/...) 17 | // as well as any additional frameworks (requirejs/chai/sinon/...) 18 | frameworks: [ 19 | "jasmine" 20 | ], 21 | 22 | // list of files / patterns to load in the browser 23 | files: [ 24 | // bower:js 25 | 'bower_components/es5-shim/es5-shim.js', 26 | 'bower_components/jquery/dist/jquery.js', 27 | 'bower_components/angular/angular.js', 28 | 'bower_components/bootstrap/dist/js/bootstrap.js', 29 | 'bower_components/angular-animate/angular-animate.js', 30 | 'bower_components/angular-cookies/angular-cookies.js', 31 | 'bower_components/angular-resource/angular-resource.js', 32 | 'bower_components/angular-route/angular-route.js', 33 | 'bower_components/angular-sanitize/angular-sanitize.js', 34 | 'bower_components/angular-touch/angular-touch.js', 35 | 'bower_components/angular-ui-router/release/angular-ui-router.js', 36 | 'bower_components/ng-table/dist/ng-table.min.js', 37 | 'bower_components/moment/moment.js', 38 | 'bower_components/angular-growl-v2/build/angular-growl.js', 39 | 'bower_components/angular-file-upload/angular-file-upload.js', 40 | 'bower_components/angular-mocks/angular-mocks.js', 41 | // endbower 42 | "app/scripts/**/*.js", 43 | "test/mock/**/*.js", 44 | "test/spec/**/*.js" 45 | ], 46 | 47 | // list of files / patterns to exclude 48 | exclude: [ 49 | ], 50 | 51 | // web server port 52 | port: 8080, 53 | 54 | // Start these browsers, currently available: 55 | // - Chrome 56 | // - ChromeCanary 57 | // - Firefox 58 | // - Opera 59 | // - Safari (only Mac) 60 | // - PhantomJS 61 | // - IE (only Windows) 62 | browsers: [ 63 | "PhantomJS" 64 | ], 65 | 66 | // Which plugins to enable 67 | plugins: [ 68 | "karma-phantomjs-launcher", 69 | "karma-jasmine" 70 | ], 71 | 72 | // Continuous Integration mode 73 | // if true, it capture browsers, run tests and exit 74 | singleRun: false, 75 | 76 | colors: true, 77 | 78 | // level of logging 79 | // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG 80 | logLevel: config.LOG_INFO, 81 | 82 | // Uncomment the following lines if you are using grunt's server to run the tests 83 | // proxies: { 84 | // '/': 'http://localhost:9000/' 85 | // }, 86 | // URL root prevent conflicts with the site root 87 | // urlRoot: '_karma_' 88 | }); 89 | }; 90 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/test/spec/controllers/about.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('Controller: AboutCtrl', function () { 4 | 5 | // load the controller's module 6 | beforeEach(module('clientApp')); 7 | 8 | var AboutCtrl, 9 | scope; 10 | 11 | // Initialize the controller and a mock scope 12 | beforeEach(inject(function ($controller, $rootScope) { 13 | scope = $rootScope.$new(); 14 | AboutCtrl = $controller('AboutCtrl', { 15 | $scope: scope 16 | }); 17 | })); 18 | 19 | it('should attach a list of awesomeThings to the scope', function () { 20 | expect(scope.awesomeThings.length).toBe(3); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/client/test/spec/controllers/main.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('Controller: MainCtrl', function () { 4 | 5 | // load the controller's module 6 | beforeEach(module('clientApp')); 7 | 8 | var MainCtrl, 9 | scope; 10 | 11 | // Initialize the controller and a mock scope 12 | beforeEach(inject(function ($controller, $rootScope) { 13 | scope = $rootScope.$new(); 14 | MainCtrl = $controller('MainCtrl', { 15 | $scope: scope 16 | }); 17 | })); 18 | 19 | it('should attach a list of awesomeThings to the scope', function () { 20 | expect(scope.awesomeThings.length).toBe(3); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/spring-batch-admin-samples/207720048a076052c8ec13ef03ec325650cc52f6/spring-batch-admin-angularjs/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 26 11:10:27 CDT 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-all.zip 7 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/src/main/java/org/springframework/batch/admin/sample/Main.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.batch.admin.sample; 17 | 18 | import org.springframework.batch.admin.annotation.EnableBatchAdmin; 19 | import org.springframework.boot.SpringApplication; 20 | import org.springframework.boot.autoconfigure.SpringBootApplication; 21 | import org.springframework.boot.autoconfigure.hateoas.HypermediaAutoConfiguration; 22 | import org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration; 23 | 24 | /** 25 | *

Spring Boot launching point for Spring Batch Admin.

26 | * 27 | * @author Michael Minella 28 | */ 29 | @SpringBootApplication(exclude = {HypermediaAutoConfiguration.class, MultipartAutoConfiguration.class}) 30 | @EnableBatchAdmin 31 | public class Main { 32 | 33 | public static void main(String [] args) { 34 | SpringApplication.run(Main.class, args); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/src/main/java/org/springframework/batch/admin/sample/jobs/SampleJob.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.batch.admin.sample.jobs; 17 | 18 | import org.springframework.batch.core.Job; 19 | import org.springframework.batch.core.Step; 20 | import org.springframework.batch.core.StepContribution; 21 | import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; 22 | import org.springframework.batch.core.configuration.annotation.StepBuilderFactory; 23 | import org.springframework.batch.core.configuration.annotation.StepScope; 24 | import org.springframework.batch.core.scope.context.ChunkContext; 25 | import org.springframework.batch.core.step.tasklet.Tasklet; 26 | import org.springframework.batch.repeat.RepeatStatus; 27 | import org.springframework.beans.factory.annotation.Autowired; 28 | import org.springframework.beans.factory.annotation.Value; 29 | import org.springframework.context.annotation.Bean; 30 | import org.springframework.context.annotation.Configuration; 31 | 32 | /** 33 | * Sample Spring Batch Job. This job takes a single, optional, job parameter: fail. If 34 | * set to true, the job will throw an exception and fail. 35 | * 36 | * @author Michael Minella 37 | */ 38 | @Configuration 39 | public class SampleJob { 40 | 41 | @Autowired 42 | public JobBuilderFactory jobBuilderFactory; 43 | 44 | @Autowired 45 | public StepBuilderFactory stepBuilderFactory; 46 | 47 | @Bean 48 | @StepScope 49 | public FailableTasklet tasklet(@Value("#{jobParameters[fail]}") Boolean failable) { 50 | if(failable != null) { 51 | return new FailableTasklet(failable); 52 | } 53 | else { 54 | return new FailableTasklet(false); 55 | } 56 | } 57 | 58 | @Bean 59 | public Step step() { 60 | return stepBuilderFactory.get("step") 61 | .tasklet(tasklet(null)).build(); 62 | } 63 | 64 | @Bean 65 | public Job job() { 66 | return jobBuilderFactory.get("job") 67 | .start(step()) 68 | .build(); 69 | } 70 | 71 | public static class FailableTasklet implements Tasklet { 72 | 73 | private final boolean fail; 74 | 75 | public FailableTasklet(boolean fail) { 76 | this.fail = fail; 77 | } 78 | 79 | @Override 80 | public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { 81 | System.out.println("Tasklet was executed"); 82 | 83 | if(fail) { 84 | throw new RuntimeException("This exception was expected"); 85 | } 86 | else { 87 | return RepeatStatus.FINISHED; 88 | } 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/src/main/java/org/springframework/batch/admin/sample/web/CORSFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.batch.admin.sample.web; 17 | 18 | import java.io.IOException; 19 | 20 | import javax.servlet.Filter; 21 | import javax.servlet.FilterChain; 22 | import javax.servlet.FilterConfig; 23 | import javax.servlet.ServletException; 24 | import javax.servlet.ServletRequest; 25 | import javax.servlet.ServletResponse; 26 | import javax.servlet.http.HttpServletResponse; 27 | 28 | import org.springframework.context.annotation.Profile; 29 | import org.springframework.stereotype.Component; 30 | 31 | /** 32 | *

Provide Cross Origin Request permissions for the dashboard to talk to the REST API. 33 | * Enabled with the spring profile "development"

34 | * 35 | * Note: This is added for development purposes only (so you can run the services 36 | * on port 8080 (Tomcat's default) and use Grunt to serve the javascript application from 37 | * port 9000. This implementation is not secure and should not be used in a 38 | * production environment! 39 | * 40 | * @author Michael Minella 41 | */ 42 | @Component 43 | @Profile("development") 44 | public class CORSFilter implements Filter { 45 | 46 | public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) 47 | throws IOException, ServletException { 48 | HttpServletResponse response = (HttpServletResponse) res; 49 | response.setHeader("Access-Control-Allow-Origin", "*"); 50 | 51 | response.setHeader("Access-Control-Allow-Methods", "GET, PUT, POST, DELETE"); 52 | response.setHeader("Access-Control-Max-Age", "3600"); 53 | response.setHeader("Access-Control-Allow-Headers", "Content-Type"); 54 | chain.doFilter(req, res); 55 | } 56 | 57 | public void init(FilterConfig filterConfig) { 58 | } 59 | 60 | public void destroy() { 61 | } 62 | } -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/src/main/resources/META-INF/spring/batch/jobs/xmlJob.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | foo 12 | bar 13 | baz 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.servletPath=/* 2 | ENVIRONMENT=hsql 3 | spring.application.index=index.html 4 | spring.batch.job.enabled=false 5 | spring.profiles.active=development -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/src/main/resources/batch-hsql.properties: -------------------------------------------------------------------------------- 1 | # Placeholders batch.* 2 | # for HSQLDB: 3 | batch.jdbc.driver=org.hsqldb.jdbcDriver 4 | batch.jdbc.url=jdbc:hsqldb:mem:testdb;sql.enforce_strict_size=true 5 | # Override and use this one in for a separate server process so you can inspect 6 | # the results (or add it to system properties with -D to override at run time). 7 | # batch.jdbc.url=jdbc:hsqldb:hsql://localhost:9005/samples 8 | batch.jdbc.user=sa 9 | batch.jdbc.password= 10 | batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.HsqlMaxValueIncrementer 11 | batch.schema.script=classpath*:/org/springframework/batch/core/schema-hsqldb.sql 12 | batch.drop.script=classpath*:/org/springframework/batch/core/schema-drop-hsqldb.sql 13 | batch.business.schema.script=classpath:/business-schema-hsqldb.sql 14 | batch.job.configuration.package=org.springframework.batch.admin.sample.jobs 15 | 16 | # Non-platform dependent settings that you might like to change 17 | # batch.data.source.init=true 18 | -------------------------------------------------------------------------------- /spring-batch-admin-angularjs/src/main/resources/business-schema-hsqldb.sql: -------------------------------------------------------------------------------- 1 | SELECT 1 FROM INFORMATION_SCHEMA.SYSTEM_USERS; 2 | --------------------------------------------------------------------------------