Skip to content

Latest commit

 

History

History
22 lines (22 loc) · 1.78 KB

TODO.md

File metadata and controls

22 lines (22 loc) · 1.78 KB
  1. elastalert_server.ts - Object is possibly null (check is vars like _testController are deffined corectly)
  2. server_config.ts - Added JSON.parse - probably not neede check how it was done before (old joi autoparse to object) 3) //"precommit": "./node_modules/eslint/bin/eslint.js ." in package.json 4) file_system.ts getEmptyDirectoryIndex() - add type
  3. controllers\rules\index.ts - flat model for rules instead of { rules: ["rule1", "rule2"]}
  4. controllers\templates\index.ts - flat model for rules instead of { templates: ["template1", "template2"]}
  5. controllers\rules\index.ts and controllers\templates\index.ts are almost the same make base class or something
  6. request_error.ts data more specify
  7. JOI for TestRuleOptions or find way to handling defaults
  8. statusHandler nullable status?
  9. Better implement ConfigService as singleton and refactor to not using config/index.ts
  10. Refactor rulesController.rule
  11. metadataHandler fix resp.hits.hits.map(h => h._source);
  12. metadataHandler fix getQueryString -> (<any>request.query).rule_name) 15) scripts/replace_templates.sh probably not needed
  13. Better error handling and documentation - for now global error handling in elastalert_server.ts https://tsoa-community.github.io/docs/error-handling.html#setting-up-error-handling
  14. Logging requst change RouteLogger to morgan (https://rsbh.dev/blog/rest-api-with-express-typescript) bunyan-middleware (https://www.npmjs.com/package/bunyan-middleware)
  15. Split logic form metadata.controller.ts to metadata.service.ts
  16. Migrate latest fixes from https://github.com/johnsusek/elastalert-server 20) Verify test rule on WS IMO something is wrong here: e84a3fa8fc79520eaddf701c220d3f92291bb9c9 Last catch in testRule() supresses all errors