Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
560 changes: 310 additions & 250 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@noble/hashes": "2.2.0",
"@testing-library/dom": "^10.4.1",
"depcheck": "1.4.7",
"knip": "6.4.1",
"knip": "6.7.0",
"eslint-plugin-react-x": "4.2.3",
"husky": "9.1.0",
"jsdom": "29.0.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/jaeger-ui/src/model/ddg/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export type TDdgPayload = {
dependencies: TDdgPayloadPath[];
};

export type TDdgService = {
type TDdgService = {
name: string;
operations: Map<string, TDdgOperation>;
};
Expand Down Expand Up @@ -117,11 +117,11 @@ export type TDdgAddViewModifierPayload = TDdgModelParams & {
visibilityIndices: number[];
};

export type TDdgClearViewModifiersFromIndicesPayload = TDdgAddViewModifierPayload & { viewModifier?: void };
type TDdgClearViewModifiersFromIndicesPayload = TDdgAddViewModifierPayload & { viewModifier?: void };

export type TDdgRemoveViewModifierFromIndicesPayload = TDdgAddViewModifierPayload;

export type TDdgRemoveViewModifierPayload = TDdgAddViewModifierPayload & { visibilityIndices?: void };
type TDdgRemoveViewModifierPayload = TDdgAddViewModifierPayload & { visibilityIndices?: void };

export type TDdgViewModifierRemovalPayload =
| TDdgClearViewModifiersFromIndicesPayload
Expand Down
12 changes: 10 additions & 2 deletions packages/jaeger-ui/src/stores/archive-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
import { create } from 'zustand';
import JaegerAPI from '../api/jaeger';
import { toApiError } from '../types/api-error';
import { ErrorTraceArchive, LoadingTraceArchive, TraceArchive } from '../types/archive';
import {
ErrorTraceArchive,
LoadingTraceArchive,
SuccessfulTraceArchive,
TraceArchive,
} from '../types/archive';

type ArchiveStore = {
archives: Record<string, TraceArchive>;
Expand All @@ -22,7 +27,10 @@ export const useArchiveStore = create<ArchiveStore>((set, _get) => ({
try {
await JaegerAPI.archiveTrace(traceId);
set(s => ({
archives: { ...s.archives, [traceId]: { isArchived: true, isAcknowledged: false } },
archives: {
...s.archives,
[traceId]: { isArchived: true, isAcknowledged: false } satisfies SuccessfulTraceArchive,
},
}));
} catch (caught) {
set(s => ({
Expand Down
2 changes: 1 addition & 1 deletion packages/jaeger-ui/src/types/archive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ApiError } from './api-error';
export type LoadingTraceArchive = { isArchiving: true };
export type SuccessfulTraceArchive = { isAcknowledged: false; isArchived: true };
export type ErrorTraceArchive = { error: ApiError; isAcknowledged: false; isArchived: false; isError: true };
export type AcknowledgedTraceArchive = Omit<SuccessfulTraceArchive | ErrorTraceArchive, 'isAcknowledged'> & {
type AcknowledgedTraceArchive = Omit<SuccessfulTraceArchive | ErrorTraceArchive, 'isAcknowledged'> & {
isAcknowledged: true;
};

Expand Down
4 changes: 2 additions & 2 deletions packages/jaeger-ui/src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type TScript = {
type: 'inline';
};

export type LinkPatternsConfig = {
type LinkPatternsConfig = {
// type defines the entity that the pattern applies to.
// 'traces' patterns apply to the whole trace, and have access to 'traceID' value.
// Other patterns apply to tags at different levels. They have access to the value
Expand Down Expand Up @@ -58,7 +58,7 @@ export type MonitorEmptyStateConfig = {
};
};

export type MonitorConfig = {
type MonitorConfig = {
menuEnabled?: boolean;
emptyState?: MonitorEmptyStateConfig;
docsLink?: string;
Expand Down
10 changes: 5 additions & 5 deletions packages/jaeger-ui/src/types/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export type MetricsAPIQueryParams = {
spanKind: spanKinds;
};

export type LableObject = {
type LableObject = {
name: string;
value: string;
};
Expand All @@ -38,15 +38,15 @@ export type MetricObject = {
metricPoints: MetricPointObject[];
};

export type MetricsAPIServiceResponseData<T = AvailableServiceMetrics, U = 0.95> = {
type MetricsAPIServiceResponseData<T = AvailableServiceMetrics, U = 0.95> = {
name: T;
type: 'GAUGE';
help: string;
metrics: MetricObject[];
quantile: U;
};

export type MetricsAPIOpsResponseData<T = AvailableOpsMetrics> = {
type MetricsAPIOpsResponseData<T = AvailableOpsMetrics> = {
name: T;
type: 'GAUGE';
help: string;
Expand All @@ -59,7 +59,7 @@ export type Points = {
y: number | null;
};

export type DataAvg = {
type DataAvg = {
service_operation_call_rate: null | number;
service_operation_error_rate: null | number;
service_operation_latencies: null | number;
Expand Down Expand Up @@ -119,7 +119,7 @@ enum PromiseStatus {
rejected = 'rejected',
}

export type PromiseFulfilledResult<T> = {
type PromiseFulfilledResult<T> = {
status: PromiseStatus.fulfilled;
value: T;
};
Expand Down
2 changes: 1 addition & 1 deletion packages/jaeger-ui/src/types/trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export type KeyValuePair<ValueType = string> = {
value: ValueType;
};

export type Log = {
type Log = {
timestamp: number;
fields: ReadonlyArray<KeyValuePair>;
};
Expand Down
6 changes: 3 additions & 3 deletions packages/plexus/src/Digraph/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ export type TRenderNodeFn<T = Record<string, unknown>> = (
utils: TRendererUtils
) => React.ReactNode;

export type TRenderMeasurableNodeFn<T = Record<string, unknown>> = (
type TRenderMeasurableNodeFn<T = Record<string, unknown>> = (
vertex: TVertex<T>,
utils: TRendererUtils,
layoutVertex: TLayoutVertex<T> | null
) => React.ReactNode;

export type TMeasureNodeUtils = {
type TMeasureNodeUtils = {
layerType: 'html' | 'svg';
getWrapperSize: () => { height: number; width: number };
getWrapper: () => TOneOfTwo<{ htmlWrapper: HTMLDivElement | null }, { svgWrapper: SVGGElement | null }>;
Expand Down Expand Up @@ -113,7 +113,7 @@ type TStandaloneNodesLayer<T = Record<string, unknown>, U = Record<string, unkno
}
);

export type TEdgesLayer<T = Record<string, unknown>, U = Record<string, unknown>> = TKeyed &
type TEdgesLayer<T = Record<string, unknown>, U = Record<string, unknown>> = TKeyed &
TSetOnContainer<T, U> & {
edges: true;
markerEndId?: string;
Expand Down
4 changes: 2 additions & 2 deletions packages/plexus/src/LayoutManager/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ export type TWorkerErrorMessage = {
type: EWorkerErrorType.Error;
};

export type TNodesUpdate<T = Record<string, unknown>> = {
type TNodesUpdate<T = Record<string, unknown>> = {
type: ECoordinatorPhase.Positions;
layoutId: number;
graph: TLayoutGraph;
vertices: TLayoutVertex<T>[];
};

export type TLayoutUpdate<T = Record<string, unknown>, U = Record<string, unknown>> = {
type TLayoutUpdate<T = Record<string, unknown>, U = Record<string, unknown>> = {
type: ECoordinatorPhase.Done;
layoutId: number;
graph: TLayoutGraph;
Expand Down
Loading