diff --git a/package.json b/package.json index 2845c06..f754baf 100644 --- a/package.json +++ b/package.json @@ -378,15 +378,25 @@ "title": "%Copy WUID%" }, { - "command": "hpccPlatform.browseECLWatch", + "command": "hpccPlatform.browseWUDetails", "category": "ECL", - "title": "%Browse ECL Watch%" + "title": "%Browse Details%" }, { "command": "hpccPlatform.openResults", "category": "ECL", "title": "%Open Results%" }, + { + "command": "hpccPlatform.openResult", + "category": "ECL", + "title": "%Open Result%" + }, + { + "command": "hpccPlatform.browseResults", + "category": "ECL", + "title": "%Browse Results%" + }, { "command": "hpccPlatform.browseMetrics", "category": "ECL", @@ -398,14 +408,24 @@ "title": "%Open ECL%" }, { - "command": "hpccPlatform.saveWUAs", + "command": "hpccPlatform.saveWUResults", + "category": "ECL", + "title": "%Save Results%" + }, + { + "command": "ecl.openResult", "category": "ECL", - "title": "%Save Data to File%" + "title": "%Open Result%" + }, + { + "command": "ecl.browseResult", + "category": "ECL", + "title": "%Browse Result%" }, { "command": "ecl.saveResultAs", "category": "ECL", - "title": "%Save Result to File%" + "title": "%Save Result%" }, { "command": "hpccPlatform.abortWU", @@ -1002,35 +1022,40 @@ "when": "view == hpccPlatform && viewItem =~ /^ECLWUNode/", "group": "inline" }, + { + "command": "hpccPlatform.openECL", + "when": "view == hpccPlatform && viewItem =~ /^ECLWUNode/", + "group": "navigation@900" + }, { "command": "hpccPlatform.openResults", "when": "view == hpccPlatform && viewItem =~ /^ECLWUNode/", "group": "navigation@910" }, { - "command": "hpccPlatform.browseMetrics", + "command": "hpccPlatform.browseWUDetails", "when": "view == hpccPlatform && viewItem =~ /^ECLWUNode/", - "group": "navigation@920" + "group": "2browse@920" }, { - "command": "hpccPlatform.browseECLWatch", + "command": "hpccPlatform.browseResults", "when": "view == hpccPlatform && viewItem =~ /^ECLWUNode/", - "group": "navigation@930" + "group": "2browse@930" }, { - "command": "hpccPlatform.openECL", + "command": "hpccPlatform.browseMetrics", "when": "view == hpccPlatform && viewItem =~ /^ECLWUNode/", - "group": "navigation@940" + "group": "2browse@935" }, { - "command": "hpccPlatform.saveWUAs", + "command": "hpccPlatform.copyWUID", "when": "view == hpccPlatform && viewItem =~ /^ECLWUNode/", - "group": "navigation@950" + "group": "2copy@910" }, { - "command": "hpccPlatform.copyWUID", + "command": "hpccPlatform.saveWUResults", "when": "view == hpccPlatform && viewItem =~ /^ECLWUNode/", - "group": "2copy" + "group": "2copy@920" }, { "command": "hpccPlatform.abortWU", @@ -1103,14 +1128,19 @@ "group": "inline" }, { - "command": "ecl.saveResultAs", + "command": "ecl.openResult", "when": "view == hpccPlatform && viewItem == ECLResultNode", - "group": "navigatation@910" + "group": "navigation@910" }, { - "command": "ecl.openECLWatchExternal", + "command": "ecl.browseResult", + "when": "view == hpccPlatform && viewItem == ECLResultNode", + "group": "navigation@920" + }, + { + "command": "ecl.saveResultAs", "when": "view == hpccPlatform && viewItem == ECLResultNode", - "group": "navigatation@920" + "group": "navigation@930" }, { "command": "ecl.openECLWatchExternal", @@ -1644,4 +1674,4 @@ } ] } -} +} \ No newline at end of file diff --git a/package.nls.json b/package.nls.json index 84339f4..7e32c37 100644 --- a/package.nls.json +++ b/package.nls.json @@ -15,8 +15,10 @@ "Automatically open Workunits on creation": "Automatically open Workunits on creation", "Back": "Back", "Blocked": "Blocked", - "Browse ECL Watch": "Browse ECL Watch", + "Browse Details": "Browse Details", + "Browse Results": "Browse Results", "Browse Metrics": "Browse Metrics", + "Browse Result": "Browse Result", "Build flags, to be passed to the eclcc compiler": "Build flags, to be passed to the eclcc compiler", "Bundles": "Bundles", "Bundles Homepage": "Bundles Homepage", @@ -74,6 +76,7 @@ "Open ECL": "Open ECL", "Open ECL Watch": "Open ECL Watch", "Open ECL Watch in external browser": "Open ECL Watch in external browser", + "Open Result": "Open Result", "Open Results": "Open Results", "Opens ECL Client Tools Terminal Session": "Opens ECL Client Tools Terminal Session", "Opens ECL Watch Page": "Opens ECL Watch Page", @@ -102,10 +105,10 @@ "Running": "Running", "Save + check syntax of current file": "Save + check syntax of current file", "Save All + check syntax of all files": "Save All + check syntax of all files", - "Save Data to File": "Save Data to File", + "Save Results": "Save Results", "Save file prior to submission": "Save file prior to submission", "Save file prior to syntax check": "Save file prior to syntax check", - "Save Result to File": "Save Result to File", + "Save Result": "Save Result", "Scheduled": "Scheduled", "Select Client Tools Version": "Select Client Tools Version", "Select Client Tools Version from available options": "Select Client Tools Version from available options", diff --git a/src/ecl/command.ts b/src/ecl/command.ts index 535d4f8..2e4e7e7 100644 --- a/src/ecl/command.ts +++ b/src/ecl/command.ts @@ -38,6 +38,8 @@ export class ECLCommands { ctx.subscriptions.push(vscode.commands.registerCommand("ecl.selectCTVersion", selectCTVersion)); ctx.subscriptions.push(vscode.commands.registerCommand("ecl.openECLWatchExternal", this.openECLWatchExternal, this)); ctx.subscriptions.push(vscode.commands.registerCommand("ecl.saveResultAs", this.saveResultAs, this)); + ctx.subscriptions.push(vscode.commands.registerCommand("ecl.openResult", this.openResult, this)); + ctx.subscriptions.push(vscode.commands.registerCommand("ecl.browseResult", this.browseResult, this)); ctx.subscriptions.push(vscode.commands.registerCommand("ecl.insertRecordDef", this.insertRecordDef, this)); ctx.subscriptions.push(vscode.commands.registerCommand("ecl.sign", this.sign, this)); ctx.subscriptions.push(vscode.commands.registerCommand("ecl.verify", this.verify, this)); @@ -115,11 +117,7 @@ export class ECLCommands { } openECLWatchExternal(source: ECLWUNode | ECLResultNode) { - if (source instanceof ECLWUNode) { - vscode.env.openExternal(vscode.Uri.parse(source.url)); - } else if (source instanceof ECLResultNode) { - vscode.env.openExternal(vscode.Uri.parse(source.url)); - } + vscode.env.openExternal(vscode.Uri.parse(source.url)); } saveResultAs(source: ECLResultNode) { @@ -127,6 +125,14 @@ export class ECLCommands { saveData.saveResultAs(source.getResult()); } + openResult(source: ECLResultNode) { + eclWatchPanelView.navigateTo(sessionManager.session.launchRequestArgs, source.getWU().Wuid, source.getResult().Sequence); + } + + browseResult(source: ECLResultNode) { + vscode.env.openExternal(vscode.Uri.parse(source.url)); + } + async insertRecordDef() { if (vscode.window.activeTextEditor && sessionManager.session) { const editor = vscode.window.activeTextEditor; diff --git a/src/ecl/eclWatchTree.ts b/src/ecl/eclWatchTree.ts index 5aa7281..3871d02 100644 --- a/src/ecl/eclWatchTree.ts +++ b/src/ecl/eclWatchTree.ts @@ -35,7 +35,8 @@ export class ECLWatchTree extends Tree { case "disabled": break; case "external": - vscode.env.openExternal(vscode.Uri.parse(`${evt.workunit.BaseUrl}/esp/files/stub.htm?Widget=WUDetailsWidget&Wuid=${evt.workunit.Wuid}`)); + // vscode.env.openExternal(vscode.Uri.parse(`${evt.workunit.BaseUrl}/esp/files/stub.htm?Widget=WUDetailsWidget&Wuid=${evt.workunit.Wuid}`)); + vscode.env.openExternal(vscode.Uri.parse(`${evt.workunit.BaseUrl}/esp/files/index.html#/workunits/${evt.workunit.Wuid}`)); break; case "internal": default: @@ -69,12 +70,16 @@ export class ECLWatchTree extends Tree { wuNode.openResults(); }); + vscode.commands.registerCommand("hpccPlatform.browseResults", (wuNode: ECLWUNode) => { + wuNode.browseResults(); + }); + vscode.commands.registerCommand("hpccPlatform.browseMetrics", (wuNode: ECLWUNode) => { wuNode.browseMetrics(); }); - vscode.commands.registerCommand("hpccPlatform.browseECLWatch", (wuNode: ECLWUNode) => { - wuNode.browseECLWatch(); + vscode.commands.registerCommand("hpccPlatform.browseWUDetails", (wuNode: ECLWUNode) => { + wuNode.browseWUDetails(); }); vscode.commands.registerCommand("hpccPlatform.openECL", (wuNode: ECLWUNode) => { @@ -85,8 +90,8 @@ export class ECLWatchTree extends Tree { wuNode.copyWuid(); }); - vscode.commands.registerCommand("hpccPlatform.saveWUAs", (wuNode: ECLWUNode) => { - wuNode.saveWUAs(); + vscode.commands.registerCommand("hpccPlatform.saveWUResults", (wuNode: ECLWUNode) => { + wuNode.saveWUResults(); }); vscode.commands.registerCommand("hpccPlatform.abortWU", (wuNode: ECLWUNode) => { @@ -321,7 +326,7 @@ export class ECLResultNode extends Item { constructor(wu: Workunit, tree: ECLWatchTree, private _result: Result) { super(tree); - this.url = `${this._result.BaseUrl}/?Widget=ResultWidget&Wuid=${this._result.Wuid}&Sequence=${this._result.Sequence}`; + this.url = `${this._result.BaseUrl}esp/files/index.html#/workunits/${this._result.Wuid}/outputs/${this._result.Name}`; this.wu = wu; } @@ -389,7 +394,7 @@ export class ECLWUNode extends Item { constructor(tree: ECLWatchTree, wu: Workunit) { super(tree); this._wu = wu; - this.url = `${wu.BaseUrl}/?Widget=WUDetailsWidget&Wuid=${wu.Wuid}`; + this.url = `${wu.BaseUrl}esp/files/index.html#/workunits/${wu.Wuid}`; if (!this._wu.isComplete()) { this._wu.watchUntilComplete(changes => { tree.refresh(this); @@ -449,11 +454,15 @@ export class ECLWUNode extends Item { eclWatchPanelView.navigateTo(sessionManager.session.launchRequestArgs, this._wu.Wuid); } + browseResults() { + vscode.env.openExternal(vscode.Uri.parse(this.url + "/outputs")); + } + browseMetrics() { vscode.env.openExternal(vscode.Uri.parse(this.url + "/metrics")); } - browseECLWatch() { + browseWUDetails() { vscode.env.openExternal(vscode.Uri.parse(this.url)); } @@ -470,9 +479,9 @@ export class ECLWUNode extends Item { vscode.env.clipboard.writeText(this._wu.Wuid); } - saveWUAs() { + saveWUResults() { const saveData = new SaveData(this._wu); - saveData.saveWUAs(this._wu); + saveData.saveWUResults(this._wu); } abort() { diff --git a/src/ecl/saveData.ts b/src/ecl/saveData.ts index d18658d..b08369d 100644 --- a/src/ecl/saveData.ts +++ b/src/ecl/saveData.ts @@ -54,7 +54,7 @@ export class SaveData { }); } - async saveWUAs(wu: Workunit) { + async saveWUResults(wu: Workunit) { this._saveType = SaveType.WORKUNIT; this._wu = wu; await this.askFileSave();