Skip to content

Commit 348b524

Browse files
committed
temp [ci skip]
1 parent 627407a commit 348b524

2 files changed

Lines changed: 8 additions & 36 deletions

File tree

vscode/react/src/api/instance.ts

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ export const isErr = <T, E>(
5050

5151
async function fetchAPIDevelopment<T = any, B extends object = any>(
5252
config: FetchOptions<B>,
53-
options?: Partial<FetchOptionsWithSignal>,
5453
): Promise<T & ResponseWithDetail> {
5554
// Generate a unique ID for this request
5655
// Create a promise that will resolve when we get a response with matching ID
@@ -101,34 +100,8 @@ async function fetchAPIDevelopment<T = any, B extends object = any>(
101100
})
102101
}
103102

104-
function toRequestHeaders(headers?: Record<string, string>): HeadersInit {
105-
return {
106-
'Content-Type': 'application/json',
107-
...(headers ?? {}),
108-
}
109-
}
110-
111-
function toRequestBody(obj: unknown): BodyInit {
112-
try {
113-
return JSON.stringify(obj)
114-
} catch (error) {
115-
return ''
116-
}
117-
}
118-
119-
function getUrlWithPrefix(url: string = '/'): string {
120-
let urlWithPrefix = `${window.__BASE_URL__ ?? '/'}/${url}`
121-
122-
while (urlWithPrefix.includes('//')) {
123-
urlWithPrefix = urlWithPrefix.replaceAll('//', '/')
124-
}
125-
126-
return urlWithPrefix
127-
}
128-
129103
export async function fetchAPIProduction<T = any, B extends object = any>(
130104
config: FetchOptions<B>,
131-
options?: Partial<FetchOptionsWithSignal>,
132105
): Promise<T & ResponseWithDetail> {
133106
// Generate a unique ID for this request
134107
const requestId = `query_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`
@@ -180,10 +153,10 @@ export async function fetchAPIProduction<T = any, B extends object = any>(
180153

181154
export function fetchAPI<T = any, B extends object = any>(
182155
config: FetchOptions<B>,
183-
options?: Partial<FetchOptionsWithSignal>,
156+
_options?: Partial<FetchOptionsWithSignal>,
184157
): Promise<T & ResponseWithDetail> {
185158
if (IS_PRODUCTION) {
186-
return fetchAPIProduction(config, options)
159+
return fetchAPIProduction(config)
187160
}
188-
return fetchAPIDevelopment(config, options)
161+
return fetchAPIDevelopment(config)
189162
}

vscode/react/src/components/graph/ModelColumns.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,6 @@ function ModelColumn({
403403
refetch: getColumnLineage,
404404
isFetching,
405405
isError,
406-
isTimeout,
407406
} = useApiColumnLineage(nodeId, column.name)
408407

409408
useEffect(() => {
@@ -457,7 +456,7 @@ function ModelColumn({
457456
<ColumnStatus
458457
isFetching={isFetching}
459458
isError={isError}
460-
isTimeout={isTimeout}
459+
isTimeout={false}
461460
/>
462461
<ColumnDisplay
463462
columnName={column.name}
@@ -468,7 +467,7 @@ function ModelColumn({
468467
className={clsx(
469468
isError
470469
? 'text-danger-500'
471-
: isTimeout
470+
: false
472471
? 'text-warning-500'
473472
: isEmpty
474473
? 'text-neutral-400 dark:text-neutral-600'
@@ -481,7 +480,7 @@ function ModelColumn({
481480
<ColumnStatus
482481
isFetching={isFetching}
483482
isError={isError}
484-
isTimeout={isTimeout}
483+
isTimeout={false}
485484
/>
486485
<ColumnDisplay
487486
columnName={column.name}
@@ -492,7 +491,7 @@ function ModelColumn({
492491
className={clsx(
493492
isError
494493
? 'text-danger-500'
495-
: isTimeout
494+
: false
496495
? 'text-warning-500'
497496
: isEmpty
498497
? 'text-neutral-400 dark:text-neutral-600'
@@ -733,6 +732,6 @@ function getColumnFromLineage(
733732
lineage: Record<string, Lineage>,
734733
nodeId: string,
735734
columnName: string,
736-
): Optional<LineageColumn> {
735+
): LineageColumn | undefined {
737736
return lineage?.[nodeId]?.columns?.[encodeURI(columnName)]
738737
}

0 commit comments

Comments
 (0)