From d617f4ea38944869313004b310eac21e19072dc4 Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Fri, 27 Sep 2024 12:17:43 +0100 Subject: [PATCH 1/4] Split off 9.2.126 Signed-off-by: Gordon Smith --- helm/hpcc/Chart.yaml | 4 ++-- helm/hpcc/templates/_helpers.tpl | 2 +- version.cmake | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/helm/hpcc/Chart.yaml b/helm/hpcc/Chart.yaml index d7e6d459d41..1bcc94fea52 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.125-closedown0 +version: 9.2.127-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.125-closedown0 +appVersion: 9.2.127-closedown0 diff --git a/helm/hpcc/templates/_helpers.tpl b/helm/hpcc/templates/_helpers.tpl index 47a742b54e5..e6c559d0b6e 100644 --- a/helm/hpcc/templates/_helpers.tpl +++ b/helm/hpcc/templates/_helpers.tpl @@ -1361,7 +1361,7 @@ Pass in dict with .root, .visibility defined {{- end -}} {{- define "hpcc.generateHelmVersion" -}} -helmVersion: 9.2.125-closedown0 +helmVersion: 9.2.127-closedown0 {{- end -}} {{/* diff --git a/version.cmake b/version.cmake index c9691562ac2..210fd162a1c 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 125 ) +set ( HPCC_POINT 127 ) set ( HPCC_MATURITY "closedown" ) set ( HPCC_SEQUENCE 0 ) -set ( HPCC_TAG_TIMESTAMP "2024-09-23T15:31:51Z" ) +set ( HPCC_TAG_TIMESTAMP "2024-09-27T11:17:43Z" ) ### From 9e8dec64e3eea5de6db67a76d94a4aa9be611f75 Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Fri, 27 Sep 2024 12:20:37 +0100 Subject: [PATCH 2/4] Split off 9.4.100 Signed-off-by: Gordon Smith --- helm/hpcc/Chart.yaml | 4 ++-- helm/hpcc/templates/_helpers.tpl | 2 +- version.cmake | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/helm/hpcc/Chart.yaml b/helm/hpcc/Chart.yaml index 464f8bf1213..4897d30687c 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.4.99-closedown0 +version: 9.4.101-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.4.99-closedown0 +appVersion: 9.4.101-closedown0 diff --git a/helm/hpcc/templates/_helpers.tpl b/helm/hpcc/templates/_helpers.tpl index bfa9bf844b2..44cb04487ab 100644 --- a/helm/hpcc/templates/_helpers.tpl +++ b/helm/hpcc/templates/_helpers.tpl @@ -1473,7 +1473,7 @@ Pass in dict with .root, .visibility defined {{- end -}} {{- define "hpcc.generateHelmVersion" -}} -helmVersion: 9.4.99-closedown0 +helmVersion: 9.4.101-closedown0 {{- end -}} {{/* diff --git a/version.cmake b/version.cmake index 3c4d548c81b..61d3394d558 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 4 ) -set ( HPCC_POINT 99 ) +set ( HPCC_POINT 101 ) set ( HPCC_MATURITY "closedown" ) set ( HPCC_SEQUENCE 0 ) -set ( HPCC_TAG_TIMESTAMP "2024-09-23T15:30:37Z" ) +set ( HPCC_TAG_TIMESTAMP "2024-09-27T11:20:37Z" ) ### From c1dde948112841490c539d35e4ca5c6cafbd6e71 Mon Sep 17 00:00:00 2001 From: Gavin Halliday Date: Mon, 30 Sep 2024 16:21:11 +0100 Subject: [PATCH 3/4] HPCC-32750 Add page faults and context switches to the periodic logging Signed-off-by: Gavin Halliday --- system/jlib/jdebug.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/jlib/jdebug.cpp b/system/jlib/jdebug.cpp index 934067258c3..2ebb5587af9 100644 --- a/system/jlib/jdebug.cpp +++ b/system/jlib/jdebug.cpp @@ -1504,8 +1504,8 @@ void getMemStats(StringBuffer &out, unsigned &memused, unsigned &memtot) muval = 100; // ! - out.appendf("MU=%3u%% MAL=%" I64F "d MMP=%" I64F "d SBK=%" I64F "d TOT=%uK RAM=%uK SWP=%uK", - muval, total, mmapmem, sbrkmem, (unsigned)(virttot/1024), mu, su); + out.appendf("MU=%3u%% MAL=%" I64F "d MMP=%" I64F "d SBK=%" I64F "d TOT=%uK RAM=%uK SWP=%uK FLT=%" I64F "u CTX=%" I64F "u", + muval, total, mmapmem, sbrkmem, (unsigned)(virttot/1024), mu, su, processInfo.getMajorFaults(), processInfo.getNumContextSwitches()); #ifdef _USE_MALLOC_HOOK if (totalMem) out.appendf(" TM=%" I64F "d",totalMem); From 00d177a64528c707aeb9050b7c8fdbd7613e355c Mon Sep 17 00:00:00 2001 From: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> Date: Tue, 1 Oct 2024 16:47:11 -0400 Subject: [PATCH 4/4] HPCC-32747 ECL Watch v9 Log grids no pagination changes the ECL Watch v9 Logs grid to not use pagination, as Azure Log Analytics does not support it also, fixes an issue with the EndDate time having the wrong timezone Signed-off-by: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> --- esp/src/src-react/components/Logs.tsx | 106 ++++++++++++++------------ 1 file changed, 57 insertions(+), 49 deletions(-) diff --git a/esp/src/src-react/components/Logs.tsx b/esp/src/src-react/components/Logs.tsx index a04b845f6db..675bfca7b9b 100644 --- a/esp/src/src-react/components/Logs.tsx +++ b/esp/src/src-react/components/Logs.tsx @@ -1,18 +1,20 @@ import * as React from "react"; import { CommandBar, ContextualMenuItemType, ICommandBarItemProps } from "@fluentui/react"; -import { useConst } from "@fluentui/react-hooks"; -import { GetLogsExRequest, TargetAudience, LogType } from "@hpcc-js/comms"; -import { Level } from "@hpcc-js/util"; -import { CreateLogsQueryStore } from "src/ESPLog"; +import { GetLogsExRequest, LogaccessService, TargetAudience, LogType } from "@hpcc-js/comms"; +import { Level, scopedLogger } from "@hpcc-js/util"; import nlsHPCC from "src/nlsHPCC"; import { logColor, wuidToDate, wuidToTime } from "src/Utility"; import { HolyGrail } from "../layouts/HolyGrail"; import { pushParams } from "../util/history"; -import { FluentPagedGrid, FluentPagedFooter, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; import { Filter } from "./forms/Filter"; import { Fields } from "./forms/Fields"; import { ShortVerticalDivider } from "./Common"; +export const service = new LogaccessService({ baseUrl: "" }); + +const logger = scopedLogger("src-react/components/Logs.tsx"); + const eightHours = 8 * 60 * 60 * 1000; const startTimeOffset = 1 * 60 * 60 * 1000; const endTimeOffset = 23 * 60 * 60 * 1000; @@ -42,6 +44,14 @@ const FilterFields: Fields = { processid: { type: "string", label: nlsHPCC.ProcessID }, threadid: { type: "string", label: nlsHPCC.ThreadID }, message: { type: "string", label: nlsHPCC.Message }, + LogLineLimit: { + type: "dropdown", label: nlsHPCC.LogLineLimit, options: [ + { key: 100, text: "100" }, + { key: 250, text: "250" }, + { key: 500, text: "500" }, + { key: 1000, text: "1000" }, + ] + }, StartDate: { type: "datetime", label: nlsHPCC.FromDate }, EndDate: { type: "datetime", label: nlsHPCC.ToDate }, }; @@ -91,17 +101,37 @@ export const Logs: React.FunctionComponent = ({ const hasFilter = React.useMemo(() => Object.keys(filter).length > 0, [filter]); const [showFilter, setShowFilter] = React.useState(false); + const [data, setData] = React.useState([]); const { selection, setSelection, - pageNum, setPageNum, - pageSize, setPageSize, - total, setTotal, + setTotal, refreshTable } = useFluentStoreState({ page }); const now = React.useMemo(() => new Date(), []); // Grid --- - const gridStore = useConst(() => CreateLogsQueryStore()); + const columns = React.useMemo((): FluentColumns => { + return { + timestamp: { label: nlsHPCC.TimeStamp, width: 140, sortable: false, }, + message: { label: nlsHPCC.Message, width: 600, sortable: false, }, + components: { label: nlsHPCC.ContainerName, width: 150, sortable: false }, + audience: { label: nlsHPCC.Audience, width: 60, sortable: false, }, + class: { + label: nlsHPCC.Class, width: 40, sortable: false, + formatter: level => { + const colors = logColor(levelMap(level)); + const styles = { backgroundColor: colors.background, padding: "2px 6px", color: colors.foreground }; + return {level}; + } + }, + workunits: { label: nlsHPCC.JobID, width: 50, sortable: false, hidden: wuid !== undefined, }, + processid: { label: nlsHPCC.ProcessID, width: 75, sortable: false, }, + logid: { label: nlsHPCC.Sequence, width: 70, sortable: false, }, + threadid: { label: nlsHPCC.ThreadID, width: 60, sortable: false, }, + }; + }, [wuid]); + + const copyButtons = useCopyButtons(columns, selection, "logaccess"); const query = React.useMemo(() => { if (wuid !== undefined) { @@ -119,6 +149,9 @@ export const Logs: React.FunctionComponent = ({ //assign a reasonable default start date if one isn't set filter.StartDate = new Date(now.getTime() - eightHours); } + if (typeof filter.EndDate === "string") { + filter.EndDate = new Date(filter.EndDate + ":00Z"); + } if (!filter.EndDate) { filter.EndDate = new Date(now.getTime() + endTimeOffset); } @@ -126,34 +159,17 @@ export const Logs: React.FunctionComponent = ({ return formatQuery(filter); }, [filter, now, wuid]); - const columns = React.useMemo((): FluentColumns => { - return { - timestamp: { label: nlsHPCC.TimeStamp, width: 140, sortable: false, }, - message: { label: nlsHPCC.Message, sortable: false, }, - components: { label: nlsHPCC.ContainerName, width: 150, sortable: false }, - audience: { label: nlsHPCC.Audience, width: 60, sortable: false, }, - class: { - label: nlsHPCC.Class, width: 40, sortable: false, - formatter: level => { - const colors = logColor(levelMap(level)); - const styles = { backgroundColor: colors.background, padding: "2px 6px", color: colors.foreground }; - return {level}; - } - }, - workunits: { label: nlsHPCC.JobID, width: 50, sortable: false, hidden: wuid !== undefined, }, - processid: { label: nlsHPCC.ProcessID, width: 75, sortable: false, }, - logid: { label: nlsHPCC.Sequence, width: 70, sortable: false, }, - threadid: { label: nlsHPCC.ThreadID, width: 60, sortable: false, }, - }; - }, [wuid]); - - const copyButtons = useCopyButtons(columns, selection, "logaccess"); + const refreshData = React.useCallback(() => { + service.GetLogsEx(query as any).then(response => { + setData(response.lines); + }).catch(err => logger.error(err)); + }, [query]); // Command Bar --- 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: () => }, { @@ -162,7 +178,11 @@ export const Logs: React.FunctionComponent = ({ setShowFilter(true); } }, - ], [hasFilter, refreshTable]); + ], [hasFilter, refreshData]); + + React.useEffect(() => { + refreshData(); + }, [refreshData]); // Filter --- const filterFields: Fields = React.useMemo(() => { @@ -181,12 +201,9 @@ export const Logs: React.FunctionComponent = ({ header={} main={
- { @@ -196,18 +213,9 @@ export const Logs: React.FunctionComponent = ({ } }} refresh={refreshTable} - > + >
} - footer={} - footerStyles={{}} />; }; \ No newline at end of file