forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Collapse two unenroll functions into one (elastic#94848)
## Summary Refactoring in progress towards elastic#90437 Collapse `forceUninstallAgents` into `uninstallAgents` into one function with an option. The pseudocode diff is ```diff - function uninstallAgents() { - // filtering logic A - // side effects A - } - function forceUninstallAgents() { - // filtering logic A - // side effects B - } + function uninstallAgents({ flag: boolean}) { + // filtering logic A + // if flag: side effects B + // else: side effects A + } ``` actually, there is [_one difference_](https://github.com/elastic/kibana/pull/94848/files/5564f253831a8a94e2b2bbb808afe6d2019016d7#diff-ecc3c625f2366949f1723e56b8477f6afb552ccfbcf3a71e0c28b2062fd05195) in the filtering logic ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
- Loading branch information
1 parent
6f38b96
commit aae86af
Showing
2 changed files
with
68 additions
and
72 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
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