Switch search source when deleting an index in ES administration
Currently a user can't delete an index if it's the active search source, and has to mark another index as active search source first. Also, the last remaining index can't be deleted.
In the backend, we need to accept an index ID in the
DELETE /elasticsearch_indices/:id endpoint and mark it as the new active search source. If the last remaining index is deleted, ES searching and indexing needs to be disabled.
In the frontend, this should be implemented as in the proposed designs:
|No other index exists|
|One other index exists|
|More than one other index exists|
- The code for this already exists, but is commented out.