changes
This commit is contained in:
51
fusion_odoo_fixes/graphify-out/GRAPH_REPORT.md
Normal file
51
fusion_odoo_fixes/graphify-out/GRAPH_REPORT.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# Graph Report - /Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes (2026-04-22)
|
||||
|
||||
## Corpus Check
|
||||
- 4 files · ~372 words
|
||||
- Verdict: corpus is large enough that graph structure adds value.
|
||||
|
||||
## Summary
|
||||
- 6 nodes · 4 edges · 4 communities detected
|
||||
- Extraction: 100% EXTRACTED · 0% INFERRED · 0% AMBIGUOUS
|
||||
- Token cost: 0 input · 0 output
|
||||
|
||||
## Community Hubs (Navigation)
|
||||
- [[_COMMUNITY_Community 0|Community 0]]
|
||||
- [[_COMMUNITY_Community 1|Community 1]]
|
||||
- [[_COMMUNITY_Community 2|Community 2]]
|
||||
- [[_COMMUNITY_Community 3|Community 3]]
|
||||
|
||||
## God Nodes (most connected - your core abstractions)
|
||||
1. `AccountMove` - 2 edges
|
||||
|
||||
## Surprising Connections (you probably didn't know these)
|
||||
- None detected - all connections are within the same source files.
|
||||
|
||||
## Communities
|
||||
|
||||
### Community 0 - "Community 0"
|
||||
Cohesion: 0.67
|
||||
Nodes (1): AccountMove
|
||||
|
||||
### Community 1 - "Community 1"
|
||||
Cohesion: 1.0
|
||||
Nodes (0):
|
||||
|
||||
### Community 2 - "Community 2"
|
||||
Cohesion: 1.0
|
||||
Nodes (0):
|
||||
|
||||
### Community 3 - "Community 3"
|
||||
Cohesion: 1.0
|
||||
Nodes (0):
|
||||
|
||||
## Knowledge Gaps
|
||||
- **Thin community `Community 1`** (1 nodes): `__init__.py`
|
||||
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
||||
- **Thin community `Community 2`** (1 nodes): `__init__.py`
|
||||
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
||||
- **Thin community `Community 3`** (1 nodes): `__manifest__.py`
|
||||
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
||||
|
||||
## Suggested Questions
|
||||
_Not enough signal to generate questions. This usually means the corpus has no AMBIGUOUS edges, no bridge nodes, no INFERRED relationships, and all communities are tightly cohesive. Add more files or run with --mode deep to extract richer edges._
|
||||
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_manifest_py", "label": "__manifest__.py", "file_type": "code", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/__manifest__.py", "source_location": "L1"}], "edges": [], "raw_calls": []}
|
||||
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_init_py", "label": "__init__.py", "file_type": "code", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/__init__.py", "source_location": "L1"}], "edges": [{"source": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_init_py", "target": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_init_py", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/__init__.py", "source_location": "L5", "weight": 1.0}], "raw_calls": []}
|
||||
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_init_py", "label": "__init__.py", "file_type": "code", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/__init__.py", "source_location": "L1"}], "edges": [{"source": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_init_py", "target": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_init_py", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/__init__.py", "source_location": "L5", "weight": 1.0}], "raw_calls": []}
|
||||
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_account_move_py", "label": "account_move.py", "file_type": "code", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py", "source_location": "L1"}, {"id": "account_move_accountmove", "label": "AccountMove", "file_type": "code", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py", "source_location": "L25"}, {"id": "account_move_accountmove_invoice_paid_hook", "label": "._invoice_paid_hook()", "file_type": "code", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py", "source_location": "L28"}], "edges": [{"source": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_account_move_py", "target": "logging", "relation": "imports", "confidence": "EXTRACTED", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py", "source_location": "L18", "weight": 1.0}, {"source": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_account_move_py", "target": "odoo", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py", "source_location": "L20", "weight": 1.0}, {"source": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_account_move_py", "target": "account_move_accountmove", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py", "source_location": "L25", "weight": 1.0}, {"source": "account_move_accountmove", "target": "account_move_accountmove_invoice_paid_hook", "relation": "method", "confidence": "EXTRACTED", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py", "source_location": "L28", "weight": 1.0}], "raw_calls": [{"caller_nid": "account_move_accountmove_invoice_paid_hook", "callee": "super", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py", "source_location": "L29"}, {"caller_nid": "account_move_accountmove_invoice_paid_hook", "callee": "filtered", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py", "source_location": "L35"}, {"caller_nid": "account_move_accountmove_invoice_paid_hook", "callee": "mapped", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py", "source_location": "L35"}, {"caller_nid": "account_move_accountmove_invoice_paid_hook", "callee": "search_count", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py", "source_location": "L42"}, {"caller_nid": "account_move_accountmove_invoice_paid_hook", "callee": "write", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py", "source_location": "L50"}, {"caller_nid": "account_move_accountmove_invoice_paid_hook", "callee": "info", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py", "source_location": "L51"}]}
|
||||
257
fusion_odoo_fixes/graphify-out/graph.html
Normal file
257
fusion_odoo_fixes/graphify-out/graph.html
Normal file
@@ -0,0 +1,257 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>graphify - /Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/graphify-out/graph.html</title>
|
||||
<script src="https://unpkg.com/vis-network/standalone/umd/vis-network.min.js"></script>
|
||||
<style>
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body { background: #0f0f1a; color: #e0e0e0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; display: flex; height: 100vh; overflow: hidden; }
|
||||
#graph { flex: 1; }
|
||||
#sidebar { width: 280px; background: #1a1a2e; border-left: 1px solid #2a2a4e; display: flex; flex-direction: column; overflow: hidden; }
|
||||
#search-wrap { padding: 12px; border-bottom: 1px solid #2a2a4e; }
|
||||
#search { width: 100%; background: #0f0f1a; border: 1px solid #3a3a5e; color: #e0e0e0; padding: 7px 10px; border-radius: 6px; font-size: 13px; outline: none; }
|
||||
#search:focus { border-color: #4E79A7; }
|
||||
#search-results { max-height: 140px; overflow-y: auto; padding: 4px 12px; border-bottom: 1px solid #2a2a4e; display: none; }
|
||||
.search-item { padding: 4px 6px; cursor: pointer; border-radius: 4px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.search-item:hover { background: #2a2a4e; }
|
||||
#info-panel { padding: 14px; border-bottom: 1px solid #2a2a4e; min-height: 140px; }
|
||||
#info-panel h3 { font-size: 13px; color: #aaa; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
|
||||
#info-content { font-size: 13px; color: #ccc; line-height: 1.6; }
|
||||
#info-content .field { margin-bottom: 5px; }
|
||||
#info-content .field b { color: #e0e0e0; }
|
||||
#info-content .empty { color: #555; font-style: italic; }
|
||||
.neighbor-link { display: block; padding: 2px 6px; margin: 2px 0; border-radius: 3px; cursor: pointer; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid #333; }
|
||||
.neighbor-link:hover { background: #2a2a4e; }
|
||||
#neighbors-list { max-height: 160px; overflow-y: auto; margin-top: 4px; }
|
||||
#legend-wrap { flex: 1; overflow-y: auto; padding: 12px; }
|
||||
#legend-wrap h3 { font-size: 13px; color: #aaa; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
|
||||
.legend-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; border-radius: 4px; font-size: 12px; }
|
||||
.legend-item:hover { background: #2a2a4e; padding-left: 4px; }
|
||||
.legend-item.dimmed { opacity: 0.35; }
|
||||
.legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
|
||||
.legend-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.legend-count { color: #666; font-size: 11px; }
|
||||
#stats { padding: 10px 14px; border-top: 1px solid #2a2a4e; font-size: 11px; color: #555; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="graph"></div>
|
||||
<div id="sidebar">
|
||||
<div id="search-wrap">
|
||||
<input id="search" type="text" placeholder="Search nodes..." autocomplete="off">
|
||||
<div id="search-results"></div>
|
||||
</div>
|
||||
<div id="info-panel">
|
||||
<h3>Node Info</h3>
|
||||
<div id="info-content"><span class="empty">Click a node to inspect it</span></div>
|
||||
</div>
|
||||
<div id="legend-wrap">
|
||||
<h3>Communities</h3>
|
||||
<div id="legend"></div>
|
||||
</div>
|
||||
<div id="stats">6 nodes · 4 edges · 4 communities</div>
|
||||
</div>
|
||||
<script>
|
||||
const RAW_NODES = [{"id": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_init_py", "label": "__init__.py", "color": {"background": "#F28E2B", "border": "#F28E2B", "highlight": {"background": "#ffffff", "border": "#F28E2B"}}, "size": 40.0, "font": {"size": 12, "color": "#ffffff"}, "title": "__init__.py", "community": 1, "community_name": "Community 1", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/__init__.py", "file_type": "code", "degree": 2}, {"id": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_manifest_py", "label": "__manifest__.py", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 10.0, "font": {"size": 0, "color": "#ffffff"}, "title": "__manifest__.py", "community": 3, "community_name": "Community 3", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/__manifest__.py", "file_type": "code", "degree": 0}, {"id": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_account_move_py", "label": "account_move.py", "color": {"background": "#4E79A7", "border": "#4E79A7", "highlight": {"background": "#ffffff", "border": "#4E79A7"}}, "size": 25.0, "font": {"size": 12, "color": "#ffffff"}, "title": "account_move.py", "community": 0, "community_name": "Community 0", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py", "file_type": "code", "degree": 1}, {"id": "account_move_accountmove", "label": "AccountMove", "color": {"background": "#4E79A7", "border": "#4E79A7", "highlight": {"background": "#ffffff", "border": "#4E79A7"}}, "size": 40.0, "font": {"size": 12, "color": "#ffffff"}, "title": "AccountMove", "community": 0, "community_name": "Community 0", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py", "file_type": "code", "degree": 2}, {"id": "account_move_accountmove_invoice_paid_hook", "label": "._invoice_paid_hook()", "color": {"background": "#4E79A7", "border": "#4E79A7", "highlight": {"background": "#ffffff", "border": "#4E79A7"}}, "size": 25.0, "font": {"size": 12, "color": "#ffffff"}, "title": "._invoice_paid_hook()", "community": 0, "community_name": "Community 0", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py", "file_type": "code", "degree": 1}, {"id": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_init_py", "label": "__init__.py", "color": {"background": "#E15759", "border": "#E15759", "highlight": {"background": "#ffffff", "border": "#E15759"}}, "size": 40.0, "font": {"size": 12, "color": "#ffffff"}, "title": "__init__.py", "community": 2, "community_name": "Community 2", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/__init__.py", "file_type": "code", "degree": 2}];
|
||||
const RAW_EDGES = [{"from": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_init_py", "to": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_init_py", "label": "imports_from", "title": "imports_from [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_account_move_py", "to": "account_move_accountmove", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "account_move_accountmove", "to": "account_move_accountmove_invoice_paid_hook", "label": "method", "title": "method [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_init_py", "to": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_init_py", "label": "imports_from", "title": "imports_from [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}];
|
||||
const LEGEND = [{"cid": 0, "color": "#4E79A7", "label": "Community 0", "count": 3}, {"cid": 1, "color": "#F28E2B", "label": "Community 1", "count": 1}, {"cid": 2, "color": "#E15759", "label": "Community 2", "count": 1}, {"cid": 3, "color": "#76B7B2", "label": "Community 3", "count": 1}];
|
||||
|
||||
// HTML-escape helper — prevents XSS when injecting graph data into innerHTML
|
||||
function esc(s) {
|
||||
return String(s).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"').replace(/'/g,''');
|
||||
}
|
||||
|
||||
// Build vis datasets
|
||||
const nodesDS = new vis.DataSet(RAW_NODES.map(n => ({
|
||||
id: n.id, label: n.label, color: n.color, size: n.size,
|
||||
font: n.font, title: n.title,
|
||||
_community: n.community, _community_name: n.community_name,
|
||||
_source_file: n.source_file, _file_type: n.file_type, _degree: n.degree,
|
||||
})));
|
||||
|
||||
const edgesDS = new vis.DataSet(RAW_EDGES.map((e, i) => ({
|
||||
id: i, from: e.from, to: e.to,
|
||||
label: '',
|
||||
title: e.title,
|
||||
dashes: e.dashes,
|
||||
width: e.width,
|
||||
color: e.color,
|
||||
arrows: { to: { enabled: true, scaleFactor: 0.5 } },
|
||||
})));
|
||||
|
||||
const container = document.getElementById('graph');
|
||||
const network = new vis.Network(container, { nodes: nodesDS, edges: edgesDS }, {
|
||||
physics: {
|
||||
enabled: true,
|
||||
solver: 'forceAtlas2Based',
|
||||
forceAtlas2Based: {
|
||||
gravitationalConstant: -60,
|
||||
centralGravity: 0.005,
|
||||
springLength: 120,
|
||||
springConstant: 0.08,
|
||||
damping: 0.4,
|
||||
avoidOverlap: 0.8,
|
||||
},
|
||||
stabilization: { iterations: 200, fit: true },
|
||||
},
|
||||
interaction: {
|
||||
hover: true,
|
||||
tooltipDelay: 100,
|
||||
hideEdgesOnDrag: true,
|
||||
navigationButtons: false,
|
||||
keyboard: false,
|
||||
},
|
||||
nodes: { shape: 'dot', borderWidth: 1.5 },
|
||||
edges: { smooth: { type: 'continuous', roundness: 0.2 }, selectionWidth: 3 },
|
||||
});
|
||||
|
||||
network.once('stabilizationIterationsDone', () => {
|
||||
network.setOptions({ physics: { enabled: false } });
|
||||
});
|
||||
|
||||
function showInfo(nodeId) {
|
||||
const n = nodesDS.get(nodeId);
|
||||
if (!n) return;
|
||||
const neighborIds = network.getConnectedNodes(nodeId);
|
||||
const neighborItems = neighborIds.map(nid => {
|
||||
const nb = nodesDS.get(nid);
|
||||
const color = nb ? nb.color.background : '#555';
|
||||
return `<span class="neighbor-link" style="border-left-color:${esc(color)}" onclick="focusNode(${JSON.stringify(nid)})">${esc(nb ? nb.label : nid)}</span>`;
|
||||
}).join('');
|
||||
document.getElementById('info-content').innerHTML = `
|
||||
<div class="field"><b>${esc(n.label)}</b></div>
|
||||
<div class="field">Type: ${esc(n._file_type || 'unknown')}</div>
|
||||
<div class="field">Community: ${esc(n._community_name)}</div>
|
||||
<div class="field">Source: ${esc(n._source_file || '-')}</div>
|
||||
<div class="field">Degree: ${n._degree}</div>
|
||||
${neighborIds.length ? `<div class="field" style="margin-top:8px;color:#aaa;font-size:11px">Neighbors (${neighborIds.length})</div><div id="neighbors-list">${neighborItems}</div>` : ''}
|
||||
`;
|
||||
}
|
||||
|
||||
function focusNode(nodeId) {
|
||||
network.focus(nodeId, { scale: 1.4, animation: true });
|
||||
network.selectNodes([nodeId]);
|
||||
showInfo(nodeId);
|
||||
}
|
||||
|
||||
// Track hovered node — hover detection is more reliable than click params
|
||||
let hoveredNodeId = null;
|
||||
network.on('hoverNode', params => {
|
||||
hoveredNodeId = params.node;
|
||||
container.style.cursor = 'pointer';
|
||||
});
|
||||
network.on('blurNode', () => {
|
||||
hoveredNodeId = null;
|
||||
container.style.cursor = 'default';
|
||||
});
|
||||
container.addEventListener('click', () => {
|
||||
if (hoveredNodeId !== null) {
|
||||
showInfo(hoveredNodeId);
|
||||
network.selectNodes([hoveredNodeId]);
|
||||
}
|
||||
});
|
||||
network.on('click', params => {
|
||||
if (params.nodes.length > 0) {
|
||||
showInfo(params.nodes[0]);
|
||||
} else if (hoveredNodeId === null) {
|
||||
document.getElementById('info-content').innerHTML = '<span class="empty">Click a node to inspect it</span>';
|
||||
}
|
||||
});
|
||||
|
||||
const searchInput = document.getElementById('search');
|
||||
const searchResults = document.getElementById('search-results');
|
||||
searchInput.addEventListener('input', () => {
|
||||
const q = searchInput.value.toLowerCase().trim();
|
||||
searchResults.innerHTML = '';
|
||||
if (!q) { searchResults.style.display = 'none'; return; }
|
||||
const matches = RAW_NODES.filter(n => n.label.toLowerCase().includes(q)).slice(0, 20);
|
||||
if (!matches.length) { searchResults.style.display = 'none'; return; }
|
||||
searchResults.style.display = 'block';
|
||||
matches.forEach(n => {
|
||||
const el = document.createElement('div');
|
||||
el.className = 'search-item';
|
||||
el.textContent = n.label;
|
||||
el.style.borderLeft = `3px solid ${n.color.background}`;
|
||||
el.style.paddingLeft = '8px';
|
||||
el.onclick = () => {
|
||||
network.focus(n.id, { scale: 1.5, animation: true });
|
||||
network.selectNodes([n.id]);
|
||||
showInfo(n.id);
|
||||
searchResults.style.display = 'none';
|
||||
searchInput.value = '';
|
||||
};
|
||||
searchResults.appendChild(el);
|
||||
});
|
||||
});
|
||||
document.addEventListener('click', e => {
|
||||
if (!searchResults.contains(e.target) && e.target !== searchInput)
|
||||
searchResults.style.display = 'none';
|
||||
});
|
||||
|
||||
const hiddenCommunities = new Set();
|
||||
const legendEl = document.getElementById('legend');
|
||||
LEGEND.forEach(c => {
|
||||
const item = document.createElement('div');
|
||||
item.className = 'legend-item';
|
||||
item.innerHTML = `<div class="legend-dot" style="background:${c.color}"></div>
|
||||
<span class="legend-label">${c.label}</span>
|
||||
<span class="legend-count">${c.count}</span>`;
|
||||
item.onclick = () => {
|
||||
if (hiddenCommunities.has(c.cid)) {
|
||||
hiddenCommunities.delete(c.cid);
|
||||
item.classList.remove('dimmed');
|
||||
} else {
|
||||
hiddenCommunities.add(c.cid);
|
||||
item.classList.add('dimmed');
|
||||
}
|
||||
const updates = RAW_NODES
|
||||
.filter(n => n.community === c.cid)
|
||||
.map(n => ({ id: n.id, hidden: hiddenCommunities.has(c.cid) }));
|
||||
nodesDS.update(updates);
|
||||
};
|
||||
legendEl.appendChild(item);
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
// Render hyperedges as shaded regions
|
||||
const hyperedges = [];
|
||||
// afterDrawing passes ctx already transformed to network coordinate space.
|
||||
// Draw node positions raw — no manual pan/zoom/DPR math needed.
|
||||
network.on('afterDrawing', function(ctx) {
|
||||
hyperedges.forEach(h => {
|
||||
const positions = h.nodes
|
||||
.map(nid => network.getPositions([nid])[nid])
|
||||
.filter(p => p !== undefined);
|
||||
if (positions.length < 2) return;
|
||||
ctx.save();
|
||||
ctx.globalAlpha = 0.12;
|
||||
ctx.fillStyle = '#6366f1';
|
||||
ctx.strokeStyle = '#6366f1';
|
||||
ctx.lineWidth = 2;
|
||||
ctx.beginPath();
|
||||
// Centroid and expanded hull in network coordinates
|
||||
const cx = positions.reduce((s, p) => s + p.x, 0) / positions.length;
|
||||
const cy = positions.reduce((s, p) => s + p.y, 0) / positions.length;
|
||||
const expanded = positions.map(p => ({
|
||||
x: cx + (p.x - cx) * 1.15,
|
||||
y: cy + (p.y - cy) * 1.15
|
||||
}));
|
||||
ctx.moveTo(expanded[0].x, expanded[0].y);
|
||||
expanded.slice(1).forEach(p => ctx.lineTo(p.x, p.y));
|
||||
ctx.closePath();
|
||||
ctx.fill();
|
||||
ctx.globalAlpha = 0.4;
|
||||
ctx.stroke();
|
||||
// Label
|
||||
ctx.globalAlpha = 0.8;
|
||||
ctx.fillStyle = '#4f46e5';
|
||||
ctx.font = 'bold 11px sans-serif';
|
||||
ctx.textAlign = 'center';
|
||||
ctx.fillText(h.label, cx, cy - 5);
|
||||
ctx.restore();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
112
fusion_odoo_fixes/graphify-out/graph.json
Normal file
112
fusion_odoo_fixes/graphify-out/graph.json
Normal file
@@ -0,0 +1,112 @@
|
||||
{
|
||||
"directed": false,
|
||||
"multigraph": false,
|
||||
"graph": {},
|
||||
"nodes": [
|
||||
{
|
||||
"label": "__init__.py",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/__init__.py",
|
||||
"source_location": "L1",
|
||||
"id": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_init_py",
|
||||
"community": 1,
|
||||
"norm_label": "__init__.py"
|
||||
},
|
||||
{
|
||||
"label": "__manifest__.py",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/__manifest__.py",
|
||||
"source_location": "L1",
|
||||
"id": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_manifest_py",
|
||||
"community": 3,
|
||||
"norm_label": "__manifest__.py"
|
||||
},
|
||||
{
|
||||
"label": "account_move.py",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py",
|
||||
"source_location": "L1",
|
||||
"id": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_account_move_py",
|
||||
"community": 0,
|
||||
"norm_label": "account_move.py"
|
||||
},
|
||||
{
|
||||
"label": "AccountMove",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py",
|
||||
"source_location": "L25",
|
||||
"id": "account_move_accountmove",
|
||||
"community": 0,
|
||||
"norm_label": "accountmove"
|
||||
},
|
||||
{
|
||||
"label": "._invoice_paid_hook()",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py",
|
||||
"source_location": "L28",
|
||||
"id": "account_move_accountmove_invoice_paid_hook",
|
||||
"community": 0,
|
||||
"norm_label": "._invoice_paid_hook()"
|
||||
},
|
||||
{
|
||||
"label": "__init__.py",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/__init__.py",
|
||||
"source_location": "L1",
|
||||
"id": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_init_py",
|
||||
"community": 2,
|
||||
"norm_label": "__init__.py"
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
{
|
||||
"relation": "imports_from",
|
||||
"confidence": "EXTRACTED",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/__init__.py",
|
||||
"source_location": "L5",
|
||||
"weight": 1.0,
|
||||
"_src": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_init_py",
|
||||
"_tgt": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_init_py",
|
||||
"source": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_init_py",
|
||||
"target": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_init_py",
|
||||
"confidence_score": 1.0
|
||||
},
|
||||
{
|
||||
"relation": "contains",
|
||||
"confidence": "EXTRACTED",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py",
|
||||
"source_location": "L25",
|
||||
"weight": 1.0,
|
||||
"_src": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_account_move_py",
|
||||
"_tgt": "account_move_accountmove",
|
||||
"source": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_account_move_py",
|
||||
"target": "account_move_accountmove",
|
||||
"confidence_score": 1.0
|
||||
},
|
||||
{
|
||||
"relation": "method",
|
||||
"confidence": "EXTRACTED",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/account_move.py",
|
||||
"source_location": "L28",
|
||||
"weight": 1.0,
|
||||
"_src": "account_move_accountmove",
|
||||
"_tgt": "account_move_accountmove_invoice_paid_hook",
|
||||
"source": "account_move_accountmove",
|
||||
"target": "account_move_accountmove_invoice_paid_hook",
|
||||
"confidence_score": 1.0
|
||||
},
|
||||
{
|
||||
"relation": "imports_from",
|
||||
"confidence": "EXTRACTED",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_odoo_fixes/models/__init__.py",
|
||||
"source_location": "L5",
|
||||
"weight": 1.0,
|
||||
"_src": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_init_py",
|
||||
"_tgt": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_init_py",
|
||||
"source": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_init_py",
|
||||
"target": "users_gurpreet_github_odoo_modules_fusion_odoo_fixes_models_init_py",
|
||||
"confidence_score": 1.0
|
||||
}
|
||||
],
|
||||
"hyperedges": []
|
||||
}
|
||||
Reference in New Issue
Block a user