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]>

# Conflicts:
#	helm/hpcc/Chart.yaml
#	helm/hpcc/templates/_helpers.tpl
#	helm/hpcc/templates/dafilesrv.yaml
#	helm/hpcc/templates/dali.yaml
#	helm/hpcc/templates/dfuserver.yaml
#	helm/hpcc/templates/eclagent.yaml
#	helm/hpcc/templates/eclccserver.yaml
#	helm/hpcc/templates/eclscheduler.yaml
#	helm/hpcc/templates/esp.yaml
#	helm/hpcc/templates/localroxie.yaml
#	helm/hpcc/templates/roxie.yaml
#	helm/hpcc/templates/sasha.yaml
#	helm/hpcc/templates/thor.yaml
#	version.cmake
  • Loading branch information
jakesmith committed Jan 11, 2024
2 parents fe26a62 + 64b6a8c commit 870c0f7
Show file tree
Hide file tree
Showing 12 changed files with 139 additions and 149 deletions.
2 changes: 2 additions & 0 deletions esp/src/src-react/components/DFUWorkunitDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { scopedLogger } from "@hpcc-js/util";
import { SizeMe } from "react-sizeme";
import nlsHPCC from "src/nlsHPCC";
import * as FileSpray from "src/FileSpray";
import { formatCost } from "src/Session";
import { useConfirm } from "../hooks/confirm";
import { useDfuWorkunit } from "../hooks/workunit";
import { pivotItemStyle } from "../layouts/pivot";
Expand Down Expand Up @@ -213,6 +214,7 @@ export const DFUWorkunitDetails: React.FunctionComponent<DFUWorkunitDetailsProps
"protected": { label: nlsHPCC.Protected, type: "checkbox", value: _protected },
"command": { label: nlsHPCC.Command, type: "string", value: FileSpray.CommandMessages[workunit?.Command], readonly: true },
"state": { label: nlsHPCC.State, type: "string", value: FileSpray.States[workunit?.State], readonly: true },
"accessCost": { label: nlsHPCC.FileAccessCost, type: "string", value: `${formatCost(workunit?.FileAccessCost ?? 0)}`, readonly: true },
"timeStarted": { label: nlsHPCC.TimeStarted, type: "string", value: workunit?.TimeStarted, readonly: true },
"secondsLeft": { label: nlsHPCC.SecondsRemaining, type: "number", value: workunit?.SecsLeft, readonly: true },
"timeStopped": { label: nlsHPCC.TimeStopped, type: "string", value: workunit?.TimeStopped, readonly: true },
Expand Down
8 changes: 4 additions & 4 deletions esp/src/src-react/components/ECLPlayground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,9 @@ export const ECLPlayground: React.FunctionComponent<ECLPlaygroundProps> = (props

if (editor) {
if (theme.semanticColors.link === darkTheme.palette.themePrimary) {
editor.setOption("theme", "darcula");
editor.option("theme", "darcula");
} else {
editor.setOption("theme", "default");
editor.option("theme", "default");
}
}
}, [wuid, editor, theme]);
Expand All @@ -404,9 +404,9 @@ export const ECLPlayground: React.FunctionComponent<ECLPlaygroundProps> = (props
const handleThemeToggle = React.useCallback((evt) => {
if (!editor) return;
if (evt.detail && evt.detail.dark === true) {
editor.setOption("theme", "darcula");
editor.option("theme", "darcula");
} else {
editor.setOption("theme", "default");
editor.option("theme", "default");
}
}, [editor]);
useOnEvent(document, "eclwatch-theme-toggle", handleThemeToggle);
Expand Down
11 changes: 4 additions & 7 deletions esp/src/src-react/components/IndexFileSummary.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as React from "react";
import { CommandBar, ContextualMenuItemType, ICommandBarItemProps, ScrollablePane, ScrollbarVisibility, Sticky, StickyPositionType } from "@fluentui/react";
import { DFUService, WsDfu } from "@hpcc-js/comms";
import { format as d3Format } from "@hpcc-js/common";
import { scopedLogger } from "@hpcc-js/util";
import nlsHPCC from "src/nlsHPCC";
import { formatCost } from "src/Session";
Expand All @@ -21,8 +20,6 @@ const logger = scopedLogger("src-react/components/IndexFileSummary.tsx");

import "react-reflex/styles.css";

const format = d3Format(",.2f");

const dfuService = new DFUService({ baseUrl: "" });

interface IndexFileSummaryProps {
Expand Down Expand Up @@ -175,7 +172,7 @@ export const IndexFileSummary: React.FunctionComponent<IndexFileSummaryProps> =
"Filesize": { label: nlsHPCC.FileSize, type: "string", value: file?.Filesize, readonly: true },
"Format": { label: nlsHPCC.Format, type: "string", value: file?.Format, readonly: true },
"IsCompressed": { label: nlsHPCC.IsCompressed, type: "checkbox", value: file?.IsCompressed, readonly: true },
"CompressedFileSizeString": { label: nlsHPCC.CompressedFileSize, type: "string", value: file?.CompressedFileSize ? file?.CompressedFileSize.toString() : "", readonly: true },
"CompressedFileSizeString": { label: nlsHPCC.CompressedFileSize, type: "string", value: file?.CompressedFileSize ? Utility.safeFormatNum(file?.CompressedFileSize) : "", readonly: true },
"PercentCompressed": { label: nlsHPCC.PercentCompressed, type: "string", value: file?.PercentCompressed, readonly: true },
"Modified": { label: nlsHPCC.Modified, type: "string", value: file?.Modified, readonly: true },
"ExpirationDate": { label: nlsHPCC.ExpirationDate, type: "string", value: file?.ExpirationDate, readonly: true },
Expand Down Expand Up @@ -237,21 +234,21 @@ export const IndexFileSummary: React.FunctionComponent<IndexFileSummaryProps> =
label: nlsHPCC.File,
originalSize: Utility.convertedSize(file?.FileSizeInt64),
diskSize: Utility.convertedSize(file?.CompressedFileSize || file?.FileSizeInt64),
percentCompressed: ((file?.CompressedFileSize && file?.FileSizeInt64) ? format(100 * file?.CompressedFileSize / file?.FileSizeInt64) : 0) + "%",
percentCompressed: ((file?.CompressedFileSize && file?.FileSizeInt64) ? Utility.formatDecimal(100 * file?.CompressedFileSize / file?.FileSizeInt64) : 0) + "%",
memorySize: (file?.ExtendedIndexInfo?.SizeMemoryBranches && file?.ExtendedIndexInfo?.SizeMemoryLeaves) ? Utility.convertedSize(file?.ExtendedIndexInfo?.SizeMemoryBranches + file?.ExtendedIndexInfo?.SizeMemoryLeaves) : ""
},
{
label: nlsHPCC.Branches,
originalSize: Utility.convertedSize(file?.ExtendedIndexInfo?.SizeOriginalBranches) ?? "",
diskSize: Utility.convertedSize(file?.ExtendedIndexInfo?.SizeDiskBranches) ?? "",
percentCompressed: file?.ExtendedIndexInfo?.BranchCompressionPercent ? format(file.ExtendedIndexInfo.BranchCompressionPercent) + "%" : "",
percentCompressed: file?.ExtendedIndexInfo?.BranchCompressionPercent ? Utility.formatDecimal(file.ExtendedIndexInfo.BranchCompressionPercent) + "%" : "",
memorySize: Utility.convertedSize(file?.ExtendedIndexInfo?.SizeMemoryBranches) ?? ""
},
{
label: nlsHPCC.Data,
originalSize: Utility.convertedSize(file?.ExtendedIndexInfo?.SizeOriginalData) ?? "",
diskSize: (file?.ExtendedIndexInfo?.SizeDiskLeaves !== undefined && file?.ExtendedIndexInfo?.SizeDiskBlobs !== undefined) ? Utility.convertedSize(file?.ExtendedIndexInfo?.SizeDiskLeaves + file?.ExtendedIndexInfo?.SizeDiskBlobs) : "",
percentCompressed: file?.ExtendedIndexInfo?.DataCompressionPercent ? format(file.ExtendedIndexInfo.DataCompressionPercent) + "%" : "",
percentCompressed: file?.ExtendedIndexInfo?.DataCompressionPercent ? Utility.formatDecimal(file.ExtendedIndexInfo.DataCompressionPercent) + "%" : "",
memorySize: Utility.convertedSize(file?.ExtendedIndexInfo?.SizeMemoryLeaves) ?? ""
}
]}
Expand Down
5 changes: 1 addition & 4 deletions esp/src/src-react/components/LogicalFileSummary.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from "react";
import { CommandBar, ContextualMenuItemType, ICommandBarItemProps, MessageBar, MessageBarType, ScrollablePane, ScrollbarVisibility, Sticky, StickyPositionType } from "@fluentui/react";
import { format as d3Format } from "@hpcc-js/common";
import { DFUService, WsDfu } from "@hpcc-js/comms";
import { scopedLogger } from "@hpcc-js/util";
import nlsHPCC from "src/nlsHPCC";
Expand Down Expand Up @@ -29,8 +28,6 @@ interface LogicalFileSummaryProps {
tab?: string;
}

