Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into task/rename-cmd-fil…
Browse files Browse the repository at this point in the history
…e-to-work-on-windows
  • Loading branch information
dljm committed Dec 9, 2023
2 parents 2a5357e + 92d65b7 commit c20a719
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
16 changes: 8 additions & 8 deletions backend/app/app/api/api_v1/endpoints/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,14 @@ async def read_graph(action_type, send_json, project_uuid):
'elements': blueprint.pop('elements'),
}
nodes.append(blueprint)
if len(edges[0]) >= 1:
[edges_data.append({
'id': f"{i}",
'source': f"{e[2]['from'].id}",
'target': f"{e[3]['to'].id}",
'label': e[1][T.label],
'type': 'float'
}) for i, e in enumerate(chunks(edges[0], 4))]
if len(edges[0]) >= 1:
[edges_data.append({
'id': f"{i}",
'source': f"{e[2]['from'].id}",
'target': f"{e[3]['to'].id}",
'label': e[1][T.label],
'type': 'float'
}) for i, e in enumerate(chunks(edges[0], 4))]
await send_json({
'action': 'addInitialLoad',
'nodes': nodes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function EntitiesPanel({
isLoading,
isError,
isSuccess,
refreshAllEntities,
refetchEntities,
}: JSONObject) {
const [showFavoriteEntities, setShowFavoriteEntities] = useState<boolean>(true);
const [showEntities, setShowEntities] = useState(true);
Expand All @@ -32,7 +32,7 @@ export default function EntitiesPanel({

const updateEntityOnBookmark = async (hid: string) => {
await updateEntityIsFavorite({ hid })
refreshAllEntities()
refetchEntities()
}

return (
Expand Down
7 changes: 4 additions & 3 deletions frontend/src/routes/dashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function DashboardPage() {
isLoading,
isError,
isSuccess,
refetch: refreshAllEntities,
refetch: refetchEntities,
} = useGetEntitiesQuery({ skip: 0, limit: 50 })

const scrollGraphs = ({ skip, limit, favoriteSkip, favoriteLimit }: ScrollGraphs) => {
Expand Down Expand Up @@ -153,7 +153,8 @@ export default function DashboardPage() {
isLoading={isLoading}
isError={isError}
isSuccess={isSuccess}
updateEntities={refreshAllEntities}
refetchEntities={refetchEntities}

/>
</Tab.Panel>
<Tab.Panel className={styles["tab-panel"]}>
Expand Down Expand Up @@ -196,7 +197,7 @@ export default function DashboardPage() {
refreshAllGraphs={async () => await refetchGraphs()}
/>
<CreateEntityModal
refreshAllEntities={async () => await refreshAllEntities()}
refreshAllEntities={async () => await refetchEntities()}
cancelCreateRef={cancelCreateEntityRef}
isOpen={showCreateEntityModal}
closeModal={() => setShowCreateEntityModal(false)}
Expand Down

0 comments on commit c20a719

Please sign in to comment.