Skip to content

Commit

Permalink
Merge pull request #19056 from hpcc-systems/hpcc-32407-roxie-summary-…
Browse files Browse the repository at this point in the history
…stats-logger

HPCC-32407 ECL Watch log exceptions returned for Query Stats
  • Loading branch information
GordonSmith authored Aug 29, 2024
2 parents 80685df + af73602 commit 3a1e549
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
14 changes: 13 additions & 1 deletion esp/src/eclwatch/SummaryStatsQueryWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ define([
"@hpcc-js/comms",

"hpcc/GraphsWidget",
"src/ESPQuery"
"src/ESPQuery",
], function (declare, lang, arrayUtil,
hpccComms,
GraphsWidget, ESPQuery) {
Expand Down Expand Up @@ -59,6 +59,18 @@ define([
context.store.setData(response.StatsList.QuerySummaryStats);
context.grid.refresh();
}
}).catch(err => {
if (err?.Exception.length) {
dojo.publish("hpcc/brToaster", {
Severity: "Error",
Source: "WsWorkunits.WUQueryGetSummaryStats",
Exceptions: [{
Source: context.i18n.Error,
Message: err.Exception[0].Description,
duration: -1
}]
});
}
});
}
});
Expand Down
5 changes: 4 additions & 1 deletion esp/src/src-react/components/QuerySummaryStats.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import * as React from "react";
import { CommandBar, ICommandBarItemProps } from "@fluentui/react";
import { Query } from "@hpcc-js/comms";
import { scopedLogger } from "@hpcc-js/util";
import nlsHPCC from "src/nlsHPCC";
import { HolyGrail } from "../layouts/HolyGrail";
import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid";

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

interface QuerySummaryStatsProps {
querySet: string;
queryId: string;
Expand Down Expand Up @@ -65,7 +68,7 @@ export const QuerySummaryStats: React.FunctionComponent<QuerySummaryStatsProps>
};
}));
}
});
}).catch(err => logger.error(err));
}, [query]);

React.useEffect(() => {
Expand Down

0 comments on commit 3a1e549

Please sign in to comment.