Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/candidate-9.2.x' into candidate-…
Browse files Browse the repository at this point in the history
…9.4.x

Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>

# Conflicts:
#	helm/hpcc/Chart.yaml
#	helm/hpcc/templates/_helpers.tpl
#	version.cmake
  • Loading branch information
GordonSmith committed Aug 30, 2024
2 parents 1d37701 + 681913a commit 49b555f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 8 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
19 changes: 13 additions & 6 deletions esp/src/src-react/components/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { hasLogAccess } from "src/ESPLog";
import { containerized, bare_metal } from "src/BuildInfo";
import { MainNav, routes } from "../routes";
import { useFavorite, useFavorites, useHistory } from "../hooks/favorite";
import { useUserTheme } from "../hooks/theme";
import { useSessionStore } from "../hooks/store";
import { usePivotItemDisable } from "../layouts/pivot";
import { useUserTheme } from "../hooks/theme";
import { useMyAccount } from "../hooks/user";
import { Breadcrumbs } from "./Breadcrumbs";

export interface NextPrevious {
Expand Down Expand Up @@ -226,7 +226,8 @@ export const SubNavigation: React.FunctionComponent<SubNavigationProps> = ({
hashPath
}) => {

const { theme } = useUserTheme();
const { theme, themeV9 } = useUserTheme();
const { isAdmin } = useMyAccount();

const [favorites] = useFavorites();
const [favoriteCount, setFavoriteCount] = React.useState(0);
Expand Down Expand Up @@ -300,7 +301,12 @@ export const SubNavigation: React.FunctionComponent<SubNavigationProps> = ({
setLogsDisabled(true);
});
}, []);
const logsDisabledStyle = usePivotItemDisable(logsDisabled);
const linkStyle = React.useCallback((disabled) => {
return disabled ? {
background: themeV9.colorNeutralBackgroundDisabled,
color: themeV9.colorNeutralForegroundDisabled
} : {};
}, [themeV9]);

const favoriteMenu: IContextualMenuItem[] = React.useMemo(() => {
const retVal: IContextualMenuItem[] = [];
Expand All @@ -320,16 +326,17 @@ export const SubNavigation: React.FunctionComponent<SubNavigationProps> = ({
<Stack horizontal>
<Stack.Item grow={0} className={navStyles.wrapper}>
{subMenuItems[mainNav]?.map((row, idx) => {
const linkDisabled = (row.itemKey === "/topology/logs" && logsDisabled) || (row.itemKey.indexOf("security") > -1 && !isAdmin);
return <Link
disabled={row.itemKey === "/topology/logs" && logsDisabled}
disabled={linkDisabled}
key={`MenuLink_${idx}`}
href={`#${row.itemKey}`}
className={[
navStyles.link,
row.itemKey === subNav ? navStyles.active : "",
!subNav && row.itemKey === "/topology/configuration" ? navStyles.active : ""
].join(" ")}
style={row.itemKey === "/topology/logs" && logsDisabled ? logsDisabledStyle?.style : {}}
style={linkStyle(linkDisabled)}
>
{row.headerText}
</Link>;
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
1 change: 1 addition & 0 deletions esp/src/src-react/components/forms/ZAPDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ export const ZAPDialog: React.FunctionComponent<ZAPDialogProps> = ({
label={nlsHPCC.PasswordOpenZAP}
value={value}
type="password"
autoComplete="off"
canRevealPassword={true}
revealPasswordAriaLabel={nlsHPCC.ShowPassword}
/>}
Expand Down

0 comments on commit 49b555f

Please sign in to comment.