const formatInt = d3Format(",");

export const LogicalFileSummary: React.FunctionComponent<LogicalFileSummaryProps> = ({
cluster,
logicalFile,
Expand Down Expand Up @@ -196,7 +193,7 @@ export const LogicalFileSummary: React.FunctionComponent<LogicalFileSummaryProps
"KeyType": { label: nlsHPCC.KeyType, type: "string", value: file?.KeyType, readonly: true },
"Format": { label: nlsHPCC.Format, type: "string", value: file?.Format, readonly: true },
"IsCompressed": { label: nlsHPCC.IsCompressed, type: "checkbox", value: file?.IsCompressed, readonly: true },
"CompressedFileSizeString": { label: nlsHPCC.CompressedFileSize, type: "string", value: file?.CompressedFileSize ? formatInt(file?.CompressedFileSize) : "", readonly: true },
"CompressedFileSizeString": { label: nlsHPCC.CompressedFileSize, type: "string", value: file?.CompressedFileSize ? Utility.safeFormatNum(file?.CompressedFileSize) : "", readonly: true },
"Filesize": { label: nlsHPCC.FileSize, type: "string", value: file?.Filesize, readonly: true },
"PercentCompressed": { label: nlsHPCC.PercentCompressed, type: "string", value: file?.PercentCompressed, readonly: true },
"Modified": { label: nlsHPCC.Modified, type: "string", value: file?.Modified, readonly: true },
Expand Down
98 changes: 34 additions & 64 deletions esp/src/src-react/components/Metrics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import * as Utility from "src/Utility";
import { FetchStatus, useMetricsOptions, useWorkunitMetrics } from "../hooks/metrics";
import { HolyGrail } from "../layouts/HolyGrail";
import { AutosizeComponent, AutosizeHpccJSComponent } from "../layouts/HpccJSAdapter";
import { DockPanel, DockPanelItems, ReactWidget, ResetableDockPanel } from "../layouts/DockPanel";
import { DockPanel, DockPanelItem, ResetableDockPanel } from "../layouts/DockPanel";
import { IScope, LayoutStatus, MetricGraph, MetricGraphWidget, isGraphvizWorkerResponse, layoutCache } from "../util/metricGraph";
import { pushUrl } from "../util/history";
import { debounce } from "../util/throttle";
Expand Down Expand Up @@ -435,29 +435,8 @@ export const Metrics: React.FunctionComponent<MetricsProps> = ({
});
}, [lineage, selectedLineage]);

