Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-30351 ECL Watch v9 fix WU results buttons #17870

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion esp/src/eclwatch/VizWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ define([

refreshData: function () {
if (this.limit.get("value") > this.rows.length) {
var result = this.wu.results[this.params.Sequence];
var result = this.wu.results.filter(r => r.Sequence == this.params.Sequence)[0];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was definitely an array out of bounds problem. I think there might be some other areas in this widget where it crashes gracelessly, but I couldn't quite reproduce it reliably (it could just have something to do with if the result(s) selected can actually be visualized..?).

var context = this;
result.fetchNRows(this.rows.length, this.limit.get("value")).then(function (response) {
context.rows = context.rows.concat(response);
Expand Down
16 changes: 14 additions & 2 deletions esp/src/src-react/components/Results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,22 @@ export const Results: React.FunctionComponent<ResultsProps> = ({
key: "open legacy", text: nlsHPCC.OpenLegacyMode, disabled: !uiState.hasSelection, iconProps: { iconName: "WindowEdit" },
onClick: () => {
if (selection.length === 1) {
window.location.href = `#/workunits/${wuid}/outputs/${selection[0].Name}/legacy`;
window.location.href = `#/workunits/${wuid}/outputs/${selection[0].Name}?__legacy`;
} else {
for (let i = selection.length - 1; i >= 0; --i) {
window.open(`#/workunits/${wuid}/outputs/${selection[i].Name}/legacy`, "_blank");
window.open(`#/workunits/${wuid}/outputs/${selection[i].Name}?__legacy`, "_blank");
}
}
}
},
{
key: "visualize", text: nlsHPCC.Visualize, disabled: !uiState.hasSelection, iconProps: { iconName: "BarChartVertical" },
onClick: () => {
if (selection.length === 1) {
window.location.href = `#/workunits/${wuid}/outputs/${selection[0].Sequence}?__visualize`;
} else {
for (let i = selection.length - 1; i >= 0; --i) {
window.open(`#/workunits/${wuid}/outputs/${selection[i].Sequence}?__visualize`, "_blank");
}
}
}
Expand Down
17 changes: 10 additions & 7 deletions esp/src/src-react/components/WorkunitDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@ import { DojoAdapter } from "../layouts/DojoAdapter";
import { pivotItemStyle } from "../layouts/pivot";
import { pushUrl } from "../util/history";
import { WorkunitPersona } from "./controls/StateIcon";
import { Results } from "./Results";
import { Variables } from "./Variables";
import { SourceFiles } from "./SourceFiles";
import { Helpers } from "./Helpers";
import { IFrame } from "./IFrame";
import { Logs } from "./Logs";
import { Metrics } from "./Metrics";
import { Queries } from "./Queries";
import { Resources } from "./Resources";
import { Result } from "./Result";
import { Results } from "./Results";
import { FetchEditor, WUXMLSourceEditor } from "./SourceEditor";
import { SourceFiles } from "./SourceFiles";
import { Variables } from "./Variables";
import { Workflows } from "./Workflows";
import { Metrics } from "./Metrics";
import { WorkunitSummary } from "./WorkunitSummary";
import { Result } from "./Result";
import { Logs } from "./Logs";

const logger = scopedLogger("src-react/components/WorkunitDetails.tsx");

Expand Down Expand Up @@ -84,7 +85,9 @@ export const WorkunitDetails: React.FunctionComponent<WorkunitDetailsProps> = ({
</PivotItem>
<PivotItem headerText={nlsHPCC.Outputs} itemKey="outputs" itemCount={workunit?.ResultCount} style={pivotItemStyle(size, 0)}>
{state ?
<Result wuid={wuid} resultName={state} filter={queryParams} /> :
queryParams.hasOwnProperty("__legacy") ? <IFrame src={`/WsWorkunits/WUResult?Wuid=${wuid}&ResultName=${state}`} height="99%" /> :
queryParams.hasOwnProperty("__visualize") ? <DojoAdapter widgetClassID="VizWidget" params={{ Wuid: wuid, Sequence: state }} /> :
<Result wuid={wuid} resultName={state} filter={queryParams} /> :
<Results wuid={wuid} />
}
</PivotItem>
Expand Down
Loading