Skip to content

Commit bf073ba

Browse files
Merge branch 'develop' into 'master'
Develop See merge request back-end/elastalert!20
2 parents 29b52d0 + d65f923 commit bf073ba

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,14 @@ Controllers expose API that can be used by the handlers. There are a couple thin
8585

8686
- be a class named `[controllerName]Controller`
8787
- use a logger to log important stuff. You can create a new logger by:
88+
8889
```javascript
8990
import Logger from 'path/to/common/logger';
9091
let logger = new Logger('[className]');
9192
```
93+
9294
- have an instance of it accessible by the `ElastalertServer`. In the `start()` function in the [`ElastalertServer`](../src/elastalert_server.js) you see
95+
9396
```javascript
9497
config.ready(function () {
9598
try {
@@ -100,10 +103,13 @@ Controllers expose API that can be used by the handlers. There are a couple thin
100103
});
101104
```
102105
You should add an instance of your controller there:
106+
103107
```javascript
104108
self._controllerNameController = new controllerName();
105109
```
110+
106111
You should also provide a getter for the controller:
112+
107113
```javascript
108114
get controllerNameController() {
109115
return this._controllerNameController;

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ This server exposes the following REST API's:
187187
Allows you to edit the ElastAlert configuration from `config.yaml` in `elastalertPath` (from the config). The required body to be send will be edited when the work on this API is done.
188188

189189
## Contributing
190-
Want to contribute to this project? Great! Please read our [contributing guidelines](../CONTRIBUTING.md) before submitting an issue or a pull request.
190+
Want to contribute to this project? Great! Please read our [contributing guidelines](CONTRIBUTING.md) before submitting an issue or a pull request.
191191

192192
**We only accept pull requests on our [GitHub repository](https://github.com/bitsensor/elastalert)!**
193193

0 commit comments

Comments
 (0)