From 17780408d9586a3b7d9613d7f863c491047dbf01 Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Thu, 4 Jan 2024 16:58:20 +0000 Subject: [PATCH 1/7] Split off 9.2.50 Signed-off-by: Gordon Smith --- helm/hpcc/Chart.yaml | 4 ++-- helm/hpcc/templates/_helpers.tpl | 2 +- helm/hpcc/templates/dafilesrv.yaml | 2 +- helm/hpcc/templates/dali.yaml | 2 +- helm/hpcc/templates/dfuserver.yaml | 2 +- helm/hpcc/templates/eclagent.yaml | 4 ++-- helm/hpcc/templates/eclccserver.yaml | 4 ++-- helm/hpcc/templates/eclscheduler.yaml | 2 +- helm/hpcc/templates/esp.yaml | 2 +- helm/hpcc/templates/localroxie.yaml | 2 +- helm/hpcc/templates/roxie.yaml | 8 ++++---- helm/hpcc/templates/sasha.yaml | 2 +- helm/hpcc/templates/thor.yaml | 10 +++++----- version.cmake | 4 ++-- 14 files changed, 25 insertions(+), 25 deletions(-) diff --git a/helm/hpcc/Chart.yaml b/helm/hpcc/Chart.yaml index a9574471d4a..46c633c9d0f 100644 --- a/helm/hpcc/Chart.yaml +++ b/helm/hpcc/Chart.yaml @@ -6,9 +6,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 9.2.49-closedown0 +version: 9.2.51-closedown0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. -appVersion: 9.2.49-closedown0 +appVersion: 9.2.51-closedown0 diff --git a/helm/hpcc/templates/_helpers.tpl b/helm/hpcc/templates/_helpers.tpl index c3db13d97b7..faf28d21272 100644 --- a/helm/hpcc/templates/_helpers.tpl +++ b/helm/hpcc/templates/_helpers.tpl @@ -1405,7 +1405,7 @@ kind: Service metadata: name: {{ $lvars.serviceName | quote }} labels: - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $.root "instance" $lvars.serviceName ) | indent 4 }} {{- if $lvars.labels }} {{ toYaml $lvars.labels | indent 4 }} diff --git a/helm/hpcc/templates/dafilesrv.yaml b/helm/hpcc/templates/dafilesrv.yaml index be51ee2eafb..931a3464288 100644 --- a/helm/hpcc/templates/dafilesrv.yaml +++ b/helm/hpcc/templates/dafilesrv.yaml @@ -50,7 +50,7 @@ spec: labels: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "dafilesrv" "name" "dafilesrv" "instance" .name) | indent 8 }} server: {{ .name | quote }} - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 annotations: checksum/config: {{ $configSHA }} {{- include "hpcc.generateAnnotations" $commonCtx | indent 8 }} diff --git a/helm/hpcc/templates/dali.yaml b/helm/hpcc/templates/dali.yaml index 80bf50a684a..f0a86e93fac 100644 --- a/helm/hpcc/templates/dali.yaml +++ b/helm/hpcc/templates/dali.yaml @@ -82,7 +82,7 @@ spec: run: {{ $dali.name | quote }} server: {{ $dali.name | quote }} app: dali - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8 }} {{- end }} diff --git a/helm/hpcc/templates/dfuserver.yaml b/helm/hpcc/templates/dfuserver.yaml index 7237db2f354..2d5765da373 100644 --- a/helm/hpcc/templates/dfuserver.yaml +++ b/helm/hpcc/templates/dfuserver.yaml @@ -56,7 +56,7 @@ spec: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "dfuserver" "name" "dfuserver" "instance" .name) | indent 8 }} run: {{ .name | quote }} accessDali: "yes" - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/eclagent.yaml b/helm/hpcc/templates/eclagent.yaml index a6753e21302..998be80d96c 100644 --- a/helm/hpcc/templates/eclagent.yaml +++ b/helm/hpcc/templates/eclagent.yaml @@ -58,7 +58,7 @@ data: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" $apptype "name" "eclagent" "instance" $appJobName "instanceOf" (printf "%s-job" .me.name)) | indent 12 }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 {{- if hasKey .me "labels" }} {{ toYaml .me.labels | indent 12 }} {{- end }} @@ -133,7 +133,7 @@ spec: run: {{ .name | quote }} accessDali: "yes" accessEsp: {{ .useChildProcesses | default false | ternary "yes" "no" | quote }} - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/eclccserver.yaml b/helm/hpcc/templates/eclccserver.yaml index d6c2eb25966..96634b821ee 100644 --- a/helm/hpcc/templates/eclccserver.yaml +++ b/helm/hpcc/templates/eclccserver.yaml @@ -57,7 +57,7 @@ data: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclccserver" "name" "eclccserver" "instance" $compileJobName "instanceOf" (printf "%s-job" .me.name)) | indent 12 }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 {{- if hasKey .me "labels" }} {{ toYaml .me.labels | indent 12 }} {{- end }} @@ -140,7 +140,7 @@ spec: run: {{ .name | quote }} accessDali: "yes" accessEsp: {{ .useChildProcesses | default false | ternary "yes" "no" | quote }} - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/eclscheduler.yaml b/helm/hpcc/templates/eclscheduler.yaml index 58c78f74fc4..a1a327d5760 100644 --- a/helm/hpcc/templates/eclscheduler.yaml +++ b/helm/hpcc/templates/eclscheduler.yaml @@ -64,7 +64,7 @@ spec: run: {{ .name | quote }} accessDali: "yes" accessEsp: "no" - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/esp.yaml b/helm/hpcc/templates/esp.yaml index 7a807bfdac3..2312ed4aebc 100644 --- a/helm/hpcc/templates/esp.yaml +++ b/helm/hpcc/templates/esp.yaml @@ -120,7 +120,7 @@ spec: accessSasha: "yes" {{- end }} app: {{ $application }} - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "name" $application "component" "esp" "instance" .name) | indent 8 }} {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8 }} diff --git a/helm/hpcc/templates/localroxie.yaml b/helm/hpcc/templates/localroxie.yaml index 558ee306c97..2df89dc5ba5 100644 --- a/helm/hpcc/templates/localroxie.yaml +++ b/helm/hpcc/templates/localroxie.yaml @@ -70,7 +70,7 @@ spec: server: {{ $servername | quote }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "roxie-server" "name" "roxie" "instance" $roxie.name) | indent 8 }} {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} diff --git a/helm/hpcc/templates/roxie.yaml b/helm/hpcc/templates/roxie.yaml index 30dcd32a4d0..eee4d56a741 100644 --- a/helm/hpcc/templates/roxie.yaml +++ b/helm/hpcc/templates/roxie.yaml @@ -120,7 +120,7 @@ spec: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "topology-server" "name" "roxie" "instance" $commonCtx.toponame) | indent 8 }} run: {{ $commonCtx.toponame | quote }} roxie-cluster: {{ $roxie.name | quote }} - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} {{- end }} @@ -178,7 +178,7 @@ kind: Service metadata: name: {{ $commonCtx.toponame | quote }} labels: - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "topology-server" "name" "roxie" "instance" $commonCtx.toponame) | indent 4 }} spec: ports: @@ -240,7 +240,7 @@ spec: roxie-cluster: {{ $roxie.name | quote }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "roxie-server" "name" "roxie" "instance" $servername) | indent 8 }} {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} @@ -346,7 +346,7 @@ spec: roxie-cluster: {{ $roxie.name | quote }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} {{- end }} diff --git a/helm/hpcc/templates/sasha.yaml b/helm/hpcc/templates/sasha.yaml index 9c8f6aeddd9..85d0e2e8ee0 100644 --- a/helm/hpcc/templates/sasha.yaml +++ b/helm/hpcc/templates/sasha.yaml @@ -53,7 +53,7 @@ spec: server: {{ $serviceName | quote }} app: sasha accessDali: {{ (has "dali" $sasha.access) | ternary "yes" "no" | quote }} - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 {{- if hasKey $sasha "labels" }} {{ toYaml $sasha.labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/thor.yaml b/helm/hpcc/templates/thor.yaml index 2a10f76e9fd..2ede2631ded 100644 --- a/helm/hpcc/templates/thor.yaml +++ b/helm/hpcc/templates/thor.yaml @@ -82,7 +82,7 @@ data: labels: accessDali: "yes" accessEsp: "yes" - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclagent" "name" "thor" "instance" $eclAgentJobName "instanceOf" (printf "%s-job" .eclAgentName)) | indent 8 }} {{- if hasKey .me "labels" }} {{ toYaml .me.labels | indent 12 }} @@ -145,7 +145,7 @@ data: accessEsp: "yes" app: "thor" component: "thormanager" - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 instance: "_HPCC_JOBNAME_" job: "_HPCC_JOBNAME_" {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "thormanager" "name" "thor" "instance" $thorManagerJobName "instanceOf" (printf "%s-thormanager-job" .me.name)) | indent 12 }} @@ -210,7 +210,7 @@ data: accessEsp: "yes" app: "thor" component: "thorworker" - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 instance: "_HPCC_JOBNAME_" job: "_HPCC_JOBNAME_" {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "thorworker" "name" "thor" "instance" $thorWorkerJobName "instanceOf" (printf "%s-thorworker-job" .me.name)) | indent 12 }} @@ -341,7 +341,7 @@ spec: accessEsp: {{ $commonCtx.eclAgentUseChildProcesses | ternary "yes" "no" | quote }} app: "thor" component: "thor-eclagent" - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 instance: {{ $commonCtx.eclAgentName | quote }} {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclagent" "name" "thor" "instance" $commonCtx.eclAgentName ) | indent 8 }} {{- if hasKey $commonCtx.me "labels" }} @@ -404,7 +404,7 @@ spec: accessEsp: "no" app: "thor" component: "thor-thoragent" - helmVersion: 9.2.49-closedown0 + helmVersion: 9.2.51-closedown0 instance: {{ $commonCtx.thorAgentName | quote }} {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclagent" "name" "thor" "instance" $commonCtx.thorAgentName ) | indent 8 }} {{- if hasKey $commonCtx.me "labels" }} diff --git a/version.cmake b/version.cmake index 1ebf5ccdf35..a59cd11b5c4 100644 --- a/version.cmake +++ b/version.cmake @@ -5,8 +5,8 @@ set ( HPCC_NAME "Community Edition" ) set ( HPCC_PROJECT "community" ) set ( HPCC_MAJOR 9 ) set ( HPCC_MINOR 2 ) -set ( HPCC_POINT 49 ) +set ( HPCC_POINT 51 ) set ( HPCC_MATURITY "closedown" ) set ( HPCC_SEQUENCE 0 ) -set ( HPCC_TAG_TIMESTAMP "2023-12-21T11:28:20Z" ) +set ( HPCC_TAG_TIMESTAMP "2024-01-04T16:58:20Z" ) ### From 8fa13a2645487ce80b1b128e3bf3f2c253072afb Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Fri, 5 Jan 2024 08:42:33 +0000 Subject: [PATCH 2/7] HPCC-31072 ECL Watch using deprecated editor method Caused ECL Playground to fail Signed-off-by: Gordon Smith --- esp/src/src-react/components/ECLPlayground.tsx | 8 ++++---- esp/src/src-react/components/SourceEditor.tsx | 4 ++-- esp/src/src/ECLArchiveWidget.ts | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/esp/src/src-react/components/ECLPlayground.tsx b/esp/src/src-react/components/ECLPlayground.tsx index 7c3d436c02c..14ff6d1de1b 100644 --- a/esp/src/src-react/components/ECLPlayground.tsx +++ b/esp/src/src-react/components/ECLPlayground.tsx @@ -376,9 +376,9 @@ export const ECLPlayground: React.FunctionComponent = (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]); @@ -404,9 +404,9 @@ export const ECLPlayground: React.FunctionComponent = (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); diff --git a/esp/src/src-react/components/SourceEditor.tsx b/esp/src/src-react/components/SourceEditor.tsx index e2a4060741d..6a367c39c71 100644 --- a/esp/src/src-react/components/SourceEditor.tsx +++ b/esp/src/src-react/components/SourceEditor.tsx @@ -76,9 +76,9 @@ export const SourceEditor: React.FunctionComponent = ({ 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); diff --git a/esp/src/src/ECLArchiveWidget.ts b/esp/src/src/ECLArchiveWidget.ts index 879efbfa4fd..e1ac7eb193b 100644 --- a/esp/src/src/ECLArchiveWidget.ts +++ b/esp/src/src/ECLArchiveWidget.ts @@ -59,9 +59,9 @@ export class ECLArchiveWidget { setEditorTheme() { if (themeIsDark()) { - this.editor.setOption("theme", "darcula"); + this.editor.option("theme", "darcula"); } else { - this.editor.setOption("theme", "default"); + this.editor.option("theme", "default"); } } @@ -108,9 +108,9 @@ export class ECLArchiveWidget { const handleThemeToggle = (evt) => { if (!context.editor) return; if (evt.detail && evt.detail.dark === true) { - context.editor.setOption("theme", "darcula"); + context.editor.option("theme", "darcula"); } else { - context.editor.setOption("theme", "default"); + context.editor.option("theme", "default"); } }; document.addEventListener("eclwatch-theme-toggle", handleThemeToggle); From 2757f6adbc88954a6a2e05fb36a4dbe5e7d40b8b Mon Sep 17 00:00:00 2001 From: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:49:52 -0500 Subject: [PATCH 3/7] HPCC-31075 ECL Watch v9 change compressed file size notation do not show compressed file size in scientific notation Signed-off-by: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> --- esp/src/src-react/components/IndexFileSummary.tsx | 11 ++++------- esp/src/src-react/components/LogicalFileSummary.tsx | 5 +---- esp/src/src/Utility.ts | 2 +- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/esp/src/src-react/components/IndexFileSummary.tsx b/esp/src/src-react/components/IndexFileSummary.tsx index da78d4fc6ed..54f52605e97 100644 --- a/esp/src/src-react/components/IndexFileSummary.tsx +++ b/esp/src/src-react/components/IndexFileSummary.tsx @@ -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"; @@ -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 { @@ -175,7 +172,7 @@ export const IndexFileSummary: React.FunctionComponent = "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 }, @@ -237,21 +234,21 @@ export const IndexFileSummary: React.FunctionComponent = 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) ?? "" } ]} diff --git a/esp/src/src-react/components/LogicalFileSummary.tsx b/esp/src/src-react/components/LogicalFileSummary.tsx index 0416e253424..469f2c57b83 100644 --- a/esp/src/src-react/components/LogicalFileSummary.tsx +++ b/esp/src/src-react/components/LogicalFileSummary.tsx @@ -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"; @@ -29,8 +28,6 @@ interface LogicalFileSummaryProps { tab?: string; } -const formatInt = d3Format(","); - export const LogicalFileSummary: React.FunctionComponent = ({ cluster, logicalFile, @@ -196,7 +193,7 @@ export const LogicalFileSummary: React.FunctionComponent Date: Fri, 5 Jan 2024 15:11:54 -0500 Subject: [PATCH 4/7] HPCC-30958 ECL Watch v9 fix WU input links when missing cluster when ECLSourceFiles for a given WU have no FileCluster defined, exclude it from the URL linking to the file Signed-off-by: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> --- esp/src/src-react/components/SourceFiles.tsx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/esp/src/src-react/components/SourceFiles.tsx b/esp/src/src-react/components/SourceFiles.tsx index 7d1e7cc70de..e33a53c3019 100644 --- a/esp/src/src-react/components/SourceFiles.tsx +++ b/esp/src/src-react/components/SourceFiles.tsx @@ -54,10 +54,14 @@ export const SourceFiles: React.FunctionComponent = ({ Name: { label: "Name", sortable: true, formatter: (Name, row) => { + let fileUrl = `#/files/${Name}`; + if (row?.FileCluster) { + fileUrl = `#/files/${row.FileCluster}/${Name}`; + } return <>   - {Name} + {Name} ; } }, @@ -86,10 +90,18 @@ export const SourceFiles: React.FunctionComponent = ({ 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"); } } } From 6b8a2969a060e0196a4e6f51afebdbd7964284b7 Mon Sep 17 00:00:00 2001 From: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> Date: Mon, 8 Jan 2024 15:28:48 -0500 Subject: [PATCH 5/7] HPCC-30329 ECL Watch v9 prevent toolbar color from hiding buttons prevent the selected toolbar color from making any links or buttons in the title bar difficult to see Signed-off-by: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> --- esp/src/src-react/components/Title.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/esp/src/src-react/components/Title.tsx b/esp/src/src-react/components/Title.tsx index 1cd66f3f2a8..ec472bbc373 100644 --- a/esp/src/src-react/components/Title.tsx +++ b/esp/src/src-react/components/Title.tsx @@ -65,6 +65,10 @@ export const DevTitle: React.FunctionComponent = ({ const [showBannerConfig, setShowBannerConfig] = React.useState(false); const [BannerMessageBar, BannerConfig] = useBanner({ showForm: showBannerConfig, setShowForm: setShowBannerConfig }); + const titlebarColorSet = React.useMemo(() => { + return titlebarColor && titlebarColor !== theme.palette.themeLight; + }, [theme.palette, titlebarColor]); + const personaProps: IPersonaSharedProps = React.useMemo(() => { return { text: (currentUser?.firstName && currentUser?.lastName) ? currentUser.firstName + " " + currentUser.lastName : currentUser?.username, @@ -181,12 +185,12 @@ export const DevTitle: React.FunctionComponent = ({ background: "transparent", minWidth: 48, padding: "0 10px 0 4px", - color: theme.semanticColors.link + color: titlebarColor ? Utility.textColor(titlebarColor) : theme.semanticColors.link }, errorsWarningsCount: { margin: "-3px 0 0 -3px" } - }), [theme.semanticColors.link]); + }), [theme.semanticColors.link, titlebarColor]); React.useEffect(() => { switch (log.reduce((prev, cur) => Math.max(prev, cur.level), Level.debug)) { @@ -248,18 +252,18 @@ export const DevTitle: React.FunctionComponent = ({ document.title = environmentTitle; }, [environmentTitle]); - return
+ return
- + - + {showEnvironmentTitle && environmentTitle.length ? environmentTitle : "ECL Watch"} @@ -283,7 +287,7 @@ export const DevTitle: React.FunctionComponent = ({ - + Date: Tue, 9 Jan 2024 10:17:43 -0500 Subject: [PATCH 6/7] HPCC-31030 ECL Watch v9 show FileAccessCost on DFU WU details Signed-off-by: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> --- esp/src/src-react/components/DFUWorkunitDetails.tsx | 2 ++ esp/src/src-react/components/Scopes.tsx | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/esp/src/src-react/components/DFUWorkunitDetails.tsx b/esp/src/src-react/components/DFUWorkunitDetails.tsx index e959727a081..1a18a580c86 100644 --- a/esp/src/src-react/components/DFUWorkunitDetails.tsx +++ b/esp/src/src-react/components/DFUWorkunitDetails.tsx @@ -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"; @@ -213,6 +214,7 @@ export const DFUWorkunitDetails: React.FunctionComponent = ({ const { currentUser } = useMyAccount(); const [viewByScope, setViewByScope] = React.useState(true); const [uiState, setUIState] = React.useState({ ...defaultUIState }); - const [, { currencyCode }] = useBuildInfo(); const { selection, setSelection, setTotal, @@ -197,14 +195,14 @@ export const Scopes: React.FunctionComponent = ({ 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, From dd6f572bfd0cef57d68f49c8aa038dcd0af71cdc Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Fri, 5 Jan 2024 08:42:33 +0000 Subject: [PATCH 7/7] HPCC-31108 Remove "items" from ECL Watch Dock Panel Promotes "React" paradigm and prevents multiple refreshes. Signed-off-by: Gordon Smith --- esp/src/src-react/components/Metrics.tsx | 98 +++++++------------- esp/src/src-react/layouts/DockPanel.tsx | 108 +++++++++++++---------- 2 files changed, 93 insertions(+), 113 deletions(-) diff --git a/esp/src/src-react/components/Metrics.tsx b/esp/src/src-react/components/Metrics.tsx index 99b25491089..d4e5a7bb5c6 100644 --- a/esp/src/src-react/components/Metrics.tsx +++ b/esp/src/src-react/components/Metrics.tsx @@ -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"; @@ -435,29 +435,8 @@ export const Metrics: React.FunctionComponent = ({ }); }, [lineage, selectedLineage]); - const graphComponent = React.useMemo(() => { - return - - setSelectedLineage(lineage.find(l => l.id === item.id))} /> - } - main={<> - - - - - - } - />; - }, [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") ); @@ -485,7 +464,6 @@ export const Metrics: React.FunctionComponent = ({ }, [propsTable]); const propsTable2 = useConst(() => new Table() - .id("propsTable2") .columns([nlsHPCC.Property, nlsHPCC.Value]) .columnWidth("auto") ); @@ -514,14 +492,6 @@ export const Metrics: React.FunctionComponent = ({ ; }, [propsTable2]); - const portal = useConst(() => new ReactWidget() - .id("portal") - ); - - React.useEffect(() => { - portal.children(

{timelineFilter}

).lazyRender(); - }, [portal, timelineFilter]); - React.useEffect(() => { const dot = metricGraph.graphTpl(selectedLineage ? [selectedLineage] : [], options); setDot(dot); @@ -561,38 +531,6 @@ export const Metrics: React.FunctionComponent = ({ setSelectedMetricsPtr(0); }, [metrics, selection]); - const items: DockPanelItems = React.useMemo((): DockPanelItems => { - return [ - { - key: "scopesTable", - title: nlsHPCC.Metrics, - component: } - main={} - /> - }, - { - 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 --- @@ -685,7 +623,39 @@ export const Metrics: React.FunctionComponent = ({ } main={ - + + + } + main={} + /> + + + + + setSelectedLineage(lineage.find(l => l.id === item.id))} /> + } + main={<> + + + + + + } + /> + + + + + + + + } diff --git a/esp/src/src-react/layouts/DockPanel.tsx b/esp/src/src-react/layouts/DockPanel.tsx index dff57463fa7..d688ccf9799 100644 --- a/esp/src/src-react/layouts/DockPanel.tsx +++ b/esp/src/src-react/layouts/DockPanel.tsx @@ -5,6 +5,7 @@ import { useConst } from "@fluentui/react-hooks"; import { FluentProvider, Theme as ThemeV9 } from "@fluentui/react-components"; import { HTMLWidget, Widget } from "@hpcc-js/common"; import { DockPanel as HPCCDockPanel, IClosable } from "@hpcc-js/phosphor"; +import { compare2 } from "@hpcc-js/util"; import { lightTheme, lightThemeV9 } from "../themes"; import { useUserTheme } from "../hooks/theme"; import { AutosizeHpccJSComponent } from "./HpccJSAdapter"; @@ -85,26 +86,6 @@ export class ReactWidget extends HTMLWidget { } } -export interface DockPanelBase { - title: string; - location?: "split-top" | "split-left" | "split-right" | "split-bottom" | "tab-before" | "tab-after"; - ref?: string; - closable?: boolean | IClosable; -} - -export interface DockPanelWidget extends DockPanelBase { - widget?: Widget; -} - -export interface DockPanelComponent extends DockPanelBase { - key: string; - component?: JSX.Element; -} - -function isDockPanelComponent(item: DockPanelWidget | DockPanelComponent): item is DockPanelComponent { - return !!(item as DockPanelComponent).component; -} - export interface DockPanelLayout { main: object; } @@ -146,11 +127,14 @@ export class ResetableDockPanel extends HPCCDockPanel { return formatLayout(this.layout()) ?? this._lastLayout ?? this._origLayout; } - render() { + render(callback?: (w: Widget) => void) { const retVal = super.render(); if (this._origLayout === undefined) { this._origLayout = formatLayout(this.layout()); } + if (callback) { + callback(this); + } return retVal; } @@ -160,36 +144,44 @@ export class ResetableDockPanel extends HPCCDockPanel { } } -export type DockPanelItems = (DockPanelWidget | DockPanelComponent)[]; +interface DockPanelItemProps { + key: string; + title: string; + location?: "split-top" | "split-left" | "split-right" | "split-bottom" | "tab-before" | "tab-after"; + relativeTo?: string; + closable?: boolean | IClosable; + children: JSX.Element; +} + +export const DockPanelItem: React.FunctionComponent = ({ + children +}) => { + return <>{children}; +}; interface DockPanelProps { - items?: DockPanelItems; layout?: object; + hideSingleTabs?: boolean; onDockPanelCreate?: (dockpanel: ResetableDockPanel) => void; + children?: React.ReactElement | React.ReactElement[]; } export const DockPanel: React.FunctionComponent = ({ - items = [], layout, - onDockPanelCreate + hideSingleTabs, + onDockPanelCreate, + children }) => { - + const items = React.useMemo(() => { + if (children === undefined) return []; + return Array.isArray(children) ? children : [children]; + }, [children]); + const [prevItems, setPrevItems] = React.useState[]>([]); const { theme, themeV9 } = useUserTheme(); - const [idx, setIdx] = React.useState<{ [key: string]: Widget }>({}); + const idx = useConst(() => new Map()); const dockPanel = useConst(() => { const retVal = new ResetableDockPanel(); - const idx: { [key: string]: Widget } = {}; - items.forEach(item => { - if (isDockPanelComponent(item)) { - idx[item.key] = new ReactWidget().id(item.key); - retVal.addWidget(idx[item.key], item.title, item.location, idx[item.ref], item.closable); - } else if (item.widget) { - idx[item.widget.id()] = item.widget; - retVal.addWidget(item.widget, item.title, item.location, idx[item.ref], item.closable); - } - }); - setIdx(idx); if (onDockPanelCreate) { setTimeout(() => { onDockPanelCreate(retVal); @@ -198,6 +190,35 @@ export const DockPanel: React.FunctionComponent = ({ return retVal; }); + React.useEffect(() => { + dockPanel?.hideSingleTabs(hideSingleTabs); + }, [dockPanel, hideSingleTabs]); + + React.useEffect(() => { + const diffs = compare2(prevItems, items, item => item.key); + diffs.exit.forEach(item => { + idx.delete(item.key); + dockPanel.removeWidget(idx.get(item.key)); + }); + diffs.enter.forEach(item => { + const reactWidget = new ReactWidget().id(item.key); + dockPanel.addWidget(reactWidget, item.props.title, item.props.location, idx.get(item.props.relativeTo), item.props.closable); + idx.set(item.key, reactWidget); + }); + [...diffs.enter, ...diffs.update].forEach(item => { + const reactWidget = idx.get(item.key); + if (reactWidget) { + reactWidget + .theme(theme) + .themeV9(themeV9) + .children(item.props.children) + ; + } + }); + dockPanel.render(); + setPrevItems(items); + }, [prevItems, dockPanel, idx, items, theme, themeV9]); + React.useEffect(() => { if (layout === undefined) { dockPanel?.resetLayout(); @@ -206,16 +227,5 @@ export const DockPanel: React.FunctionComponent = ({ } }, [dockPanel, layout]); - React.useEffect(() => { - items.filter(isDockPanelComponent).forEach(item => { - (idx[item.key] as ReactWidget) - .theme(theme) - .themeV9(themeV9) - .children(item.component) - .render() - ; - }); - }, [idx, items, theme, themeV9]); - return ; };