-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
feat: Correlation feature #394
Merged
Merged
Changes from 61 commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
24bb27f
Correlation route and page setup
fdd6389
Added logTable toolbar
praveen5959 66b8237
Added sidebar and collapsable config
praveen5959 f37f28c
Added sidebar and collapsable config
praveen5959 544b400
Added new UX few items
praveen5959 baf8901
Added new desing flow for correlation
praveen5959 84ccdb8
correlation
praveen5959 edc3b90
Created Correlation store and new UX changes
praveen5959 c532cf2
Created Correlation store and new UX changes
praveen5959 ea155f3
Merge pull request #3 from praveen5959/main
praveen5959 71637c3
Moved useCorrelationQueryLogs to react-query
praveen5959 aae5b1e
A seperate hook for schema call
praveen5959 85a7254
Added stream-prefix
praveen5959 c4688e8
Moved to two stream approach
praveen5959 9a6eef3
Added correltation query logic
praveen5959 2a90341
Moved Querier to new component
praveen5959 c63df2a
fix: Add or update OFFSET clause in query (#376)
praveen5959 d8ffd31
fix: handle null userRoles in stream metadata fetching logic (#383)
praveen5959 b63380f
feat: improve UX and DX in delete and reset modals (#382)
pranavgoel29 721da8a
Moved Querier to new component
praveen5959 3c2dc2c
Added event lint graph to correlation
praveen5959 313e5a0
Added multi line graph to events
praveen5959 d650324
feat: collapsible explore page sidebar. (#378)
praveen5959 5cba882
feat: move timeRange to AppStore (#384)
praveen5959 9328b52
Rebased
praveen5959 38b876b
Rebased
praveen5959 bb53abd
Moved Querier to new component
praveen5959 10b3e76
Rebased to main
praveen5959 bfa07c1
Fixed extra schema call issue
praveen5959 4f6205c
Fixed the Event Graph queries
praveen5959 a98e889
Fixed the SQL query with alias
praveen5959 1f6d3ab
UI CHanges
praveen5959 3bcb3f4
Fixed SQL query
praveen5959 cddf346
Added Legend color to ChartTooltip
praveen5959 9ee3269
Fixed the EventGraph issue
praveen5959 827b26a
Fixed FieldItem Width issue
praveen5959 df67dec
Added loaders and removed dead code
praveen5959 202b024
Handled delete stream row bug
praveen5959 eb233e4
Resolved merge conflicts
praveen5959 5c98cb1
Added new CorrelationICon for navbar
praveen5959 751ae35
Added stepper for placeholder
praveen5959 4f3ec2a
Resolved lint issues
praveen5959 b5497ee
Fixed the after correltaion col addition bug
praveen5959 177431a
Fixed the deep nest warning in Log Table
praveen5959 f676bb0
Fixed the timeRange and other data view issues
praveen5959 6ece5d5
Fixed the pagination issues
praveen5959 bf5f3a7
Added loading state on schema call
praveen5959 01657d3
Merge branch 'main' of https://github.com/praveen5959/console into co…
praveen5959 2d5d674
Refactored CorrelationProvider
praveen5959 cba8817
Moved FieldItem to seperate component
praveen5959 bc44b05
Removed lodash dep from Correlation index.tsx
praveen5959 85a7fc1
Merge branch 'main' of https://github.com/praveen5959/console into co…
praveen5959 4dd31d3
Added Tooltips to the field item
praveen5959 7f19d6d
Big fixes reagarding delete field & Joins
praveen5959 a994d64
Fixed the scroll area CSS
praveen5959 5f42766
FIxed Empty rows case and loading states
praveen5959 06e61b0
Merge branch 'main' of https://github.com/praveen5959/console into co…
praveen5959 05fc7a0
fix: Pagination pageData
praveen5959 137f95f
fix: Totalpages count on pagination fixed
praveen5959 c2e4ebb
Bug fixes (timeRange page count, Share Btn)
praveen5959 f9f3a5e
Merge branch 'main' of https://github.com/praveen5959/console into co…
praveen5959 2bce8ae
Removed unused files
praveen5959 801ce01
Removed empty file
praveen5959 006298b
Resolved merge conflicts
praveen5959 28a4351
Removed QueryEngine Logic
praveen5959 e2ff453
Improved the CorelationIcon logic
praveen5959 35e8a88
fix: Correlate button disable states fixed
praveen5959 667f685
Removed logs
praveen5959 12da404
Merge branch 'main' of https://github.com/praveen5959/console into co…
praveen5959 0aedb67
Bug fixes
praveen5959 4ce85b9
fix: Correlate btn and explore page changes
praveen5959 d592b75
Merge branch 'correlation' of https://github.com/praveen5959/console …
praveen5959 5b57f6c
Lint fixes
praveen5959 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { forwardRef } from 'react'; | ||
|
||
export const CorrelationIcon = forwardRef< | ||
SVGSVGElement, | ||
{ | ||
stroke?: string; | ||
strokeWidth?: number; | ||
height?: string; | ||
width?: string; | ||
} | ||
>(({ stroke, strokeWidth, height, width }, ref) => ( | ||
<svg ref={ref} height={height} width={width} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
d="M13.3333 17.3333L14.6667 18.6667C15.0203 19.0203 15.4999 19.219 16 19.219C16.5001 19.219 16.9797 19.0203 17.3333 18.6667L22.6667 13.3333C23.0203 12.9797 23.219 12.5001 23.219 12C23.219 11.4999 23.0203 11.0203 22.6667 10.6667L17.3333 5.33333C16.9797 4.97971 16.5001 4.78105 16 4.78105C15.4999 4.78105 15.0203 4.97971 14.6667 5.33333L9.33333 10.6667C8.97971 11.0203 8.78105 11.4999 8.78105 12C8.78105 12.5001 8.97971 12.9797 9.33333 13.3333L10.6667 14.6667" | ||
stroke={stroke} | ||
strokeWidth={strokeWidth} | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
/> | ||
<path | ||
d="M10.6667 6.66667L9.33333 5.33333C8.97971 4.97971 8.5001 4.78105 8 4.78105C7.4999 4.78105 7.02029 4.97971 6.66667 5.33333L1.33333 10.6667C0.979711 11.0203 0.781049 11.4999 0.781049 12C0.781049 12.5001 0.979711 12.9797 1.33333 13.3333L6.66667 18.6667C7.02029 19.0203 7.4999 19.219 8 19.219C8.5001 19.219 8.97971 19.0203 9.33333 18.6667L14.6667 13.3333C15.0203 12.9797 15.219 12.5001 15.219 12C15.219 11.4999 15.0203 11.0203 14.6667 10.6667L13.3333 9.33333" | ||
stroke={stroke} | ||
strokeWidth={strokeWidth} | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
/> | ||
</svg> | ||
)); | ||
|
||
CorrelationIcon.displayName = 'CorrelationIcon'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
praveen5959 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
import { Stack, Tooltip } from '@mantine/core'; | ||
import classes from './styles/SideBar.module.css'; | ||
import { IconBolt, IconFilterSearch, IconSettings2 } from '@tabler/icons-react'; | ||
import { useCallback } from 'react'; | ||
import { useNavigate, useParams } from 'react-router-dom'; | ||
import { useAppStore } from '@/layouts/MainLayout/providers/AppProvider'; | ||
import { STREAM_VIEWS } from '@/constants/routes'; | ||
import _ from 'lodash'; | ||
|
||
type MenuItemProps = { | ||
setCurrentView: (view: string) => void; | ||
currentView: string; | ||
}; | ||
|
||
const AllLogsButton = (props: MenuItemProps) => { | ||
const viewName = 'explore'; | ||
const isActive = props.currentView === viewName; | ||
const additionalClassNames = `${isActive ? classes.activeMenuItem : ''}`; | ||
return ( | ||
<Stack | ||
onClick={() => props.setCurrentView(viewName)} | ||
style={{ padding: '4px 0', alignItems: 'center' }} | ||
className={classes.menuItemContainer}> | ||
<Tooltip label="Explore" position="right"> | ||
<Stack className={additionalClassNames} style={{ padding: '4px 4px' }}> | ||
<IconFilterSearch | ||
stroke={isActive ? 1.4 : 1.2} | ||
size="1.2rem" | ||
className={classes.icon} | ||
{...(isActive && { color: 'black' })} | ||
/> | ||
</Stack> | ||
</Tooltip> | ||
</Stack> | ||
); | ||
}; | ||
|
||
const ConfigButton = (props: MenuItemProps) => { | ||
const viewName = 'manage'; | ||
const isActive = props.currentView === viewName; | ||
const additionalClassNames = `${isActive ? classes.activeMenuItem : ''}`; | ||
return ( | ||
<Stack | ||
onClick={() => props.setCurrentView(viewName)} | ||
style={{ padding: '4px 0', alignItems: 'center' }} | ||
className={classes.menuItemContainer}> | ||
<Tooltip label="Manage" position="right"> | ||
<Stack className={additionalClassNames} style={{ padding: '4px 4px' }}> | ||
<IconSettings2 | ||
stroke={isActive ? 1.4 : 1.2} | ||
size="1.2rem" | ||
className={classes.icon} | ||
{...(isActive && { color: 'black' })} | ||
/> | ||
</Stack> | ||
</Tooltip> | ||
</Stack> | ||
); | ||
}; | ||
|
||
const LiveTailMenu = (props: MenuItemProps) => { | ||
const viewName = 'live-tail'; | ||
const isActive = props.currentView === viewName; | ||
const additionalClassNames = `${isActive ? classes.activeMenuItem : ''}`; | ||
return ( | ||
<Stack | ||
onClick={() => props.setCurrentView(viewName)} | ||
className={classes.menuItemContainer} | ||
style={{ padding: '4px 0', alignItems: 'center' }}> | ||
<Tooltip label="Live Tail" position="right"> | ||
<Stack className={additionalClassNames} style={{ padding: '4px 4px' }}> | ||
<IconBolt | ||
stroke={isActive ? 1.4 : 1.2} | ||
size="1.2rem" | ||
className={classes.icon} | ||
{...(isActive && { color: 'black' })} | ||
/> | ||
</Stack> | ||
</Tooltip> | ||
</Stack> | ||
); | ||
}; | ||
|
||
const SideBar = () => { | ||
const [currentStream] = useAppStore((store) => store.currentStream); | ||
const [isStandAloneMode] = useAppStore((store) => store.isStandAloneMode); | ||
const { view } = useParams(); | ||
const navigate = useNavigate(); | ||
|
||
const setCurrentView = useCallback( | ||
(view: string) => { | ||
if (_.includes(STREAM_VIEWS, view)) { | ||
navigate(`/${currentStream}/${view}`); | ||
} | ||
}, | ||
[currentStream], | ||
); | ||
|
||
return ( | ||
<Stack className={classes.container} style={{ gap: 0 }}> | ||
<Stack gap={0}> | ||
<AllLogsButton setCurrentView={setCurrentView} currentView={view || ''} /> | ||
{isStandAloneMode && <LiveTailMenu setCurrentView={setCurrentView} currentView={view || ''} />} | ||
<ConfigButton setCurrentView={setCurrentView} currentView={view || ''} /> | ||
</Stack> | ||
</Stack> | ||
); | ||
}; | ||
|
||
export default SideBar; |
praveen5959 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
.container { | ||
flex: 1; | ||
gap: 1rem; | ||
border-right: rem(1px) solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4)); | ||
} | ||
|
||
.menuItemContainer { | ||
cursor: pointer; | ||
} | ||
|
||
.activeMenuItem { | ||
padding: 4px; | ||
background-color: var(--mantine-color-gray-1); | ||
border-radius: 0.2rem; | ||
} | ||
|
||
.menuIconContainer { | ||
background-color: transparent; | ||
} | ||
|
||
.menuLabel { | ||
font-size: 0.7rem; | ||
font-weight: 500; | ||
padding-right: 4px; | ||
} | ||
|
||
.streamDropdownContainer { | ||
/* margin-top: 0.5rem; */ | ||
/* padding: 0 1.25rem; */ | ||
position: relative; | ||
} | ||
|
||
.sideBarToggleContainer { | ||
position: absolute; | ||
left: 93%; | ||
top: 30%; | ||
align-items: center; | ||
justify-content: center; | ||
z-index: 99; | ||
} | ||
|
||
.sideBarToggleIconContainer { | ||
padding: 2rem; | ||
border-radius: 50%; | ||
background-color: white; | ||
border: 1px solid var(--mantine-color-gray-2); | ||
cursor: pointer; | ||
} | ||
|
||
.icon { | ||
color: var(--mantine-color-gray-6); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
active route can be handled with the predefined functions (same as other routes are handled)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handled it differently now