Closed danielpetisme closed 10 years ago
I have also did:
I'm not sure my PRs are very clean (not yet totally familiar w/ git :disappointed:
Tell me if you prefer 3 seperated PRs or a big one?
The final app http://grokdebug-danielpetisme.herokuapp.com/
This is awesome thankyou! Sorry for taking for ever to get to this. I will attempt to get this pushed out soon.
3 separate PRs are great, though I'm not picky.
It has been a pleasure!
@danielpetisme Any chance you can give an example of how to use custom patterns?
Tried all syntaxes I could think of and keep getting a compile error.
Hi.
It's something I made 7 years ago... To be honest I don't even remember what it was about...
Have a look to the mentioned PR, is the best O can do.
Hope you'll find what you need
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.