const graphComponent = React.useMemo(() => {
return <HolyGrail
header={<>
<CommandBar items={graphButtons} farItems={graphRightButtons} />
<OverflowBreadcrumb breadcrumbs={breadcrumbs} selected={selectedLineage?.id} onSelect={item => setSelectedLineage(lineage.find(l => l.id === item.id))} />
</>}
main={<>
<AutosizeComponent hidden={!spinnerLabel}>
<Spinner size="extra-large" label={spinnerLabel} labelPosition="below" ></Spinner>
</AutosizeComponent>
<AutosizeComponent hidden={!!spinnerLabel || selectedMetrics.length > 0}>
<Label style={{ ...typographyStyles.subtitle2 }}>{nlsHPCC.NoContentPleaseSelectItem}</Label>
</AutosizeComponent>
<AutosizeHpccJSComponent widget={metricGraphWidget}>
</AutosizeHpccJSComponent>
</>
}
/>;
}, [graphButtons, graphRightButtons, breadcrumbs, selectedLineage?.id, spinnerLabel, selectedMetrics.length, metricGraphWidget, lineage]);

// Props Table ---
const propsTable = useConst(() => new Table()
.id("propsTable")
.columns([nlsHPCC.Property, nlsHPCC.Value, "Avg", "Min", "Max", "Delta", "StdDev", "SkewMin", "SkewMax", "NodeMin", "NodeMax"])
.columnWidth("auto")
);
Expand Down Expand Up @@ -485,7 +464,6 @@ export const Metrics: React.FunctionComponent<MetricsProps> = ({
}, [propsTable]);

