nickethier/grokdebug — pull request #3 by danielpetisme (2013-10-04 23:51:00+00:00)
Title: New feature: Custom patterns in the debugger

**Specs**
As a user, when I debug an input, I should be able to use my own patterns
As a user, when I use the autocompletion, the debugger should propose
me my own patterns.

**Demo**
http://grokdebug-danielpetisme.herokuapp.com/

Check the "Add custom patterns" checkbox to toggle the textarea. The edition format is classic, one pattern per line.
Then you will be able to use the custom pattern in the pattern field. If you trigger the autocompletion, the suggestions will include the custom patterns.

**Code**
The custom patterns are transmitted to the backend. The backend do basic validations (empty). Then, it will parse and extract the the custom patterns before adding them to the grok instance patterns.

Regarding the autocompletion, when it's trying to load the "available tags" (ie. the defaults ones), the JS will read the custom patterns textarea, parse them and add them in the "availableTags" collection. A verification is made to only have unique values in the final list.