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: Jake Smith <[email protected]>
  • Loading branch information
jakesmith committed Jul 26, 2024
2 parents cf72321 + 689f5dd commit 0f295a7
Show file tree
Hide file tree
Showing 12 changed files with 1,066 additions and 843 deletions.
2 changes: 1 addition & 1 deletion dockerfiles/platform-build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ RUN groupadd -g 10001 hpcc
RUN useradd -s /bin/bash -r -m -N -c "hpcc runtime User" -u 10000 -g hpcc hpcc
RUN passwd -l hpcc

RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.28.10/bin/linux/amd64/kubectl && chmod +x ./kubectl && mv ./kubectl /usr/local/bin
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.29.7/bin/linux/amd64/kubectl && chmod +x ./kubectl && mv ./kubectl /usr/local/bin

WORKDIR /hpcc-dev
RUN mkdir build
Expand Down
7 changes: 5 additions & 2 deletions dockerfiles/vcpkg/platform-core-ubuntu-22.04.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ RUN apt-get clean -y && \
expect \
g++ \
git \
git-lfs \
locales \
jq \
openssh-client \
Expand All @@ -59,10 +58,14 @@ RUN apt-get install -y \
gdb \
nano

RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.28.10/bin/linux/amd64/kubectl && \
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.29.7/bin/linux/amd64/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin

RUN curl -LO https://packagecloud.io/github/git-lfs/packages/ubuntu/jammy/git-lfs_3.5.1_amd64.deb/download && \
dpkg -i download && \
rm download

# Set the locale
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/vcpkg/platform-core-ubuntu-22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ RUN apt-get install -y \
gdb \
nano

RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.28.10/bin/linux/amd64/kubectl && \
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.29.7/bin/linux/amd64/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin

RUN curl -LO https://packagecloud.io/github/git-lfs/packages/ubuntu/jammy/git-lfs_3.4.1_amd64.deb/download && \
RUN curl -LO https://packagecloud.io/github/git-lfs/packages/ubuntu/jammy/git-lfs_3.5.1_amd64.deb/download && \
dpkg -i download && \
rm download

Expand Down
1,782 changes: 1,014 additions & 768 deletions esp/src/package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions esp/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@
},
"main": "src/stub.js",
"dependencies": {
"@fluentui/react": "8.117.0",
"@fluentui/react-components": "9.47.2",
"@fluentui/react-experiments": "8.14.137",
"@fluentui/react-hooks": "8.7.0",
"@fluentui/react-icons-mdl2": "1.3.59",
"@fluentui/react-migration-v8-v9": "9.6.3",
"@fluentui/react": "8.119.3",
"@fluentui/react-components": "9.54.6",
"@fluentui/react-experiments": "8.14.160",
"@fluentui/react-hooks": "8.8.10",
"@fluentui/react-icons-mdl2": "1.3.72",
"@fluentui/react-migration-v8-v9": "9.6.22",
"@hpcc-js/chart": "2.83.4",
"@hpcc-js/codemirror": "2.62.1",
"@hpcc-js/common": "2.71.18",
"@hpcc-js/comms": "2.93.0",
"@hpcc-js/comms": "2.94.0",
"@hpcc-js/dataflow": "8.1.7",
"@hpcc-js/eclwatch": "2.74.8",
"@hpcc-js/graph": "2.85.16",
Expand Down
4 changes: 2 additions & 2 deletions esp/src/src-react/components/EventScheduler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const EventScheduler: React.FunctionComponent<EventSchedulerProps> = ({
const buttons = React.useMemo((): ICommandBarItemProps[] => [
{
key: "refresh", text: nlsHPCC.Refresh, iconProps: { iconName: "Refresh" },
onClick: () => refreshTable.call()
onClick: () => refreshData()
},
{ key: "divider_1", itemType: ContextualMenuItemType.Divider, onRender: () => <ShortVerticalDivider /> },
{
Expand Down Expand Up @@ -163,7 +163,7 @@ export const EventScheduler: React.FunctionComponent<EventSchedulerProps> = ({
pushParams(filter);
}
},
], [currentUser, filter, hasFilter, refreshTable, selection, setShowDescheduleConfirm, store, total]);
], [currentUser.username, filter, hasFilter, refreshData, selection, setShowDescheduleConfirm, store, total]);

return <HolyGrail
header={<CommandBar items={buttons} farItems={copyButtons} />}
Expand Down
18 changes: 10 additions & 8 deletions esp/src/src-react/components/IndexFileSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const IndexFileSummary: React.FunctionComponent<IndexFileSummaryProps> =

React.useEffect(() => {
setDescription(file?.Description || "");
setProtected(file?.ProtectList?.DFUFileProtect?.length > 0 || false);
setProtected(isProtected);
setRestricted(file?.IsRestricted || false);

if ((file?.filePartsOnCluster() ?? []).length > 0) {
Expand All @@ -78,7 +78,7 @@ export const IndexFileSummary: React.FunctionComponent<IndexFileSummaryProps> =
setReplicateFlag(_replicate);
}

}, [file]);
}, [file, isProtected]);

