Skip to content

Commit

Permalink
fix: add ask to delete to delete workunits
Browse files Browse the repository at this point in the history
Signed-off-by: David de Hilster <[email protected]>
  • Loading branch information
dehilsterlexis committed Jan 30, 2024
1 parent a34688c commit 913bc3c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"Check syntax on load": "Check syntax on load",
"Check syntax on save": "Check syntax on save",
"Check syntax with KEL grammar (fast)": "Check syntax with KEL grammar (fast)",
"Choose Yes or No": "Choose Yes or No",
"Clear all previously reported ECL Syntax Check results": "Clear all previously reported ECL Syntax Check results",
"Client Tools Homepage": "Client Tools Homepage",
"Completed": "Completed",
Expand All @@ -38,6 +39,7 @@
"Default timeout (secs)": "Default timeout (secs)",
"Delete Workunit": "Delete Workunit",
"Digitally sign ECL file": "Digitally sign ECL file",
"Do not delete": "Do not delete",
"ECL Client Tools Terminal": "ECL Client Tools Terminal",
"ECL Watch": "ECL Watch",
"Edit Dashboard": "Edit Dashboard",
Expand All @@ -63,6 +65,7 @@
"Launch ECL Watch": "Launch ECL Watch",
"Max result limit for workunit results": "Max result limit for workunit results",
"My workunits": "My workunits",
"No": "No",
"Open ECL": "Open ECL",
"Open ECL Watch": "Open ECL Watch",
"Open ECL Watch in external browser": "Open ECL Watch in external browser",
Expand Down Expand Up @@ -132,5 +135,6 @@
"View ECL Markdown": "View ECL Markdown",
"Waiting": "Waiting",
"Write eclcc log file to specified file": "Write eclcc log file to specified file",
"Yes": "Yes",
"eclcc syntax check arguments": "eclcc syntax check arguments"
}
10 changes: 9 additions & 1 deletion src/ecl/eclWatchTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,15 @@ export class ECLWUNode extends Item<ECLWatchTree> {
}

delete() {
this._wu.delete().then(() => this._tree.refresh());
const items: vscode.QuickPickItem[] = [];
items.push({label: localize("Yes"), description: `${localize("Delete Workunit")} ${this._wu.Wuid}`});
items.push({label: localize("No"), description: localize("Do not delete")});

vscode.window.showQuickPick(items, {title: localize("Delete Workunit"), canPickMany: false, placeHolder: localize("Choose Yes or No")}).then(selection => {
if (!selection || selection.label == localize("No"))
return;
this._wu.delete().then(() => this._tree.refresh());
});
}

hasChildren() {
Expand Down

0 comments on commit 913bc3c

Please sign in to comment.