Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
16 changed files
with
503 additions
and
10 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
|
||
![Video Clip](./img/sse-gateway-sample-plugin.gif) | ||
|
||
# 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.