Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
aldrinjenson committed Sep 8, 2023
1 parent 34066ad commit d446e7b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
9 changes: 0 additions & 9 deletions src/api/constants.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
const API_V1 = 'api/v1';

// const baseURL = process.env.REACT_APP_API_URL || '/';

// Streams Management
export const LOG_STREAM_LIST_URL = `${API_V1}/logstream`;
export const LOG_STREAMS_SCHEMA_URL = (streamName: string) => `${LOG_STREAM_LIST_URL}/${streamName}/schema`;
Expand All @@ -20,12 +18,5 @@ export const USER_URL = (username: string) => `${USERS_LIST_URL}/${username}`;
export const USER_ROLES_URL = (username: string) => `${USER_URL(username)}/role`;
export const USER_PASSWORD_URL = (username: string) => `${USER_URL(username)}/generate-new-password`;

// Roles Management
export const ROLES_LIST_URL = `${API_V1}/role`;
export const ROLE_URL = (roleName: string) => `${ROLES_LIST_URL}/${roleName}`;

//USERS LOGIN
export const LOGIN_URL = `${API_V1}/o/login?redirect=${window.location.origin}`;

// LLM queries
export const LLM_QUERY_URL = `${API_V1}/llm`;
9 changes: 9 additions & 0 deletions src/pages/Query/QueryCodeEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ const QueryCodeEditor: FC = () => {
const query = sanitseSqlString(inputQuery);

resetData();
notifications.show({
id: 'load-data',
loading: true,
color: '#545BEB',
title: 'Running Query',
message: 'Data will be loaded.',
autoClose: false,
withCloseButton: false,
});
let LogQuery = {
startTime: subLogQuery.get().startTime,
endTime: subLogQuery.get().endTime,
Expand Down
1 change: 0 additions & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Field } from '@/@types/parseable/dataType';
import dayjs from 'dayjs';

export const wait = (sec = 1) => new Promise<void>((res) => setTimeout(res, sec * 1000));
Expand Down

0 comments on commit d446e7b

Please sign in to comment.