const propsTable2 = useConst(() => new Table()
.id("propsTable2")
.columns([nlsHPCC.Property, nlsHPCC.Value])
.columnWidth("auto")
);
Expand Down Expand Up @@ -514,14 +492,6 @@ export const Metrics: React.FunctionComponent<MetricsProps> = ({
;
}, [propsTable2]);

const portal = useConst(() => new ReactWidget()
.id("portal")
);

React.useEffect(() => {
portal.children(<h1>{timelineFilter}</h1>).lazyRender();
}, [portal, timelineFilter]);

React.useEffect(() => {
const dot = metricGraph.graphTpl(selectedLineage ? [selectedLineage] : [], options);
setDot(dot);
Expand Down Expand Up @@ -561,38 +531,6 @@ export const Metrics: React.FunctionComponent<MetricsProps> = ({
setSelectedMetricsPtr(0);
}, [metrics, selection]);

const items: DockPanelItems = React.useMemo<DockPanelItems>((): DockPanelItems => {
return [
{
key: "scopesTable",
title: nlsHPCC.Metrics,
component: <HolyGrail
header={<SearchBox value={scopeFilter} onChange={onChangeScopeFilter} iconProps={filterIcon} placeholder={nlsHPCC.Filter} />}
main={<AutosizeHpccJSComponent widget={scopesTable} ></AutosizeHpccJSComponent>}
/>
},
{
key: "metricGraph",
title: nlsHPCC.Graph,
component: graphComponent,
location: "split-right",
ref: "scopesTable"
},
{
title: nlsHPCC.Properties,
widget: propsTable,
location: "split-bottom",
ref: "scopesTable"
},
{
title: nlsHPCC.CrossTab,
widget: propsTable2,
location: "tab-after",
ref: propsTable.id()
}
];
}, [scopeFilter, onChangeScopeFilter, scopesTable, graphComponent, propsTable, propsTable2]);

React.useEffect(() => {

// Update layout prior to unmount ---
Expand Down Expand Up @@ -685,7 +623,39 @@ export const Metrics: React.FunctionComponent<MetricsProps> = ({
</>}
main={
<ErrorBoundary>
<DockPanel items={items} layout={options?.layout} onDockPanelCreate={setDockpanel} />
<DockPanel layout={options?.layout} onDockPanelCreate={setDockpanel}>
<DockPanelItem key="scopesTable" title={nlsHPCC.Metrics}>
<HolyGrail
header={<SearchBox value={scopeFilter} onChange={onChangeScopeFilter} iconProps={filterIcon} placeholder={nlsHPCC.Filter} />}
main={<AutosizeHpccJSComponent widget={scopesTable} ></AutosizeHpccJSComponent>}
/>
</DockPanelItem>
<DockPanelItem key="metricGraph" title={nlsHPCC.Graph} location="split-right" relativeTo="scopesTable" >
<HolyGrail
header={<>
<CommandBar items={graphButtons} farItems={graphRightButtons} />
<OverflowBreadcrumb breadcrumbs={breadcrumbs} selected={selectedLineage?.id} onSelect={item => setSelectedLineage(lineage.find(l => l.id === item.id))} />
</>}
main={<>
<AutosizeComponent hidden={!spinnerLabel}>
<Spinner size="extra-large" label={spinnerLabel} labelPosition="below" ></Spinner>
</AutosizeComponent>
<AutosizeComponent hidden={!!spinnerLabel || selectedMetrics.length > 0}>
<Label style={{ ...typographyStyles.subtitle2 }}>{nlsHPCC.NoContentPleaseSelectItem}</Label>
</AutosizeComponent>
<AutosizeHpccJSComponent widget={metricGraphWidget}>
</AutosizeHpccJSComponent>
</>
}
/>
</DockPanelItem>
<DockPanelItem key="propsTable" title={nlsHPCC.Properties} location="split-bottom" relativeTo="scopesTable" >
<AutosizeHpccJSComponent widget={propsTable}></AutosizeHpccJSComponent>
</DockPanelItem>
<DockPanelItem key="propsTable2" title={nlsHPCC.CrossTab} location="tab-after" relativeTo="propsTable" >
<AutosizeHpccJSComponent widget={propsTable2}></AutosizeHpccJSComponent>
</DockPanelItem>
</DockPanel>
<MetricsOptions show={showMetricOptions} setShow={setShowMetricOptions} />
</ErrorBoundary>
}
Expand Down
8 changes: 3 additions & 5 deletions esp/src/src-react/components/Scopes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { formatCost } from "src/Session";
import * as Utility from "src/Utility";
import nlsHPCC from "src/nlsHPCC";
import { useConfirm } from "../hooks/confirm";
import { useBuildInfo } from "../hooks/platform";
import { useUserTheme } from "../hooks/theme";
import { useMyAccount } from "../hooks/user";
import { HolyGrail } from "../layouts/HolyGrail";
Expand Down Expand Up @@ -101,7 +100,6 @@ export const Scopes: React.FunctionComponent<ScopesProps> = ({
const { currentUser } = useMyAccount();
const [viewByScope, setViewByScope] = React.useState(true);
const [uiState, setUIState] = React.useState({ ...defaultUIState });
const [, { currencyCode }] = useBuildInfo();
const {
selection, setSelection,
setTotal,
Expand Down Expand Up @@ -197,14 +195,14 @@ export const Scopes: React.FunctionComponent<ScopesProps> = ({
Modified: { label: nlsHPCC.ModifiedUTCGMT, width: 162 },
AtRestCost: {
label: nlsHPCC.FileCostAtRest, width: 100,
formatter: (cost, row) => `${formatCost(cost ?? 0)} (${currencyCode || "$"})`
formatter: (cost, row) => `${formatCost(cost ?? 0)}`
},
AccessCost: {
label: nlsHPCC.FileAccessCost, width: 100,
formatter: (cost, row) => `${formatCost(cost ?? 0)} (${currencyCode || "$"})`
formatter: (cost, row) => `${formatCost(cost ?? 0)}`
}
};
}, [currencyCode, scopePath]);
}, [scopePath]);

const [DeleteConfirm, setShowDeleteConfirm] = useConfirm({
title: nlsHPCC.Delete,
Expand Down
4 changes: 2 additions & 2 deletions esp/src/src-react/components/SourceEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ export const SourceEditor: React.FunctionComponent<SourceEditorProps> = ({
const handleThemeToggle = React.useCallback((evt) => {
if (!editor) return;
if (evt.detail && evt.detail.dark === true) {
editor.setOption("theme", "darcula");
editor.option("theme", "darcula");
} else {
editor.setOption("theme", "default");
editor.option("theme", "default");
}
}, [editor]);
useOnEvent(document, "eclwatch-theme-toggle", handleThemeToggle);
Expand Down
18 changes: 15 additions & 3 deletions esp/src/src-react/components/SourceFiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,14 @@ export const SourceFiles: React.FunctionComponent<SourceFilesProps> = ({
Name: {
label: "Name", sortable: true,
formatter: (Name, row) => {
let fileUrl = `#/files/${Name}`;
if (row?.FileCluster) {
fileUrl = `#/files/${row.FileCluster}/${Name}`;
}
return <>
<Image src={Utility.getImageURL(row.IsSuperFile ? "folder_table.png" : "file.png")} />
&nbsp;
<Link href={`#/files/${row.FileCluster}/${Name}`}>{Name}</Link>
<Link href={fileUrl}>{Name}</Link>
</>;
}
},
Expand Down Expand Up @@ -86,10 +90,18 @@ export const SourceFiles: React.FunctionComponent<SourceFilesProps> = ({
key: "open", text: nlsHPCC.Open, disabled: !uiState.hasSelection, iconProps: { iconName: "WindowEdit" },
onClick: () => {
if (selection.length === 1) {
window.location.href = `#/files/${selection[0].Name}`;
let fileUrl = `#/files/${selection[0].Name}`;
if (selection[0]?.FileCluster) {
fileUrl = `#/files/${selection[0].FileCluster}/${selection[0].Name}`;
}
window.location.href = fileUrl;
} else {
for (let i = selection.length - 1; i >= 0; --i) {
window.open(`#/files/${selection[i].Name}`, "_blank");
let fileUrl = `#/files/${selection[i].Name}`;
if (selection[i]?.FileCluster) {
fileUrl = `#/files/${selection[i].FileCluster}/${selection[i].Name}`;
}
window.open(fileUrl, "_blank");
}
}
}
Expand Down
Loading

0 comments on commit 870c0f7

Please sign in to comment.