Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[FIX JENKINS-40326] Add support for reconnect after the backend serve…
…r has been restarted (#15) * onError event handler * Added sample plugin * Added error handler in sample * Added ping endpoint * install sse from parent dir * remove .watch_trigger file * Added **/.watch_trigger to .gitignore * Server reconnect support Detect that the server has been restarted and provide a mechanism for hooking into the restart * Fix lint errors * Modify sample app to only load EventSource polyfill for MSIE * Better connection failure detection * Api tweaks * fixed typo * 0.0.16-tfbeta1
- Loading branch information
Showing
with
503 additions
and 10 deletions.
- +2 −0 .gitignore
- +42 −0 README.md
- +1 −1 package.json
- +19 −0 src/main/java/org/jenkinsci/plugins/ssegateway/Endpoint.java
- +92 −3 src/main/js/SSEConnection.js
- +45 −6 src/main/js/ajax.js
- +9 −0 sse-gateway-sample/README.md
- +7 −0 sse-gateway-sample/gulpfile.js
- BIN sse-gateway-sample/img/sse-gateway-sample-plugin.gif
- +20 −0 sse-gateway-sample/package.json
- +55 −0 sse-gateway-sample/pom.xml
- +46 −0 sse-gateway-sample/src/main/java/org/jenkinsci/plugins/ssegateway/sample/SSESamplePage.java
- +69 −0 sse-gateway-sample/src/main/js/sse-gateway-sample.js
- +56 −0 sse-gateway-sample/src/main/js/sse-gateway-sample.less
- +7 −0 sse-gateway-sample/src/main/resources/index.jelly
- +33 −0 ...teway-sample/src/main/resources/org/jenkinsci/plugins/ssegateway/sample/SSESamplePage/index.jelly
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -16,3 +16,5 @@ npm-debug.log | ||
**/.project | ||
**/.classpath | ||
etc/ | ||
|
||
**/.watch_trigger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,9 @@ | ||
A simple plugin that demos how to use the [sse-gateway-plugin](https://github.com/tfennelly/sse-gateway-plugin). | ||
|
||
The plugin is very simple. It just listens for all "job" events, displaying them in a simple window. | ||
|
||
 | ||
|
||
# Source code | ||
|
||
See [src/main/js/sse-gateway-sample.js](src/main/js/sse-gateway-sample.js). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,7 @@ | ||
var builder = require('@jenkins-cd/js-builder'); | ||
|
||
// | ||
// Bundle the modules. | ||
// See https://github.com/jenkinsci/js-builder | ||
// | ||
builder.bundle('src/main/js/sse-gateway-sample.js').less('src/main/js/sse-gateway-sample.less'); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "sse-gateway-sample", | ||
"version": "1.0.0", | ||
"description": "SSE Gateway Sample", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "Tom Fennelly <tom.fennelly@gmail.com> (https://github.com/tfennelly)", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@jenkins-cd/js-builder": "latest", | ||
"gulp": "^3.9.1" | ||
}, | ||
"dependencies": { | ||
"@jenkins-cd/sse-gateway": "../", | ||
"@jenkins-cd/js-modules": "latest", | ||
"jquery": "^2.2.3" | ||
} | ||
} |
Oops, something went wrong.