Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.
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
8 changes: 2 additions & 6 deletions .github/workflows/prettier.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Continuous Integration

# This action works with pull requests and pushes
on:
pull_request

Expand All @@ -10,13 +9,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}

- name: Prettify code
uses: creyD/prettier_action@v4.3
with:
# This part is also where you can pass other options, for example:
prettier_options: --write **/*.{js,md}
prettier_options: --write **/*.{ts,tsx,js,json}
4 changes: 2 additions & 2 deletions src/@types/parseable/api/about.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ export type AboutData = {
oidcActive: boolean;
cache: string;
analytics: {
clarityTag: string;
}
clarityTag: string;
};
};
2 changes: 1 addition & 1 deletion src/@types/parseable/api/clusterInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ export type IngestorQueryRecord = {
parseable_lifetime_storage_size_staging: number;
parseable_deleted_storage_size_data: number;
parseable_deleted_storage_size_staging: number;
};
};
14 changes: 7 additions & 7 deletions src/@types/parseable/api/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ export type LogsQuery = {
streamName: string;
startTime: Date;
endTime: Date;
access:string[]|null;
access: string[] | null;
};

export enum SortOrder {
ASCENDING = 1,
DESCENDING = -1
DESCENDING = -1,
}

export type LogsSearch = {
search: string;
filters: Record<string, string[]>;
sort: {
key: string,
order: SortOrder
}
key: string;
order: SortOrder;
};
};

export type LogsData = {
Expand All @@ -35,8 +35,8 @@ export type Log = {
};

export type LogSelectedTimeRange = {
state : "fixed"| "custom";
value : string;
state: 'fixed' | 'custom';
value: string;
};

export type UserRoles = {
Expand Down
46 changes: 23 additions & 23 deletions src/@types/parseable/api/savedFilters.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
import { QueryType } from "@/pages/Stream/providers/FilterProvider";
import { QueryType } from '@/pages/Stream/providers/FilterProvider';

export type SavedFilterType = {
version: string;
stream_name: string;
filter_name: string,
filter_id: string,
user_id: string;
filter_name: string;
filter_id: string;
user_id: string;
query: {
filter_type: 'sql' | 'builder';
filter_query?: string;
filter_builder?: QueryType
}
time_filter: null | {
from: string,
to: string
}
}
filter_type: 'sql' | 'builder';
filter_query?: string;
filter_builder?: QueryType;
};
time_filter: null | {
from: string;
to: string;
};
};

export type CreateSavedFilterType = {
stream_name: string;
filter_name: string;
filter_name: string;
query: {
filter_type: 'sql' | 'builder';
filter_query?: string;
filter_builder?: QueryType
}
time_filter: null | {
from: string,
to: string
}
}
filter_type: 'sql' | 'builder';
filter_query?: string;
filter_builder?: QueryType;
};
time_filter: null | {
from: string;
to: string;
};
};
26 changes: 14 additions & 12 deletions src/@types/parseable/api/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,26 @@ export type action = {
};

export type StreamInfo = {
"created-at": string;
"first-event-at": string;
'created-at': string;
'first-event-at': string;
cache_enabled: boolean;
time_partition: string;
static_schema_flag: boolean;
time_partition_limit: string,
custom_partition: string,
}
time_partition_limit: string;
custom_partition: string;
};

export type LogStreamRetention = Array<action>;

export type HotTierConfig = {
size: string;
used_size: string;
available_size: string;
oldest_date_time_entry: string;
} | {};
export type HotTierConfig =
| {
size: string;
used_size: string;
available_size: string;
oldest_date_time_entry: string;
}
| {};

export type UpdateHotTierConfig = {
size: string;
}
};
11 changes: 5 additions & 6 deletions src/api/about.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

import { AboutData } from "@/@types/parseable/api/about";
import { Axios } from "./axios";
import { ABOUT_URL } from "./constants";
import { AboutData } from '@/@types/parseable/api/about';
import { Axios } from './axios';
import { ABOUT_URL } from './constants';

export const getCurrentAbout = () => {
return Axios().get<AboutData>(ABOUT_URL);
}
return Axios().get<AboutData>(ABOUT_URL);
};
3 changes: 1 addition & 2 deletions src/api/auth.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Axios } from './axios';
import { LOGIN_URL } from './constants';

import { LOGIN_URL } from './constants';

export const loginIn = (username: string, password: string) => {
const credentials = btoa(`${username}:${password}`);
Expand Down
2 changes: 1 addition & 1 deletion src/api/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ export const getClusterMetrics = () => {

export const deleteIngestor = (ingestorUrl: string) => {
return Axios().delete(INGESTOR_DELETE_URL(ingestorUrl));
};
};
1 change: 0 additions & 1 deletion src/api/llm.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Axios } from './axios';
import { LLM_QUERY_URL } from './constants';


