Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data analysis llm page #1172

Merged
merged 60 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
8e06c6f
data analysis page
himanshudube97 Jul 19, 2024
753c6f5
added functions in sql write
himanshudube97 Jul 19, 2024
f3531b0
worked on the table and the full screen loader
himanshudube97 Jul 22, 2024
175528e
added the overwrite component
himanshudube97 Jul 23, 2024
46d3955
added the remaining components
himanshudube97 Jul 24, 2024
e4ff430
connection log component test written
himanshudube97 Jul 24, 2024
e48aac4
Connection components test completed (schemachangedetection and conn…
himanshudube97 Jul 24, 2024
f415abb
fixed the css
himanshudube97 Jul 27, 2024
295e5cd
commits merged from main
himanshudube97 Jul 27, 2024
0ef7711
pull from main branch
himanshudube97 Sep 2, 2024
99163e7
Added the api for prompt, and changed the structure too, moved the po…
himanshudube97 Sep 3, 2024
ba24d71
pull taken from main
himanshudube97 Sep 3, 2024
062f85f
added calculate year dynamically code
himanshudube97 Sep 4, 2024
0f3808e
added the ask api, prompt getting good, showing good, click save as, …
himanshudube97 Sep 4, 2024
f8c7d9f
added the api to save session, refactored some components
himanshudube97 Sep 4, 2024
3da1c2d
chnaged the structure of the components, removed the saveed session f…
himanshudube97 Sep 4, 2024
729769c
edit functionality finished
himanshudube97 Sep 4, 2024
0638afa
new button resets the form
himanshudube97 Sep 4, 2024
589de41
added apis, fixed the tables etc
himanshudube97 Sep 5, 2024
b965cc9
commits
himanshudube97 Sep 5, 2024
e688d0b
code adjustments and removed the closeicon svg
himanshudube97 Sep 5, 2024
6bf0475
changed the log and made function comman, and some toher changes
himanshudube97 Sep 5, 2024
84a6ff4
changes added
himanshudube97 Sep 6, 2024
4ae5b4b
used the custom Dailog in overwrite box
himanshudube97 Sep 6, 2024
1162d42
added and changed fixes, used the prebuilt components
himanshudube97 Sep 9, 2024
8995b55
written jests tests for lklmsummary
himanshudube97 Sep 10, 2024
f36f6db
fixed some css
himanshudube97 Sep 11, 2024
123a273
fixed the cicd linter issue
himanshudube97 Sep 11, 2024
6c88cb8
added the limit
himanshudube97 Sep 12, 2024
f71d66c
added tooltip
himanshudube97 Sep 13, 2024
89082d5
Merge branch 'main' into data-analysis-llm-page
fatchat Sep 15, 2024
9eb5c0a
download button added temp
himanshudube97 Sep 17, 2024
b4750c7
Data analysis completed all changes
himanshudube97 Sep 18, 2024
8a2b890
changes from main
himanshudube97 Sep 18, 2024
8d5b234
fixed deepscan issues
himanshudube97 Sep 18, 2024
ad74767
final issue resolved
himanshudube97 Sep 18, 2024
cd671cc
added pages title and pacakage too
himanshudube97 Sep 19, 2024
9e00034
fixed the sql placeholder thing
himanshudube97 Sep 23, 2024
cb8f73a
reordering the download cs button fields issue 1209
himanshudube97 Sep 23, 2024
032b344
clicking on new gives warning issue 1210
himanshudube97 Sep 23, 2024
0f96466
changed the text in the tooltip issue 1211 and issue 1212
himanshudube97 Sep 23, 2024
323b6e7
added a markdown editor isse 1216 , 1218
himanshudube97 Sep 23, 2024
655ac16
added tooltip text for saved sessions info issue 1219
himanshudube97 Sep 23, 2024
ac113fe
removed the thumbs up issue 1221
himanshudube97 Sep 23, 2024
663fa17
made the form errors as toast issue 1205
himanshudube97 Sep 24, 2024
2ff0283
made prompt a single box issue 1207
himanshudube97 Sep 24, 2024
e95f128
submit button not disabled issue 1207
himanshudube97 Sep 24, 2024
e1110d3
fixes done
himanshudube97 Sep 24, 2024
19f6c7e
tests removed for time being
himanshudube97 Sep 24, 2024
2c571dd
updated at added to table
himanshudube97 Sep 25, 2024
57d98ef
fixed the issue 1223
himanshudube97 Sep 25, 2024
e91b116
disclaimer page
himanshudube97 Sep 26, 2024
51852ed
added open button again
himanshudube97 Sep 26, 2024
3c3f81c
commits done test cases checked
himanshudube97 Sep 27, 2024
49c5393
Merge pull request #1227 from DalgoT4D/data-analysis-issue-fixes
himanshudube97 Sep 27, 2024
f4d0184
pull from main
himanshudube97 Sep 27, 2024
a99ee56
fixed tests and added test for the Disclaimer
himanshudube97 Sep 27, 2024
128e307
changes added
himanshudube97 Sep 27, 2024
333f0a9
fixed deepscan issues
himanshudube97 Sep 27, 2024
06f9896
Merge branch 'main' into data-analysis-llm-page
Ishankoradia Sep 29, 2024
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
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@
"react-dom": "^18.3.1",
"react-hook-form": "^7.52.2",
"react-joyride": "^2.8.1",
"react-markdown": "^9.0.1",
"react-papaparse": "^4.4.0",
"react-resizable": "^3.0.5",
"reactflow": "^11.11.4",
"remark-gfm": "^4.0.0",
"superset-ui": "^0.0.0-1",
"swr": "^2.2.4",
"typescript": "5.5.4",
Expand Down
62 changes: 62 additions & 0 deletions src/assets/icons/aianalysis.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import * as React from 'react';
const AiAnalysis = (props: any) => (
<svg
width="26"
height="20"
viewBox="0 0 26 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
d="M10.0598 17.9178H3.66699C2.56242 17.9178 1.66699 17.0224 1.66699 15.9178V3.75C1.66699 2.64543 2.56242 1.75 3.66699 1.75H12.9556C14.0602 1.75 14.9556 2.64543 14.9556 3.75V9.10913"
stroke={props.fill || '#2C3E57'}
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
fill="white"
/>
<path
d="M4.10352 4.85156H12.2981"
stroke={props.fill || '#2C3E57'}
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
fill={props.fill || '#7D8998'}
/>
<path
d="M4.1037 8.17383H12.2983"
stroke={props.fill || '#2C3E57'}
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
fill={props.fill || '#7D8998'}
/>
<path
d="M4.10254 11.4941H7.42469"
stroke={props.fill || '#2C3E57'}
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
fill={props.fill || '#7D8998'}
/>
<path
d="M4.1037 14.5957H7.42585"
stroke={props.fill || '#2C3E57'}
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
fill={props.fill || '#7D8998'}
/>
<path
d="M16.0002 19.5H16.0344C18.2555 19.5 19.9654 19.5 21.2586 19.3563C22.5547 19.2123 23.5424 18.915 24.2288 18.2286C24.9152 17.5421 25.2125 16.5545 25.3566 15.2583C25.5003 13.9651 25.5002 12.2553 25.5002 10.0341V10V9.96586C25.5002 7.74471 25.5003 6.03487 25.3566 4.74166C25.2125 3.44552 24.9152 2.45786 24.2288 1.77145C23.5424 1.08503 22.5547 0.787699 21.2586 0.643683C19.9654 0.499993 18.2555 0.499996 16.0344 0.5H16.0002H15.9661C13.745 0.499996 12.0351 0.499993 10.7419 0.643683C9.44577 0.787699 8.4581 1.08503 7.77169 1.77145C7.08528 2.45786 6.78794 3.44552 6.64393 4.74166C6.50024 6.03487 6.50024 7.74471 6.50024 9.96587V10V10.0341C6.50024 12.2553 6.50024 13.9651 6.64393 15.2583C6.78794 16.5545 7.08528 17.5421 7.77169 18.2286C8.4581 18.915 9.44577 19.2123 10.7419 19.3563C12.0351 19.5 13.745 19.5 15.9661 19.5H16.0002Z"
fill={props.fill || '#2C3E57'}
stroke="#F4F4F4"
/>
<path
d="M12.5842 14H11.4322C11.2882 14 11.2402 13.916 11.2882 13.748L13.1842 6.536C13.2402 6.368 13.3602 6.284 13.5442 6.284H15.1402C15.3402 6.284 15.4602 6.368 15.5002 6.536L17.3962 13.748C17.4442 13.916 17.3962 14 17.2522 14H16.1002C16.0122 14 15.9522 13.984 15.9202 13.952C15.8882 13.912 15.8642 13.844 15.8482 13.748L15.5122 12.428H13.1722L12.8362 13.748C12.8202 13.844 12.7922 13.912 12.7522 13.952C12.7202 13.984 12.6642 14 12.5842 14ZM14.3242 7.736L13.4602 11.204H15.2362L14.3722 7.736H14.3242ZM20.0439 6.536V13.748C20.0439 13.916 19.9599 14 19.7919 14H18.7719C18.6039 14 18.5199 13.916 18.5199 13.748V6.536C18.5199 6.368 18.6039 6.284 18.7719 6.284H19.7919C19.9599 6.284 20.0439 6.368 20.0439 6.536Z"
fill="white"
/>
</svg>
);
export default AiAnalysis;
8 changes: 8 additions & 0 deletions src/assets/icons/arrow_back_ios.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/content_copy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/icons/dalgoIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/folder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/assets/icons/info.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/icons/thumb_up (1).svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/icons/thumb_up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/components/Connections/SchemaChangeDetailsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ const SchemaChangeDetailsForm = ({
const checkProgress = async function (
taskId: string
): Promise<[boolean, any]> {

try {
const message = await httpGet(session, `tasks/stp/${taskId}`);
const message = await httpGet(session, `tasks/stp/${taskId}`)
await delay(3000);
// setProgressMessages(message['progress']);
const lastMessage = message['progress'][message['progress'].length - 1];
Expand Down
87 changes: 87 additions & 0 deletions src/components/DataAnalysis/Disclaimer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import { httpPut } from '@/helpers/http';
import {
Box,
Button,
Dialog,
DialogActions,
DialogTitle,
Typography,
} from '@mui/material';
import { useSession } from 'next-auth/react';

type Org = {
name: string;
slug: string;
airbyte_workspace_id: string;
viz_url: string | null;
viz_login_type: string | null;
is_demo: boolean;
};

export const Disclaimer = ({
open,
setIsOpen,
}: {
open: boolean;
setIsOpen: any;
}) => {
const { data: session } = useSession();
const handleOkayButton = async () => {
try {
const response = await httpPut(session, 'v1/organizations/user_self', {
toupdate_email: session?.user?.email,
llm_optin: true,
});
if (response && response.email) {
setIsOpen(false);
}
} catch (error) {
console.log(error, 'error');
return;
}
};

return (
<Dialog
open={open}
PaperProps={{
sx: { borderRadius: '8px', padding: ' 2.3rem 3rem', width: '480px' },
}}
>
<DialogTitle variant="h5" fontWeight={700} sx={{ padding: '0' }}>
<Box display="flex" alignItems="center">
<Box flexGrow={1}>Disclaimer</Box>
</Box>
</DialogTitle>
<DialogTitle flexGrow={1} sx={{ padding: '0', mt: '1.5rem' }}>
{' '}
<Typography sx={{ lineHeight: '26px' }}>
This content has been generated by an artificial intelligence language
model, and it is provided as-is without any warranties or guarantees
of accuracy. While we strive to deliver accurate and reliable content,
please note that the information provided may not be entirely
error-free or up-to-date. Any actions taken based on this content are
at your own risk. We recommend seeking qualified expertise or
conducting further research to validate and supplement the information
provided. We disclaim any liability for damages or losses resulting
from the use or reliance on this content.
</Typography>
</DialogTitle>
<DialogActions
sx={{
mt: '2.3rem',
justifyContent: 'flex-start',
p: 0,
}}
>
<Button
onClick={handleOkayButton}
variant="contained"
sx={{ width: '5rem' }}
>
Okay
</Button>
</DialogActions>
</Dialog>
);
};
Loading