@galaxy-io/filament-ui 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/queries/metrics.d.ts +1 -1
- package/dist/api/queries/metrics.js +9 -18
- package/dist/components/connections/ConnectorNameChips.d.ts +8 -0
- package/dist/components/connections/ConnectorNameChips.js +34 -0
- package/dist/module/hooks.d.ts +2 -1
- package/dist/module/hooks.js +2 -1
- package/dist/module/routes.d.ts +2 -1
- package/dist/module/schemas.d.ts +3 -3
- package/dist/module/schemas.js +3 -3
- package/dist/pages/connections/components/drawer/ConnectionDrawer.js +4 -27
- package/dist/pages/observability/ObservabilityPage.js +64 -53
- package/dist/pages/observability/components/ObservabilityPageActions.js +34 -12
- package/dist/pages/observability/components/ObservabilityRefreshIntervalSelect.d.ts +8 -0
- package/dist/pages/observability/components/ObservabilityRefreshIntervalSelect.js +26 -0
- package/dist/pages/observability/components/ObservabilityTimeframeSwitcher.js +2 -1
- package/dist/pages/observability/components/metrics/ObservabilityMetricsWidget.js +10 -3
- package/dist/pages/observability/components/runs/ObservabilityRunsChart.js +8 -5
- package/dist/pages/observability/components/runs/ObservabilityRunsPastTable.js +13 -17
- package/dist/pages/observability/components/runs/ObservabilityRunsScheduledChart.js +2 -2
- package/dist/pages/observability/components/runs/ObservabilityRunsTableWidget.js +3 -0
- package/dist/pages/observability/components/runs/ObservabilityRunsUpcomingTable.js +10 -14
- package/dist/pages/observability/components/runs/constants.d.ts +0 -1
- package/dist/pages/observability/components/timeseries/ObservabilityTimeseriesChart.js +8 -5
- package/dist/pages/observability/constants.d.ts +8 -1
- package/dist/pages/observability/constants.js +24 -3
- package/dist/pages/observability/hooks/useObservabilityScrollTakeover.d.ts +4 -0
- package/dist/pages/observability/hooks/useObservabilityScrollTakeover.js +27 -0
- package/dist/pages/observability/types.d.ts +7 -0
- package/dist/pages/observability/types.js +9 -1
- package/dist/pages/observability/utils.d.ts +2 -0
- package/dist/pages/observability/utils.js +3 -1
- package/dist/pages/pipelines/PipelineCanvasPage.js +2 -1
- package/dist/pages/pipelines/canvas/PipelineCanvasControls.js +2 -5
- package/dist/pages/pipelines/canvas/PipelineCanvasFlow.js +10 -12
- package/dist/pages/pipelines/canvas/constants.d.ts +3 -1
- package/dist/pages/pipelines/canvas/constants.js +11 -1
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasSelection.d.ts +2 -3
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasSelection.js +6 -13
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasSelectionReveal.js +11 -12
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanel.js +8 -35
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelColumn.d.ts +3 -0
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelColumn.js +63 -0
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelHeader.d.ts +5 -3
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelHeader.js +21 -14
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelLayout.d.ts +3 -0
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelLayout.js +28 -0
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelOpenButton.d.ts +3 -0
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelOpenButton.js +18 -0
- package/dist/pages/pipelines/canvas/panel/activity/PipelineCanvasPanelActivity.d.ts +5 -1
- package/dist/pages/pipelines/canvas/panel/activity/PipelineCanvasPanelActivity.js +19 -19
- package/dist/pages/pipelines/canvas/panel/activity/PipelineCanvasPanelActivityHeader.d.ts +7 -0
- package/dist/pages/pipelines/canvas/panel/activity/PipelineCanvasPanelActivityHeader.js +41 -0
- package/dist/pages/pipelines/canvas/panel/activity/PipelineCanvasPanelActivityLine.js +2 -2
- package/dist/pages/pipelines/canvas/panel/activity/constants.d.ts +5 -0
- package/dist/pages/pipelines/canvas/panel/activity/constants.js +8 -0
- package/dist/pages/pipelines/canvas/panel/activity/hooks/usePipelineCanvasPanelActivityRunIds.d.ts +1 -0
- package/dist/pages/pipelines/canvas/panel/activity/hooks/usePipelineCanvasPanelActivityRunIds.js +14 -0
- package/dist/pages/pipelines/canvas/panel/activity/hooks/usePipelineCanvasPanelActivityStickToBottom.d.ts +2 -0
- package/dist/pages/pipelines/canvas/panel/activity/hooks/usePipelineCanvasPanelActivityStickToBottom.js +57 -0
- package/dist/pages/pipelines/canvas/panel/activity/utils.d.ts +1 -0
- package/dist/pages/pipelines/canvas/panel/activity/utils.js +6 -1
- package/dist/pages/pipelines/canvas/panel/constants.d.ts +13 -5
- package/dist/pages/pipelines/canvas/panel/constants.js +7 -1
- package/dist/pages/pipelines/canvas/panel/overview/node/PipelineCanvasPanelNodeDetail.js +7 -2
- package/dist/pages/pipelines/canvas/panel/overview/resource/PipelineCanvasPanelResourceDetail.js +1 -0
- package/dist/pages/pipelines/canvas/panel/overview/resource/PipelineCanvasPanelResourceSection.js +1 -1
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutes.js +4 -5
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesDraftRow.js +7 -3
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesList.js +1 -0
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesToolbar.js +3 -1
- package/dist/pages/pipelines/canvas/routes/constants.d.ts +1 -0
- package/dist/pages/pipelines/canvas/utils.d.ts +0 -3
- package/dist/pages/pipelines/canvas/utils.js +1 -11
- package/dist/pages/pipelines/components/create/rows.js +8 -4
- package/dist/pages/pipelines/components/header/PipelinePageEditActions.js +1 -2
- package/dist/pages/pipelines/components/header/PipelinePageRunActions.js +1 -7
- package/dist/pages/pipelines/components/resource/utils.d.ts +6 -0
- package/dist/pages/pipelines/components/resource/utils.js +2 -1
- package/dist/styles.css +8 -6
- package/package.json +3 -3
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelTabHeader.d.ts +0 -3
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelTabHeader.js +0 -35
- package/dist/pages/pipelines/canvas/panel/types.d.ts +0 -4
- package/dist/pages/pipelines/canvas/panel/types.js +0 -8
|
@@ -8,4 +8,4 @@ export declare const useQueryAggregateQuery: ({ input, options, }?: {
|
|
|
8
8
|
input?: QueryAggregateRequest;
|
|
9
9
|
options?: UseQueryOptions<typeof MetricsService.method.queryAggregate.output, QueryAggregateResponse>;
|
|
10
10
|
}) => import('@tanstack/react-query').UseQueryResult<QueryAggregateResponse, import('@connectrpc/connect').ConnectError>;
|
|
11
|
-
export declare const useRefreshObservabilityQueries: () => () => void
|
|
11
|
+
export declare const useRefreshObservabilityQueries: () => () => Promise<void[]>;
|
|
@@ -6,7 +6,6 @@ import { useCallback } from "react";
|
|
|
6
6
|
import { useQueryClient } from "@tanstack/react-query";
|
|
7
7
|
import { createConnectQueryKey, useQuery, useTransport } from "@connectrpc/connect-query";
|
|
8
8
|
//#region src/api/queries/metrics.ts
|
|
9
|
-
var METRICS_REFETCH_INTERVAL = 3e4;
|
|
10
9
|
var createQueryTimeseriesQueryKey = (input, transport) => {
|
|
11
10
|
return createConnectQueryKey({
|
|
12
11
|
schema: MetricsService.method.queryTimeseries,
|
|
@@ -16,10 +15,7 @@ var createQueryTimeseriesQueryKey = (input, transport) => {
|
|
|
16
15
|
});
|
|
17
16
|
};
|
|
18
17
|
var useQueryTimeseriesQuery = ({ input, options = {} } = {}) => {
|
|
19
|
-
return useQuery(MetricsService.method.queryTimeseries, input,
|
|
20
|
-
refetchInterval: METRICS_REFETCH_INTERVAL,
|
|
21
|
-
...options
|
|
22
|
-
});
|
|
18
|
+
return useQuery(MetricsService.method.queryTimeseries, input, options);
|
|
23
19
|
};
|
|
24
20
|
var createQueryAggregateQueryKey = (input, transport) => {
|
|
25
21
|
return createConnectQueryKey({
|
|
@@ -30,23 +26,18 @@ var createQueryAggregateQueryKey = (input, transport) => {
|
|
|
30
26
|
});
|
|
31
27
|
};
|
|
32
28
|
var useQueryAggregateQuery = ({ input, options = {} } = {}) => {
|
|
33
|
-
return useQuery(MetricsService.method.queryAggregate, input,
|
|
34
|
-
refetchInterval: METRICS_REFETCH_INTERVAL,
|
|
35
|
-
...options
|
|
36
|
-
});
|
|
29
|
+
return useQuery(MetricsService.method.queryAggregate, input, options);
|
|
37
30
|
};
|
|
38
31
|
var useRefreshObservabilityQueries = () => {
|
|
39
32
|
const queryClient = useQueryClient();
|
|
40
33
|
const transport = useTransport();
|
|
41
|
-
return useCallback(() =>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
]) queryClient.invalidateQueries({ queryKey });
|
|
49
|
-
}, [queryClient, transport]);
|
|
34
|
+
return useCallback(() => Promise.all([
|
|
35
|
+
createQueryTimeseriesQueryKey(void 0, transport),
|
|
36
|
+
createQueryAggregateQueryKey(void 0, transport),
|
|
37
|
+
createListRunsQueryKey(void 0, transport),
|
|
38
|
+
createListConnectionsQueryKey(void 0, transport),
|
|
39
|
+
createListPipelinesQueryKey(void 0, transport)
|
|
40
|
+
].map((queryKey) => queryClient.invalidateQueries({ queryKey }))), [queryClient, transport]);
|
|
50
41
|
};
|
|
51
42
|
//#endregion
|
|
52
43
|
export { useQueryAggregateQuery, useQueryTimeseriesQuery, useRefreshObservabilityQueries };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { Connection } from '../../gen/ingestion/v1/connections_pb';
|
|
3
|
+
interface ConnectorNameChipsProps {
|
|
4
|
+
connector: Connection["connector"];
|
|
5
|
+
kind: Connection["kind"];
|
|
6
|
+
}
|
|
7
|
+
declare const ConnectorNameChips: FC<ConnectorNameChipsProps>;
|
|
8
|
+
export default ConnectorNameChips;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { GetConnectorRequestSchema } from "../../gen/ingestion/v1/connectors_pb.js";
|
|
2
|
+
import { formatConnectorName, getConnectorFamilyName, getConnectorVariantName } from "./utils.js";
|
|
3
|
+
import { useGetConnectorQuery } from "../../api/queries/connectors.js";
|
|
4
|
+
import { create } from "@bufbuild/protobuf";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import Flex, { AlignItems } from "@galaxy-io/dls/layout/Flex";
|
|
7
|
+
import Chip, { ChipSize, ChipVariant } from "@galaxy-io/dls/chips/Chip";
|
|
8
|
+
//#region src/components/connections/ConnectorNameChips.tsx
|
|
9
|
+
var ConnectorNameChips = ({ connector, kind }) => {
|
|
10
|
+
const { data } = useGetConnectorQuery({
|
|
11
|
+
input: create(GetConnectorRequestSchema, {
|
|
12
|
+
connector,
|
|
13
|
+
kind
|
|
14
|
+
}),
|
|
15
|
+
options: { enabled: connector !== "" }
|
|
16
|
+
});
|
|
17
|
+
const variant = getConnectorVariantName(connector);
|
|
18
|
+
return /* @__PURE__ */ jsxs(Flex, {
|
|
19
|
+
alignItems: AlignItems.CENTER,
|
|
20
|
+
gap: 8,
|
|
21
|
+
minWidth: 0,
|
|
22
|
+
children: [/* @__PURE__ */ jsx(Chip, {
|
|
23
|
+
label: data?.connector ? formatConnectorName(data.connector) : getConnectorFamilyName(connector),
|
|
24
|
+
variant: ChipVariant.SECONDARY,
|
|
25
|
+
size: ChipSize.SMALL
|
|
26
|
+
}), variant && /* @__PURE__ */ jsx(Chip, {
|
|
27
|
+
label: variant,
|
|
28
|
+
variant: ChipVariant.SECONDARY,
|
|
29
|
+
size: ChipSize.SMALL
|
|
30
|
+
})]
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { ConnectorNameChips as default };
|
package/dist/module/hooks.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export declare const useListSearch: () => {
|
|
|
34
34
|
};
|
|
35
35
|
export declare const useObservabilitySearch: () => {
|
|
36
36
|
timeframe: import('../pages/observability/types').ObservabilityTimeframe;
|
|
37
|
+
refreshInterval: import('../pages/observability/types').ObservabilityRefreshInterval;
|
|
37
38
|
runs: import('../pages/observability/types').ObservabilityRunsView;
|
|
38
39
|
statuses: import('../gen/ingestion/v1/runs_pb').RunStatus[];
|
|
39
40
|
throughput?: import('../pages/observability/types').ObservabilityThroughputView | undefined;
|
|
@@ -58,7 +59,7 @@ export declare const usePipelineCanvasSearch: () => {
|
|
|
58
59
|
node?: string | undefined;
|
|
59
60
|
resource?: string | undefined;
|
|
60
61
|
showPanel?: boolean | undefined;
|
|
61
|
-
|
|
62
|
+
showActivity?: boolean | undefined;
|
|
62
63
|
view?: import('../pages/pipelines/canvas/types').PipelineCanvasView | undefined;
|
|
63
64
|
sinks?: string[] | undefined;
|
|
64
65
|
};
|
package/dist/module/hooks.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OBSERVABILITY_RUNS_DEFAULT_STATUSES } from "../pages/observability/components/runs/constants.js";
|
|
2
|
-
import { OBSERVABILITY_DEFAULT_RUNS_VIEW, OBSERVABILITY_DEFAULT_TIMEFRAME } from "../pages/observability/constants.js";
|
|
2
|
+
import { OBSERVABILITY_DEFAULT_REFRESH_INTERVAL, OBSERVABILITY_DEFAULT_RUNS_VIEW, OBSERVABILITY_DEFAULT_TIMEFRAME } from "../pages/observability/constants.js";
|
|
3
3
|
import { connectionsSearchSchema, filamentLayoutSearchSchema, listSearchParamsSchema, observabilitySearchSchema, pipelineCanvasSearchSchema, pipelineHistorySearchSchema, pipelineParamsSchema, pipelineSearchSchema, pipelinesSearchSchema } from "./schemas.js";
|
|
4
4
|
import { useCallback } from "react";
|
|
5
5
|
import { useMatchRoute, useMatches, useNavigate, useParams, useSearch } from "@tanstack/react-router";
|
|
@@ -56,6 +56,7 @@ var useObservabilitySearch = () => useSearch({
|
|
|
56
56
|
return {
|
|
57
57
|
...parsed,
|
|
58
58
|
timeframe: parsed.timeframe ?? OBSERVABILITY_DEFAULT_TIMEFRAME,
|
|
59
|
+
refreshInterval: parsed.refreshInterval ?? OBSERVABILITY_DEFAULT_REFRESH_INTERVAL,
|
|
59
60
|
runs: parsed.runs ?? OBSERVABILITY_DEFAULT_RUNS_VIEW,
|
|
60
61
|
statuses: parsed.statuses ?? OBSERVABILITY_RUNS_DEFAULT_STATUSES
|
|
61
62
|
};
|
package/dist/module/routes.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export declare const filamentNotFoundRouteOptions: FilamentRouteComponents;
|
|
|
20
20
|
export declare const observabilityRouteOptions: FilamentRouteComponents & {
|
|
21
21
|
validateSearch: import('zod').ZodObject<{
|
|
22
22
|
timeframe: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodEnum<typeof import('../pages/observability/types').ObservabilityTimeframe>>>;
|
|
23
|
+
refreshInterval: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodEnum<typeof import('../pages/observability/types').ObservabilityRefreshInterval>>>;
|
|
23
24
|
runs: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodEnum<typeof import('../pages/observability/types').ObservabilityRunsView>>>;
|
|
24
25
|
throughput: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodEnum<typeof import('../pages/observability/types').ObservabilityThroughputView>>>;
|
|
25
26
|
throughputPivot: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodEnum<typeof import('../gen/metrics/v1/metrics_pb').MetricDimension>>>;
|
|
@@ -59,7 +60,7 @@ export declare const pipelineCanvasRouteOptions: FilamentRouteComponents & {
|
|
|
59
60
|
node: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodString>>;
|
|
60
61
|
resource: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodString>>;
|
|
61
62
|
showPanel: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodBoolean>>;
|
|
62
|
-
|
|
63
|
+
showActivity: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodBoolean>>;
|
|
63
64
|
view: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodEnum<typeof import('../pages/pipelines/canvas/types').PipelineCanvasView>>>;
|
|
64
65
|
sinks: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodArray<import('zod').ZodString>>>;
|
|
65
66
|
}, import('zod/v4/core').$strip>;
|
package/dist/module/schemas.d.ts
CHANGED
|
@@ -3,8 +3,7 @@ import { ConnectorKind } from '../gen/ingestion/v1/common_pb';
|
|
|
3
3
|
import { RunStatus } from '../gen/ingestion/v1/runs_pb';
|
|
4
4
|
import { SortBy, SortOrder } from '../gen/ingestion/v1/sorting_pb';
|
|
5
5
|
import { MetricDimension } from '../gen/metrics/v1/metrics_pb';
|
|
6
|
-
import { ObservabilityRunsView, ObservabilityThroughputView, ObservabilityTimeframe, ObservabilityUsageView } from '../pages/observability/types';
|
|
7
|
-
import { PipelineCanvasPanelTab } from '../pages/pipelines/canvas/panel/types';
|
|
6
|
+
import { ObservabilityRefreshInterval, ObservabilityRunsView, ObservabilityThroughputView, ObservabilityTimeframe, ObservabilityUsageView } from '../pages/observability/types';
|
|
8
7
|
import { PipelineCanvasView } from '../pages/pipelines/canvas/types';
|
|
9
8
|
import { SettingsTeamView } from '../pages/settings/types';
|
|
10
9
|
import { Flow } from './types';
|
|
@@ -29,6 +28,7 @@ export declare const teamSearchSchema: z.ZodObject<{
|
|
|
29
28
|
export type TeamSearch = z.infer<typeof teamSearchSchema>;
|
|
30
29
|
export declare const observabilitySearchSchema: z.ZodObject<{
|
|
31
30
|
timeframe: z.ZodCatch<z.ZodOptional<z.ZodEnum<typeof ObservabilityTimeframe>>>;
|
|
31
|
+
refreshInterval: z.ZodCatch<z.ZodOptional<z.ZodEnum<typeof ObservabilityRefreshInterval>>>;
|
|
32
32
|
runs: z.ZodCatch<z.ZodOptional<z.ZodEnum<typeof ObservabilityRunsView>>>;
|
|
33
33
|
throughput: z.ZodCatch<z.ZodOptional<z.ZodEnum<typeof ObservabilityThroughputView>>>;
|
|
34
34
|
throughputPivot: z.ZodCatch<z.ZodOptional<z.ZodEnum<typeof MetricDimension>>>;
|
|
@@ -60,7 +60,7 @@ export declare const pipelineCanvasSearchSchema: z.ZodObject<{
|
|
|
60
60
|
node: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
61
61
|
resource: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
62
62
|
showPanel: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
63
|
-
|
|
63
|
+
showActivity: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
64
64
|
view: z.ZodCatch<z.ZodOptional<z.ZodEnum<typeof PipelineCanvasView>>>;
|
|
65
65
|
sinks: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
66
66
|
}, z.core.$strip>;
|
package/dist/module/schemas.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ConnectorKind } from "../gen/ingestion/v1/common_pb.js";
|
|
2
2
|
import { SortBy, SortOrder } from "../gen/ingestion/v1/sorting_pb.js";
|
|
3
3
|
import { RunStatus } from "../gen/ingestion/v1/runs_pb.js";
|
|
4
|
-
import { ObservabilityRunsView, ObservabilityThroughputView, ObservabilityTimeframe, ObservabilityUsageView } from "../pages/observability/types.js";
|
|
4
|
+
import { ObservabilityRefreshInterval, ObservabilityRunsView, ObservabilityThroughputView, ObservabilityTimeframe, ObservabilityUsageView } from "../pages/observability/types.js";
|
|
5
5
|
import { MetricDimension } from "../gen/metrics/v1/metrics_pb.js";
|
|
6
|
-
import { PipelineCanvasPanelTab } from "../pages/pipelines/canvas/panel/types.js";
|
|
7
6
|
import { PipelineCanvasView } from "../pages/pipelines/canvas/types.js";
|
|
8
7
|
import { SettingsTeamView } from "../pages/settings/types.js";
|
|
9
8
|
import { Flow } from "./types.js";
|
|
@@ -27,6 +26,7 @@ z.object({
|
|
|
27
26
|
});
|
|
28
27
|
var observabilitySearchSchema = z.object({
|
|
29
28
|
timeframe: z.enum(ObservabilityTimeframe).optional().catch(void 0),
|
|
29
|
+
refreshInterval: z.enum(ObservabilityRefreshInterval).optional().catch(void 0),
|
|
30
30
|
runs: z.enum(ObservabilityRunsView).optional().catch(void 0),
|
|
31
31
|
throughput: z.enum(ObservabilityThroughputView).optional().catch(void 0),
|
|
32
32
|
throughputPivot: z.enum(MetricDimension).optional().catch(void 0),
|
|
@@ -44,7 +44,7 @@ var pipelineCanvasSearchSchema = z.object({
|
|
|
44
44
|
node: z.string().optional().catch(void 0),
|
|
45
45
|
resource: z.string().optional().catch(void 0),
|
|
46
46
|
showPanel: z.boolean().optional().catch(void 0),
|
|
47
|
-
|
|
47
|
+
showActivity: z.boolean().optional().catch(void 0),
|
|
48
48
|
view: z.enum(PipelineCanvasView).optional().catch(void 0),
|
|
49
49
|
sinks: z.array(z.string()).optional().catch(void 0)
|
|
50
50
|
});
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { IS_DEBUG } from "../../../../constants.js";
|
|
2
|
-
import { GetConnectorRequestSchema } from "../../../../gen/ingestion/v1/connectors_pb.js";
|
|
3
|
-
import { formatConnectorName, getConnectorFamilyName, getConnectorVariantName } from "../../../../components/connections/utils.js";
|
|
4
|
-
import { useGetConnectorQuery } from "../../../../api/queries/connectors.js";
|
|
5
2
|
import ConnectionKindChip from "../../../../components/connections/ConnectionKindChip.js";
|
|
6
3
|
import { isNotFoundError } from "../../../../utils/errors.js";
|
|
7
4
|
import { createGetConnectionInput, useGetConnectionQuery } from "../../../../api/queries/connections.js";
|
|
8
5
|
import { useOverlaySession } from "../../../../hooks/useOverlaySession.js";
|
|
6
|
+
import ConnectorNameChips from "../../../../components/connections/ConnectorNameChips.js";
|
|
9
7
|
import KeyValueList from "../../../../components/KeyValueList.js";
|
|
10
8
|
import KeyValueListRow from "../../../../components/KeyValueListRow.js";
|
|
11
9
|
import ConnectionDrawerActions from "./ConnectionDrawerActions.js";
|
|
@@ -16,11 +14,9 @@ import ConnectionDrawerPipelines from "./ConnectionDrawerPipelines.js";
|
|
|
16
14
|
import { KeyIcon, LinkBreakIcon, SlidersIcon } from "@phosphor-icons/react";
|
|
17
15
|
import Button, { ButtonSize, ButtonVariant } from "@galaxy-io/dls/buttons/Button";
|
|
18
16
|
import ErrorLayout from "@galaxy-io/dls/layout/ErrorLayout";
|
|
19
|
-
import { create } from "@bufbuild/protobuf";
|
|
20
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
18
|
import PendingLayout from "@galaxy-io/dls/layout/PendingLayout";
|
|
22
19
|
import Flex, { AlignItems, FlexDirection } from "@galaxy-io/dls/layout/Flex";
|
|
23
|
-
import Chip, { ChipSize, ChipVariant } from "@galaxy-io/dls/chips/Chip";
|
|
24
20
|
import Text, { TextSize, TextVariant } from "@galaxy-io/dls/text/Text";
|
|
25
21
|
import { FontFamily } from "@galaxy-io/dls/theme/enums";
|
|
26
22
|
import CopyButton from "@galaxy-io/dls/buttons/CopyButton";
|
|
@@ -36,15 +32,6 @@ var ConnectionDrawer = ({ connectionId, isOpen, onClose }) => {
|
|
|
36
32
|
}
|
|
37
33
|
});
|
|
38
34
|
const connection = data?.connection;
|
|
39
|
-
const { data: connectorData } = useGetConnectorQuery({
|
|
40
|
-
input: create(GetConnectorRequestSchema, {
|
|
41
|
-
connector: connection?.connector ?? "",
|
|
42
|
-
kind: connection?.kind
|
|
43
|
-
}),
|
|
44
|
-
options: { enabled: !!connection }
|
|
45
|
-
});
|
|
46
|
-
const connector = connectorData?.connector;
|
|
47
|
-
const connectorVariant = connection && getConnectorVariantName(connection.connector);
|
|
48
35
|
const renderContent = () => {
|
|
49
36
|
if (isError) {
|
|
50
37
|
const isNotFound = isNotFoundError(error);
|
|
@@ -94,19 +81,9 @@ var ConnectionDrawer = ({ connectionId, isOpen, onClose }) => {
|
|
|
94
81
|
}),
|
|
95
82
|
/* @__PURE__ */ jsx(KeyValueListRow, {
|
|
96
83
|
label: "Connector",
|
|
97
|
-
value: /* @__PURE__ */
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
minWidth: 0,
|
|
101
|
-
children: [/* @__PURE__ */ jsx(Chip, {
|
|
102
|
-
label: connector ? formatConnectorName(connector) : getConnectorFamilyName(connection.connector),
|
|
103
|
-
variant: ChipVariant.SECONDARY,
|
|
104
|
-
size: ChipSize.SMALL
|
|
105
|
-
}), connectorVariant && /* @__PURE__ */ jsx(Chip, {
|
|
106
|
-
label: connectorVariant,
|
|
107
|
-
variant: ChipVariant.SECONDARY,
|
|
108
|
-
size: ChipSize.SMALL
|
|
109
|
-
})]
|
|
84
|
+
value: /* @__PURE__ */ jsx(ConnectorNameChips, {
|
|
85
|
+
connector: connection.connector,
|
|
86
|
+
kind: connection.kind
|
|
110
87
|
})
|
|
111
88
|
}),
|
|
112
89
|
/* @__PURE__ */ jsx(KeyValueListRow, {
|
|
@@ -9,6 +9,8 @@ import { useObservabilitySetup } from "./hooks/useObservabilitySetup.js";
|
|
|
9
9
|
import ObservabilitySetupChecklist from "./components/setup/ObservabilitySetupChecklist.js";
|
|
10
10
|
import { OBSERVABILITY_THROUGHPUT_VIEWS, OBSERVABILITY_THROUGHPUT_VIEW_TO_CONFIG_MAP, OBSERVABILITY_USAGE_VIEWS, OBSERVABILITY_USAGE_VIEW_TO_CONFIG_MAP } from "./components/timeseries/constants.js";
|
|
11
11
|
import ObservabilityTimeseriesWidget from "./components/timeseries/ObservabilityTimeseriesWidget.js";
|
|
12
|
+
import { useObservabilityScrollTakeover } from "./hooks/useObservabilityScrollTakeover.js";
|
|
13
|
+
/* empty css */
|
|
12
14
|
import { CpuIcon, GaugeIcon } from "@phosphor-icons/react";
|
|
13
15
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
16
|
import Flex, { AlignItems, FlexDirection, FlexWrap } from "@galaxy-io/dls/layout/Flex";
|
|
@@ -16,9 +18,13 @@ import FlexItem from "@galaxy-io/dls/layout/FlexItem";
|
|
|
16
18
|
import ScrollArea from "@galaxy-io/dls/layout/ScrollArea";
|
|
17
19
|
import ChartGroupProvider from "@galaxy-io/dls/charts/ChartGroupProvider";
|
|
18
20
|
import PageLayout from "@galaxy-io/dls/layout/PageLayout";
|
|
21
|
+
import { HAIRLINE_WIDTH } from "@galaxy-io/dls/styles/mixins";
|
|
19
22
|
//#region src/pages/observability/ObservabilityPage.tsx
|
|
23
|
+
var OBSERVABILITY_PAGE_SCROLL_CSS = "filament-ObservabilityPage-OBSERVABILITY_PAGE_SCROLL_CSS-o1p5bblp";
|
|
24
|
+
var OBSERVABILITY_RUNS_TAKEOVER_HEIGHT = `calc(100cqh + ${HAIRLINE_WIDTH})`;
|
|
20
25
|
var ObservabilityPage = () => {
|
|
21
26
|
const { isComplete } = useObservabilitySetup();
|
|
27
|
+
const { scrollRef, takeoverRef } = useObservabilityScrollTakeover(isComplete);
|
|
22
28
|
if (!isComplete) return /* @__PURE__ */ jsx(PageLayout, {
|
|
23
29
|
header: "Observability",
|
|
24
30
|
children: /* @__PURE__ */ jsx(ObservabilitySetupChecklist, {})
|
|
@@ -28,59 +34,64 @@ var ObservabilityPage = () => {
|
|
|
28
34
|
actions: /* @__PURE__ */ jsx(ObservabilityPageActions, {}),
|
|
29
35
|
children: /* @__PURE__ */ jsx(ChartGroupProvider, {
|
|
30
36
|
shouldShareTooltip: true,
|
|
31
|
-
children: /* @__PURE__ */
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
37
|
+
children: /* @__PURE__ */ jsxs(ScrollArea, {
|
|
38
|
+
ref: scrollRef,
|
|
39
|
+
className: OBSERVABILITY_PAGE_SCROLL_CSS,
|
|
40
|
+
children: [/* @__PURE__ */ jsxs(Flex, {
|
|
41
|
+
alignItems: AlignItems.START,
|
|
42
|
+
direction: FlexDirection.COLUMN,
|
|
43
|
+
padding: 16,
|
|
44
|
+
gap: 12,
|
|
45
|
+
fillWidth: true,
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ jsx(ObservabilityMetricsWidget, {}),
|
|
48
|
+
/* @__PURE__ */ jsxs(Flex, {
|
|
49
|
+
gap: 12,
|
|
50
|
+
alignItems: AlignItems.STRETCH,
|
|
51
|
+
wrap: FlexWrap.WRAP,
|
|
52
|
+
fillWidth: true,
|
|
53
|
+
children: [/* @__PURE__ */ jsx(FlexItem, {
|
|
54
|
+
grow: 1,
|
|
55
|
+
basis: OBSERVABILITY_WIDGET_BASIS,
|
|
56
|
+
minWidth: 0,
|
|
57
|
+
children: /* @__PURE__ */ jsx(ObservabilityTimeseriesWidget, {
|
|
58
|
+
header: "Throughput",
|
|
59
|
+
icon: GaugeIcon,
|
|
60
|
+
isStacked: true,
|
|
61
|
+
views: OBSERVABILITY_THROUGHPUT_VIEWS,
|
|
62
|
+
viewToConfigMap: OBSERVABILITY_THROUGHPUT_VIEW_TO_CONFIG_MAP,
|
|
63
|
+
defaultView: ObservabilityThroughputView.RECORDS,
|
|
64
|
+
viewSearchKey: "throughput",
|
|
65
|
+
pivotSearchKey: "throughputPivot"
|
|
66
|
+
})
|
|
67
|
+
}), /* @__PURE__ */ jsx(FlexItem, {
|
|
68
|
+
grow: 1,
|
|
69
|
+
basis: OBSERVABILITY_WIDGET_BASIS,
|
|
70
|
+
minWidth: 0,
|
|
71
|
+
children: /* @__PURE__ */ jsx(ObservabilityTimeseriesWidget, {
|
|
72
|
+
header: "Usage",
|
|
73
|
+
icon: CpuIcon,
|
|
74
|
+
views: OBSERVABILITY_USAGE_VIEWS,
|
|
75
|
+
viewToConfigMap: OBSERVABILITY_USAGE_VIEW_TO_CONFIG_MAP,
|
|
76
|
+
defaultView: ObservabilityUsageView.CPU,
|
|
77
|
+
defaultPivot: MetricDimension.PIPELINE_ID,
|
|
78
|
+
viewSearchKey: "usage",
|
|
79
|
+
pivotSearchKey: "usagePivot"
|
|
80
|
+
})
|
|
81
|
+
})]
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ jsx(FlexItem, {
|
|
84
|
+
fillWidth: true,
|
|
85
|
+
children: /* @__PURE__ */ jsx(ObservabilityRunsChartWidget, {})
|
|
86
|
+
})
|
|
87
|
+
]
|
|
88
|
+
}), /* @__PURE__ */ jsx(Flex, {
|
|
89
|
+
ref: takeoverRef,
|
|
90
|
+
direction: FlexDirection.COLUMN,
|
|
91
|
+
height: OBSERVABILITY_RUNS_TAKEOVER_HEIGHT,
|
|
92
|
+
children: /* @__PURE__ */ jsx(ObservabilityRunsTableWidget, {})
|
|
93
|
+
})]
|
|
94
|
+
})
|
|
84
95
|
})
|
|
85
96
|
});
|
|
86
97
|
};
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { useFilamentSearchUpdate, useObservabilitySearch } from "../../../module/hooks.js";
|
|
2
2
|
import { useRefreshObservabilityQueries } from "../../../api/queries/metrics.js";
|
|
3
|
+
import ObservabilityRefreshIntervalSelect from "./ObservabilityRefreshIntervalSelect.js";
|
|
3
4
|
import ObservabilityTimeframeSwitcher from "./ObservabilityTimeframeSwitcher.js";
|
|
4
5
|
import { ArrowsClockwiseIcon } from "@phosphor-icons/react";
|
|
5
6
|
import Button, { ButtonVariant } from "@galaxy-io/dls/buttons/Button";
|
|
6
|
-
import {
|
|
7
|
+
import { useState } from "react";
|
|
8
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
9
|
//#region src/pages/observability/components/ObservabilityPageActions.tsx
|
|
8
10
|
var ObservabilityPageActions = () => {
|
|
9
11
|
const updateSearch = useFilamentSearchUpdate();
|
|
10
12
|
const refresh = useRefreshObservabilityQueries();
|
|
11
|
-
const
|
|
13
|
+
const [isRefreshing, setIsRefreshing] = useState(false);
|
|
14
|
+
const { timeframe, refreshInterval } = useObservabilitySearch();
|
|
12
15
|
const handleTimeframeChange = (timeframe) => {
|
|
13
16
|
updateSearch((prev) => ({
|
|
14
17
|
...prev,
|
|
@@ -17,16 +20,35 @@ var ObservabilityPageActions = () => {
|
|
|
17
20
|
runsStatus: void 0
|
|
18
21
|
}));
|
|
19
22
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
const handleRefreshIntervalChange = (refreshInterval) => {
|
|
24
|
+
updateSearch((prev) => ({
|
|
25
|
+
...prev,
|
|
26
|
+
refreshInterval
|
|
27
|
+
}));
|
|
28
|
+
};
|
|
29
|
+
const handleRefresh = async () => {
|
|
30
|
+
setIsRefreshing(true);
|
|
31
|
+
await refresh();
|
|
32
|
+
setIsRefreshing(false);
|
|
33
|
+
};
|
|
34
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
35
|
+
/* @__PURE__ */ jsx(ObservabilityTimeframeSwitcher, {
|
|
36
|
+
value: timeframe,
|
|
37
|
+
onChange: handleTimeframeChange
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ jsx(ObservabilityRefreshIntervalSelect, {
|
|
40
|
+
value: refreshInterval,
|
|
41
|
+
onChange: handleRefreshIntervalChange
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ jsx(Button, {
|
|
44
|
+
icon: ArrowsClockwiseIcon,
|
|
45
|
+
variant: ButtonVariant.SECONDARY,
|
|
46
|
+
ariaLabel: "Refresh",
|
|
47
|
+
tooltip: "Refresh",
|
|
48
|
+
isLoading: isRefreshing,
|
|
49
|
+
onClick: handleRefresh
|
|
50
|
+
})
|
|
51
|
+
] });
|
|
30
52
|
};
|
|
31
53
|
//#endregion
|
|
32
54
|
export { ObservabilityPageActions as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ObservabilityRefreshInterval } from '../types';
|
|
3
|
+
interface ObservabilityRefreshIntervalSelectProps {
|
|
4
|
+
value: ObservabilityRefreshInterval;
|
|
5
|
+
onChange: (refreshInterval: ObservabilityRefreshInterval) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const ObservabilityRefreshIntervalSelect: FC<ObservabilityRefreshIntervalSelectProps>;
|
|
8
|
+
export default ObservabilityRefreshIntervalSelect;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ObservabilityRefreshInterval } from "../types.js";
|
|
2
|
+
import { OBSERVABILITY_REFRESH_INTERVAL_TO_LABEL_MAP } from "../constants.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import SelectInput from "@galaxy-io/dls/inputs/SelectInput";
|
|
5
|
+
import Box from "@galaxy-io/dls/layout/Box";
|
|
6
|
+
//#region src/pages/observability/components/ObservabilityRefreshIntervalSelect.tsx
|
|
7
|
+
var ObservabilityRefreshIntervalSelect = ({ value, onChange }) => {
|
|
8
|
+
const options = Object.values(ObservabilityRefreshInterval).map((refreshInterval) => ({
|
|
9
|
+
id: refreshInterval,
|
|
10
|
+
label: OBSERVABILITY_REFRESH_INTERVAL_TO_LABEL_MAP[refreshInterval]
|
|
11
|
+
}));
|
|
12
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
13
|
+
width: 160,
|
|
14
|
+
children: /* @__PURE__ */ jsx(SelectInput, {
|
|
15
|
+
fillWidth: true,
|
|
16
|
+
options,
|
|
17
|
+
value,
|
|
18
|
+
onChange: (refreshInterval) => {
|
|
19
|
+
if (refreshInterval !== null) onChange(refreshInterval);
|
|
20
|
+
},
|
|
21
|
+
ariaLabel: "Refresh interval"
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { ObservabilityRefreshIntervalSelect as default };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ObservabilityTimeframe } from "../types.js";
|
|
2
|
+
import { OBSERVABILITY_TIMEFRAME_TO_LABEL_MAP } from "../constants.js";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import ToggleInput, { ToggleInputVariant } from "@galaxy-io/dls/inputs/ToggleInput";
|
|
4
5
|
//#region src/pages/observability/components/ObservabilityTimeframeSwitcher.tsx
|
|
5
6
|
var ObservabilityTimeframeSwitcher = ({ value, onChange }) => {
|
|
6
7
|
const items = Object.values(ObservabilityTimeframe).map((timeframe) => ({
|
|
7
8
|
id: timeframe,
|
|
8
|
-
label: timeframe
|
|
9
|
+
label: OBSERVABILITY_TIMEFRAME_TO_LABEL_MAP[timeframe]
|
|
9
10
|
}));
|
|
10
11
|
return /* @__PURE__ */ jsx(ToggleInput, {
|
|
11
12
|
variant: ToggleInputVariant.PRIMARY,
|
|
@@ -4,6 +4,7 @@ import { PIPELINE_RUN_STATUS_TO_LABEL_MAP } from "../../../../components/runs/co
|
|
|
4
4
|
import PipelineRunStatusSwatch from "../../../../components/runs/PipelineRunStatusSwatch.js";
|
|
5
5
|
import { OBSERVABILITY_RUNS_SCHEDULED_INPUT } from "../runs/constants.js";
|
|
6
6
|
import { Metric, MetricDimension, QueryAggregateRequestSchema } from "../../../../gen/metrics/v1/metrics_pb.js";
|
|
7
|
+
import { OBSERVABILITY_REFRESH_INTERVAL_TO_MS_MAP } from "../../constants.js";
|
|
7
8
|
import { useObservabilitySearch } from "../../../../module/hooks.js";
|
|
8
9
|
import { useListRunsQuery } from "../../../../api/queries/runs.js";
|
|
9
10
|
import { OBSERVABILITY_METRICS_FEATURED_STATUSES, OBSERVABILITY_METRICS_OTHER_STATUSES } from "./constants.js";
|
|
@@ -22,7 +23,7 @@ import BigNumber from "@galaxy-io/dls/charts/BigNumber";
|
|
|
22
23
|
import BigNumberGroup, { BigNumberGroupVariant } from "@galaxy-io/dls/charts/BigNumberGroup";
|
|
23
24
|
//#region src/pages/observability/components/metrics/ObservabilityMetricsWidget.tsx
|
|
24
25
|
var ObservabilityMetricsWidget = () => {
|
|
25
|
-
const { timeframe } = useObservabilitySearch();
|
|
26
|
+
const { timeframe, refreshInterval } = useObservabilitySearch();
|
|
26
27
|
const bucketStartMs = useObservabilityBucketStart(timeframe);
|
|
27
28
|
const { totalsInput, statusCountsInput } = useMemo(() => {
|
|
28
29
|
const sinceMs = createTimeframeSince(timeframe, bucketStartMs);
|
|
@@ -42,8 +43,14 @@ var ObservabilityMetricsWidget = () => {
|
|
|
42
43
|
})
|
|
43
44
|
};
|
|
44
45
|
}, [timeframe, bucketStartMs]);
|
|
45
|
-
const { data: totalsData, isLoading: isTotalsLoading } = useQueryAggregateQuery({
|
|
46
|
-
|
|
46
|
+
const { data: totalsData, isLoading: isTotalsLoading } = useQueryAggregateQuery({
|
|
47
|
+
input: totalsInput,
|
|
48
|
+
options: { refetchInterval: OBSERVABILITY_REFRESH_INTERVAL_TO_MS_MAP[refreshInterval] }
|
|
49
|
+
});
|
|
50
|
+
const { data: statusCountsData, isLoading: isStatusCountsLoading } = useQueryAggregateQuery({
|
|
51
|
+
input: statusCountsInput,
|
|
52
|
+
options: { refetchInterval: OBSERVABILITY_REFRESH_INTERVAL_TO_MS_MAP[refreshInterval] }
|
|
53
|
+
});
|
|
47
54
|
const { data: scheduledData, isLoading: isScheduledLoading } = useListRunsQuery({ input: OBSERVABILITY_RUNS_SCHEDULED_INPUT });
|
|
48
55
|
const [totalRuns = 0, totalRecords = 0, totalBytes = 0] = totalsData?.rows[0]?.values ?? [];
|
|
49
56
|
const countsByStatus = useMemo(() => new Map((statusCountsData?.rows ?? []).map((row) => [mapOptionIdToEnum(RunStatus, row.key), row.values[0] ?? 0])), [statusCountsData]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OBSERVABILITY_RUNS_NO_STATUSES_PLACEHOLDER, OBSERVABILITY_RUNS_SERIES } from "./constants.js";
|
|
2
|
-
import { OBSERVABILITY_TIMEFRAME_TO_QUERY_MAP } from "../../constants.js";
|
|
2
|
+
import { OBSERVABILITY_REFRESH_INTERVAL_TO_MS_MAP, OBSERVABILITY_TIMEFRAME_TO_QUERY_MAP } from "../../constants.js";
|
|
3
3
|
import { useFilamentSearchUpdate, useObservabilitySearch } from "../../../../module/hooks.js";
|
|
4
4
|
import { getBucketLabelFormatter } from "../../utils.js";
|
|
5
5
|
import { useObservabilityBucketStart } from "../../hooks/useObservabilityBucketStart.js";
|
|
@@ -12,7 +12,7 @@ import BarChart from "@galaxy-io/dls/charts/BarChart";
|
|
|
12
12
|
//#region src/pages/observability/components/runs/ObservabilityRunsChart.tsx
|
|
13
13
|
var ObservabilityRunsChart = () => {
|
|
14
14
|
const updateSearch = useFilamentSearchUpdate();
|
|
15
|
-
const { timeframe, statuses, runsBucket, runsStatus } = useObservabilitySearch();
|
|
15
|
+
const { timeframe, refreshInterval, statuses, runsBucket, runsStatus } = useObservabilitySearch();
|
|
16
16
|
const bucketStartMs = useObservabilityBucketStart(timeframe);
|
|
17
17
|
const bucketLabelFormatter = getBucketLabelFormatter(OBSERVABILITY_TIMEFRAME_TO_QUERY_MAP[timeframe].granularity);
|
|
18
18
|
const input = useMemo(() => createRunCountTimeseriesInput(timeframe, bucketStartMs, statuses), [
|
|
@@ -20,9 +20,12 @@ var ObservabilityRunsChart = () => {
|
|
|
20
20
|
bucketStartMs,
|
|
21
21
|
statuses
|
|
22
22
|
]);
|
|
23
|
-
const { data,
|
|
23
|
+
const { data, isFetching } = useQueryTimeseriesQuery({
|
|
24
24
|
input,
|
|
25
|
-
options: {
|
|
25
|
+
options: {
|
|
26
|
+
enabled: statuses.length > 0,
|
|
27
|
+
refetchInterval: OBSERVABILITY_REFRESH_INTERVAL_TO_MS_MAP[refreshInterval]
|
|
28
|
+
}
|
|
26
29
|
});
|
|
27
30
|
const groups = useMemo(() => {
|
|
28
31
|
if (!statuses.length) return [];
|
|
@@ -52,7 +55,7 @@ var ObservabilityRunsChart = () => {
|
|
|
52
55
|
selection,
|
|
53
56
|
onSelectionChange: handleSelectionChange,
|
|
54
57
|
isFilterable: true,
|
|
55
|
-
isLoading,
|
|
58
|
+
isLoading: isFetching,
|
|
56
59
|
placeholder: statuses.length ? void 0 : OBSERVABILITY_RUNS_NO_STATUSES_PLACEHOLDER,
|
|
57
60
|
ariaLabel: "Runs by status",
|
|
58
61
|
minSegmentLength: 4
|