Skip to content

Commit

Permalink
Merge branch 'shared' into cam4dm
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-at-sri committed Aug 22, 2024
2 parents 1baf3ed + deac3ec commit ded33e7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
7 changes: 6 additions & 1 deletion src/components/Details/DetailsComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ export const DetailsComponent = () => {
*/
function getRows(data: any) {
if (data == null) return;
return Object.entries(data).sort().map(e => {
const rows = Object.entries(data);
const nameRow = rows.find(([key]) => key === 'name');
const otherRows = rows.filter(([key]) => key !== 'name');
const sortedRows = otherRows.sort((a, b) => a[0].localeCompare(b[0]));
const finalRows = nameRow ? [nameRow, ...sortedRows] : sortedRows;
return finalRows.map(e => {
return <TableRow>
<TableCell style={{ width: 1 }}><strong>{String(e[0])}</strong></TableCell>
<TableCell style={{ paddingRight: 5 }}>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Details/QueryComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import axios from "axios";
import { COMMON_GREMLIN_ERROR, QUERY_ENDPOINT } from "../../constants";
import { onFetchQuery } from "../../logics/actionHelper";
import { RootState } from "../../app/store";
import { highlightNodesAndEdges } from "../../logics/graphImpl/visImpl";
// import { highlightNodesAndEdges } from "../../logics/graphImpl/visImpl";

const Query = ({ }) => {
const dispatch = useDispatch()
Expand All @@ -24,7 +24,7 @@ const Query = ({ }) => {

function sendQuery() {
dispatch(setError(null));
highlightNodesAndEdges(null, null);
// highlightNodesAndEdges(null, null);
axios
.post(
QUERY_ENDPOINT,
Expand Down
4 changes: 3 additions & 1 deletion src/logics/graphImpl/cytoImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ function toCyNode(n: NodeData): cy.NodeDefinition {
'background-opacity': 0,
'background-image': getIcon(n.type),
'background-fit': 'contain',
'text-max-width' : '100px',
//'font-size': '0px',
'text-max-width' : '80px',
'text-wrap': 'wrap',
'text-valign': 'bottom'
},
Expand Down Expand Up @@ -112,6 +113,7 @@ export function getCytoGraph(container?: HTMLElement, data?: GraphData, options?
width: 1,
"curve-style": "bezier",
"target-arrow-shape": 'triangle',
//"font-size": "0px",
"text-rotation": "autorotate",
"label": "data(label)"
}
Expand Down

0 comments on commit ded33e7

Please sign in to comment.