// LLM
export const postLLM = (prompt: string, stream: string) => {
return Axios().post(LLM_QUERY_URL, {
Expand Down
6 changes: 3 additions & 3 deletions src/api/logStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
UPDATE_SAVED_FILTERS_URL,
DELETE_SAVED_FILTERS_URL,
CREATE_SAVED_FILTERS_URL,
LOG_STREAM_HOT_TIER
LOG_STREAM_HOT_TIER,
} from './constants';
import { HotTierConfig, LogStreamData, LogStreamSchemaData } from '@/@types/parseable/api/stream';

Expand Down Expand Up @@ -79,12 +79,12 @@ export const getLogStreamInfo = (streamName: string) => {

export const getHotTierInfo = (streamName: string) => {
return Axios().get<HotTierConfig>(LOG_STREAM_HOT_TIER(streamName));
}
};

export const updateHotTierInfo = (streamName: string, data: any) => {
return Axios().put(LOG_STREAM_HOT_TIER(streamName), data);
};

export const deleteHotTierInfo = (streamName: string) => {
return Axios().delete(LOG_STREAM_HOT_TIER(streamName));
};
};
12 changes: 6 additions & 6 deletions src/assets/arrow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1666,12 +1666,12 @@ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefi
export type DeepPartial<T> = T extends Builtin
? T
: T extends globalThis.Array<infer U>
? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U>
? ReadonlyArray<DeepPartial<U>>
: T extends {}
? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U>
? ReadonlyArray<DeepPartial<U>>
: T extends {}
? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;

function toTimestamp(date: Date): Timestamp {
const seconds = date.getTime() / 1_000;
Expand Down
12 changes: 6 additions & 6 deletions src/assets/google/protobuf/timestamp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefi
export type DeepPartial<T> = T extends Builtin
? T
: T extends globalThis.Array<infer U>
? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U>
? ReadonlyArray<DeepPartial<U>>
: T extends {}
? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U>
? ReadonlyArray<DeepPartial<U>>
: T extends {}
? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;

function longToNumber(long: Long): number {
if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
Expand Down
7 changes: 5 additions & 2 deletions src/components/Button/Retry.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Button, ButtonProps, px } from '@mantine/core';
import { IconReload } from '@tabler/icons-react';
import { FC } from 'react';
import classes from './Button.module.css'
import classes from './Button.module.css';

type RetryProps = ButtonProps & {
onClick: () => void;
Expand All @@ -13,7 +13,10 @@ export const RetryBtn: FC<RetryProps> = (props) => {
const { retryBtn } = classes;

return (
<Button className={[className, retryBtn].join(" ")} rightSection={<IconReload size={px('0.8rem')} />} {...restProps}>
<Button
className={[className, retryBtn].join(' ')}
rightSection={<IconReload size={px('0.8rem')} />}
{...restProps}>
Reload
</Button>
);
Expand Down
8 changes: 4 additions & 4 deletions src/components/Button/ToggleButton.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import { Button, ButtonProps } from '@mantine/core';
import { FC, ReactNode } from 'react';
import classes from './Button.module.css'
import classes from './Button.module.css';

type ToggleButtonProps = ButtonProps & {
onClick: () => void;
toggled: boolean;
renderIcon?: () => ReactNode;
label?: string;
iconPosition?: 'left' | 'right';
customClassName?: string | null;
customClassName?: string | null;
};

export const ToggleButton: FC<ToggleButtonProps> = (props) => {
const { onClick, toggled, label = '', renderIcon, customClassName = '' } = props;
const { toggleBtn, toggleBtnActive } = classes;
const iconPosition = props.iconPosition === 'right' ? 'rightSection' : 'leftSection'
const iconPosition = props.iconPosition === 'right' ? 'rightSection' : 'leftSection';
return (
<Button
className={[customClassName, toggleBtn, ...(toggled ? [toggleBtnActive] : [])].join(" ")}
className={[customClassName, toggleBtn, ...(toggled ? [toggleBtnActive] : [])].join(' ')}
onClick={onClick}
{...(renderIcon && { [iconPosition]: renderIcon() })}>
{label}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Empty/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { CenterProps, TextProps } from '@mantine/core';
import { Center, Text } from '@mantine/core';
import type { FC } from 'react';
import styles from './Empty.module.css'
import styles from './Empty.module.css';

type EmptyProps = {
height?: number | string;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Header/Dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type FC } from 'react';
import { Select } from '@mantine/core';
import classes from './styles/LogQuery.module.css'
import classes from './styles/LogQuery.module.css';

type DropdownProps = {
data: string[];
Expand All @@ -11,7 +11,7 @@ type DropdownProps = {
};

const Dropdown: FC<DropdownProps> = (props) => {
const { data, onChange, placeholder = "Export", searchable = false, value = null } = props;
const { data, onChange, placeholder = 'Export', searchable = false, value = null } = props;

return (
<Select
Expand Down
14 changes: 10 additions & 4 deletions src/components/Header/HelpModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,21 @@ const HelpCard: FC<HelpCardProps> = (props) => {
);
};


const HelpModal: FC = () => {
const [helpModalOpen, setAppStore] = useAppStore(store => store.helpModalOpen)
const [helpModalOpen, setAppStore] = useAppStore((store) => store.helpModalOpen);
const classes = styles;
const { container, aboutTitle, aboutDescription, helpIconContainer } = classes;
const onClose = useCallback(() => setAppStore((store) => appStoreReducers.toggleHelpModal(store, false)), [])
const onClose = useCallback(() => setAppStore((store) => appStoreReducers.toggleHelpModal(store, false)), []);

return (
<Modal opened={helpModalOpen} onClose={onClose} withinPortal withCloseButton={false} size="xl" centered padding={40}>
<Modal
opened={helpModalOpen}
onClose={onClose}
withinPortal
withCloseButton={false}
size="xl"
centered
padding={40}>
<Box className={container}>
<Text className={aboutTitle}>Need help?</Text>
<Text className={aboutDescription}>Ensure uninterrupted deployment</Text>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Header/RefreshInterval.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const RefreshInterval: FC = () => {
console.log(e);
}
}
}
};

clearIntervalInstance();
if (refreshInterval !== null) {
Expand All @@ -39,7 +39,7 @@ const RefreshInterval: FC = () => {
timerRef.current = intervalId;
}

return () => timerRef.current ? clearInterval(timerRef.current) : _.noop();
return () => (timerRef.current ? clearInterval(timerRef.current) : _.noop());
}, [refreshInterval]);

const { intervalbtn } = classes;
Expand Down
Loading