Skip to content

Commit

Permalink
Merge pull request #380 from dehilsterlexis/ADD_ASK_DELETE_WU
Browse files Browse the repository at this point in the history
fix: add ask to delete to delete workunits
  • Loading branch information
GordonSmith committed Feb 7, 2024
2 parents 0b4ffd2 + 404af47 commit 8a31383
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
4 changes: 4 additions & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,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 @@ -39,6 +40,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",
"Down": "Down",
"ECL Client Tools Terminal": "ECL Client Tools Terminal",
"ECL Watch": "ECL Watch",
Expand Down Expand Up @@ -66,6 +68,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 @@ -136,5 +139,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"
}
30 changes: 19 additions & 11 deletions src/ecl/eclWatchTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,43 +115,43 @@ export class ECLWatchTree extends Tree {
vscode.commands.registerCommand("hpccPlatform.setStateRunning", (wuNode: ECLWUNode) => {
wuNode.setStateRunning();
});

vscode.commands.registerCommand("hpccPlatform.setStateCompleted", (wuNode: ECLWUNode) => {
wuNode.setStateCompleted();
});

vscode.commands.registerCommand("hpccPlatform.setStateFailed", (wuNode: ECLWUNode) => {
wuNode.setStateFailed();
});

vscode.commands.registerCommand("hpccPlatform.setStateArchived", (wuNode: ECLWUNode) => {
wuNode.setStateArchived();
});

vscode.commands.registerCommand("hpccPlatform.setStateAborting", (wuNode: ECLWUNode) => {
wuNode.setStateAborting();
});

vscode.commands.registerCommand("hpccPlatform.setStateAborted", (wuNode: ECLWUNode) => {
wuNode.setStateAborted();
});

vscode.commands.registerCommand("hpccPlatform.setStateBlocked", (wuNode: ECLWUNode) => {
wuNode.setStateBlocked();
});

vscode.commands.registerCommand("hpccPlatform.setStateSubmitted", (wuNode: ECLWUNode) => {
wuNode.setStateSubmitted();
});

vscode.commands.registerCommand("hpccPlatform.setStateScheduled", (wuNode: ECLWUNode) => {
wuNode.setStateScheduled();
});

vscode.commands.registerCommand("hpccPlatform.setStateCompiling", (wuNode: ECLWUNode) => {
wuNode.setStateCompiling();
});

vscode.commands.registerCommand("hpccPlatform.setStateWait", (wuNode: ECLWUNode) => {
wuNode.setStateWait();
});
Expand Down Expand Up @@ -560,7 +560,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 8a31383

Please sign in to comment.