@galaxy-io/filament-ui 0.11.0 → 0.12.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/constants.d.ts +1 -0
- package/dist/api/queries/constants.js +2 -1
- package/dist/api/queries/pipelines.js +8 -13
- package/dist/api/queries/runs.d.ts +1 -1
- package/dist/api/queries/runs.js +5 -11
- package/dist/api/utils.d.ts +1 -0
- package/dist/api/utils.js +3 -1
- package/dist/constants.js +1 -1
- package/dist/gen/ingestion/v1/capabilities_pb.js +1 -1
- package/dist/gen/ingestion/v1/service_pb.js +1 -1
- package/dist/module/hooks.d.ts +5 -6
- package/dist/module/hooks.js +6 -1
- package/dist/module/routes.d.ts +1 -2
- package/dist/module/schemas.d.ts +1 -2
- package/dist/module/schemas.js +1 -2
- package/dist/pages/observability/ObservabilityPage.js +61 -66
- package/dist/pages/observability/components/ObservabilityPageActions.js +1 -3
- package/dist/pages/observability/components/ObservabilityWidgetEmpty.d.ts +8 -0
- package/dist/pages/observability/components/ObservabilityWidgetEmpty.js +30 -0
- package/dist/pages/observability/components/band/ObservabilityBand.d.ts +3 -0
- package/dist/pages/observability/components/band/ObservabilityBand.js +28 -0
- package/dist/pages/observability/components/band/ObservabilityBandList.d.ts +12 -0
- package/dist/pages/observability/components/band/ObservabilityBandList.js +81 -0
- package/dist/pages/observability/components/band/ObservabilityBandMetricTile.d.ts +10 -0
- package/dist/pages/observability/components/band/ObservabilityBandMetricTile.js +86 -0
- package/dist/pages/observability/components/band/ObservabilityBandPivotSelect.d.ts +7 -0
- package/dist/pages/observability/components/band/ObservabilityBandPivotSelect.js +37 -0
- package/dist/pages/observability/components/band/ObservabilityBandRunsChart.d.ts +10 -0
- package/dist/pages/observability/components/band/ObservabilityBandRunsChart.js +26 -0
- package/dist/pages/observability/components/band/ObservabilityBandRunsPastTile.d.ts +3 -0
- package/dist/pages/observability/components/band/ObservabilityBandRunsPastTile.js +128 -0
- package/dist/pages/observability/components/band/ObservabilityBandRunsTile.d.ts +3 -0
- package/dist/pages/observability/components/band/ObservabilityBandRunsTile.js +13 -0
- package/dist/pages/observability/components/band/ObservabilityBandRunsUpcomingTile.d.ts +3 -0
- package/dist/pages/observability/components/band/ObservabilityBandRunsUpcomingTile.js +63 -0
- package/dist/pages/observability/components/band/ObservabilityBandTile.d.ts +12 -0
- package/dist/pages/observability/components/band/ObservabilityBandTile.js +71 -0
- package/dist/pages/observability/components/band/ObservabilityBandTimeseriesChart.d.ts +14 -0
- package/dist/pages/observability/components/band/ObservabilityBandTimeseriesChart.js +48 -0
- package/dist/pages/observability/components/band/ObservabilityBandTopList.d.ts +12 -0
- package/dist/pages/observability/components/band/ObservabilityBandTopList.js +19 -0
- package/dist/pages/observability/components/band/constants.d.ts +25 -0
- package/dist/pages/observability/components/band/constants.js +81 -0
- package/dist/pages/observability/components/band/types.d.ts +27 -0
- package/dist/pages/observability/components/band/utils.d.ts +25 -0
- package/dist/pages/observability/components/band/utils.js +93 -0
- package/dist/pages/observability/components/connections/ObservabilityConnectionRow.d.ts +9 -0
- package/dist/pages/observability/components/connections/ObservabilityConnectionRow.js +57 -0
- package/dist/pages/observability/components/connections/ObservabilityConnectionsWidget.d.ts +7 -0
- package/dist/pages/observability/components/connections/ObservabilityConnectionsWidget.js +56 -0
- package/dist/pages/observability/components/connections/constants.d.ts +5 -0
- package/dist/pages/observability/components/connections/constants.js +24 -0
- package/dist/pages/observability/components/connections/types.d.ts +4 -0
- package/dist/pages/observability/components/connections/utils.d.ts +4 -0
- package/dist/pages/observability/components/connections/utils.js +23 -0
- package/dist/pages/observability/components/failures/ObservabilityFailuresBanner.d.ts +3 -0
- package/dist/pages/observability/components/failures/ObservabilityFailuresBanner.js +33 -0
- package/dist/pages/observability/components/failures/ObservabilityFailuresDetails.d.ts +7 -0
- package/dist/pages/observability/components/failures/ObservabilityFailuresDetails.js +99 -0
- package/dist/pages/observability/components/failures/constants.d.ts +2 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesBar.d.ts +7 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesBar.js +34 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesColumnCell.d.ts +7 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesColumnCell.js +15 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesHeader.d.ts +3 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesHeader.js +34 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesRow.d.ts +11 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesRow.js +120 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesWidget.d.ts +3 -0
- package/dist/pages/observability/components/pipelines/ObservabilityPipelinesWidget.js +142 -0
- package/dist/pages/observability/components/pipelines/constants.d.ts +23 -0
- package/dist/pages/observability/components/pipelines/constants.js +33 -0
- package/dist/pages/observability/components/pipelines/types.d.ts +22 -0
- package/dist/pages/observability/components/pipelines/types.js +11 -0
- package/dist/pages/observability/components/pipelines/utils.d.ts +9 -0
- package/dist/pages/observability/components/pipelines/utils.js +73 -0
- package/dist/pages/observability/components/runs/ObservabilityRunsPastTable.js +6 -13
- package/dist/pages/observability/components/runs/ObservabilityRunsTableActions.d.ts +3 -0
- package/dist/pages/observability/components/runs/ObservabilityRunsTableActions.js +43 -0
- package/dist/pages/observability/components/runs/ObservabilityRunsTableWidget.js +2 -0
- package/dist/pages/observability/components/runs/ObservabilityRunsViewToggle.d.ts +3 -0
- package/dist/pages/observability/components/runs/ObservabilityRunsViewToggle.js +26 -0
- package/dist/pages/observability/components/runs/constants.d.ts +4 -10
- package/dist/pages/observability/components/runs/constants.js +8 -12
- package/dist/pages/observability/components/scheduled/ObservabilityScheduledWidget.d.ts +3 -0
- package/dist/pages/observability/components/scheduled/ObservabilityScheduledWidget.js +94 -0
- package/dist/pages/observability/components/setup/ObservabilitySetupChecklist.js +3 -1
- package/dist/pages/observability/components/setup/constants.js +1 -1
- package/dist/pages/observability/constants.d.ts +18 -3
- package/dist/pages/observability/constants.js +24 -4
- package/dist/pages/observability/hooks/useObservabilityAggregateQuery.d.ts +2 -0
- package/dist/pages/observability/hooks/useObservabilityAggregateQuery.js +13 -0
- package/dist/pages/observability/hooks/useObservabilityBandRanking.d.ts +8 -0
- package/dist/pages/observability/hooks/useObservabilityBandRanking.js +21 -0
- package/dist/pages/observability/hooks/useObservabilityBandUpcoming.d.ts +8 -0
- package/dist/pages/observability/hooks/useObservabilityBandUpcoming.js +45 -0
- package/dist/pages/observability/hooks/useObservabilityMetricInputs.d.ts +9 -0
- package/dist/pages/observability/hooks/useObservabilityMetricInputs.js +33 -0
- package/dist/pages/observability/hooks/useObservabilityPipelines.d.ts +12 -0
- package/dist/pages/observability/hooks/useObservabilityPipelines.js +22 -0
- package/dist/pages/observability/hooks/useObservabilityTimeseriesQuery.d.ts +2 -0
- package/dist/pages/observability/hooks/useObservabilityTimeseriesQuery.js +13 -0
- package/dist/pages/observability/types.d.ts +16 -0
- package/dist/pages/observability/types.js +7 -1
- package/dist/pages/observability/utils.d.ts +6 -1
- package/dist/pages/observability/utils.js +19 -2
- package/dist/pages/pipelines/components/create/hooks/useCreatePipelineResources.js +1 -1
- package/dist/pages/pipelines/components/header/PipelinePageHeading.js +1 -1
- package/dist/pages/pipelines/components/table/PipelinesTable.js +1 -1
- package/dist/pages/pipelines/settings/PipelineSettingsPageAdvanced.js +1 -1
- package/dist/pages/pipelines/settings/PipelineSettingsPageDanger.js +1 -1
- package/dist/pages/pipelines/settings/PipelineSettingsPageGeneral.js +1 -1
- package/dist/pages/pipelines/settings/PipelineSettingsPageSchedule.js +1 -1
- package/dist/styles.css +15 -0
- package/package.json +1 -1
- package/dist/pages/observability/components/metrics/ObservabilityMetricsWidget.d.ts +0 -3
- package/dist/pages/observability/components/metrics/ObservabilityMetricsWidget.js +0 -139
- package/dist/pages/observability/components/metrics/constants.d.ts +0 -3
- package/dist/pages/observability/components/metrics/constants.js +0 -11
- package/dist/pages/observability/components/runs/ObservabilityRunsChart.d.ts +0 -3
- package/dist/pages/observability/components/runs/ObservabilityRunsChart.js +0 -66
- package/dist/pages/observability/components/runs/ObservabilityRunsChartWidget.d.ts +0 -3
- package/dist/pages/observability/components/runs/ObservabilityRunsChartWidget.js +0 -75
- package/dist/pages/observability/components/runs/ObservabilityRunsScheduledChart.d.ts +0 -3
- package/dist/pages/observability/components/runs/ObservabilityRunsScheduledChart.js +0 -39
- package/dist/pages/observability/components/runs/types.d.ts +0 -1
- package/dist/pages/observability/components/runs/utils.d.ts +0 -14
- package/dist/pages/observability/components/runs/utils.js +0 -71
- package/dist/pages/observability/components/timeseries/ObservabilityPivotSelect.d.ts +0 -8
- package/dist/pages/observability/components/timeseries/ObservabilityPivotSelect.js +0 -28
- package/dist/pages/observability/components/timeseries/ObservabilityTimeseriesChart.d.ts +0 -14
- package/dist/pages/observability/components/timeseries/ObservabilityTimeseriesChart.js +0 -105
- package/dist/pages/observability/components/timeseries/ObservabilityTimeseriesWidget.d.ts +0 -19
- package/dist/pages/observability/components/timeseries/ObservabilityTimeseriesWidget.js +0 -61
- package/dist/pages/observability/components/timeseries/constants.d.ts +0 -19
- package/dist/pages/observability/components/timeseries/constants.js +0 -57
|
@@ -6,5 +6,6 @@ var PROBE_QUERY_OPTIONS = {
|
|
|
6
6
|
refetchOnWindowFocus: false
|
|
7
7
|
};
|
|
8
8
|
var ACTIVE_RUNS_REFETCH_INTERVAL = 3e3;
|
|
9
|
+
var SCHEDULED_REFETCH_MAX_INTERVAL = 6e4;
|
|
9
10
|
//#endregion
|
|
10
|
-
export { ACTIVE_RUNS_REFETCH_INTERVAL, PROBE_QUERY_OPTIONS };
|
|
11
|
+
export { ACTIVE_RUNS_REFETCH_INTERVAL, PROBE_QUERY_OPTIONS, SCHEDULED_REFETCH_MAX_INTERVAL };
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { GetPipelineRequestSchema } from "../../gen/ingestion/v1/pipelines_pb.js";
|
|
2
2
|
import { IngestionService } from "../../gen/ingestion/v1/service_pb.js";
|
|
3
|
-
import { INITIAL_PAGE_PARAM, createListSearchInput, getNextPageParam } from "../utils.js";
|
|
4
3
|
import { ACTIVE_RUNS_REFETCH_INTERVAL } from "./constants.js";
|
|
4
|
+
import { INITIAL_PAGE_PARAM, createListSearchInput, getNextPageParam, getScheduledRefetchInterval } from "../utils.js";
|
|
5
5
|
import { isRunActive } from "../../utils/runs.js";
|
|
6
6
|
import { createListRunsQueryKey } from "./runs.js";
|
|
7
7
|
import { create } from "@bufbuild/protobuf";
|
|
8
|
-
import {
|
|
9
|
-
import { createConnectQueryKey,
|
|
8
|
+
import { useQueryClient } from "@tanstack/react-query";
|
|
9
|
+
import { createConnectQueryKey, useMutation, useQuery, useSuspenseInfiniteQuery, useSuspenseQuery, useTransport } from "@connectrpc/connect-query";
|
|
10
10
|
//#region src/api/queries/pipelines.ts
|
|
11
11
|
var getListPipelinesRefetchInterval = (pipelines) => {
|
|
12
|
-
|
|
12
|
+
if (!pipelines) return false;
|
|
13
|
+
if (pipelines.some((pipeline) => pipeline.lastRun && isRunActive(pipeline.lastRun))) return ACTIVE_RUNS_REFETCH_INTERVAL;
|
|
14
|
+
const waits = pipelines.flatMap((pipeline) => pipeline.schedule?.config?.isEnabled && pipeline.schedule.nextFireAt ? [Number(pipeline.schedule.nextFireAt) - Date.now()] : []);
|
|
15
|
+
return getScheduledRefetchInterval(waits, ACTIVE_RUNS_REFETCH_INTERVAL);
|
|
13
16
|
};
|
|
14
17
|
var createListPipelinesInput = (search) => ({
|
|
15
18
|
includeLastRun: true,
|
|
@@ -68,14 +71,6 @@ var useGetPipelineQuery = ({ input, options = {} }) => {
|
|
|
68
71
|
var useSuspenseGetPipelineQuery = ({ input }) => {
|
|
69
72
|
return useSuspenseQuery(IngestionService.method.getPipeline, input);
|
|
70
73
|
};
|
|
71
|
-
var selectPipelines = (results) => results.flatMap((result) => result.data?.pipeline ?? []);
|
|
72
|
-
var useGetPipelineQueries = (ids) => {
|
|
73
|
-
const transport = useTransport();
|
|
74
|
-
return useQueries({
|
|
75
|
-
queries: ids.map((id) => createQueryOptions(IngestionService.method.getPipeline, createGetPipelineInput(id), { transport })),
|
|
76
|
-
combine: selectPipelines
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
74
|
var useCreatePipelineMutation = (options = {}) => {
|
|
80
75
|
const queryClient = useQueryClient();
|
|
81
76
|
const transport = useTransport();
|
|
@@ -113,4 +108,4 @@ var useDeletePipelineMutation = (options = {}) => {
|
|
|
113
108
|
});
|
|
114
109
|
};
|
|
115
110
|
//#endregion
|
|
116
|
-
export { createGetPipelineInput, createGetPipelineQueryKey, createListPipelinesInput, createListPipelinesQueryKey, useCreatePipelineMutation, useDeletePipelineMutation,
|
|
111
|
+
export { createGetPipelineInput, createGetPipelineQueryKey, createListPipelinesInput, createListPipelinesQueryKey, useCreatePipelineMutation, useDeletePipelineMutation, useGetPipelineQuery, useListPipelinesQuery, useSuspenseGetPipelineQuery, useSuspenseListPipelinesInfiniteQuery, useSuspenseListPipelinesQuery, useUpdatePipelineMutation };
|
|
@@ -5,7 +5,7 @@ import { GetRunRequest, GetRunResponse, ListRunsRequest, ListRunsResponse, RunEv
|
|
|
5
5
|
import { IngestionService } from '../../gen/ingestion/v1/service_pb';
|
|
6
6
|
import { InfiniteQueryInput, UseInfiniteQueryOptions } from '../utils';
|
|
7
7
|
export declare const createListRunsQueryKey: (input?: ListRunsRequest, transport?: Transport) => import('@connectrpc/connect-query').ConnectQueryKey<Omit<import('@bufbuild/protobuf').DescMessage, "field" | "typeName"> & {
|
|
8
|
-
field: Record<"
|
|
8
|
+
field: Record<"pagination" | "runs", import('@bufbuild/protobuf').DescField>;
|
|
9
9
|
typeName: "ingestion.v1.ListRunsResponse";
|
|
10
10
|
} & {
|
|
11
11
|
readonly $codegenv2: {
|
package/dist/api/queries/runs.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ListRunsRequestSchema, RunStatus, TailRunRequestSchema } from "../../gen/ingestion/v1/runs_pb.js";
|
|
2
2
|
import { ACTIVE_RUN_STATUSES } from "../../constants.js";
|
|
3
3
|
import { IngestionService } from "../../gen/ingestion/v1/service_pb.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { ACTIVE_RUNS_REFETCH_INTERVAL, SCHEDULED_REFETCH_MAX_INTERVAL } from "./constants.js";
|
|
5
|
+
import { INITIAL_PAGE_PARAM, batchIterable, getNextPageParam, getScheduledRefetchInterval } from "../utils.js";
|
|
6
6
|
import { isRunActive } from "../../utils/runs.js";
|
|
7
7
|
import { createGetPipelineInput, createGetPipelineQueryKey, createListPipelinesQueryKey, useGetPipelineQuery } from "./pipelines.js";
|
|
8
8
|
import { create } from "@bufbuild/protobuf";
|
|
@@ -20,18 +20,12 @@ var createListRunsQueryKey = (input, transport) => {
|
|
|
20
20
|
cardinality: void 0
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
|
-
var SCHEDULED_REFETCH_MAX_INTERVAL = 6e4;
|
|
24
23
|
var IDLE_RUNS_REFETCH_INTERVAL = 3e4;
|
|
25
|
-
var
|
|
26
|
-
const scheduled = runs.filter((run) => run.status === RunStatus.SCHEDULED);
|
|
27
|
-
if (scheduled.length === 0) return false;
|
|
28
|
-
const waits = scheduled.map((run) => run.scheduledAt ? Number(run.scheduledAt) - Date.now() : SCHEDULED_REFETCH_MAX_INTERVAL);
|
|
29
|
-
return Math.min(Math.max(Math.min(...waits), floor), SCHEDULED_REFETCH_MAX_INTERVAL);
|
|
30
|
-
};
|
|
24
|
+
var getRunsScheduledRefetchInterval = (runs, floor) => getScheduledRefetchInterval(runs.filter((run) => run.status === RunStatus.SCHEDULED).map((run) => run.scheduledAt ? Number(run.scheduledAt) - Date.now() : SCHEDULED_REFETCH_MAX_INTERVAL), floor);
|
|
31
25
|
var getListRunsRefetchInterval = (runs) => {
|
|
32
26
|
if (!runs) return false;
|
|
33
27
|
if (runs.some((run) => isRunActive(run))) return ACTIVE_RUNS_REFETCH_INTERVAL;
|
|
34
|
-
return
|
|
28
|
+
return getRunsScheduledRefetchInterval(runs, ACTIVE_RUNS_REFETCH_INTERVAL);
|
|
35
29
|
};
|
|
36
30
|
var getActiveRunsRefetchInterval = (runs, nextFireAt) => {
|
|
37
31
|
if (runs?.some((run) => isRunActive(run))) return ACTIVE_RUNS_REFETCH_INTERVAL;
|
|
@@ -110,7 +104,7 @@ var useSuspenseListRunsInfiniteQuery = ({ input } = {}) => {
|
|
|
110
104
|
var getGetRunRefetchInterval = (run) => {
|
|
111
105
|
if (!run) return false;
|
|
112
106
|
if (isRunActive(run)) return GET_RUN_REFETCH_INTERVAL;
|
|
113
|
-
return
|
|
107
|
+
return getRunsScheduledRefetchInterval([run], GET_RUN_REFETCH_INTERVAL);
|
|
114
108
|
};
|
|
115
109
|
var createGetRunQueryKey = (input, transport) => {
|
|
116
110
|
return createConnectQueryKey({
|
package/dist/api/utils.d.ts
CHANGED
|
@@ -18,3 +18,4 @@ export declare const createListSearchInput: ({ q, sortBy, sortOrder }: ListSearc
|
|
|
18
18
|
sorting: import('../gen/ingestion/v1/sorting_pb').SortingRequest;
|
|
19
19
|
};
|
|
20
20
|
export declare function batchIterable<T>(source: AsyncIterable<T>, intervalMs: number): AsyncGenerator<T[]>;
|
|
21
|
+
export declare const getScheduledRefetchInterval: (waits: number[], floor: number) => number | false;
|
package/dist/api/utils.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SortBy, SortOrder, SortingRequestSchema } from "../gen/ingestion/v1/sorting_pb.js";
|
|
2
|
+
import { SCHEDULED_REFETCH_MAX_INTERVAL } from "./queries/constants.js";
|
|
2
3
|
import { create } from "@bufbuild/protobuf";
|
|
3
4
|
//#region src/api/utils.ts
|
|
4
5
|
var DEFAULT_PAGE_SIZE = 25;
|
|
@@ -56,5 +57,6 @@ async function* batchIterable(source, intervalMs) {
|
|
|
56
57
|
await iterator.return?.();
|
|
57
58
|
}
|
|
58
59
|
}
|
|
60
|
+
var getScheduledRefetchInterval = (waits, floor) => waits.length === 0 ? false : Math.min(Math.max(Math.min(...waits), floor), SCHEDULED_REFETCH_MAX_INTERVAL);
|
|
59
61
|
//#endregion
|
|
60
|
-
export { INITIAL_PAGE_PARAM, batchIterable, createListSearchInput, createListSortingInput, getNextPageParam };
|
|
62
|
+
export { INITIAL_PAGE_PARAM, batchIterable, createListSearchInput, createListSortingInput, getNextPageParam, getScheduledRefetchInterval };
|
package/dist/constants.js
CHANGED
|
@@ -4,7 +4,7 @@ var IS_DEBUG = process.env.NODE_ENV !== "production";
|
|
|
4
4
|
var NOOP = () => {};
|
|
5
5
|
var GITHUB_REPO_URL = "https://github.com/galaxy-io/filament";
|
|
6
6
|
var DOCUMENTATION_URL = "https://filament.getgalaxy.io";
|
|
7
|
-
var SLACK_COMMUNITY_URL = "https://join.slack.com/t/galaxy-
|
|
7
|
+
var SLACK_COMMUNITY_URL = "https://join.slack.com/t/galaxy-io-community/shared_invite/zt-45qln0zg5-9CTvKVXugvh3sEhpD6KzJQ";
|
|
8
8
|
var ACTIVE_RUN_STATUSES = /* @__PURE__ */ new Set([
|
|
9
9
|
RunStatus.REQUESTED,
|
|
10
10
|
RunStatus.RUNNING,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { file_ingestion_v1_common } from "./common_pb.js";
|
|
2
|
-
import { file_ingestion_v1_connectors } from "./connectors_pb.js";
|
|
3
2
|
import { file_ingestion_v1_pipelines } from "./pipelines_pb.js";
|
|
3
|
+
import { file_ingestion_v1_connectors } from "./connectors_pb.js";
|
|
4
4
|
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
|
|
5
5
|
//#region src/gen/ingestion/v1/capabilities_pb.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { file_ingestion_v1_runs } from "./runs_pb.js";
|
|
2
|
-
import { file_ingestion_v1_connectors } from "./connectors_pb.js";
|
|
3
2
|
import { file_ingestion_v1_pipelines } from "./pipelines_pb.js";
|
|
3
|
+
import { file_ingestion_v1_connectors } from "./connectors_pb.js";
|
|
4
4
|
import { file_ingestion_v1_capabilities } from "./capabilities_pb.js";
|
|
5
5
|
import { file_ingestion_v1_connections } from "./connections_pb.js";
|
|
6
6
|
import { file_ingestion_v1_notifiers } from "./notifiers_pb.js";
|
package/dist/module/hooks.d.ts
CHANGED
|
@@ -37,13 +37,12 @@ export declare const useObservabilitySearch: () => {
|
|
|
37
37
|
timeframe: import('../pages/observability/types').ObservabilityTimeframe;
|
|
38
38
|
refreshInterval: import('../pages/observability/types').ObservabilityRefreshInterval;
|
|
39
39
|
runs: import('../pages/observability/types').ObservabilityRunsView;
|
|
40
|
+
throughput: import('../pages/observability/types').ObservabilityThroughputView;
|
|
41
|
+
throughputPivot: import('../gen/metrics/v1/metrics_pb').MetricDimension;
|
|
42
|
+
usage: import('../pages/observability/types').ObservabilityUsageView;
|
|
43
|
+
usagePivot: import('../gen/metrics/v1/metrics_pb').MetricDimension;
|
|
44
|
+
pipelinesPage: number;
|
|
40
45
|
statuses: import('../gen/ingestion/v1/runs_pb').RunStatus[];
|
|
41
|
-
throughput?: import('../pages/observability/types').ObservabilityThroughputView | undefined;
|
|
42
|
-
throughputPivot?: import('../gen/metrics/v1/metrics_pb').MetricDimension | undefined;
|
|
43
|
-
usage?: import('../pages/observability/types').ObservabilityUsageView | undefined;
|
|
44
|
-
usagePivot?: import('../gen/metrics/v1/metrics_pb').MetricDimension | undefined;
|
|
45
|
-
runsBucket?: bigint | undefined;
|
|
46
|
-
runsStatus?: import('../gen/ingestion/v1/runs_pb').RunStatus | undefined;
|
|
47
46
|
};
|
|
48
47
|
export declare const usePipelinesSearch: () => {
|
|
49
48
|
q?: string | undefined;
|
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_REFRESH_INTERVAL, OBSERVABILITY_DEFAULT_RUNS_VIEW, OBSERVABILITY_DEFAULT_TIMEFRAME } from "../pages/observability/constants.js";
|
|
2
|
+
import { OBSERVABILITY_BAND_PIVOT_KEY_TO_DEFAULT_MAP, OBSERVABILITY_BAND_VIEW_KEY_TO_DEFAULT_MAP, 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";
|
|
@@ -59,6 +59,11 @@ var useObservabilitySearch = () => useSearch({
|
|
|
59
59
|
timeframe: parsed.timeframe ?? OBSERVABILITY_DEFAULT_TIMEFRAME,
|
|
60
60
|
refreshInterval: parsed.refreshInterval ?? OBSERVABILITY_DEFAULT_REFRESH_INTERVAL,
|
|
61
61
|
runs: parsed.runs ?? OBSERVABILITY_DEFAULT_RUNS_VIEW,
|
|
62
|
+
throughput: parsed.throughput ?? OBSERVABILITY_BAND_VIEW_KEY_TO_DEFAULT_MAP.throughput,
|
|
63
|
+
throughputPivot: parsed.throughputPivot ?? OBSERVABILITY_BAND_PIVOT_KEY_TO_DEFAULT_MAP.throughputPivot,
|
|
64
|
+
usage: parsed.usage ?? OBSERVABILITY_BAND_VIEW_KEY_TO_DEFAULT_MAP.usage,
|
|
65
|
+
usagePivot: parsed.usagePivot ?? OBSERVABILITY_BAND_PIVOT_KEY_TO_DEFAULT_MAP.usagePivot,
|
|
66
|
+
pipelinesPage: parsed.pipelinesPage ?? 1,
|
|
62
67
|
statuses: parsed.statuses ?? OBSERVABILITY_RUNS_DEFAULT_STATUSES
|
|
63
68
|
};
|
|
64
69
|
}
|
package/dist/module/routes.d.ts
CHANGED
|
@@ -28,8 +28,7 @@ export declare const observabilityRouteOptions: FilamentRouteComponents & {
|
|
|
28
28
|
usage: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodEnum<typeof import('../pages/observability/types').ObservabilityUsageView>>>;
|
|
29
29
|
usagePivot: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodEnum<typeof import('../gen/metrics/v1/metrics_pb').MetricDimension>>>;
|
|
30
30
|
statuses: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodArray<import('zod').ZodEnum<typeof import('../gen/ingestion/v1/runs_pb').RunStatus>>>>;
|
|
31
|
-
|
|
32
|
-
runsStatus: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodEnum<typeof import('../gen/ingestion/v1/runs_pb').RunStatus>>>;
|
|
31
|
+
pipelinesPage: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodCoercedNumber<unknown>>>;
|
|
33
32
|
}, import('zod/v4/core').$strip>;
|
|
34
33
|
};
|
|
35
34
|
export declare const pipelinesRouteOptions: FilamentRouteComponents & {
|
package/dist/module/schemas.d.ts
CHANGED
|
@@ -36,8 +36,7 @@ export declare const observabilitySearchSchema: z.ZodObject<{
|
|
|
36
36
|
usage: z.ZodCatch<z.ZodOptional<z.ZodEnum<typeof ObservabilityUsageView>>>;
|
|
37
37
|
usagePivot: z.ZodCatch<z.ZodOptional<z.ZodEnum<typeof MetricDimension>>>;
|
|
38
38
|
statuses: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodEnum<typeof RunStatus>>>>;
|
|
39
|
-
|
|
40
|
-
runsStatus: z.ZodCatch<z.ZodOptional<z.ZodEnum<typeof RunStatus>>>;
|
|
39
|
+
pipelinesPage: z.ZodCatch<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
41
40
|
}, z.core.$strip>;
|
|
42
41
|
export type ObservabilitySearch = z.infer<typeof observabilitySearchSchema>;
|
|
43
42
|
export declare const pipelinesSearchSchema: z.ZodObject<{
|
package/dist/module/schemas.js
CHANGED
|
@@ -34,8 +34,7 @@ var observabilitySearchSchema = z.object({
|
|
|
34
34
|
usage: z.enum(ObservabilityUsageView).optional().catch(void 0),
|
|
35
35
|
usagePivot: z.enum(MetricDimension).optional().catch(void 0),
|
|
36
36
|
statuses: z.array(z.enum(RunStatus)).optional().catch(void 0),
|
|
37
|
-
|
|
38
|
-
runsStatus: z.enum(RunStatus).optional().catch(void 0)
|
|
37
|
+
pipelinesPage: z.coerce.number().int().positive().optional().catch(void 0)
|
|
39
38
|
});
|
|
40
39
|
var pipelinesSearchSchema = listSearchParamsSchema;
|
|
41
40
|
var connectionsSearchSchema = listSearchParamsSchema.pick({ q: true });
|
|
@@ -1,91 +1,86 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { ConnectorKind } from "../../gen/ingestion/v1/common_pb.js";
|
|
2
|
+
import { Flow } from "../../module/types.js";
|
|
3
|
+
import { useFilamentFlowOpen } from "../../module/hooks.js";
|
|
4
|
+
import { PIPELINE_CREATE_TITLE } from "../../components/pipelines/constants.js";
|
|
5
|
+
import ObservabilityBand from "./components/band/ObservabilityBand.js";
|
|
6
|
+
import ObservabilityConnectionsWidget from "./components/connections/ObservabilityConnectionsWidget.js";
|
|
7
|
+
import ObservabilityFailuresBanner from "./components/failures/ObservabilityFailuresBanner.js";
|
|
5
8
|
import ObservabilityPageActions from "./components/ObservabilityPageActions.js";
|
|
6
|
-
import
|
|
9
|
+
import ObservabilityPipelinesWidget from "./components/pipelines/ObservabilityPipelinesWidget.js";
|
|
7
10
|
import ObservabilityRunsTableWidget from "./components/runs/ObservabilityRunsTableWidget.js";
|
|
11
|
+
import ObservabilityScheduledWidget from "./components/scheduled/ObservabilityScheduledWidget.js";
|
|
8
12
|
import { useObservabilitySetup } from "./hooks/useObservabilitySetup.js";
|
|
9
13
|
import ObservabilitySetupChecklist from "./components/setup/ObservabilitySetupChecklist.js";
|
|
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
|
-
import ObservabilityTimeseriesWidget from "./components/timeseries/ObservabilityTimeseriesWidget.js";
|
|
12
14
|
import { useObservabilityScrollTakeover } from "./hooks/useObservabilityScrollTakeover.js";
|
|
13
15
|
/* empty css */
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import
|
|
16
|
+
import { PlusIcon } from "@phosphor-icons/react";
|
|
17
|
+
import Button, { ButtonVariant } from "@galaxy-io/dls/buttons/Button";
|
|
18
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
import Flex, { FlexDirection } from "@galaxy-io/dls/layout/Flex";
|
|
20
|
+
import Box from "@galaxy-io/dls/layout/Box";
|
|
21
|
+
import { styled } from "@linaria/react";
|
|
22
|
+
import Divider from "@galaxy-io/dls/layout/Divider";
|
|
18
23
|
import ScrollArea from "@galaxy-io/dls/layout/ScrollArea";
|
|
24
|
+
import GalaxyFilamentWordmark from "@galaxy-io/dls/brand/GalaxyFilamentWordmark";
|
|
19
25
|
import ChartGroupProvider from "@galaxy-io/dls/charts/ChartGroupProvider";
|
|
20
26
|
import PageLayout from "@galaxy-io/dls/layout/PageLayout";
|
|
21
27
|
import { HAIRLINE_WIDTH } from "@galaxy-io/dls/styles/mixins";
|
|
22
28
|
//#region src/pages/observability/ObservabilityPage.tsx
|
|
23
29
|
var OBSERVABILITY_PAGE_SCROLL_CSS = "filament-ObservabilityPage-OBSERVABILITY_PAGE_SCROLL_CSS-o1p5bblp";
|
|
24
30
|
var OBSERVABILITY_RUNS_TAKEOVER_HEIGHT = `calc(100cqh + ${HAIRLINE_WIDTH})`;
|
|
31
|
+
var ObservabilityLayout = /*#__PURE__*/ styled("div")({
|
|
32
|
+
name: "ObservabilityLayout",
|
|
33
|
+
class: "filament-ObservabilityPage-ObservabilityLayout-o13zxkvd",
|
|
34
|
+
propsAsIs: false
|
|
35
|
+
});
|
|
36
|
+
var ObservabilityBlockSide = /*#__PURE__*/ styled("div")({
|
|
37
|
+
name: "ObservabilityBlockSide",
|
|
38
|
+
class: "filament-ObservabilityPage-ObservabilityBlockSide-o1l5x7ab",
|
|
39
|
+
propsAsIs: false
|
|
40
|
+
});
|
|
41
|
+
var ObservabilityBlock = /*#__PURE__*/ styled("div")({
|
|
42
|
+
name: "ObservabilityBlock",
|
|
43
|
+
class: "filament-ObservabilityPage-ObservabilityBlock-ov836dj",
|
|
44
|
+
propsAsIs: false
|
|
45
|
+
});
|
|
25
46
|
var ObservabilityPage = () => {
|
|
26
47
|
const { isComplete } = useObservabilitySetup();
|
|
27
48
|
const { scrollRef, takeoverRef } = useObservabilityScrollTakeover(isComplete);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
49
|
+
const openFlow = useFilamentFlowOpen();
|
|
50
|
+
const handleNewPipeline = () => {
|
|
51
|
+
openFlow(Flow.CREATE_PIPELINE);
|
|
52
|
+
};
|
|
53
|
+
if (!isComplete) return /* @__PURE__ */ jsx(ObservabilitySetupChecklist, {});
|
|
32
54
|
return /* @__PURE__ */ jsx(PageLayout, {
|
|
33
|
-
header:
|
|
34
|
-
|
|
55
|
+
header: /* @__PURE__ */ jsx(GalaxyFilamentWordmark, {
|
|
56
|
+
size: 20,
|
|
57
|
+
ariaLabel: "Filament"
|
|
58
|
+
}),
|
|
59
|
+
actions: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ObservabilityPageActions, {}), /* @__PURE__ */ jsx(Button, {
|
|
60
|
+
label: PIPELINE_CREATE_TITLE,
|
|
61
|
+
icon: PlusIcon,
|
|
62
|
+
variant: ButtonVariant.PRIMARY,
|
|
63
|
+
onClick: handleNewPipeline
|
|
64
|
+
})] }),
|
|
65
|
+
banner: /* @__PURE__ */ jsx(ObservabilityFailuresBanner, {}),
|
|
35
66
|
children: /* @__PURE__ */ jsx(ChartGroupProvider, {
|
|
36
67
|
shouldShareTooltip: true,
|
|
37
68
|
children: /* @__PURE__ */ jsxs(ScrollArea, {
|
|
38
69
|
ref: scrollRef,
|
|
39
70
|
className: OBSERVABILITY_PAGE_SCROLL_CSS,
|
|
40
|
-
children: [/* @__PURE__ */ jsxs(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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, {
|
|
71
|
+
children: [/* @__PURE__ */ jsxs(ObservabilityLayout, { children: [
|
|
72
|
+
/* @__PURE__ */ jsx(ObservabilityBand, {}),
|
|
73
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
74
|
+
/* @__PURE__ */ jsx(Box, {
|
|
75
|
+
padding: 16,
|
|
76
|
+
fillWidth: true,
|
|
77
|
+
children: /* @__PURE__ */ jsxs(ObservabilityBlock, { children: [/* @__PURE__ */ jsx(ObservabilityPipelinesWidget, {}), /* @__PURE__ */ jsxs(ObservabilityBlockSide, { children: [
|
|
78
|
+
/* @__PURE__ */ jsx(ObservabilityScheduledWidget, {}),
|
|
79
|
+
/* @__PURE__ */ jsx(ObservabilityConnectionsWidget, { kind: ConnectorKind.SOURCE }),
|
|
80
|
+
/* @__PURE__ */ jsx(ObservabilityConnectionsWidget, { kind: ConnectorKind.SINK })
|
|
81
|
+
] })] })
|
|
82
|
+
})
|
|
83
|
+
] }), /* @__PURE__ */ jsx(Flex, {
|
|
89
84
|
ref: takeoverRef,
|
|
90
85
|
direction: FlexDirection.COLUMN,
|
|
91
86
|
height: OBSERVABILITY_RUNS_TAKEOVER_HEIGHT,
|
|
@@ -15,9 +15,7 @@ var ObservabilityPageActions = () => {
|
|
|
15
15
|
const handleTimeframeChange = (timeframe) => {
|
|
16
16
|
updateSearch((prev) => ({
|
|
17
17
|
...prev,
|
|
18
|
-
timeframe
|
|
19
|
-
runsBucket: void 0,
|
|
20
|
-
runsStatus: void 0
|
|
18
|
+
timeframe
|
|
21
19
|
}));
|
|
22
20
|
};
|
|
23
21
|
const handleRefreshIntervalChange = (refreshInterval) => {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { Icon as PhosphorIcon } from '@phosphor-icons/react';
|
|
3
|
+
interface ObservabilityWidgetEmptyProps {
|
|
4
|
+
icon: PhosphorIcon;
|
|
5
|
+
header: string;
|
|
6
|
+
}
|
|
7
|
+
declare const ObservabilityWidgetEmpty: FC<ObservabilityWidgetEmptyProps>;
|
|
8
|
+
export default ObservabilityWidgetEmpty;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import Flex, { AlignItems, JustifyContent } from "@galaxy-io/dls/layout/Flex";
|
|
3
|
+
import Box, { BoxVariant } from "@galaxy-io/dls/layout/Box";
|
|
4
|
+
import Icon, { IconVariant } from "@galaxy-io/dls/icons/Icon";
|
|
5
|
+
import { Radius } from "@galaxy-io/dls/theme/enums";
|
|
6
|
+
import EmptyLayout, { EmptyLayoutSize } from "@galaxy-io/dls/layout/EmptyLayout";
|
|
7
|
+
//#region src/pages/observability/components/ObservabilityWidgetEmpty.tsx
|
|
8
|
+
var ObservabilityWidgetEmpty = ({ icon, header }) => /* @__PURE__ */ jsx(EmptyLayout, {
|
|
9
|
+
size: EmptyLayoutSize.SMALL,
|
|
10
|
+
header,
|
|
11
|
+
graphic: /* @__PURE__ */ jsx(Box, {
|
|
12
|
+
variant: BoxVariant.SECONDARY,
|
|
13
|
+
hasBorder: true,
|
|
14
|
+
radius: Radius.MD,
|
|
15
|
+
width: 20,
|
|
16
|
+
height: 20,
|
|
17
|
+
children: /* @__PURE__ */ jsx(Flex, {
|
|
18
|
+
alignItems: AlignItems.CENTER,
|
|
19
|
+
justifyContent: JustifyContent.CENTER,
|
|
20
|
+
height: "100%",
|
|
21
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
22
|
+
component: icon,
|
|
23
|
+
size: 12,
|
|
24
|
+
variant: IconVariant.SECONDARY
|
|
25
|
+
})
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
//#endregion
|
|
30
|
+
export { ObservabilityWidgetEmpty as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import ObservabilityBandMetricTile from "./ObservabilityBandMetricTile.js";
|
|
2
|
+
import ObservabilityBandRunsTile from "./ObservabilityBandRunsTile.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { styled } from "@linaria/react";
|
|
6
|
+
//#region src/pages/observability/components/band/ObservabilityBand.tsx
|
|
7
|
+
var ObservabilityBandGrid = /*#__PURE__*/ styled("div")({
|
|
8
|
+
name: "ObservabilityBandGrid",
|
|
9
|
+
class: "filament-ObservabilityBand-ObservabilityBandGrid-o1u9j31d",
|
|
10
|
+
propsAsIs: false
|
|
11
|
+
});
|
|
12
|
+
var ObservabilityBand = () => /* @__PURE__ */ jsxs(ObservabilityBandGrid, { children: [
|
|
13
|
+
/* @__PURE__ */ jsx(ObservabilityBandRunsTile, {}),
|
|
14
|
+
/* @__PURE__ */ jsx(ObservabilityBandMetricTile, {
|
|
15
|
+
label: "Throughput",
|
|
16
|
+
viewKey: "throughput",
|
|
17
|
+
pivotKey: "throughputPivot",
|
|
18
|
+
isStacked: true
|
|
19
|
+
}),
|
|
20
|
+
/* @__PURE__ */ jsx(ObservabilityBandMetricTile, {
|
|
21
|
+
label: "Usage",
|
|
22
|
+
viewKey: "usage",
|
|
23
|
+
pivotKey: "usagePivot",
|
|
24
|
+
isStacked: false
|
|
25
|
+
})
|
|
26
|
+
] });
|
|
27
|
+
//#endregion
|
|
28
|
+
export { ObservabilityBand as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { RoleColor } from '@galaxy-io/dls/theme/tokens/types';
|
|
3
|
+
import { ObservabilityBandListItem } from './types';
|
|
4
|
+
interface ObservabilityBandListProps {
|
|
5
|
+
title: string;
|
|
6
|
+
emptyText: string;
|
|
7
|
+
items: ObservabilityBandListItem[];
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
colors: (RoleColor | undefined)[];
|
|
10
|
+
}
|
|
11
|
+
declare const ObservabilityBandList: FC<ObservabilityBandListProps>;
|
|
12
|
+
export default ObservabilityBandList;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { FilamentPath, createFilamentHref } from "../../../../module/paths.js";
|
|
2
|
+
import RouterLink from "../../../../components/RouterLink.js";
|
|
3
|
+
import { formatPipelineName } from "../../../../components/pipelines/utils.js";
|
|
4
|
+
import Square, { SquareSize } from "@galaxy-io/dls/shapes/Square";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import Flex, { AlignItems, FlexDirection } from "@galaxy-io/dls/layout/Flex";
|
|
7
|
+
import Box from "@galaxy-io/dls/layout/Box";
|
|
8
|
+
import Skeleton, { SkeletonSize } from "@galaxy-io/dls/feedback/Skeleton";
|
|
9
|
+
import Text, { TextSize, TextVariant, TextWeight } from "@galaxy-io/dls/text/Text";
|
|
10
|
+
import FlexItem from "@galaxy-io/dls/layout/FlexItem";
|
|
11
|
+
import { FontFamily } from "@galaxy-io/dls/theme/enums";
|
|
12
|
+
import Link, { LinkUnderline, LinkVariant } from "@galaxy-io/dls/links/Link";
|
|
13
|
+
import Tooltip from "@galaxy-io/dls/tooltip/Tooltip";
|
|
14
|
+
//#region src/pages/observability/components/band/ObservabilityBandList.tsx
|
|
15
|
+
var ObservabilityBandList = ({ title, emptyText, items, isLoading, colors }) => {
|
|
16
|
+
const renderRows = () => {
|
|
17
|
+
if (isLoading) return Array.from({ length: 3 }, (_, index) => /* @__PURE__ */ jsx(Box, {
|
|
18
|
+
height: 16,
|
|
19
|
+
fillWidth: true,
|
|
20
|
+
children: /* @__PURE__ */ jsx(Skeleton, { size: SkeletonSize.X_SMALL })
|
|
21
|
+
}, index));
|
|
22
|
+
if (items.length === 0) return /* @__PURE__ */ jsx(Text, {
|
|
23
|
+
size: TextSize.BODY_SM,
|
|
24
|
+
variant: TextVariant.TERTIARY,
|
|
25
|
+
children: emptyText
|
|
26
|
+
});
|
|
27
|
+
return items.slice(0, 3).map(({ pipeline, value, tooltip }, index) => {
|
|
28
|
+
const valueText = /* @__PURE__ */ jsx(Text, {
|
|
29
|
+
size: TextSize.BODY_SM,
|
|
30
|
+
family: FontFamily.MONO,
|
|
31
|
+
children: value
|
|
32
|
+
});
|
|
33
|
+
return /* @__PURE__ */ jsxs(Flex, {
|
|
34
|
+
alignItems: AlignItems.CENTER,
|
|
35
|
+
gap: 8,
|
|
36
|
+
minWidth: 0,
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ jsx(Square, {
|
|
39
|
+
size: SquareSize.SMALL,
|
|
40
|
+
color: colors[index % colors.length]
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ jsx(FlexItem, {
|
|
43
|
+
grow: 1,
|
|
44
|
+
minWidth: 0,
|
|
45
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
46
|
+
size: TextSize.BODY_SM,
|
|
47
|
+
lineClamp: 1,
|
|
48
|
+
children: /* @__PURE__ */ jsx(Link, {
|
|
49
|
+
href: createFilamentHref(FilamentPath.PIPELINE, { id: pipeline.id }),
|
|
50
|
+
as: RouterLink,
|
|
51
|
+
variant: LinkVariant.INHERIT,
|
|
52
|
+
underline: LinkUnderline.HOVER,
|
|
53
|
+
children: formatPipelineName(pipeline)
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ jsx(FlexItem, {
|
|
58
|
+
shrink: 0,
|
|
59
|
+
children: tooltip ? /* @__PURE__ */ jsx(Tooltip, {
|
|
60
|
+
body: tooltip,
|
|
61
|
+
children: valueText
|
|
62
|
+
}) : valueText
|
|
63
|
+
})
|
|
64
|
+
]
|
|
65
|
+
}, pipeline.id);
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
return /* @__PURE__ */ jsxs(Flex, {
|
|
69
|
+
direction: FlexDirection.COLUMN,
|
|
70
|
+
gap: 8,
|
|
71
|
+
fillWidth: true,
|
|
72
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
73
|
+
size: TextSize.CAPTION,
|
|
74
|
+
weight: TextWeight.MEDIUM,
|
|
75
|
+
variant: TextVariant.TERTIARY,
|
|
76
|
+
children: title
|
|
77
|
+
}), renderRows()]
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
//#endregion
|
|
81
|
+
export { ObservabilityBandList as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ObservabilityBandPivotKey, ObservabilityBandViewKey } from '../../types';
|
|
3
|
+
interface ObservabilityBandMetricTileProps {
|
|
4
|
+
label: string;
|
|
5
|
+
viewKey: ObservabilityBandViewKey;
|
|
6
|
+
pivotKey: ObservabilityBandPivotKey;
|
|
7
|
+
isStacked: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const ObservabilityBandMetricTile: FC<ObservabilityBandMetricTileProps>;
|
|
10
|
+
export default ObservabilityBandMetricTile;
|