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

Neodash Bug Fixes #80

Merged
merged 1 commit into from
Nov 30, 2023
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
Neodash Bug Fixes
  • Loading branch information
m-o-n-i-s-h committed Nov 30, 2023
commit ef46db5139c2d3da8d4ec42925d6142627c9b2c9
6 changes: 4 additions & 2 deletions src/chart/graph/component/GraphChartInspectModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ export const NeoGraphChartInspectModal = (props: GraphChartVisualizationProps) =
const selectedEntity = props.interactivity?.selectedEntity;
const propertySelections = props?.engine.selection ? props.engine.selection : {};
const customTablePropertiesOfModal = props.interactivity?.customTablePropertiesOfModal;
const entityName = selectedEntity ? getEntityHeader(props.interactivity?.selectedEntity) : '';
const entityName = selectedEntity
? getEntityHeader(props.interactivity.selectedEntity, props?.engine?.selection)
: '';

// Check if the user clicked relationship or edge
const isRelationShipTypeExists = selectedEntity ? Object.getOwnPropertyNames(selectedEntity).includes('type') : false;
if (selectedEntity) {
// Get header name of modal based on the node or edge clicked by user
headerName = isRelationShipTypeExists
? getEntityHeaderForEdge(selectedEntity, propertySelections)
: getEntityHeader(selectedEntity);
: getEntityHeader(props.interactivity.selectedEntity, props?.engine?.selection);
}

/**
Expand Down
9 changes: 9 additions & 0 deletions src/chart/graph/util/NodeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,12 @@ export const generateNodeCanvasObject = (
}
}
};

export const getEntityHeaderForEdge = (entity: any, propertySelections: any) => {
const sourceTitle = getSelectedNodeProperty(entity, 'source', propertySelections);
const targetTitle = getSelectedNodeProperty(entity, 'target', propertySelections);
return (
(entity?.labels && `${sourceTitle} >> ${entity.labels.join(', ')} >> ${targetTitle}`) ||
`${entity.type} (${sourceTitle} --> ${targetTitle})`
);
};
6 changes: 3 additions & 3 deletions src/dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { forceRefreshPage } from '../page/PageActions';
import { getPageNumber } from '../settings/SettingsSelectors';
import { createNotificationThunk } from '../page/PageThunks';
import { version } from '../modal/AboutModal';
import NeoDashboardSidebar from './sidebar/DashboardSidebar';
// import NeoDashboardSidebar from './sidebar/DashboardSidebar';

const Dashboard = ({
pagenumber,
Expand Down Expand Up @@ -71,9 +71,9 @@ const Dashboard = ({
position: 'relative',
}}
>
<div>
{/* <div>
<NeoDashboardSidebar />
</div>
</div> */}
<div className='n-w-full n-h-full n-overflow-y-scroll n-flex n-flex-row'>
{/* Main Content */}
<main className='n-flex-1 n-relative n-z-0 n-scroll-smooth n-w-full'>
Expand Down