-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8241aa0
commit cfc0dd9
Showing
11 changed files
with
176 additions
and
69 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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import * as vscode from "vscode"; | ||
import SearchIndexNode from "../model/SearchIndexNode"; | ||
import { getActiveConnection } from "./connections"; | ||
import { logger } from "../logger/logger"; | ||
|
||
export async function deleteIndex(searchIndexNode: SearchIndexNode) { | ||
const connection = getActiveConnection() | ||
if (!connection) { | ||
return; | ||
} | ||
|
||
let answer = await vscode.window.showInformationMessage(`Are you sure you want to DELETE the index: ${searchIndexNode.indexName}?`, ...["Yes", "No"]); | ||
if (answer !== "Yes") { | ||
return; | ||
} | ||
|
||
try { | ||
const searchIndexesManager = connection?.cluster?.searchIndexes(); | ||
searchIndexesManager?.dropIndex(searchIndexNode.indexName) | ||
} catch (err) { | ||
logger.error("An error occurred while trying to delete the index" + searchIndexNode.indexName + err) | ||
await vscode.window.showInformationMessage(`Could not delete the index. Please check the logs.`) | ||
} | ||
} |
Oops, something went wrong.