const canSave = React.useMemo(() => {
return file && (
Expand All @@ -91,15 +91,11 @@ export const IndexFileSummary: React.FunctionComponent<IndexFileSummaryProps> =
const buttons = React.useMemo((): ICommandBarItemProps[] => [
{
key: "refresh", text: nlsHPCC.Refresh, iconProps: { iconName: "Refresh" },
onClick: () => {
refresh();
}
onClick: () => refresh()
},
{
key: "copyFilename", text: nlsHPCC.CopyLogicalFilename, iconProps: { iconName: "Copy" },
onClick: () => {
navigator?.clipboard?.writeText(logicalFile);
}
onClick: () => navigator?.clipboard?.writeText(logicalFile)
},
{ key: "divider_1", itemType: ContextualMenuItemType.Divider, onRender: () => <ShortVerticalDivider /> },
{
Expand Down Expand Up @@ -194,9 +190,15 @@ export const IndexFileSummary: React.FunctionComponent<IndexFileSummaryProps> =
break;
case "isProtected":
setProtected(value);
file?.update({
Protect: value ? WsDfu.DFUChangeProtection.Protect : WsDfu.DFUChangeProtection.Unprotect,
}).catch(err => logger.error(err));
break;
case "isRestricted":
setRestricted(value);
file?.update({
Restrict: value ? WsDfu.DFUChangeRestriction.Restrict : WsDfu.DFUChangeRestriction.Unrestricted,
}).catch(err => logger.error(err));
break;
}
}} />
Expand Down
18 changes: 10 additions & 8 deletions esp/src/src-react/components/LogicalFileSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const LogicalFileSummary: React.FunctionComponent<LogicalFileSummaryProps

React.useEffect(() => {
setDescription(file?.Description || "");
setProtected(file?.ProtectList?.DFUFileProtect?.length > 0 || false);
setProtected(isProtected);
setRestricted(file?.IsRestricted || false);

if ((file?.filePartsOnCluster() ?? []).length > 0) {
Expand All @@ -83,7 +83,7 @@ export const LogicalFileSummary: React.FunctionComponent<LogicalFileSummaryProps
setReplicateFlag(_replicate);
}

}, [file]);
}, [file, isProtected]);

const canSave = React.useMemo(() => {
return file && (
Expand All @@ -96,15 +96,11 @@ export const LogicalFileSummary: React.FunctionComponent<LogicalFileSummaryProps
const buttons = React.useMemo((): ICommandBarItemProps[] => [
{
key: "refresh", text: nlsHPCC.Refresh, iconProps: { iconName: "Refresh" },
onClick: () => {
refresh();
}
onClick: () => refresh()
},
{
key: "copyFilename", text: nlsHPCC.CopyLogicalFilename, iconProps: { iconName: "Copy" },
onClick: () => {
navigator?.clipboard?.writeText(logicalFile);
}
onClick: () => navigator?.clipboard?.writeText(logicalFile)
},
{ key: "divider_1", itemType: ContextualMenuItemType.Divider, onRender: () => <ShortVerticalDivider /> },
{
Expand Down Expand Up @@ -216,9 +212,15 @@ export const LogicalFileSummary: React.FunctionComponent<LogicalFileSummaryProps
break;
case "isProtected":
setProtected(value);
file?.update({
Protect: value ? WsDfu.DFUChangeProtection.Protect : WsDfu.DFUChangeProtection.Unprotect,
}).catch(err => logger.error(err));
break;
case "isRestricted":
setRestricted(value);
file?.update({
Restrict: value ? WsDfu.DFUChangeRestriction.Restrict : WsDfu.DFUChangeRestriction.Unrestricted,
}).catch(err => logger.error(err));
break;
}
}} />
Expand Down
11 changes: 6 additions & 5 deletions esp/src/src-react/components/SuperFileSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ export const SuperFileSummary: React.FunctionComponent<SuperFileSummaryProps> =

React.useEffect(() => {
setDescription(file?.Description || "");
setProtected(file?.ProtectList?.DFUFileProtect?.length > 0 || false);
setProtected(isProtected);
setRestricted(file?.IsRestricted || false);
}, [file]);
}, [file, isProtected]);

const [DeleteConfirm, setShowDeleteConfirm] = useConfirm({
title: nlsHPCC.Delete,
Expand Down Expand Up @@ -65,9 +65,7 @@ export const SuperFileSummary: React.FunctionComponent<SuperFileSummaryProps> =
const buttons = React.useMemo((): ICommandBarItemProps[] => [
{
key: "refresh", text: nlsHPCC.Refresh, iconProps: { iconName: "Refresh" },
onClick: () => {
refresh();
}
onClick: () => refresh()
},
{ key: "divider_1", itemType: ContextualMenuItemType.Divider, onRender: () => <ShortVerticalDivider /> },
{
Expand Down Expand Up @@ -124,6 +122,9 @@ export const SuperFileSummary: React.FunctionComponent<SuperFileSummaryProps> =
break;
case "isProtected":
setProtected(value);
file?.update({
Protect: value ? WsDfu.DFUChangeProtection.Protect : WsDfu.DFUChangeProtection.Unprotect,
}).catch(err => logger.error(err));
break;
}
}} />
Expand Down
38 changes: 3 additions & 35 deletions esp/src/src-react/components/controls/Grid.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import { DetailsList, DetailsListLayoutMode, Dropdown, IColumn as _IColumn, ICommandBarItemProps, IDetailsHeaderProps, IDetailsListStyles, mergeStyleSets, Selection, Stack, TooltipHost, TooltipOverflowMode, IDetailsList, IRenderFunction, IDetailsRowProps, SelectionMode, ConstrainMode } from "@fluentui/react";
import { DetailsList, DetailsListLayoutMode, Dropdown, IColumn as _IColumn, ICommandBarItemProps, IDetailsHeaderProps, IDetailsListStyles, mergeStyleSets, Selection, Stack, TooltipHost, TooltipOverflowMode, IRenderFunction, IDetailsRowProps, SelectionMode, ConstrainMode } from "@fluentui/react";
import { Pagination } from "@fluentui/react-experiments/lib/Pagination";
import { useConst, useId, useMount, useOnEvent } from "@fluentui/react-hooks";
import { useConst } from "@fluentui/react-hooks";
import { BaseStore, Memory, QueryRequest, QuerySortItem } from "src/store/Memory";
import nlsHPCC from "src/nlsHPCC";
import { createCopyDownloadSelection } from "../Common";
Expand Down Expand Up @@ -190,16 +190,6 @@ export function useFluentStoreState({ page }: FluentStoreStateProps): FluentStor
return { selection, setSelection, pageNum, setPageNum, pageSize, setPageSize, total, setTotal, refreshTable };
}

interface IListEx {
_scrollElement?: HTMLElement;
_onScroll?: () => void;
_onAsyncScrollDebounced?: () => void;

}
interface IDetailsListEx extends IDetailsList {
_list?: React.RefObject<IListEx>;
}

interface FluentStoreGridProps {
store: any,
query?: QueryRequest,
Expand Down Expand Up @@ -308,30 +298,8 @@ const FluentStoreGrid: React.FunctionComponent<FluentStoreGridProps> = ({
columnWidths.set(column.key, newWidth);
}, [columnWidths]);

/* Monitor Scroll Events (hack)
Essentially we are setting the scrollElement of the DetailsList to the div that contains the DetailsList (rather than a scrollable pane host).
See: https://github.com/microsoft/fluentui/blob/55d3a31042e8972ea373841bef616c68e6ab69f9/packages/react/src/components/List/List.tsx#L355-L369
Note: Not sure if `_onScroll` call is needed, but excluding for now as it seems to work without it and is more performant.
*/
const id = useId("fluent-store-grid-");
const detailListComponent = React.useRef<IDetailsListEx | null>(null);
const [detailListElement, setDetailListElement] = React.useState<HTMLDivElement | null>(null);
useMount(() => {
const detailListElement = document.querySelector<HTMLDivElement>(`#${id} .ms-DetailsList`);
setDetailListElement(detailListElement);
if (detailListComponent.current?._list?.current) {
detailListComponent.current._list.current._scrollElement = detailListElement;
}
});
useOnEvent(detailListElement, "scroll", () => {
detailListComponent.current?._list?.current?._onAsyncScrollDebounced();
});

return <div id={id} data-is-scrollable={"true"} style={{ overflow: "auto" }}>
return <div data-is-scrollable="true" style={{ overflow: "auto", height: "100%" }}>
<DetailsList
componentRef={detailListComponent}
compact={true}
items={items}
columns={fluentColumns}
Expand Down
5 changes: 3 additions & 2 deletions esp/src/src-react/components/forms/Fields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const AsyncDropdown: React.FunctionComponent<AsyncDropdownProps> = ({
const keys = selectedKey !== "" ? selectedKey.split(valueSeparator) : [];
let items = [...selectedItems];
if (keys.length === items.length) return;
if (selectedKeys !== "" && selOptions.length && selectedKey === "") {
if (selectedKeys !== "" && selOptions.length && selectedKey === "" && selectedKeys === items.map(i => i.key).join("|")) {
setSelectedItems([]);
return;
}
Expand Down Expand Up @@ -833,7 +833,7 @@ export const CloudContainerNameField: React.FunctionComponent<CloudContainerName
text: row
};
}) || [];
setOptions(options);
setOptions([{ key: "", text: "" }, ...options]);
}, [cloudContainerNames]);

return <ComboBox {...props} allowFreeform={true} autoComplete={"on"} options={options} />;
Expand Down Expand Up @@ -1367,6 +1367,7 @@ export function createInputs(fields: Fields, onChange?: (id: string, newValue: a
label: field.label,
field: <CloudContainerNameField
key={fieldID}
selectedKey={field.value}
onChange={(ev, row) => {
onChange(fieldID, row.key);
setDropzone(row.key as string);
Expand Down
6 changes: 3 additions & 3 deletions esp/src/src-react/hooks/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ export function useFile(cluster: string, name: string): [LogicalFile, boolean, n
let handle;
const fetchInfo = singletonDebounce(file, "fetchInfo");
fetchInfo()
.then(() => {
.then((response) => {
if (active) {
setFile(file);
setIsProtected(file.ProtectList?.DFUFileProtect?.length > 0 || false);
setIsProtected(response.ProtectList?.DFUFileProtect?.length > 0 || false);
setLastUpdate(Date.now());
handle = file.watch(() => {
setIsProtected(file.ProtectList?.DFUFileProtect?.length > 0 || false);
setIsProtected(response.ProtectList?.DFUFileProtect?.length > 0 || false);
setLastUpdate(Date.now());
});
}
Expand Down

0 comments on commit 0f295a7

Please sign in to comment.