mirror of https://github.com/buster-so/buster.git
fix additional files and problems
This commit is contained in:
parent
ee58591687
commit
e43defac98
|
@ -36,7 +36,10 @@ export const PermissionListDatasetGroupContainer: React.FC<{
|
|||
{
|
||||
title: 'Name',
|
||||
dataIndex: 'name',
|
||||
render: (name: string, datasetGroup: ListDatasetGroupsResponse) => {
|
||||
render: (
|
||||
name: string | number | boolean | null | undefined,
|
||||
datasetGroup: ListDatasetGroupsResponse
|
||||
) => {
|
||||
return (
|
||||
<div className="flex items-center justify-between gap-x-2">
|
||||
<Text>{name}</Text>
|
||||
|
|
|
@ -13,10 +13,10 @@ export const TOP_SASH_ID = 'top-sash-id';
|
|||
export const calculateColumnSpan = (layout: number[]) => {
|
||||
const columnSpans: number[] = [];
|
||||
const totalColumns = layout.reduce((sum, ratio) => sum + ratio, 0);
|
||||
layout.forEach((ratio) => {
|
||||
for (const ratio of layout) {
|
||||
const columnSpan = Math.round((ratio / totalColumns) * NUMBER_OF_COLUMNS);
|
||||
columnSpans.push(columnSpan);
|
||||
});
|
||||
}
|
||||
return columnSpans;
|
||||
};
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import { SnowflakeIcon } from './customIcons/snowflake';
|
|||
import { SqlServer } from './customIcons/sqlserver';
|
||||
import { SupabaseIcon } from './customIcons/supabase';
|
||||
|
||||
const IconRecord: Record<DataSourceTypes, any> = {
|
||||
const IconRecord: Record<DataSourceTypes, React.FC<Parameters<typeof PostgresIcon>[0]>> = {
|
||||
[DataSourceTypes.postgres]: PostgresIcon,
|
||||
[DataSourceTypes.mysql]: MySQLIcon,
|
||||
[DataSourceTypes.bigquery]: BigQueryIcon,
|
||||
|
|
|
@ -32,7 +32,11 @@ export interface BusterListColumn {
|
|||
export type BusterListRow = BusterListRowItem;
|
||||
export interface BusterListRowItem {
|
||||
id: string;
|
||||
data: Record<string, string | React.ReactNode | number | boolean | null | undefined> | null;
|
||||
data: Record<
|
||||
string,
|
||||
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
||||
string | React.ReactNode | number | boolean | null | undefined | object | any
|
||||
> | null;
|
||||
onClick?: () => void;
|
||||
link?: string;
|
||||
onSelect?: () => void;
|
||||
|
|
|
@ -37,14 +37,13 @@ export const StreamingMessageCode: React.FC<
|
|||
let currentLine = 1;
|
||||
|
||||
if (!modified || modified.length === 0) {
|
||||
// If no modified ranges, process the entire text as visible
|
||||
lines.forEach((line) => {
|
||||
for (const line of lines) {
|
||||
segments.push({
|
||||
type: 'text',
|
||||
content: line,
|
||||
lineNumber: currentLine++
|
||||
});
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// Sort modified ranges to ensure proper processing
|
||||
const sortedModified = [...modified].sort((a, b) => a[0] - b[0]);
|
||||
|
|
|
@ -43,8 +43,8 @@ const StreamingMessageBody: React.FC<{
|
|||
}> = React.memo(({ metadata }) => {
|
||||
return (
|
||||
<div className="flex w-full flex-col items-center space-y-1 px-2.5 py-2">
|
||||
{metadata.map((metadata, index) => (
|
||||
<MetadataItem metadata={metadata} key={index} />
|
||||
{metadata.map((meta) => (
|
||||
<MetadataItem metadata={meta} key={meta.message} />
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -41,6 +41,7 @@ export const StreamingMessage_Text: React.FC<StreamingMessage_TextProps> = React
|
|||
return (
|
||||
<div className={'whitespace-pre-wrap'}>
|
||||
{textChunksRef.current.map((chunk, index) => (
|
||||
// biome-ignore lint/suspicious/noArrayIndexKey: we need to use the index to animate the chunks
|
||||
<AnimatedSpan key={index} isCompletedStream={isCompletedStream}>
|
||||
{chunk}
|
||||
</AnimatedSpan>
|
||||
|
|
Loading…
Reference in New Issue