migrazione verso gitea
This commit is contained in:
154
docs/_build/html/flows/README.html
vendored
Normal file
154
docs/_build/html/flows/README.html
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en" data-content_root="../">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Flow Diagrams — warehouse 0.0.1 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=5ecbeea2" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/basic.css?v=b08954a9" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=27fed22d" />
|
||||
<script src="../_static/documentation_options.js?v=d45e8c67"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="main.py" href="main_flow.html" />
|
||||
<link rel="prev" title="Flow Diagrams" href="index.html" />
|
||||
|
||||
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head><body>
|
||||
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
|
||||
|
||||
<div class="body" role="main">
|
||||
|
||||
<section id="flow-diagrams">
|
||||
<h1>Flow Diagrams<a class="headerlink" href="#flow-diagrams" title="Link to this heading">¶</a></h1>
|
||||
<p>Questa cartella contiene schemi di flusso e schemi di chiamata dei moduli
|
||||
principali avviati da <code class="docutils literal notranslate"><span class="pre">main.py</span></code>.</p>
|
||||
<p>I diagrammi sono scritti in Mermaid, quindi possono essere:</p>
|
||||
<ul class="simple">
|
||||
<li><p>letti direttamente nei file Markdown;</p></li>
|
||||
<li><p>renderizzati da molti editor Git/Markdown;</p></li>
|
||||
<li><p>inclusi in una futura documentazione Sphinx o MkDocs.</p></li>
|
||||
</ul>
|
||||
<section id="indice">
|
||||
<h2>Indice<a class="headerlink" href="#indice" title="Link to this heading">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference internal" href="main_flow.html"><span class="std std-doc">main</span></a></p></li>
|
||||
<li><p><a class="reference internal" href="layout_window_flow.html"><span class="std std-doc">layout_window</span></a></p></li>
|
||||
<li><p><a class="reference internal" href="reset_corsie_flow.html"><span class="std std-doc">reset_corsie</span></a></p></li>
|
||||
<li><p><a class="reference internal" href="view_celle_multiple_flow.html"><span class="std std-doc">view_celle_multiple</span></a></p></li>
|
||||
<li><p><a class="reference internal" href="search_pallets_flow.html"><span class="std std-doc">search_pallets</span></a></p></li>
|
||||
<li><p><a class="reference internal" href="gestione_pickinglist_flow.html"><span class="std std-doc">gestione_pickinglist</span></a></p></li>
|
||||
<li><p><a class="reference internal" href="async_db_flow.html"><span class="std std-doc">infrastruttura async/db</span></a></p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="convenzioni">
|
||||
<h2>Convenzioni<a class="headerlink" href="#convenzioni" title="Link to this heading">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><p>I diagrammi descrivono il flusso applicativo ad alto livello.</p></li>
|
||||
<li><p>Non rappresentano ogni singola riga di codice.</p></li>
|
||||
<li><p>I nodi <code class="docutils literal notranslate"><span class="pre">AsyncRunner</span></code> e <code class="docutils literal notranslate"><span class="pre">query_json</span></code> evidenziano i passaggi asincroni più
|
||||
importanti tra interfaccia e database.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h1 class="logo"><a href="../index.html">warehouse</a></h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<search id="searchbox" style="display: none" role="search">
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="../search.html" method="get">
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search"/>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
</search>
|
||||
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contenuti</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../architecture.html">Architettura Complessiva</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../api_reference.html">Riferimento API</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Flow Diagrams</a><ul class="current">
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">Flow Diagrams</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="main_flow.html"><code class="docutils literal notranslate"><span class="pre">main.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="layout_window_flow.html"><code class="docutils literal notranslate"><span class="pre">layout_window.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="reset_corsie_flow.html"><code class="docutils literal notranslate"><span class="pre">reset_corsie.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="view_celle_multiple_flow.html"><code class="docutils literal notranslate"><span class="pre">view_celle_multiple.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="search_pallets_flow.html"><code class="docutils literal notranslate"><span class="pre">search_pallets.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_pickinglist_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_pickinglist.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_db_flow.html">Infrastruttura Async / DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_msssql_query_flow.html"><code class="docutils literal notranslate"><span class="pre">async_msssql_query.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_aree_frame_async_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_aree_frame_async.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_loop_singleton_flow.html"><code class="docutils literal notranslate"><span class="pre">async_loop_singleton.py</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="relations">
|
||||
<h3>Related Topics</h3>
|
||||
<ul>
|
||||
<li><a href="../index.html">Documentation overview</a><ul>
|
||||
<li><a href="index.html">Flow Diagrams</a><ul>
|
||||
<li>Previous: <a href="index.html" title="previous chapter">Flow Diagrams</a></li>
|
||||
<li>Next: <a href="main_flow.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">main.py</span></code></a></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
©.
|
||||
|
||||
|
|
||||
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 9.1.0</a>
|
||||
& <a href="https://alabaster.readthedocs.io">Alabaster 1.0.0</a>
|
||||
|
||||
|
|
||||
<a href="../_sources/flows/README.md.txt"
|
||||
rel="nofollow">Page source</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
599
docs/_build/html/flows/async_db_flow.html
vendored
Normal file
599
docs/_build/html/flows/async_db_flow.html
vendored
Normal file
@@ -0,0 +1,599 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en" data-content_root="../">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Infrastruttura Async / DB — warehouse 0.0.1 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=5ecbeea2" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/basic.css?v=b08954a9" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=27fed22d" />
|
||||
<script src="../_static/documentation_options.js?v=d45e8c67"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js"></script>
|
||||
<script type="module">import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11.12.1/dist/mermaid.esm.min.mjs";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const initStyles = () => {
|
||||
const defaultStyle = document.createElement('style');
|
||||
defaultStyle.textContent = `pre.mermaid {
|
||||
/* Same as .mermaid-container > pre */
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
pre.mermaid > svg {
|
||||
/* Same as .mermaid-container > pre > svg */
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}`;
|
||||
document.head.appendChild(defaultStyle);
|
||||
|
||||
const fullscreenStyle = document.createElement('style');
|
||||
fullscreenStyle.textContent = `.mermaid-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre > svg {
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.3);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
padding: 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn:hover {
|
||||
opacity: 100% !important;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 3px 10px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal {
|
||||
display: none;
|
||||
position: fixed !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
width: 95vw;
|
||||
height: 100vh;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
z-index: 9999;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.dark-theme {
|
||||
background: rgba(0, 0, 0, 0.98);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.active {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen {
|
||||
position: relative;
|
||||
width: 95vw;
|
||||
height: 90vh;
|
||||
max-width: 95vw;
|
||||
max-height: 90vh;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen.dark-theme {
|
||||
background: #1a1a1a;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen pre.mermaid {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen .mermaid svg {
|
||||
height: 100% !important;
|
||||
width: 100% !important;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close {
|
||||
position: fixed !important;
|
||||
top: 20px !important;
|
||||
right: 20px !important;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
z-index: 10000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
transition: all 0.2s;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close:hover {
|
||||
background: white;
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 6px 16px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal .mermaid-fullscreen-btn {
|
||||
display: none !important;
|
||||
}`;
|
||||
document.head.appendChild(fullscreenStyle);
|
||||
}
|
||||
|
||||
// Detect if page has dark background
|
||||
const isDarkTheme = () => {
|
||||
// We use a set of heuristics:
|
||||
// 1. Check for common dark mode classes or attributes
|
||||
// 2. Check computed background color brightness
|
||||
if (document.documentElement.classList.contains('dark') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'dark' ||
|
||||
document.body.classList.contains('dark') ||
|
||||
document.body.getAttribute('data-theme') === 'dark') {
|
||||
// console.log("Dark theme detected via class/attribute");
|
||||
return true;
|
||||
}
|
||||
if (document.documentElement.classList.contains('light') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'light' ||
|
||||
document.body.classList.contains('light') ||
|
||||
document.body.getAttribute('data-theme') === 'light') {
|
||||
// console.log("Light theme detected via class/attribute");
|
||||
return false;
|
||||
}
|
||||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
// console.log("Dark theme detected via prefers-color-scheme");
|
||||
return true;
|
||||
}
|
||||
const bgColor = window.getComputedStyle(document.body).backgroundColor;
|
||||
const match = bgColor.match(/rgb\((\d+),\s*(\d+),\s*(\d+)/);
|
||||
if (match) {
|
||||
const r = parseInt(match[1]);
|
||||
const g = parseInt(match[2]);
|
||||
const b = parseInt(match[3]);
|
||||
const brightness = (r * 299 + g * 587 + b * 114) / 1000;
|
||||
// console.log("Background color brightness:", brightness);
|
||||
return brightness < 128;
|
||||
}
|
||||
// console.log("No dark or light theme detected, defaulting to light theme");
|
||||
return false;
|
||||
};
|
||||
|
||||
let darkTheme = isDarkTheme();
|
||||
let modal = null;
|
||||
let modalContent = null;
|
||||
let previousScrollOffset = [window.scrollX, window.scrollY];
|
||||
|
||||
const runMermaid = async (rerun) => {
|
||||
console.log("Running mermaid diagrams, rerun =", rerun);
|
||||
// clear all existing mermaid charts
|
||||
let all_mermaids = document.querySelectorAll(".mermaid");
|
||||
|
||||
if (rerun) {
|
||||
all_mermaids.forEach((el) => {
|
||||
if(!el.hasAttribute("data-original-code")) {
|
||||
// store original code
|
||||
// console.log(`Storing original code for first run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
if(el.getAttribute("data-processed") === "true") {
|
||||
// remove and restore original
|
||||
el.removeAttribute("data-processed");
|
||||
// console.log(`Restoring original code for re-run: `, el.getAttribute('data-original-code'));
|
||||
el.innerHTML = el.getAttribute('data-original-code');
|
||||
} else {
|
||||
// store original code
|
||||
// console.log(`Storing original code for re-run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
});
|
||||
await mermaid.run();
|
||||
}
|
||||
|
||||
all_mermaids = document.querySelectorAll(".mermaid");
|
||||
const mermaids_processed = document.querySelectorAll(".mermaid[data-processed='true']");
|
||||
|
||||
if ("False" === "True") {
|
||||
const mermaids_to_add_zoom = -1 === -1 ? all_mermaids.length : -1;
|
||||
if(mermaids_to_add_zoom > 0) {
|
||||
var svgs = d3.selectAll("");
|
||||
if(all_mermaids.length !== mermaids_processed.length) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else if(svgs.size() !== mermaids_to_add_zoom) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else {
|
||||
svgs.each(function() {
|
||||
var svg = d3.select(this);
|
||||
svg.html("<g class='wrapper'>" + svg.html() + "</g>");
|
||||
var inner = svg.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svg.call(zoom);
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if(all_mermaids.length !== mermaids_processed.length) {
|
||||
// Wait for mermaid to process all diagrams
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
}
|
||||
|
||||
// Stop here if not adding fullscreen capability
|
||||
if ("True" !== "True") return;
|
||||
|
||||
if (modal !== null ) {
|
||||
// Destroy existing modal
|
||||
modal.remove();
|
||||
modal = null;
|
||||
modalContent = null;
|
||||
}
|
||||
|
||||
modal = document.createElement('div');
|
||||
modal.className = 'mermaid-fullscreen-modal' + (darkTheme ? ' dark-theme' : '');
|
||||
modal.setAttribute('role', 'dialog');
|
||||
modal.setAttribute('aria-modal', 'true');
|
||||
modal.setAttribute('aria-label', 'Fullscreen diagram viewer');
|
||||
modal.innerHTML = `
|
||||
<button class="mermaid-fullscreen-close${darkTheme ? ' dark-theme' : ''}" aria-label="Close fullscreen">✕</button>
|
||||
<div class="mermaid-container-fullscreen${darkTheme ? ' dark-theme' : ''}"></div>
|
||||
`;
|
||||
document.body.appendChild(modal);
|
||||
|
||||
modalContent = modal.querySelector('.mermaid-container-fullscreen');
|
||||
const closeBtn = modal.querySelector('.mermaid-fullscreen-close');
|
||||
|
||||
const closeModal = () => {
|
||||
modal.classList.remove('active');
|
||||
modalContent.innerHTML = '';
|
||||
document.body.style.overflow = ''
|
||||
window.scrollTo({left: previousScrollOffset[0], top: previousScrollOffset[1], behavior: 'instant'});
|
||||
};
|
||||
|
||||
closeBtn.addEventListener('click', closeModal);
|
||||
modal.addEventListener('click', (e) => {
|
||||
if (e.target === modal) closeModal();
|
||||
});
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && modal.classList.contains('active')) {
|
||||
closeModal();
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelectorAll('.mermaid').forEach((mermaidDiv) => {
|
||||
if (mermaidDiv.parentNode.classList.contains('mermaid-container') ||
|
||||
mermaidDiv.closest('.mermaid-fullscreen-modal')) {
|
||||
// Already processed, adjust button class if needed
|
||||
const existingBtn = mermaidDiv.parentNode.querySelector('.mermaid-fullscreen-btn');
|
||||
if (existingBtn) {
|
||||
existingBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const container = document.createElement('div');
|
||||
container.className = 'mermaid-container';
|
||||
mermaidDiv.parentNode.insertBefore(container, mermaidDiv);
|
||||
container.appendChild(mermaidDiv);
|
||||
|
||||
const fullscreenBtn = document.createElement('button');
|
||||
fullscreenBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
fullscreenBtn.setAttribute('aria-label', 'View diagram in fullscreen');
|
||||
fullscreenBtn.textContent = '⛶';
|
||||
fullscreenBtn.style.opacity = '50%';
|
||||
|
||||
// Calculate dynamic position based on diagram's margin and padding
|
||||
const diagramStyle = window.getComputedStyle(mermaidDiv);
|
||||
const marginTop = parseFloat(diagramStyle.marginTop) || 0;
|
||||
const marginRight = parseFloat(diagramStyle.marginRight) || 0;
|
||||
const paddingTop = parseFloat(diagramStyle.paddingTop) || 0;
|
||||
const paddingRight = parseFloat(diagramStyle.paddingRight) || 0;
|
||||
fullscreenBtn.style.top = `${marginTop + paddingTop + 4}px`;
|
||||
fullscreenBtn.style.right = `${marginRight + paddingRight + 4}px`;
|
||||
|
||||
fullscreenBtn.addEventListener('click', () => {
|
||||
previousScrollOffset = [window.scroll, window.scrollY];
|
||||
const clone = mermaidDiv.cloneNode(true);
|
||||
modalContent.innerHTML = '';
|
||||
modalContent.appendChild(clone);
|
||||
|
||||
const svg = clone.querySelector('svg');
|
||||
if (svg) {
|
||||
svg.removeAttribute('width');
|
||||
svg.removeAttribute('height');
|
||||
svg.style.width = '100%';
|
||||
svg.style.height = 'auto';
|
||||
svg.style.maxWidth = '100%';
|
||||
svg.style.sdisplay = 'block';
|
||||
|
||||
if ("False" === "True") {
|
||||
setTimeout(() => {
|
||||
const g = svg.querySelector('g');
|
||||
if (g) {
|
||||
var svgD3 = d3.select(svg);
|
||||
svgD3.html("<g class='wrapper'>" + svgD3.html() + "</g>");
|
||||
var inner = svgD3.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svgD3.call(zoom);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
modal.classList.add('active');
|
||||
document.body.style.overflow = 'hidden';
|
||||
});
|
||||
container.appendChild(fullscreenBtn);
|
||||
});
|
||||
};
|
||||
|
||||
const load = async () => {
|
||||
initStyles();
|
||||
|
||||
await runMermaid(true);
|
||||
|
||||
const reRunIfThemeChanges = async () => {
|
||||
const newDarkTheme = isDarkTheme();
|
||||
if (newDarkTheme !== darkTheme) {
|
||||
darkTheme = newDarkTheme;
|
||||
console.log("Theme change detected, re-running mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
await mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
await runMermaid(true);
|
||||
}
|
||||
};
|
||||
|
||||
// Update theme classes when theme changes
|
||||
const themeObserver = new MutationObserver(reRunIfThemeChanges);
|
||||
themeObserver.observe(document.documentElement, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
themeObserver.observe(document.body, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
console.log("Initializing mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
|
||||
window.addEventListener("load", load);
|
||||
window.runMermaid = runMermaid;</script>
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="async_msssql_query.py" href="async_msssql_query_flow.html" />
|
||||
<link rel="prev" title="gestione_pickinglist.py" href="gestione_pickinglist_flow.html" />
|
||||
|
||||
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head><body>
|
||||
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
|
||||
|
||||
<div class="body" role="main">
|
||||
|
||||
<section id="infrastruttura-async-db">
|
||||
<h1>Infrastruttura Async / DB<a class="headerlink" href="#infrastruttura-async-db" title="Link to this heading">¶</a></h1>
|
||||
<section id="scopo">
|
||||
<h2>Scopo<a class="headerlink" href="#scopo" title="Link to this heading">¶</a></h2>
|
||||
<p>Questo diagramma descrive il flusso comune usato da tutti i moduli GUI quando
|
||||
eseguono una query sul database.</p>
|
||||
</section>
|
||||
<section id="flusso-trasversale">
|
||||
<h2>Flusso trasversale<a class="headerlink" href="#flusso-trasversale" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart TD
|
||||
A["Evento UI (click / selezione / ricerca)"] --> B["Metodo finestra"]
|
||||
B --> C["AsyncRunner.run(awaitable)"]
|
||||
C --> D["Coroutines sul loop globale"]
|
||||
D --> E["AsyncMSSQLClient.query_json() / exec()"]
|
||||
E --> F["SQL Server"]
|
||||
F --> G["Risultato query"]
|
||||
G --> H["Future completata"]
|
||||
H --> I["Callback _ok / _err su thread Tk"]
|
||||
I --> J["Aggiornamento widget"]
|
||||
</pre></section>
|
||||
<section id="relazioni-principali">
|
||||
<h2>Relazioni principali<a class="headerlink" href="#relazioni-principali" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart LR
|
||||
Main["main.py"] --> Loop["get_global_loop()"]
|
||||
Main --> DB["AsyncMSSQLClient"]
|
||||
Windows["Moduli GUI"] --> Runner["AsyncRunner"]
|
||||
Runner --> Loop
|
||||
Runner --> DB
|
||||
DB --> SQL["SQL Server Mediseawall"]
|
||||
</pre></section>
|
||||
<section id="note">
|
||||
<h2>Note<a class="headerlink" href="#note" title="Link to this heading">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><p>Il loop asincrono è condiviso tra tutte le finestre.</p></li>
|
||||
<li><p>Il client DB è condiviso e creato una sola volta nel launcher.</p></li>
|
||||
<li><p>I callback che aggiornano la UI rientrano sempre sul thread Tk.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h1 class="logo"><a href="../index.html">warehouse</a></h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<search id="searchbox" style="display: none" role="search">
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="../search.html" method="get">
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search"/>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
</search>
|
||||
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contenuti</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../architecture.html">Architettura Complessiva</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../api_reference.html">Riferimento API</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Flow Diagrams</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html">Flow Diagrams</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="main_flow.html"><code class="docutils literal notranslate"><span class="pre">main.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="layout_window_flow.html"><code class="docutils literal notranslate"><span class="pre">layout_window.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="reset_corsie_flow.html"><code class="docutils literal notranslate"><span class="pre">reset_corsie.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="view_celle_multiple_flow.html"><code class="docutils literal notranslate"><span class="pre">view_celle_multiple.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="search_pallets_flow.html"><code class="docutils literal notranslate"><span class="pre">search_pallets.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_pickinglist_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_pickinglist.py</span></code></a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">Infrastruttura Async / DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_msssql_query_flow.html"><code class="docutils literal notranslate"><span class="pre">async_msssql_query.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_aree_frame_async_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_aree_frame_async.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_loop_singleton_flow.html"><code class="docutils literal notranslate"><span class="pre">async_loop_singleton.py</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="relations">
|
||||
<h3>Related Topics</h3>
|
||||
<ul>
|
||||
<li><a href="../index.html">Documentation overview</a><ul>
|
||||
<li><a href="index.html">Flow Diagrams</a><ul>
|
||||
<li>Previous: <a href="gestione_pickinglist_flow.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">gestione_pickinglist.py</span></code></a></li>
|
||||
<li>Next: <a href="async_msssql_query_flow.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">async_msssql_query.py</span></code></a></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
©.
|
||||
|
||||
|
|
||||
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 9.1.0</a>
|
||||
& <a href="https://alabaster.readthedocs.io">Alabaster 1.0.0</a>
|
||||
|
||||
|
|
||||
<a href="../_sources/flows/async_db_flow.md.txt"
|
||||
rel="nofollow">Page source</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
597
docs/_build/html/flows/async_loop_singleton_flow.html
vendored
Normal file
597
docs/_build/html/flows/async_loop_singleton_flow.html
vendored
Normal file
@@ -0,0 +1,597 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en" data-content_root="../">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>async_loop_singleton.py — warehouse 0.0.1 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=5ecbeea2" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/basic.css?v=b08954a9" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=27fed22d" />
|
||||
<script src="../_static/documentation_options.js?v=d45e8c67"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js"></script>
|
||||
<script type="module">import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11.12.1/dist/mermaid.esm.min.mjs";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const initStyles = () => {
|
||||
const defaultStyle = document.createElement('style');
|
||||
defaultStyle.textContent = `pre.mermaid {
|
||||
/* Same as .mermaid-container > pre */
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
pre.mermaid > svg {
|
||||
/* Same as .mermaid-container > pre > svg */
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}`;
|
||||
document.head.appendChild(defaultStyle);
|
||||
|
||||
const fullscreenStyle = document.createElement('style');
|
||||
fullscreenStyle.textContent = `.mermaid-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre > svg {
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.3);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
padding: 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn:hover {
|
||||
opacity: 100% !important;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 3px 10px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal {
|
||||
display: none;
|
||||
position: fixed !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
width: 95vw;
|
||||
height: 100vh;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
z-index: 9999;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.dark-theme {
|
||||
background: rgba(0, 0, 0, 0.98);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.active {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen {
|
||||
position: relative;
|
||||
width: 95vw;
|
||||
height: 90vh;
|
||||
max-width: 95vw;
|
||||
max-height: 90vh;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen.dark-theme {
|
||||
background: #1a1a1a;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen pre.mermaid {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen .mermaid svg {
|
||||
height: 100% !important;
|
||||
width: 100% !important;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close {
|
||||
position: fixed !important;
|
||||
top: 20px !important;
|
||||
right: 20px !important;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
z-index: 10000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
transition: all 0.2s;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close:hover {
|
||||
background: white;
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 6px 16px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal .mermaid-fullscreen-btn {
|
||||
display: none !important;
|
||||
}`;
|
||||
document.head.appendChild(fullscreenStyle);
|
||||
}
|
||||
|
||||
// Detect if page has dark background
|
||||
const isDarkTheme = () => {
|
||||
// We use a set of heuristics:
|
||||
// 1. Check for common dark mode classes or attributes
|
||||
// 2. Check computed background color brightness
|
||||
if (document.documentElement.classList.contains('dark') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'dark' ||
|
||||
document.body.classList.contains('dark') ||
|
||||
document.body.getAttribute('data-theme') === 'dark') {
|
||||
// console.log("Dark theme detected via class/attribute");
|
||||
return true;
|
||||
}
|
||||
if (document.documentElement.classList.contains('light') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'light' ||
|
||||
document.body.classList.contains('light') ||
|
||||
document.body.getAttribute('data-theme') === 'light') {
|
||||
// console.log("Light theme detected via class/attribute");
|
||||
return false;
|
||||
}
|
||||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
// console.log("Dark theme detected via prefers-color-scheme");
|
||||
return true;
|
||||
}
|
||||
const bgColor = window.getComputedStyle(document.body).backgroundColor;
|
||||
const match = bgColor.match(/rgb\((\d+),\s*(\d+),\s*(\d+)/);
|
||||
if (match) {
|
||||
const r = parseInt(match[1]);
|
||||
const g = parseInt(match[2]);
|
||||
const b = parseInt(match[3]);
|
||||
const brightness = (r * 299 + g * 587 + b * 114) / 1000;
|
||||
// console.log("Background color brightness:", brightness);
|
||||
return brightness < 128;
|
||||
}
|
||||
// console.log("No dark or light theme detected, defaulting to light theme");
|
||||
return false;
|
||||
};
|
||||
|
||||
let darkTheme = isDarkTheme();
|
||||
let modal = null;
|
||||
let modalContent = null;
|
||||
let previousScrollOffset = [window.scrollX, window.scrollY];
|
||||
|
||||
const runMermaid = async (rerun) => {
|
||||
console.log("Running mermaid diagrams, rerun =", rerun);
|
||||
// clear all existing mermaid charts
|
||||
let all_mermaids = document.querySelectorAll(".mermaid");
|
||||
|
||||
if (rerun) {
|
||||
all_mermaids.forEach((el) => {
|
||||
if(!el.hasAttribute("data-original-code")) {
|
||||
// store original code
|
||||
// console.log(`Storing original code for first run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
if(el.getAttribute("data-processed") === "true") {
|
||||
// remove and restore original
|
||||
el.removeAttribute("data-processed");
|
||||
// console.log(`Restoring original code for re-run: `, el.getAttribute('data-original-code'));
|
||||
el.innerHTML = el.getAttribute('data-original-code');
|
||||
} else {
|
||||
// store original code
|
||||
// console.log(`Storing original code for re-run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
});
|
||||
await mermaid.run();
|
||||
}
|
||||
|
||||
all_mermaids = document.querySelectorAll(".mermaid");
|
||||
const mermaids_processed = document.querySelectorAll(".mermaid[data-processed='true']");
|
||||
|
||||
if ("False" === "True") {
|
||||
const mermaids_to_add_zoom = -1 === -1 ? all_mermaids.length : -1;
|
||||
if(mermaids_to_add_zoom > 0) {
|
||||
var svgs = d3.selectAll("");
|
||||
if(all_mermaids.length !== mermaids_processed.length) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else if(svgs.size() !== mermaids_to_add_zoom) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else {
|
||||
svgs.each(function() {
|
||||
var svg = d3.select(this);
|
||||
svg.html("<g class='wrapper'>" + svg.html() + "</g>");
|
||||
var inner = svg.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svg.call(zoom);
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if(all_mermaids.length !== mermaids_processed.length) {
|
||||
// Wait for mermaid to process all diagrams
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
}
|
||||
|
||||
// Stop here if not adding fullscreen capability
|
||||
if ("True" !== "True") return;
|
||||
|
||||
if (modal !== null ) {
|
||||
// Destroy existing modal
|
||||
modal.remove();
|
||||
modal = null;
|
||||
modalContent = null;
|
||||
}
|
||||
|
||||
modal = document.createElement('div');
|
||||
modal.className = 'mermaid-fullscreen-modal' + (darkTheme ? ' dark-theme' : '');
|
||||
modal.setAttribute('role', 'dialog');
|
||||
modal.setAttribute('aria-modal', 'true');
|
||||
modal.setAttribute('aria-label', 'Fullscreen diagram viewer');
|
||||
modal.innerHTML = `
|
||||
<button class="mermaid-fullscreen-close${darkTheme ? ' dark-theme' : ''}" aria-label="Close fullscreen">✕</button>
|
||||
<div class="mermaid-container-fullscreen${darkTheme ? ' dark-theme' : ''}"></div>
|
||||
`;
|
||||
document.body.appendChild(modal);
|
||||
|
||||
modalContent = modal.querySelector('.mermaid-container-fullscreen');
|
||||
const closeBtn = modal.querySelector('.mermaid-fullscreen-close');
|
||||
|
||||
const closeModal = () => {
|
||||
modal.classList.remove('active');
|
||||
modalContent.innerHTML = '';
|
||||
document.body.style.overflow = ''
|
||||
window.scrollTo({left: previousScrollOffset[0], top: previousScrollOffset[1], behavior: 'instant'});
|
||||
};
|
||||
|
||||
closeBtn.addEventListener('click', closeModal);
|
||||
modal.addEventListener('click', (e) => {
|
||||
if (e.target === modal) closeModal();
|
||||
});
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && modal.classList.contains('active')) {
|
||||
closeModal();
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelectorAll('.mermaid').forEach((mermaidDiv) => {
|
||||
if (mermaidDiv.parentNode.classList.contains('mermaid-container') ||
|
||||
mermaidDiv.closest('.mermaid-fullscreen-modal')) {
|
||||
// Already processed, adjust button class if needed
|
||||
const existingBtn = mermaidDiv.parentNode.querySelector('.mermaid-fullscreen-btn');
|
||||
if (existingBtn) {
|
||||
existingBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const container = document.createElement('div');
|
||||
container.className = 'mermaid-container';
|
||||
mermaidDiv.parentNode.insertBefore(container, mermaidDiv);
|
||||
container.appendChild(mermaidDiv);
|
||||
|
||||
const fullscreenBtn = document.createElement('button');
|
||||
fullscreenBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
fullscreenBtn.setAttribute('aria-label', 'View diagram in fullscreen');
|
||||
fullscreenBtn.textContent = '⛶';
|
||||
fullscreenBtn.style.opacity = '50%';
|
||||
|
||||
// Calculate dynamic position based on diagram's margin and padding
|
||||
const diagramStyle = window.getComputedStyle(mermaidDiv);
|
||||
const marginTop = parseFloat(diagramStyle.marginTop) || 0;
|
||||
const marginRight = parseFloat(diagramStyle.marginRight) || 0;
|
||||
const paddingTop = parseFloat(diagramStyle.paddingTop) || 0;
|
||||
const paddingRight = parseFloat(diagramStyle.paddingRight) || 0;
|
||||
fullscreenBtn.style.top = `${marginTop + paddingTop + 4}px`;
|
||||
fullscreenBtn.style.right = `${marginRight + paddingRight + 4}px`;
|
||||
|
||||
fullscreenBtn.addEventListener('click', () => {
|
||||
previousScrollOffset = [window.scroll, window.scrollY];
|
||||
const clone = mermaidDiv.cloneNode(true);
|
||||
modalContent.innerHTML = '';
|
||||
modalContent.appendChild(clone);
|
||||
|
||||
const svg = clone.querySelector('svg');
|
||||
if (svg) {
|
||||
svg.removeAttribute('width');
|
||||
svg.removeAttribute('height');
|
||||
svg.style.width = '100%';
|
||||
svg.style.height = 'auto';
|
||||
svg.style.maxWidth = '100%';
|
||||
svg.style.sdisplay = 'block';
|
||||
|
||||
if ("False" === "True") {
|
||||
setTimeout(() => {
|
||||
const g = svg.querySelector('g');
|
||||
if (g) {
|
||||
var svgD3 = d3.select(svg);
|
||||
svgD3.html("<g class='wrapper'>" + svgD3.html() + "</g>");
|
||||
var inner = svgD3.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svgD3.call(zoom);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
modal.classList.add('active');
|
||||
document.body.style.overflow = 'hidden';
|
||||
});
|
||||
container.appendChild(fullscreenBtn);
|
||||
});
|
||||
};
|
||||
|
||||
const load = async () => {
|
||||
initStyles();
|
||||
|
||||
await runMermaid(true);
|
||||
|
||||
const reRunIfThemeChanges = async () => {
|
||||
const newDarkTheme = isDarkTheme();
|
||||
if (newDarkTheme !== darkTheme) {
|
||||
darkTheme = newDarkTheme;
|
||||
console.log("Theme change detected, re-running mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
await mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
await runMermaid(true);
|
||||
}
|
||||
};
|
||||
|
||||
// Update theme classes when theme changes
|
||||
const themeObserver = new MutationObserver(reRunIfThemeChanges);
|
||||
themeObserver.observe(document.documentElement, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
themeObserver.observe(document.body, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
console.log("Initializing mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
|
||||
window.addEventListener("load", load);
|
||||
window.runMermaid = runMermaid;</script>
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="prev" title="gestione_aree_frame_async.py" href="gestione_aree_frame_async_flow.html" />
|
||||
|
||||
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head><body>
|
||||
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
|
||||
|
||||
<div class="body" role="main">
|
||||
|
||||
<section id="async-loop-singleton-py">
|
||||
<h1><code class="docutils literal notranslate"><span class="pre">async_loop_singleton.py</span></code><a class="headerlink" href="#async-loop-singleton-py" title="Link to this heading">¶</a></h1>
|
||||
<section id="scopo">
|
||||
<h2>Scopo<a class="headerlink" href="#scopo" title="Link to this heading">¶</a></h2>
|
||||
<p>Questo modulo mantiene un loop asyncio globale e condiviso, eseguito su un
|
||||
thread dedicato.</p>
|
||||
</section>
|
||||
<section id="flusso">
|
||||
<h2>Flusso<a class="headerlink" href="#flusso" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart TD
|
||||
A["Chiamata a get_global_loop()"] --> B{"Loop gia presente?"}
|
||||
B -- Si --> C["Ritorna loop esistente"]
|
||||
B -- No --> D["Crea Event ready"]
|
||||
D --> E["Avvia thread daemon"]
|
||||
E --> F["_run()"]
|
||||
F --> G["new_event_loop()"]
|
||||
G --> H["set_event_loop(loop)"]
|
||||
H --> I["ready.set()"]
|
||||
I --> J["loop.run_forever()"]
|
||||
J --> K["Ritorna loop al chiamante"]
|
||||
</pre></section>
|
||||
<section id="chiusura">
|
||||
<h2>Chiusura<a class="headerlink" href="#chiusura" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart TD
|
||||
A["stop_global_loop()"] --> B{"Loop attivo?"}
|
||||
B -- No --> C["Nessuna azione"]
|
||||
B -- Si --> D["call_soon_threadsafe(loop.stop)"]
|
||||
D --> E["join del thread"]
|
||||
E --> F["Azzera riferimenti globali"]
|
||||
</pre></section>
|
||||
<section id="note">
|
||||
<h2>Note<a class="headerlink" href="#note" title="Link to this heading">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><p>E un helper minimale usato da <code class="docutils literal notranslate"><span class="pre">main.py</span></code>.</p></li>
|
||||
<li><p>Il modulo esiste separato da <code class="docutils literal notranslate"><span class="pre">gestione_aree_frame_async.py</span></code>, ma concettualmente
|
||||
svolge lo stesso ruolo di gestione del loop condiviso.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h1 class="logo"><a href="../index.html">warehouse</a></h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<search id="searchbox" style="display: none" role="search">
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="../search.html" method="get">
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search"/>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
</search>
|
||||
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contenuti</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../architecture.html">Architettura Complessiva</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../api_reference.html">Riferimento API</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Flow Diagrams</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html">Flow Diagrams</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="main_flow.html"><code class="docutils literal notranslate"><span class="pre">main.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="layout_window_flow.html"><code class="docutils literal notranslate"><span class="pre">layout_window.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="reset_corsie_flow.html"><code class="docutils literal notranslate"><span class="pre">reset_corsie.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="view_celle_multiple_flow.html"><code class="docutils literal notranslate"><span class="pre">view_celle_multiple.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="search_pallets_flow.html"><code class="docutils literal notranslate"><span class="pre">search_pallets.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_pickinglist_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_pickinglist.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_db_flow.html">Infrastruttura Async / DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_msssql_query_flow.html"><code class="docutils literal notranslate"><span class="pre">async_msssql_query.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_aree_frame_async_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_aree_frame_async.py</span></code></a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">async_loop_singleton.py</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="relations">
|
||||
<h3>Related Topics</h3>
|
||||
<ul>
|
||||
<li><a href="../index.html">Documentation overview</a><ul>
|
||||
<li><a href="index.html">Flow Diagrams</a><ul>
|
||||
<li>Previous: <a href="gestione_aree_frame_async_flow.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">gestione_aree_frame_async.py</span></code></a></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
©.
|
||||
|
||||
|
|
||||
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 9.1.0</a>
|
||||
& <a href="https://alabaster.readthedocs.io">Alabaster 1.0.0</a>
|
||||
|
||||
|
|
||||
<a href="../_sources/flows/async_loop_singleton_flow.md.txt"
|
||||
rel="nofollow">Page source</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
601
docs/_build/html/flows/async_msssql_query_flow.html
vendored
Normal file
601
docs/_build/html/flows/async_msssql_query_flow.html
vendored
Normal file
@@ -0,0 +1,601 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en" data-content_root="../">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>async_msssql_query.py — warehouse 0.0.1 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=5ecbeea2" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/basic.css?v=b08954a9" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=27fed22d" />
|
||||
<script src="../_static/documentation_options.js?v=d45e8c67"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js"></script>
|
||||
<script type="module">import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11.12.1/dist/mermaid.esm.min.mjs";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const initStyles = () => {
|
||||
const defaultStyle = document.createElement('style');
|
||||
defaultStyle.textContent = `pre.mermaid {
|
||||
/* Same as .mermaid-container > pre */
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
pre.mermaid > svg {
|
||||
/* Same as .mermaid-container > pre > svg */
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}`;
|
||||
document.head.appendChild(defaultStyle);
|
||||
|
||||
const fullscreenStyle = document.createElement('style');
|
||||
fullscreenStyle.textContent = `.mermaid-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre > svg {
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.3);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
padding: 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn:hover {
|
||||
opacity: 100% !important;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 3px 10px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal {
|
||||
display: none;
|
||||
position: fixed !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
width: 95vw;
|
||||
height: 100vh;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
z-index: 9999;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.dark-theme {
|
||||
background: rgba(0, 0, 0, 0.98);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.active {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen {
|
||||
position: relative;
|
||||
width: 95vw;
|
||||
height: 90vh;
|
||||
max-width: 95vw;
|
||||
max-height: 90vh;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen.dark-theme {
|
||||
background: #1a1a1a;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen pre.mermaid {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen .mermaid svg {
|
||||
height: 100% !important;
|
||||
width: 100% !important;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close {
|
||||
position: fixed !important;
|
||||
top: 20px !important;
|
||||
right: 20px !important;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
z-index: 10000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
transition: all 0.2s;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close:hover {
|
||||
background: white;
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 6px 16px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal .mermaid-fullscreen-btn {
|
||||
display: none !important;
|
||||
}`;
|
||||
document.head.appendChild(fullscreenStyle);
|
||||
}
|
||||
|
||||
// Detect if page has dark background
|
||||
const isDarkTheme = () => {
|
||||
// We use a set of heuristics:
|
||||
// 1. Check for common dark mode classes or attributes
|
||||
// 2. Check computed background color brightness
|
||||
if (document.documentElement.classList.contains('dark') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'dark' ||
|
||||
document.body.classList.contains('dark') ||
|
||||
document.body.getAttribute('data-theme') === 'dark') {
|
||||
// console.log("Dark theme detected via class/attribute");
|
||||
return true;
|
||||
}
|
||||
if (document.documentElement.classList.contains('light') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'light' ||
|
||||
document.body.classList.contains('light') ||
|
||||
document.body.getAttribute('data-theme') === 'light') {
|
||||
// console.log("Light theme detected via class/attribute");
|
||||
return false;
|
||||
}
|
||||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
// console.log("Dark theme detected via prefers-color-scheme");
|
||||
return true;
|
||||
}
|
||||
const bgColor = window.getComputedStyle(document.body).backgroundColor;
|
||||
const match = bgColor.match(/rgb\((\d+),\s*(\d+),\s*(\d+)/);
|
||||
if (match) {
|
||||
const r = parseInt(match[1]);
|
||||
const g = parseInt(match[2]);
|
||||
const b = parseInt(match[3]);
|
||||
const brightness = (r * 299 + g * 587 + b * 114) / 1000;
|
||||
// console.log("Background color brightness:", brightness);
|
||||
return brightness < 128;
|
||||
}
|
||||
// console.log("No dark or light theme detected, defaulting to light theme");
|
||||
return false;
|
||||
};
|
||||
|
||||
let darkTheme = isDarkTheme();
|
||||
let modal = null;
|
||||
let modalContent = null;
|
||||
let previousScrollOffset = [window.scrollX, window.scrollY];
|
||||
|
||||
const runMermaid = async (rerun) => {
|
||||
console.log("Running mermaid diagrams, rerun =", rerun);
|
||||
// clear all existing mermaid charts
|
||||
let all_mermaids = document.querySelectorAll(".mermaid");
|
||||
|
||||
if (rerun) {
|
||||
all_mermaids.forEach((el) => {
|
||||
if(!el.hasAttribute("data-original-code")) {
|
||||
// store original code
|
||||
// console.log(`Storing original code for first run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
if(el.getAttribute("data-processed") === "true") {
|
||||
// remove and restore original
|
||||
el.removeAttribute("data-processed");
|
||||
// console.log(`Restoring original code for re-run: `, el.getAttribute('data-original-code'));
|
||||
el.innerHTML = el.getAttribute('data-original-code');
|
||||
} else {
|
||||
// store original code
|
||||
// console.log(`Storing original code for re-run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
});
|
||||
await mermaid.run();
|
||||
}
|
||||
|
||||
all_mermaids = document.querySelectorAll(".mermaid");
|
||||
const mermaids_processed = document.querySelectorAll(".mermaid[data-processed='true']");
|
||||
|
||||
if ("False" === "True") {
|
||||
const mermaids_to_add_zoom = -1 === -1 ? all_mermaids.length : -1;
|
||||
if(mermaids_to_add_zoom > 0) {
|
||||
var svgs = d3.selectAll("");
|
||||
if(all_mermaids.length !== mermaids_processed.length) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else if(svgs.size() !== mermaids_to_add_zoom) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else {
|
||||
svgs.each(function() {
|
||||
var svg = d3.select(this);
|
||||
svg.html("<g class='wrapper'>" + svg.html() + "</g>");
|
||||
var inner = svg.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svg.call(zoom);
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if(all_mermaids.length !== mermaids_processed.length) {
|
||||
// Wait for mermaid to process all diagrams
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
}
|
||||
|
||||
// Stop here if not adding fullscreen capability
|
||||
if ("True" !== "True") return;
|
||||
|
||||
if (modal !== null ) {
|
||||
// Destroy existing modal
|
||||
modal.remove();
|
||||
modal = null;
|
||||
modalContent = null;
|
||||
}
|
||||
|
||||
modal = document.createElement('div');
|
||||
modal.className = 'mermaid-fullscreen-modal' + (darkTheme ? ' dark-theme' : '');
|
||||
modal.setAttribute('role', 'dialog');
|
||||
modal.setAttribute('aria-modal', 'true');
|
||||
modal.setAttribute('aria-label', 'Fullscreen diagram viewer');
|
||||
modal.innerHTML = `
|
||||
<button class="mermaid-fullscreen-close${darkTheme ? ' dark-theme' : ''}" aria-label="Close fullscreen">✕</button>
|
||||
<div class="mermaid-container-fullscreen${darkTheme ? ' dark-theme' : ''}"></div>
|
||||
`;
|
||||
document.body.appendChild(modal);
|
||||
|
||||
modalContent = modal.querySelector('.mermaid-container-fullscreen');
|
||||
const closeBtn = modal.querySelector('.mermaid-fullscreen-close');
|
||||
|
||||
const closeModal = () => {
|
||||
modal.classList.remove('active');
|
||||
modalContent.innerHTML = '';
|
||||
document.body.style.overflow = ''
|
||||
window.scrollTo({left: previousScrollOffset[0], top: previousScrollOffset[1], behavior: 'instant'});
|
||||
};
|
||||
|
||||
closeBtn.addEventListener('click', closeModal);
|
||||
modal.addEventListener('click', (e) => {
|
||||
if (e.target === modal) closeModal();
|
||||
});
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && modal.classList.contains('active')) {
|
||||
closeModal();
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelectorAll('.mermaid').forEach((mermaidDiv) => {
|
||||
if (mermaidDiv.parentNode.classList.contains('mermaid-container') ||
|
||||
mermaidDiv.closest('.mermaid-fullscreen-modal')) {
|
||||
// Already processed, adjust button class if needed
|
||||
const existingBtn = mermaidDiv.parentNode.querySelector('.mermaid-fullscreen-btn');
|
||||
if (existingBtn) {
|
||||
existingBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const container = document.createElement('div');
|
||||
container.className = 'mermaid-container';
|
||||
mermaidDiv.parentNode.insertBefore(container, mermaidDiv);
|
||||
container.appendChild(mermaidDiv);
|
||||
|
||||
const fullscreenBtn = document.createElement('button');
|
||||
fullscreenBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
fullscreenBtn.setAttribute('aria-label', 'View diagram in fullscreen');
|
||||
fullscreenBtn.textContent = '⛶';
|
||||
fullscreenBtn.style.opacity = '50%';
|
||||
|
||||
// Calculate dynamic position based on diagram's margin and padding
|
||||
const diagramStyle = window.getComputedStyle(mermaidDiv);
|
||||
const marginTop = parseFloat(diagramStyle.marginTop) || 0;
|
||||
const marginRight = parseFloat(diagramStyle.marginRight) || 0;
|
||||
const paddingTop = parseFloat(diagramStyle.paddingTop) || 0;
|
||||
const paddingRight = parseFloat(diagramStyle.paddingRight) || 0;
|
||||
fullscreenBtn.style.top = `${marginTop + paddingTop + 4}px`;
|
||||
fullscreenBtn.style.right = `${marginRight + paddingRight + 4}px`;
|
||||
|
||||
fullscreenBtn.addEventListener('click', () => {
|
||||
previousScrollOffset = [window.scroll, window.scrollY];
|
||||
const clone = mermaidDiv.cloneNode(true);
|
||||
modalContent.innerHTML = '';
|
||||
modalContent.appendChild(clone);
|
||||
|
||||
const svg = clone.querySelector('svg');
|
||||
if (svg) {
|
||||
svg.removeAttribute('width');
|
||||
svg.removeAttribute('height');
|
||||
svg.style.width = '100%';
|
||||
svg.style.height = 'auto';
|
||||
svg.style.maxWidth = '100%';
|
||||
svg.style.sdisplay = 'block';
|
||||
|
||||
if ("False" === "True") {
|
||||
setTimeout(() => {
|
||||
const g = svg.querySelector('g');
|
||||
if (g) {
|
||||
var svgD3 = d3.select(svg);
|
||||
svgD3.html("<g class='wrapper'>" + svgD3.html() + "</g>");
|
||||
var inner = svgD3.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svgD3.call(zoom);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
modal.classList.add('active');
|
||||
document.body.style.overflow = 'hidden';
|
||||
});
|
||||
container.appendChild(fullscreenBtn);
|
||||
});
|
||||
};
|
||||
|
||||
const load = async () => {
|
||||
initStyles();
|
||||
|
||||
await runMermaid(true);
|
||||
|
||||
const reRunIfThemeChanges = async () => {
|
||||
const newDarkTheme = isDarkTheme();
|
||||
if (newDarkTheme !== darkTheme) {
|
||||
darkTheme = newDarkTheme;
|
||||
console.log("Theme change detected, re-running mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
await mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
await runMermaid(true);
|
||||
}
|
||||
};
|
||||
|
||||
// Update theme classes when theme changes
|
||||
const themeObserver = new MutationObserver(reRunIfThemeChanges);
|
||||
themeObserver.observe(document.documentElement, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
themeObserver.observe(document.body, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
console.log("Initializing mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
|
||||
window.addEventListener("load", load);
|
||||
window.runMermaid = runMermaid;</script>
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="gestione_aree_frame_async.py" href="gestione_aree_frame_async_flow.html" />
|
||||
<link rel="prev" title="Infrastruttura Async / DB" href="async_db_flow.html" />
|
||||
|
||||
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head><body>
|
||||
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
|
||||
|
||||
<div class="body" role="main">
|
||||
|
||||
<section id="async-msssql-query-py">
|
||||
<h1><code class="docutils literal notranslate"><span class="pre">async_msssql_query.py</span></code><a class="headerlink" href="#async-msssql-query-py" title="Link to this heading">¶</a></h1>
|
||||
<section id="scopo">
|
||||
<h2>Scopo<a class="headerlink" href="#scopo" title="Link to this heading">¶</a></h2>
|
||||
<p>Questo modulo centralizza la costruzione del DSN SQL Server e l’accesso
|
||||
asincrono al database tramite <code class="docutils literal notranslate"><span class="pre">AsyncMSSQLClient</span></code>.</p>
|
||||
</section>
|
||||
<section id="flusso-di-utilizzo">
|
||||
<h2>Flusso di utilizzo<a class="headerlink" href="#flusso-di-utilizzo" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart TD
|
||||
A["main.py o modulo chiamante"] --> B["make_mssql_dsn(...)"]
|
||||
B --> C["Crea stringa mssql+aioodbc"]
|
||||
C --> D["AsyncMSSQLClient(dsn)"]
|
||||
D --> E["query_json(...) o exec(...)"]
|
||||
E --> F["_ensure_engine()"]
|
||||
F --> G{"Engine gia creato?"}
|
||||
G -- No --> H["create_async_engine(..., NullPool, loop corrente)"]
|
||||
G -- Si --> I["Riusa engine esistente"]
|
||||
H --> J["execute(text(sql), params)"]
|
||||
I --> J
|
||||
J --> K["Normalizza rows/columns"]
|
||||
K --> L["Ritorna payload JSON-friendly"]
|
||||
</pre></section>
|
||||
<section id="schema-di-chiamata">
|
||||
<h2>Schema di chiamata<a class="headerlink" href="#schema-di-chiamata" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart LR
|
||||
DSN["make_mssql_dsn"] --> Client["AsyncMSSQLClient.__init__"]
|
||||
Client --> Ensure["_ensure_engine"]
|
||||
Ensure --> Query["query_json"]
|
||||
Ensure --> Exec["exec"]
|
||||
Client --> Dispose["dispose"]
|
||||
</pre></section>
|
||||
<section id="note">
|
||||
<h2>Note<a class="headerlink" href="#note" title="Link to this heading">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">NullPool</span></code> evita problemi di riuso connessioni tra loop diversi.</p></li>
|
||||
<li><p>L’engine viene creato solo al primo utilizzo reale.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">query_json()</span></code> restituisce un formato gia pronto per le callback GUI.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h1 class="logo"><a href="../index.html">warehouse</a></h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<search id="searchbox" style="display: none" role="search">
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="../search.html" method="get">
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search"/>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
</search>
|
||||
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contenuti</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../architecture.html">Architettura Complessiva</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../api_reference.html">Riferimento API</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Flow Diagrams</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html">Flow Diagrams</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="main_flow.html"><code class="docutils literal notranslate"><span class="pre">main.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="layout_window_flow.html"><code class="docutils literal notranslate"><span class="pre">layout_window.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="reset_corsie_flow.html"><code class="docutils literal notranslate"><span class="pre">reset_corsie.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="view_celle_multiple_flow.html"><code class="docutils literal notranslate"><span class="pre">view_celle_multiple.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="search_pallets_flow.html"><code class="docutils literal notranslate"><span class="pre">search_pallets.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_pickinglist_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_pickinglist.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_db_flow.html">Infrastruttura Async / DB</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">async_msssql_query.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_aree_frame_async_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_aree_frame_async.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_loop_singleton_flow.html"><code class="docutils literal notranslate"><span class="pre">async_loop_singleton.py</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="relations">
|
||||
<h3>Related Topics</h3>
|
||||
<ul>
|
||||
<li><a href="../index.html">Documentation overview</a><ul>
|
||||
<li><a href="index.html">Flow Diagrams</a><ul>
|
||||
<li>Previous: <a href="async_db_flow.html" title="previous chapter">Infrastruttura Async / DB</a></li>
|
||||
<li>Next: <a href="gestione_aree_frame_async_flow.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">gestione_aree_frame_async.py</span></code></a></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
©.
|
||||
|
||||
|
|
||||
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 9.1.0</a>
|
||||
& <a href="https://alabaster.readthedocs.io">Alabaster 1.0.0</a>
|
||||
|
||||
|
|
||||
<a href="../_sources/flows/async_msssql_query_flow.md.txt"
|
||||
rel="nofollow">Page source</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
606
docs/_build/html/flows/gestione_aree_frame_async_flow.html
vendored
Normal file
606
docs/_build/html/flows/gestione_aree_frame_async_flow.html
vendored
Normal file
@@ -0,0 +1,606 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en" data-content_root="../">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>gestione_aree_frame_async.py — warehouse 0.0.1 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=5ecbeea2" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/basic.css?v=b08954a9" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=27fed22d" />
|
||||
<script src="../_static/documentation_options.js?v=d45e8c67"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js"></script>
|
||||
<script type="module">import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11.12.1/dist/mermaid.esm.min.mjs";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const initStyles = () => {
|
||||
const defaultStyle = document.createElement('style');
|
||||
defaultStyle.textContent = `pre.mermaid {
|
||||
/* Same as .mermaid-container > pre */
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
pre.mermaid > svg {
|
||||
/* Same as .mermaid-container > pre > svg */
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}`;
|
||||
document.head.appendChild(defaultStyle);
|
||||
|
||||
const fullscreenStyle = document.createElement('style');
|
||||
fullscreenStyle.textContent = `.mermaid-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre > svg {
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.3);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
padding: 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn:hover {
|
||||
opacity: 100% !important;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 3px 10px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal {
|
||||
display: none;
|
||||
position: fixed !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
width: 95vw;
|
||||
height: 100vh;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
z-index: 9999;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.dark-theme {
|
||||
background: rgba(0, 0, 0, 0.98);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.active {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen {
|
||||
position: relative;
|
||||
width: 95vw;
|
||||
height: 90vh;
|
||||
max-width: 95vw;
|
||||
max-height: 90vh;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen.dark-theme {
|
||||
background: #1a1a1a;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen pre.mermaid {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen .mermaid svg {
|
||||
height: 100% !important;
|
||||
width: 100% !important;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close {
|
||||
position: fixed !important;
|
||||
top: 20px !important;
|
||||
right: 20px !important;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
z-index: 10000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
transition: all 0.2s;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close:hover {
|
||||
background: white;
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 6px 16px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal .mermaid-fullscreen-btn {
|
||||
display: none !important;
|
||||
}`;
|
||||
document.head.appendChild(fullscreenStyle);
|
||||
}
|
||||
|
||||
// Detect if page has dark background
|
||||
const isDarkTheme = () => {
|
||||
// We use a set of heuristics:
|
||||
// 1. Check for common dark mode classes or attributes
|
||||
// 2. Check computed background color brightness
|
||||
if (document.documentElement.classList.contains('dark') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'dark' ||
|
||||
document.body.classList.contains('dark') ||
|
||||
document.body.getAttribute('data-theme') === 'dark') {
|
||||
// console.log("Dark theme detected via class/attribute");
|
||||
return true;
|
||||
}
|
||||
if (document.documentElement.classList.contains('light') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'light' ||
|
||||
document.body.classList.contains('light') ||
|
||||
document.body.getAttribute('data-theme') === 'light') {
|
||||
// console.log("Light theme detected via class/attribute");
|
||||
return false;
|
||||
}
|
||||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
// console.log("Dark theme detected via prefers-color-scheme");
|
||||
return true;
|
||||
}
|
||||
const bgColor = window.getComputedStyle(document.body).backgroundColor;
|
||||
const match = bgColor.match(/rgb\((\d+),\s*(\d+),\s*(\d+)/);
|
||||
if (match) {
|
||||
const r = parseInt(match[1]);
|
||||
const g = parseInt(match[2]);
|
||||
const b = parseInt(match[3]);
|
||||
const brightness = (r * 299 + g * 587 + b * 114) / 1000;
|
||||
// console.log("Background color brightness:", brightness);
|
||||
return brightness < 128;
|
||||
}
|
||||
// console.log("No dark or light theme detected, defaulting to light theme");
|
||||
return false;
|
||||
};
|
||||
|
||||
let darkTheme = isDarkTheme();
|
||||
let modal = null;
|
||||
let modalContent = null;
|
||||
let previousScrollOffset = [window.scrollX, window.scrollY];
|
||||
|
||||
const runMermaid = async (rerun) => {
|
||||
console.log("Running mermaid diagrams, rerun =", rerun);
|
||||
// clear all existing mermaid charts
|
||||
let all_mermaids = document.querySelectorAll(".mermaid");
|
||||
|
||||
if (rerun) {
|
||||
all_mermaids.forEach((el) => {
|
||||
if(!el.hasAttribute("data-original-code")) {
|
||||
// store original code
|
||||
// console.log(`Storing original code for first run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
if(el.getAttribute("data-processed") === "true") {
|
||||
// remove and restore original
|
||||
el.removeAttribute("data-processed");
|
||||
// console.log(`Restoring original code for re-run: `, el.getAttribute('data-original-code'));
|
||||
el.innerHTML = el.getAttribute('data-original-code');
|
||||
} else {
|
||||
// store original code
|
||||
// console.log(`Storing original code for re-run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
});
|
||||
await mermaid.run();
|
||||
}
|
||||
|
||||
all_mermaids = document.querySelectorAll(".mermaid");
|
||||
const mermaids_processed = document.querySelectorAll(".mermaid[data-processed='true']");
|
||||
|
||||
if ("False" === "True") {
|
||||
const mermaids_to_add_zoom = -1 === -1 ? all_mermaids.length : -1;
|
||||
if(mermaids_to_add_zoom > 0) {
|
||||
var svgs = d3.selectAll("");
|
||||
if(all_mermaids.length !== mermaids_processed.length) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else if(svgs.size() !== mermaids_to_add_zoom) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else {
|
||||
svgs.each(function() {
|
||||
var svg = d3.select(this);
|
||||
svg.html("<g class='wrapper'>" + svg.html() + "</g>");
|
||||
var inner = svg.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svg.call(zoom);
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if(all_mermaids.length !== mermaids_processed.length) {
|
||||
// Wait for mermaid to process all diagrams
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
}
|
||||
|
||||
// Stop here if not adding fullscreen capability
|
||||
if ("True" !== "True") return;
|
||||
|
||||
if (modal !== null ) {
|
||||
// Destroy existing modal
|
||||
modal.remove();
|
||||
modal = null;
|
||||
modalContent = null;
|
||||
}
|
||||
|
||||
modal = document.createElement('div');
|
||||
modal.className = 'mermaid-fullscreen-modal' + (darkTheme ? ' dark-theme' : '');
|
||||
modal.setAttribute('role', 'dialog');
|
||||
modal.setAttribute('aria-modal', 'true');
|
||||
modal.setAttribute('aria-label', 'Fullscreen diagram viewer');
|
||||
modal.innerHTML = `
|
||||
<button class="mermaid-fullscreen-close${darkTheme ? ' dark-theme' : ''}" aria-label="Close fullscreen">✕</button>
|
||||
<div class="mermaid-container-fullscreen${darkTheme ? ' dark-theme' : ''}"></div>
|
||||
`;
|
||||
document.body.appendChild(modal);
|
||||
|
||||
modalContent = modal.querySelector('.mermaid-container-fullscreen');
|
||||
const closeBtn = modal.querySelector('.mermaid-fullscreen-close');
|
||||
|
||||
const closeModal = () => {
|
||||
modal.classList.remove('active');
|
||||
modalContent.innerHTML = '';
|
||||
document.body.style.overflow = ''
|
||||
window.scrollTo({left: previousScrollOffset[0], top: previousScrollOffset[1], behavior: 'instant'});
|
||||
};
|
||||
|
||||
closeBtn.addEventListener('click', closeModal);
|
||||
modal.addEventListener('click', (e) => {
|
||||
if (e.target === modal) closeModal();
|
||||
});
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && modal.classList.contains('active')) {
|
||||
closeModal();
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelectorAll('.mermaid').forEach((mermaidDiv) => {
|
||||
if (mermaidDiv.parentNode.classList.contains('mermaid-container') ||
|
||||
mermaidDiv.closest('.mermaid-fullscreen-modal')) {
|
||||
// Already processed, adjust button class if needed
|
||||
const existingBtn = mermaidDiv.parentNode.querySelector('.mermaid-fullscreen-btn');
|
||||
if (existingBtn) {
|
||||
existingBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const container = document.createElement('div');
|
||||
container.className = 'mermaid-container';
|
||||
mermaidDiv.parentNode.insertBefore(container, mermaidDiv);
|
||||
container.appendChild(mermaidDiv);
|
||||
|
||||
const fullscreenBtn = document.createElement('button');
|
||||
fullscreenBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
fullscreenBtn.setAttribute('aria-label', 'View diagram in fullscreen');
|
||||
fullscreenBtn.textContent = '⛶';
|
||||
fullscreenBtn.style.opacity = '50%';
|
||||
|
||||
// Calculate dynamic position based on diagram's margin and padding
|
||||
const diagramStyle = window.getComputedStyle(mermaidDiv);
|
||||
const marginTop = parseFloat(diagramStyle.marginTop) || 0;
|
||||
const marginRight = parseFloat(diagramStyle.marginRight) || 0;
|
||||
const paddingTop = parseFloat(diagramStyle.paddingTop) || 0;
|
||||
const paddingRight = parseFloat(diagramStyle.paddingRight) || 0;
|
||||
fullscreenBtn.style.top = `${marginTop + paddingTop + 4}px`;
|
||||
fullscreenBtn.style.right = `${marginRight + paddingRight + 4}px`;
|
||||
|
||||
fullscreenBtn.addEventListener('click', () => {
|
||||
previousScrollOffset = [window.scroll, window.scrollY];
|
||||
const clone = mermaidDiv.cloneNode(true);
|
||||
modalContent.innerHTML = '';
|
||||
modalContent.appendChild(clone);
|
||||
|
||||
const svg = clone.querySelector('svg');
|
||||
if (svg) {
|
||||
svg.removeAttribute('width');
|
||||
svg.removeAttribute('height');
|
||||
svg.style.width = '100%';
|
||||
svg.style.height = 'auto';
|
||||
svg.style.maxWidth = '100%';
|
||||
svg.style.sdisplay = 'block';
|
||||
|
||||
if ("False" === "True") {
|
||||
setTimeout(() => {
|
||||
const g = svg.querySelector('g');
|
||||
if (g) {
|
||||
var svgD3 = d3.select(svg);
|
||||
svgD3.html("<g class='wrapper'>" + svgD3.html() + "</g>");
|
||||
var inner = svgD3.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svgD3.call(zoom);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
modal.classList.add('active');
|
||||
document.body.style.overflow = 'hidden';
|
||||
});
|
||||
container.appendChild(fullscreenBtn);
|
||||
});
|
||||
};
|
||||
|
||||
const load = async () => {
|
||||
initStyles();
|
||||
|
||||
await runMermaid(true);
|
||||
|
||||
const reRunIfThemeChanges = async () => {
|
||||
const newDarkTheme = isDarkTheme();
|
||||
if (newDarkTheme !== darkTheme) {
|
||||
darkTheme = newDarkTheme;
|
||||
console.log("Theme change detected, re-running mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
await mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
await runMermaid(true);
|
||||
}
|
||||
};
|
||||
|
||||
// Update theme classes when theme changes
|
||||
const themeObserver = new MutationObserver(reRunIfThemeChanges);
|
||||
themeObserver.observe(document.documentElement, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
themeObserver.observe(document.body, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
console.log("Initializing mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
|
||||
window.addEventListener("load", load);
|
||||
window.runMermaid = runMermaid;</script>
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="async_loop_singleton.py" href="async_loop_singleton_flow.html" />
|
||||
<link rel="prev" title="async_msssql_query.py" href="async_msssql_query_flow.html" />
|
||||
|
||||
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head><body>
|
||||
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
|
||||
|
||||
<div class="body" role="main">
|
||||
|
||||
<section id="gestione-aree-frame-async-py">
|
||||
<h1><code class="docutils literal notranslate"><span class="pre">gestione_aree_frame_async.py</span></code><a class="headerlink" href="#gestione-aree-frame-async-py" title="Link to this heading">¶</a></h1>
|
||||
<section id="scopo">
|
||||
<h2>Scopo<a class="headerlink" href="#scopo" title="Link to this heading">¶</a></h2>
|
||||
<p>Questo modulo fornisce l’infrastruttura async usata dalle finestre GUI:</p>
|
||||
<ul class="simple">
|
||||
<li><p>loop asincrono globale;</p></li>
|
||||
<li><p>overlay di attesa;</p></li>
|
||||
<li><p>runner che collega coroutine e callback Tk.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="flusso-infrastrutturale">
|
||||
<h2>Flusso infrastrutturale<a class="headerlink" href="#flusso-infrastrutturale" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart TD
|
||||
A["Metodo finestra GUI"] --> B["AsyncRunner.run(awaitable)"]
|
||||
B --> C{"busy overlay richiesto?"}
|
||||
C -- Si --> D["BusyOverlay.show()"]
|
||||
C -- No --> E["Salta overlay"]
|
||||
D --> F["run_coroutine_threadsafe(awaitable, loop globale)"]
|
||||
E --> F
|
||||
F --> G["Polling del Future"]
|
||||
G --> H{"Future completato?"}
|
||||
H -- No --> G
|
||||
H -- Si --> I{"Successo o errore?"}
|
||||
I -- Successo --> J["widget.after(..., on_success)"]
|
||||
I -- Errore --> K["widget.after(..., on_error)"]
|
||||
J --> L["BusyOverlay.hide()"]
|
||||
K --> L
|
||||
</pre></section>
|
||||
<section id="schema-di-componenti">
|
||||
<h2>Schema di componenti<a class="headerlink" href="#schema-di-componenti" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart LR
|
||||
Holder["_LoopHolder"] --> Loop["get_global_loop"]
|
||||
Loop --> Runner["AsyncRunner"]
|
||||
Overlay["BusyOverlay"] --> Runner
|
||||
Runner --> GUI["Moduli GUI"]
|
||||
</pre></section>
|
||||
<section id="note">
|
||||
<h2>Note<a class="headerlink" href="#note" title="Link to this heading">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><p>Il modulo fa da ponte tra thread Tk e thread del loop asincrono.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">BusyOverlay</span></code> e riusato da piu finestre, quindi e un componente condiviso.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">AsyncRunner</span></code> evita che i moduli GUI gestiscano direttamente i <code class="docutils literal notranslate"><span class="pre">Future</span></code>.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h1 class="logo"><a href="../index.html">warehouse</a></h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<search id="searchbox" style="display: none" role="search">
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="../search.html" method="get">
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search"/>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
</search>
|
||||
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contenuti</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../architecture.html">Architettura Complessiva</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../api_reference.html">Riferimento API</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Flow Diagrams</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html">Flow Diagrams</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="main_flow.html"><code class="docutils literal notranslate"><span class="pre">main.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="layout_window_flow.html"><code class="docutils literal notranslate"><span class="pre">layout_window.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="reset_corsie_flow.html"><code class="docutils literal notranslate"><span class="pre">reset_corsie.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="view_celle_multiple_flow.html"><code class="docutils literal notranslate"><span class="pre">view_celle_multiple.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="search_pallets_flow.html"><code class="docutils literal notranslate"><span class="pre">search_pallets.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_pickinglist_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_pickinglist.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_db_flow.html">Infrastruttura Async / DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_msssql_query_flow.html"><code class="docutils literal notranslate"><span class="pre">async_msssql_query.py</span></code></a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">gestione_aree_frame_async.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_loop_singleton_flow.html"><code class="docutils literal notranslate"><span class="pre">async_loop_singleton.py</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="relations">
|
||||
<h3>Related Topics</h3>
|
||||
<ul>
|
||||
<li><a href="../index.html">Documentation overview</a><ul>
|
||||
<li><a href="index.html">Flow Diagrams</a><ul>
|
||||
<li>Previous: <a href="async_msssql_query_flow.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">async_msssql_query.py</span></code></a></li>
|
||||
<li>Next: <a href="async_loop_singleton_flow.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">async_loop_singleton.py</span></code></a></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
©.
|
||||
|
||||
|
|
||||
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 9.1.0</a>
|
||||
& <a href="https://alabaster.readthedocs.io">Alabaster 1.0.0</a>
|
||||
|
||||
|
|
||||
<a href="../_sources/flows/gestione_aree_frame_async_flow.md.txt"
|
||||
rel="nofollow">Page source</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
628
docs/_build/html/flows/gestione_pickinglist_flow.html
vendored
Normal file
628
docs/_build/html/flows/gestione_pickinglist_flow.html
vendored
Normal file
@@ -0,0 +1,628 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en" data-content_root="../">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>gestione_pickinglist.py — warehouse 0.0.1 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=5ecbeea2" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/basic.css?v=b08954a9" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=27fed22d" />
|
||||
<script src="../_static/documentation_options.js?v=d45e8c67"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js"></script>
|
||||
<script type="module">import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11.12.1/dist/mermaid.esm.min.mjs";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const initStyles = () => {
|
||||
const defaultStyle = document.createElement('style');
|
||||
defaultStyle.textContent = `pre.mermaid {
|
||||
/* Same as .mermaid-container > pre */
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
pre.mermaid > svg {
|
||||
/* Same as .mermaid-container > pre > svg */
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}`;
|
||||
document.head.appendChild(defaultStyle);
|
||||
|
||||
const fullscreenStyle = document.createElement('style');
|
||||
fullscreenStyle.textContent = `.mermaid-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre > svg {
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.3);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
padding: 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn:hover {
|
||||
opacity: 100% !important;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 3px 10px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal {
|
||||
display: none;
|
||||
position: fixed !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
width: 95vw;
|
||||
height: 100vh;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
z-index: 9999;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.dark-theme {
|
||||
background: rgba(0, 0, 0, 0.98);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.active {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen {
|
||||
position: relative;
|
||||
width: 95vw;
|
||||
height: 90vh;
|
||||
max-width: 95vw;
|
||||
max-height: 90vh;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen.dark-theme {
|
||||
background: #1a1a1a;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen pre.mermaid {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen .mermaid svg {
|
||||
height: 100% !important;
|
||||
width: 100% !important;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close {
|
||||
position: fixed !important;
|
||||
top: 20px !important;
|
||||
right: 20px !important;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
z-index: 10000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
transition: all 0.2s;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close:hover {
|
||||
background: white;
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 6px 16px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal .mermaid-fullscreen-btn {
|
||||
display: none !important;
|
||||
}`;
|
||||
document.head.appendChild(fullscreenStyle);
|
||||
}
|
||||
|
||||
// Detect if page has dark background
|
||||
const isDarkTheme = () => {
|
||||
// We use a set of heuristics:
|
||||
// 1. Check for common dark mode classes or attributes
|
||||
// 2. Check computed background color brightness
|
||||
if (document.documentElement.classList.contains('dark') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'dark' ||
|
||||
document.body.classList.contains('dark') ||
|
||||
document.body.getAttribute('data-theme') === 'dark') {
|
||||
// console.log("Dark theme detected via class/attribute");
|
||||
return true;
|
||||
}
|
||||
if (document.documentElement.classList.contains('light') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'light' ||
|
||||
document.body.classList.contains('light') ||
|
||||
document.body.getAttribute('data-theme') === 'light') {
|
||||
// console.log("Light theme detected via class/attribute");
|
||||
return false;
|
||||
}
|
||||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
// console.log("Dark theme detected via prefers-color-scheme");
|
||||
return true;
|
||||
}
|
||||
const bgColor = window.getComputedStyle(document.body).backgroundColor;
|
||||
const match = bgColor.match(/rgb\((\d+),\s*(\d+),\s*(\d+)/);
|
||||
if (match) {
|
||||
const r = parseInt(match[1]);
|
||||
const g = parseInt(match[2]);
|
||||
const b = parseInt(match[3]);
|
||||
const brightness = (r * 299 + g * 587 + b * 114) / 1000;
|
||||
// console.log("Background color brightness:", brightness);
|
||||
return brightness < 128;
|
||||
}
|
||||
// console.log("No dark or light theme detected, defaulting to light theme");
|
||||
return false;
|
||||
};
|
||||
|
||||
let darkTheme = isDarkTheme();
|
||||
let modal = null;
|
||||
let modalContent = null;
|
||||
let previousScrollOffset = [window.scrollX, window.scrollY];
|
||||
|
||||
const runMermaid = async (rerun) => {
|
||||
console.log("Running mermaid diagrams, rerun =", rerun);
|
||||
// clear all existing mermaid charts
|
||||
let all_mermaids = document.querySelectorAll(".mermaid");
|
||||
|
||||
if (rerun) {
|
||||
all_mermaids.forEach((el) => {
|
||||
if(!el.hasAttribute("data-original-code")) {
|
||||
// store original code
|
||||
// console.log(`Storing original code for first run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
if(el.getAttribute("data-processed") === "true") {
|
||||
// remove and restore original
|
||||
el.removeAttribute("data-processed");
|
||||
// console.log(`Restoring original code for re-run: `, el.getAttribute('data-original-code'));
|
||||
el.innerHTML = el.getAttribute('data-original-code');
|
||||
} else {
|
||||
// store original code
|
||||
// console.log(`Storing original code for re-run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
});
|
||||
await mermaid.run();
|
||||
}
|
||||
|
||||
all_mermaids = document.querySelectorAll(".mermaid");
|
||||
const mermaids_processed = document.querySelectorAll(".mermaid[data-processed='true']");
|
||||
|
||||
if ("False" === "True") {
|
||||
const mermaids_to_add_zoom = -1 === -1 ? all_mermaids.length : -1;
|
||||
if(mermaids_to_add_zoom > 0) {
|
||||
var svgs = d3.selectAll("");
|
||||
if(all_mermaids.length !== mermaids_processed.length) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else if(svgs.size() !== mermaids_to_add_zoom) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else {
|
||||
svgs.each(function() {
|
||||
var svg = d3.select(this);
|
||||
svg.html("<g class='wrapper'>" + svg.html() + "</g>");
|
||||
var inner = svg.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svg.call(zoom);
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if(all_mermaids.length !== mermaids_processed.length) {
|
||||
// Wait for mermaid to process all diagrams
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
}
|
||||
|
||||
// Stop here if not adding fullscreen capability
|
||||
if ("True" !== "True") return;
|
||||
|
||||
if (modal !== null ) {
|
||||
// Destroy existing modal
|
||||
modal.remove();
|
||||
modal = null;
|
||||
modalContent = null;
|
||||
}
|
||||
|
||||
modal = document.createElement('div');
|
||||
modal.className = 'mermaid-fullscreen-modal' + (darkTheme ? ' dark-theme' : '');
|
||||
modal.setAttribute('role', 'dialog');
|
||||
modal.setAttribute('aria-modal', 'true');
|
||||
modal.setAttribute('aria-label', 'Fullscreen diagram viewer');
|
||||
modal.innerHTML = `
|
||||
<button class="mermaid-fullscreen-close${darkTheme ? ' dark-theme' : ''}" aria-label="Close fullscreen">✕</button>
|
||||
<div class="mermaid-container-fullscreen${darkTheme ? ' dark-theme' : ''}"></div>
|
||||
`;
|
||||
document.body.appendChild(modal);
|
||||
|
||||
modalContent = modal.querySelector('.mermaid-container-fullscreen');
|
||||
const closeBtn = modal.querySelector('.mermaid-fullscreen-close');
|
||||
|
||||
const closeModal = () => {
|
||||
modal.classList.remove('active');
|
||||
modalContent.innerHTML = '';
|
||||
document.body.style.overflow = ''
|
||||
window.scrollTo({left: previousScrollOffset[0], top: previousScrollOffset[1], behavior: 'instant'});
|
||||
};
|
||||
|
||||
closeBtn.addEventListener('click', closeModal);
|
||||
modal.addEventListener('click', (e) => {
|
||||
if (e.target === modal) closeModal();
|
||||
});
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && modal.classList.contains('active')) {
|
||||
closeModal();
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelectorAll('.mermaid').forEach((mermaidDiv) => {
|
||||
if (mermaidDiv.parentNode.classList.contains('mermaid-container') ||
|
||||
mermaidDiv.closest('.mermaid-fullscreen-modal')) {
|
||||
// Already processed, adjust button class if needed
|
||||
const existingBtn = mermaidDiv.parentNode.querySelector('.mermaid-fullscreen-btn');
|
||||
if (existingBtn) {
|
||||
existingBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const container = document.createElement('div');
|
||||
container.className = 'mermaid-container';
|
||||
mermaidDiv.parentNode.insertBefore(container, mermaidDiv);
|
||||
container.appendChild(mermaidDiv);
|
||||
|
||||
const fullscreenBtn = document.createElement('button');
|
||||
fullscreenBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
fullscreenBtn.setAttribute('aria-label', 'View diagram in fullscreen');
|
||||
fullscreenBtn.textContent = '⛶';
|
||||
fullscreenBtn.style.opacity = '50%';
|
||||
|
||||
// Calculate dynamic position based on diagram's margin and padding
|
||||
const diagramStyle = window.getComputedStyle(mermaidDiv);
|
||||
const marginTop = parseFloat(diagramStyle.marginTop) || 0;
|
||||
const marginRight = parseFloat(diagramStyle.marginRight) || 0;
|
||||
const paddingTop = parseFloat(diagramStyle.paddingTop) || 0;
|
||||
const paddingRight = parseFloat(diagramStyle.paddingRight) || 0;
|
||||
fullscreenBtn.style.top = `${marginTop + paddingTop + 4}px`;
|
||||
fullscreenBtn.style.right = `${marginRight + paddingRight + 4}px`;
|
||||
|
||||
fullscreenBtn.addEventListener('click', () => {
|
||||
previousScrollOffset = [window.scroll, window.scrollY];
|
||||
const clone = mermaidDiv.cloneNode(true);
|
||||
modalContent.innerHTML = '';
|
||||
modalContent.appendChild(clone);
|
||||
|
||||
const svg = clone.querySelector('svg');
|
||||
if (svg) {
|
||||
svg.removeAttribute('width');
|
||||
svg.removeAttribute('height');
|
||||
svg.style.width = '100%';
|
||||
svg.style.height = 'auto';
|
||||
svg.style.maxWidth = '100%';
|
||||
svg.style.sdisplay = 'block';
|
||||
|
||||
if ("False" === "True") {
|
||||
setTimeout(() => {
|
||||
const g = svg.querySelector('g');
|
||||
if (g) {
|
||||
var svgD3 = d3.select(svg);
|
||||
svgD3.html("<g class='wrapper'>" + svgD3.html() + "</g>");
|
||||
var inner = svgD3.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svgD3.call(zoom);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
modal.classList.add('active');
|
||||
document.body.style.overflow = 'hidden';
|
||||
});
|
||||
container.appendChild(fullscreenBtn);
|
||||
});
|
||||
};
|
||||
|
||||
const load = async () => {
|
||||
initStyles();
|
||||
|
||||
await runMermaid(true);
|
||||
|
||||
const reRunIfThemeChanges = async () => {
|
||||
const newDarkTheme = isDarkTheme();
|
||||
if (newDarkTheme !== darkTheme) {
|
||||
darkTheme = newDarkTheme;
|
||||
console.log("Theme change detected, re-running mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
await mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
await runMermaid(true);
|
||||
}
|
||||
};
|
||||
|
||||
// Update theme classes when theme changes
|
||||
const themeObserver = new MutationObserver(reRunIfThemeChanges);
|
||||
themeObserver.observe(document.documentElement, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
themeObserver.observe(document.body, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
console.log("Initializing mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
|
||||
window.addEventListener("load", load);
|
||||
window.runMermaid = runMermaid;</script>
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="Infrastruttura Async / DB" href="async_db_flow.html" />
|
||||
<link rel="prev" title="search_pallets.py" href="search_pallets_flow.html" />
|
||||
|
||||
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head><body>
|
||||
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
|
||||
|
||||
<div class="body" role="main">
|
||||
|
||||
<section id="gestione-pickinglist-py">
|
||||
<h1><code class="docutils literal notranslate"><span class="pre">gestione_pickinglist.py</span></code><a class="headerlink" href="#gestione-pickinglist-py" title="Link to this heading">¶</a></h1>
|
||||
<section id="scopo">
|
||||
<h2>Scopo<a class="headerlink" href="#scopo" title="Link to this heading">¶</a></h2>
|
||||
<p>Questo modulo gestisce la vista master/detail delle picking list e permette di:</p>
|
||||
<ul class="simple">
|
||||
<li><p>caricare l’elenco dei documenti;</p></li>
|
||||
<li><p>vedere il dettaglio UDC della riga selezionata;</p></li>
|
||||
<li><p>prenotare e s-prenotare una picking list;</p></li>
|
||||
<li><p>mantenere una UI fluida con spinner e refresh differiti.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="flusso-di-apertura">
|
||||
<h2>Flusso di apertura<a class="headerlink" href="#flusso-di-apertura" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart TD
|
||||
A["open_pickinglist_window() da main.py"] --> B["create_pickinglist_frame()"]
|
||||
B --> C["GestionePickingListFrame.__init__()"]
|
||||
C --> D["_build_layout()"]
|
||||
D --> E["after_idle(_first_show)"]
|
||||
E --> F["reload_from_db(first=True)"]
|
||||
F --> G["query_json SQL_PL"]
|
||||
G --> H["_refresh_mid_rows()"]
|
||||
H --> I["Render tabella master"]
|
||||
</pre></section>
|
||||
<section id="flusso-master-detail">
|
||||
<h2>Flusso master/detail<a class="headerlink" href="#flusso-master-detail" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart TD
|
||||
A["Utente seleziona checkbox riga"] --> B["on_row_checked()"]
|
||||
B --> C["Deseleziona altre righe"]
|
||||
C --> D["Salva detail_doc"]
|
||||
D --> E["query_json SQL_PL_DETAILS"]
|
||||
E --> F["_refresh_details()"]
|
||||
F --> G["Render tabella dettaglio"]
|
||||
</pre></section>
|
||||
<section id="prenotazione-s-prenotazione">
|
||||
<h2>Prenotazione / s-prenotazione<a class="headerlink" href="#prenotazione-s-prenotazione" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart TD
|
||||
A["Click Prenota o S-prenota"] --> B["Verifica riga selezionata"]
|
||||
B --> C["Determina documento e stato atteso"]
|
||||
C --> D["Chiama sp_xExePackingListPallet_async()"]
|
||||
D --> E["Aggiorna Celle e LogPackingList sul DB"]
|
||||
E --> F["SPResult"]
|
||||
F --> G{"rc == 0?"}
|
||||
G -- Si --> H["_recolor_row_by_documento()"]
|
||||
G -- No --> I["Messaggio di errore"]
|
||||
</pre></section>
|
||||
<section id="schema-di-chiamata">
|
||||
<h2>Schema di chiamata<a class="headerlink" href="#schema-di-chiamata" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart LR
|
||||
Init["__init__"] --> Build["_build_layout"]
|
||||
Init --> First["_first_show"]
|
||||
First --> Reload["reload_from_db"]
|
||||
Reload --> Mid["_refresh_mid_rows"]
|
||||
Check["on_row_checked"] --> Details["_refresh_details"]
|
||||
Pren["on_prenota"] --> SP["sp_xExePackingListPallet_async"]
|
||||
Spren["on_sprenota"] --> SP
|
||||
</pre></section>
|
||||
<section id="note">
|
||||
<h2>Note<a class="headerlink" href="#note" title="Link to this heading">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><p>Il modulo usa <code class="docutils literal notranslate"><span class="pre">AsyncRunner</span></code>, <code class="docutils literal notranslate"><span class="pre">BusyOverlay</span></code> e <code class="docutils literal notranslate"><span class="pre">ToolbarSpinner</span></code>.</p></li>
|
||||
<li><p>Il caricamento iniziale è differito con <code class="docutils literal notranslate"><span class="pre">after_idle</span></code> per ridurre lo sfarfallio.</p></li>
|
||||
<li><p>La riga selezionata viene tenuta separata dal dettaglio tramite <code class="docutils literal notranslate"><span class="pre">detail_doc</span></code>.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h1 class="logo"><a href="../index.html">warehouse</a></h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<search id="searchbox" style="display: none" role="search">
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="../search.html" method="get">
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search"/>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
</search>
|
||||
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contenuti</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../architecture.html">Architettura Complessiva</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../api_reference.html">Riferimento API</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Flow Diagrams</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html">Flow Diagrams</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="main_flow.html"><code class="docutils literal notranslate"><span class="pre">main.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="layout_window_flow.html"><code class="docutils literal notranslate"><span class="pre">layout_window.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="reset_corsie_flow.html"><code class="docutils literal notranslate"><span class="pre">reset_corsie.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="view_celle_multiple_flow.html"><code class="docutils literal notranslate"><span class="pre">view_celle_multiple.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="search_pallets_flow.html"><code class="docutils literal notranslate"><span class="pre">search_pallets.py</span></code></a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">gestione_pickinglist.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_db_flow.html">Infrastruttura Async / DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_msssql_query_flow.html"><code class="docutils literal notranslate"><span class="pre">async_msssql_query.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_aree_frame_async_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_aree_frame_async.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_loop_singleton_flow.html"><code class="docutils literal notranslate"><span class="pre">async_loop_singleton.py</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="relations">
|
||||
<h3>Related Topics</h3>
|
||||
<ul>
|
||||
<li><a href="../index.html">Documentation overview</a><ul>
|
||||
<li><a href="index.html">Flow Diagrams</a><ul>
|
||||
<li>Previous: <a href="search_pallets_flow.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">search_pallets.py</span></code></a></li>
|
||||
<li>Next: <a href="async_db_flow.html" title="next chapter">Infrastruttura Async / DB</a></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
©.
|
||||
|
||||
|
|
||||
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 9.1.0</a>
|
||||
& <a href="https://alabaster.readthedocs.io">Alabaster 1.0.0</a>
|
||||
|
||||
|
|
||||
<a href="../_sources/flows/gestione_pickinglist_flow.md.txt"
|
||||
rel="nofollow">Page source</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
140
docs/_build/html/flows/index.html
vendored
Normal file
140
docs/_build/html/flows/index.html
vendored
Normal file
@@ -0,0 +1,140 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en" data-content_root="../">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Flow Diagrams — warehouse 0.0.1 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=5ecbeea2" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/basic.css?v=b08954a9" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=27fed22d" />
|
||||
<script src="../_static/documentation_options.js?v=d45e8c67"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="Flow Diagrams" href="README.html" />
|
||||
<link rel="prev" title="Riferimento API" href="../api_reference.html" />
|
||||
|
||||
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head><body>
|
||||
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
|
||||
|
||||
<div class="body" role="main">
|
||||
|
||||
<section id="flow-diagrams">
|
||||
<h1>Flow Diagrams<a class="headerlink" href="#flow-diagrams" title="Link to this heading">¶</a></h1>
|
||||
<p>Questa sezione raccoglie i diagrammi Mermaid dei moduli applicativi e
|
||||
infrastrutturali.</p>
|
||||
<div class="toctree-wrapper compound">
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Flow Diagrams</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="main_flow.html"><code class="docutils literal notranslate"><span class="pre">main.py</span></code></a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="layout_window_flow.html"><code class="docutils literal notranslate"><span class="pre">layout_window.py</span></code></a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reset_corsie_flow.html"><code class="docutils literal notranslate"><span class="pre">reset_corsie.py</span></code></a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="view_celle_multiple_flow.html"><code class="docutils literal notranslate"><span class="pre">view_celle_multiple.py</span></code></a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="search_pallets_flow.html"><code class="docutils literal notranslate"><span class="pre">search_pallets.py</span></code></a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="gestione_pickinglist_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_pickinglist.py</span></code></a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="async_db_flow.html">Infrastruttura Async / DB</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="async_msssql_query_flow.html"><code class="docutils literal notranslate"><span class="pre">async_msssql_query.py</span></code></a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="gestione_aree_frame_async_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_aree_frame_async.py</span></code></a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="async_loop_singleton_flow.html"><code class="docutils literal notranslate"><span class="pre">async_loop_singleton.py</span></code></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h1 class="logo"><a href="../index.html">warehouse</a></h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<search id="searchbox" style="display: none" role="search">
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="../search.html" method="get">
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search"/>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
</search>
|
||||
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contenuti</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../architecture.html">Architettura Complessiva</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../api_reference.html">Riferimento API</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Flow Diagrams</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html">Flow Diagrams</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="main_flow.html"><code class="docutils literal notranslate"><span class="pre">main.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="layout_window_flow.html"><code class="docutils literal notranslate"><span class="pre">layout_window.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="reset_corsie_flow.html"><code class="docutils literal notranslate"><span class="pre">reset_corsie.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="view_celle_multiple_flow.html"><code class="docutils literal notranslate"><span class="pre">view_celle_multiple.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="search_pallets_flow.html"><code class="docutils literal notranslate"><span class="pre">search_pallets.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_pickinglist_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_pickinglist.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_db_flow.html">Infrastruttura Async / DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_msssql_query_flow.html"><code class="docutils literal notranslate"><span class="pre">async_msssql_query.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_aree_frame_async_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_aree_frame_async.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_loop_singleton_flow.html"><code class="docutils literal notranslate"><span class="pre">async_loop_singleton.py</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="relations">
|
||||
<h3>Related Topics</h3>
|
||||
<ul>
|
||||
<li><a href="../index.html">Documentation overview</a><ul>
|
||||
<li>Previous: <a href="../api_reference.html" title="previous chapter">Riferimento API</a></li>
|
||||
<li>Next: <a href="README.html" title="next chapter">Flow Diagrams</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
©.
|
||||
|
||||
|
|
||||
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 9.1.0</a>
|
||||
& <a href="https://alabaster.readthedocs.io">Alabaster 1.0.0</a>
|
||||
|
||||
|
|
||||
<a href="../_sources/flows/index.rst.txt"
|
||||
rel="nofollow">Page source</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
620
docs/_build/html/flows/layout_window_flow.html
vendored
Normal file
620
docs/_build/html/flows/layout_window_flow.html
vendored
Normal file
@@ -0,0 +1,620 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en" data-content_root="../">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>layout_window.py — warehouse 0.0.1 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=5ecbeea2" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/basic.css?v=b08954a9" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=27fed22d" />
|
||||
<script src="../_static/documentation_options.js?v=d45e8c67"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js"></script>
|
||||
<script type="module">import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11.12.1/dist/mermaid.esm.min.mjs";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const initStyles = () => {
|
||||
const defaultStyle = document.createElement('style');
|
||||
defaultStyle.textContent = `pre.mermaid {
|
||||
/* Same as .mermaid-container > pre */
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
pre.mermaid > svg {
|
||||
/* Same as .mermaid-container > pre > svg */
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}`;
|
||||
document.head.appendChild(defaultStyle);
|
||||
|
||||
const fullscreenStyle = document.createElement('style');
|
||||
fullscreenStyle.textContent = `.mermaid-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre > svg {
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.3);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
padding: 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn:hover {
|
||||
opacity: 100% !important;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 3px 10px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal {
|
||||
display: none;
|
||||
position: fixed !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
width: 95vw;
|
||||
height: 100vh;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
z-index: 9999;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.dark-theme {
|
||||
background: rgba(0, 0, 0, 0.98);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.active {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen {
|
||||
position: relative;
|
||||
width: 95vw;
|
||||
height: 90vh;
|
||||
max-width: 95vw;
|
||||
max-height: 90vh;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen.dark-theme {
|
||||
background: #1a1a1a;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen pre.mermaid {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen .mermaid svg {
|
||||
height: 100% !important;
|
||||
width: 100% !important;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close {
|
||||
position: fixed !important;
|
||||
top: 20px !important;
|
||||
right: 20px !important;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
z-index: 10000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
transition: all 0.2s;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close:hover {
|
||||
background: white;
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 6px 16px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal .mermaid-fullscreen-btn {
|
||||
display: none !important;
|
||||
}`;
|
||||
document.head.appendChild(fullscreenStyle);
|
||||
}
|
||||
|
||||
// Detect if page has dark background
|
||||
const isDarkTheme = () => {
|
||||
// We use a set of heuristics:
|
||||
// 1. Check for common dark mode classes or attributes
|
||||
// 2. Check computed background color brightness
|
||||
if (document.documentElement.classList.contains('dark') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'dark' ||
|
||||
document.body.classList.contains('dark') ||
|
||||
document.body.getAttribute('data-theme') === 'dark') {
|
||||
// console.log("Dark theme detected via class/attribute");
|
||||
return true;
|
||||
}
|
||||
if (document.documentElement.classList.contains('light') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'light' ||
|
||||
document.body.classList.contains('light') ||
|
||||
document.body.getAttribute('data-theme') === 'light') {
|
||||
// console.log("Light theme detected via class/attribute");
|
||||
return false;
|
||||
}
|
||||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
// console.log("Dark theme detected via prefers-color-scheme");
|
||||
return true;
|
||||
}
|
||||
const bgColor = window.getComputedStyle(document.body).backgroundColor;
|
||||
const match = bgColor.match(/rgb\((\d+),\s*(\d+),\s*(\d+)/);
|
||||
if (match) {
|
||||
const r = parseInt(match[1]);
|
||||
const g = parseInt(match[2]);
|
||||
const b = parseInt(match[3]);
|
||||
const brightness = (r * 299 + g * 587 + b * 114) / 1000;
|
||||
// console.log("Background color brightness:", brightness);
|
||||
return brightness < 128;
|
||||
}
|
||||
// console.log("No dark or light theme detected, defaulting to light theme");
|
||||
return false;
|
||||
};
|
||||
|
||||
let darkTheme = isDarkTheme();
|
||||
let modal = null;
|
||||
let modalContent = null;
|
||||
let previousScrollOffset = [window.scrollX, window.scrollY];
|
||||
|
||||
const runMermaid = async (rerun) => {
|
||||
console.log("Running mermaid diagrams, rerun =", rerun);
|
||||
// clear all existing mermaid charts
|
||||
let all_mermaids = document.querySelectorAll(".mermaid");
|
||||
|
||||
if (rerun) {
|
||||
all_mermaids.forEach((el) => {
|
||||
if(!el.hasAttribute("data-original-code")) {
|
||||
// store original code
|
||||
// console.log(`Storing original code for first run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
if(el.getAttribute("data-processed") === "true") {
|
||||
// remove and restore original
|
||||
el.removeAttribute("data-processed");
|
||||
// console.log(`Restoring original code for re-run: `, el.getAttribute('data-original-code'));
|
||||
el.innerHTML = el.getAttribute('data-original-code');
|
||||
} else {
|
||||
// store original code
|
||||
// console.log(`Storing original code for re-run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
});
|
||||
await mermaid.run();
|
||||
}
|
||||
|
||||
all_mermaids = document.querySelectorAll(".mermaid");
|
||||
const mermaids_processed = document.querySelectorAll(".mermaid[data-processed='true']");
|
||||
|
||||
if ("False" === "True") {
|
||||
const mermaids_to_add_zoom = -1 === -1 ? all_mermaids.length : -1;
|
||||
if(mermaids_to_add_zoom > 0) {
|
||||
var svgs = d3.selectAll("");
|
||||
if(all_mermaids.length !== mermaids_processed.length) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else if(svgs.size() !== mermaids_to_add_zoom) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else {
|
||||
svgs.each(function() {
|
||||
var svg = d3.select(this);
|
||||
svg.html("<g class='wrapper'>" + svg.html() + "</g>");
|
||||
var inner = svg.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svg.call(zoom);
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if(all_mermaids.length !== mermaids_processed.length) {
|
||||
// Wait for mermaid to process all diagrams
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
}
|
||||
|
||||
// Stop here if not adding fullscreen capability
|
||||
if ("True" !== "True") return;
|
||||
|
||||
if (modal !== null ) {
|
||||
// Destroy existing modal
|
||||
modal.remove();
|
||||
modal = null;
|
||||
modalContent = null;
|
||||
}
|
||||
|
||||
modal = document.createElement('div');
|
||||
modal.className = 'mermaid-fullscreen-modal' + (darkTheme ? ' dark-theme' : '');
|
||||
modal.setAttribute('role', 'dialog');
|
||||
modal.setAttribute('aria-modal', 'true');
|
||||
modal.setAttribute('aria-label', 'Fullscreen diagram viewer');
|
||||
modal.innerHTML = `
|
||||
<button class="mermaid-fullscreen-close${darkTheme ? ' dark-theme' : ''}" aria-label="Close fullscreen">✕</button>
|
||||
<div class="mermaid-container-fullscreen${darkTheme ? ' dark-theme' : ''}"></div>
|
||||
`;
|
||||
document.body.appendChild(modal);
|
||||
|
||||
modalContent = modal.querySelector('.mermaid-container-fullscreen');
|
||||
const closeBtn = modal.querySelector('.mermaid-fullscreen-close');
|
||||
|
||||
const closeModal = () => {
|
||||
modal.classList.remove('active');
|
||||
modalContent.innerHTML = '';
|
||||
document.body.style.overflow = ''
|
||||
window.scrollTo({left: previousScrollOffset[0], top: previousScrollOffset[1], behavior: 'instant'});
|
||||
};
|
||||
|
||||
closeBtn.addEventListener('click', closeModal);
|
||||
modal.addEventListener('click', (e) => {
|
||||
if (e.target === modal) closeModal();
|
||||
});
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && modal.classList.contains('active')) {
|
||||
closeModal();
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelectorAll('.mermaid').forEach((mermaidDiv) => {
|
||||
if (mermaidDiv.parentNode.classList.contains('mermaid-container') ||
|
||||
mermaidDiv.closest('.mermaid-fullscreen-modal')) {
|
||||
// Already processed, adjust button class if needed
|
||||
const existingBtn = mermaidDiv.parentNode.querySelector('.mermaid-fullscreen-btn');
|
||||
if (existingBtn) {
|
||||
existingBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const container = document.createElement('div');
|
||||
container.className = 'mermaid-container';
|
||||
mermaidDiv.parentNode.insertBefore(container, mermaidDiv);
|
||||
container.appendChild(mermaidDiv);
|
||||
|
||||
const fullscreenBtn = document.createElement('button');
|
||||
fullscreenBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
fullscreenBtn.setAttribute('aria-label', 'View diagram in fullscreen');
|
||||
fullscreenBtn.textContent = '⛶';
|
||||
fullscreenBtn.style.opacity = '50%';
|
||||
|
||||
// Calculate dynamic position based on diagram's margin and padding
|
||||
const diagramStyle = window.getComputedStyle(mermaidDiv);
|
||||
const marginTop = parseFloat(diagramStyle.marginTop) || 0;
|
||||
const marginRight = parseFloat(diagramStyle.marginRight) || 0;
|
||||
const paddingTop = parseFloat(diagramStyle.paddingTop) || 0;
|
||||
const paddingRight = parseFloat(diagramStyle.paddingRight) || 0;
|
||||
fullscreenBtn.style.top = `${marginTop + paddingTop + 4}px`;
|
||||
fullscreenBtn.style.right = `${marginRight + paddingRight + 4}px`;
|
||||
|
||||
fullscreenBtn.addEventListener('click', () => {
|
||||
previousScrollOffset = [window.scroll, window.scrollY];
|
||||
const clone = mermaidDiv.cloneNode(true);
|
||||
modalContent.innerHTML = '';
|
||||
modalContent.appendChild(clone);
|
||||
|
||||
const svg = clone.querySelector('svg');
|
||||
if (svg) {
|
||||
svg.removeAttribute('width');
|
||||
svg.removeAttribute('height');
|
||||
svg.style.width = '100%';
|
||||
svg.style.height = 'auto';
|
||||
svg.style.maxWidth = '100%';
|
||||
svg.style.sdisplay = 'block';
|
||||
|
||||
if ("False" === "True") {
|
||||
setTimeout(() => {
|
||||
const g = svg.querySelector('g');
|
||||
if (g) {
|
||||
var svgD3 = d3.select(svg);
|
||||
svgD3.html("<g class='wrapper'>" + svgD3.html() + "</g>");
|
||||
var inner = svgD3.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svgD3.call(zoom);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
modal.classList.add('active');
|
||||
document.body.style.overflow = 'hidden';
|
||||
});
|
||||
container.appendChild(fullscreenBtn);
|
||||
});
|
||||
};
|
||||
|
||||
const load = async () => {
|
||||
initStyles();
|
||||
|
||||
await runMermaid(true);
|
||||
|
||||
const reRunIfThemeChanges = async () => {
|
||||
const newDarkTheme = isDarkTheme();
|
||||
if (newDarkTheme !== darkTheme) {
|
||||
darkTheme = newDarkTheme;
|
||||
console.log("Theme change detected, re-running mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
await mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
await runMermaid(true);
|
||||
}
|
||||
};
|
||||
|
||||
// Update theme classes when theme changes
|
||||
const themeObserver = new MutationObserver(reRunIfThemeChanges);
|
||||
themeObserver.observe(document.documentElement, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
themeObserver.observe(document.body, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
console.log("Initializing mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
|
||||
window.addEventListener("load", load);
|
||||
window.runMermaid = runMermaid;</script>
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="reset_corsie.py" href="reset_corsie_flow.html" />
|
||||
<link rel="prev" title="main.py" href="main_flow.html" />
|
||||
|
||||
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head><body>
|
||||
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
|
||||
|
||||
<div class="body" role="main">
|
||||
|
||||
<section id="layout-window-py">
|
||||
<h1><code class="docutils literal notranslate"><span class="pre">layout_window.py</span></code><a class="headerlink" href="#layout-window-py" title="Link to this heading">¶</a></h1>
|
||||
<section id="scopo">
|
||||
<h2>Scopo<a class="headerlink" href="#scopo" title="Link to this heading">¶</a></h2>
|
||||
<p>Questo modulo visualizza il layout delle corsie come matrice di celle, mostra
|
||||
lo stato di occupazione, consente di cercare una UDC e permette l’export della
|
||||
matrice.</p>
|
||||
</section>
|
||||
<section id="flusso-operativo">
|
||||
<h2>Flusso operativo<a class="headerlink" href="#flusso-operativo" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart TD
|
||||
A["open_layout_window()"] --> B["Crea o riporta in primo piano LayoutWindow"]
|
||||
B --> C["LayoutWindow.__init__()"]
|
||||
C --> D["Costruisce toolbar, host matrice, statistiche"]
|
||||
D --> E["_load_corsie()"]
|
||||
E --> F["AsyncRunner.run(query_json SQL corsie)"]
|
||||
F --> G["_on_select() sulla corsia iniziale"]
|
||||
G --> H["_load_matrix(corsia)"]
|
||||
H --> I["AsyncRunner.run(query_json SQL matrice)"]
|
||||
I --> J["_rebuild_matrix()"]
|
||||
J --> K["_refresh_stats()"]
|
||||
</pre></section>
|
||||
<section id="ricerca-udc">
|
||||
<h2>Ricerca UDC<a class="headerlink" href="#ricerca-udc" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart TD
|
||||
A["Utente inserisce barcode"] --> B["_search_udc()"]
|
||||
B --> C["query_json ricerca pallet -> corsia/colonna/fila"]
|
||||
C --> D{"UDC trovata?"}
|
||||
D -- No --> E["Messaggio informativo"]
|
||||
D -- Si --> F["Seleziona corsia in listbox"]
|
||||
F --> G["_load_matrix(corsia)"]
|
||||
G --> H["_rebuild_matrix()"]
|
||||
H --> I["_highlight_cell_by_labels()"]
|
||||
</pre></section>
|
||||
<section id="schema-di-chiamata-essenziale">
|
||||
<h2>Schema di chiamata essenziale<a class="headerlink" href="#schema-di-chiamata-essenziale" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart LR
|
||||
Init["__init__"] --> Top["_build_top"]
|
||||
Init --> Host["_build_matrix_host"]
|
||||
Init --> Stats["_build_stats"]
|
||||
Init --> LoadCorsie["_load_corsie"]
|
||||
LoadCorsie --> Select["_on_select"]
|
||||
Select --> LoadMatrix["_load_matrix"]
|
||||
LoadMatrix --> Rebuild["_rebuild_matrix"]
|
||||
Rebuild --> RefreshStats["_refresh_stats"]
|
||||
Search["_search_udc"] --> LoadMatrix
|
||||
Export["_export_xlsx"] --> MatrixState["matrix_state / fila_txt / col_txt / udc1"]
|
||||
</pre></section>
|
||||
<section id="note">
|
||||
<h2>Note<a class="headerlink" href="#note" title="Link to this heading">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><p>Il modulo usa un token <code class="docutils literal notranslate"><span class="pre">_req_counter</span></code> per evitare che risposte async vecchie
|
||||
aggiornino la UI fuori ordine.</p></li>
|
||||
<li><p>La statistica globale viene ricalcolata da query SQL, mentre quella della
|
||||
corsia corrente usa la matrice già caricata in memoria.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">destroy()</span></code> marca la finestra come non più attiva per evitare callback tardive.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h1 class="logo"><a href="../index.html">warehouse</a></h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<search id="searchbox" style="display: none" role="search">
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="../search.html" method="get">
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search"/>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
</search>
|
||||
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contenuti</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../architecture.html">Architettura Complessiva</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../api_reference.html">Riferimento API</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Flow Diagrams</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html">Flow Diagrams</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="main_flow.html"><code class="docutils literal notranslate"><span class="pre">main.py</span></code></a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">layout_window.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="reset_corsie_flow.html"><code class="docutils literal notranslate"><span class="pre">reset_corsie.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="view_celle_multiple_flow.html"><code class="docutils literal notranslate"><span class="pre">view_celle_multiple.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="search_pallets_flow.html"><code class="docutils literal notranslate"><span class="pre">search_pallets.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_pickinglist_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_pickinglist.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_db_flow.html">Infrastruttura Async / DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_msssql_query_flow.html"><code class="docutils literal notranslate"><span class="pre">async_msssql_query.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_aree_frame_async_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_aree_frame_async.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_loop_singleton_flow.html"><code class="docutils literal notranslate"><span class="pre">async_loop_singleton.py</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="relations">
|
||||
<h3>Related Topics</h3>
|
||||
<ul>
|
||||
<li><a href="../index.html">Documentation overview</a><ul>
|
||||
<li><a href="index.html">Flow Diagrams</a><ul>
|
||||
<li>Previous: <a href="main_flow.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">main.py</span></code></a></li>
|
||||
<li>Next: <a href="reset_corsie_flow.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">reset_corsie.py</span></code></a></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
©.
|
||||
|
||||
|
|
||||
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 9.1.0</a>
|
||||
& <a href="https://alabaster.readthedocs.io">Alabaster 1.0.0</a>
|
||||
|
||||
|
|
||||
<a href="../_sources/flows/layout_window_flow.md.txt"
|
||||
rel="nofollow">Page source</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
605
docs/_build/html/flows/main_flow.html
vendored
Normal file
605
docs/_build/html/flows/main_flow.html
vendored
Normal file
@@ -0,0 +1,605 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en" data-content_root="../">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>main.py — warehouse 0.0.1 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=5ecbeea2" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/basic.css?v=b08954a9" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=27fed22d" />
|
||||
<script src="../_static/documentation_options.js?v=d45e8c67"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js"></script>
|
||||
<script type="module">import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11.12.1/dist/mermaid.esm.min.mjs";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const initStyles = () => {
|
||||
const defaultStyle = document.createElement('style');
|
||||
defaultStyle.textContent = `pre.mermaid {
|
||||
/* Same as .mermaid-container > pre */
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
pre.mermaid > svg {
|
||||
/* Same as .mermaid-container > pre > svg */
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}`;
|
||||
document.head.appendChild(defaultStyle);
|
||||
|
||||
const fullscreenStyle = document.createElement('style');
|
||||
fullscreenStyle.textContent = `.mermaid-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre > svg {
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.3);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
padding: 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn:hover {
|
||||
opacity: 100% !important;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 3px 10px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal {
|
||||
display: none;
|
||||
position: fixed !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
width: 95vw;
|
||||
height: 100vh;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
z-index: 9999;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.dark-theme {
|
||||
background: rgba(0, 0, 0, 0.98);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.active {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen {
|
||||
position: relative;
|
||||
width: 95vw;
|
||||
height: 90vh;
|
||||
max-width: 95vw;
|
||||
max-height: 90vh;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen.dark-theme {
|
||||
background: #1a1a1a;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen pre.mermaid {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen .mermaid svg {
|
||||
height: 100% !important;
|
||||
width: 100% !important;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close {
|
||||
position: fixed !important;
|
||||
top: 20px !important;
|
||||
right: 20px !important;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
z-index: 10000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
transition: all 0.2s;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close:hover {
|
||||
background: white;
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 6px 16px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal .mermaid-fullscreen-btn {
|
||||
display: none !important;
|
||||
}`;
|
||||
document.head.appendChild(fullscreenStyle);
|
||||
}
|
||||
|
||||
// Detect if page has dark background
|
||||
const isDarkTheme = () => {
|
||||
// We use a set of heuristics:
|
||||
// 1. Check for common dark mode classes or attributes
|
||||
// 2. Check computed background color brightness
|
||||
if (document.documentElement.classList.contains('dark') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'dark' ||
|
||||
document.body.classList.contains('dark') ||
|
||||
document.body.getAttribute('data-theme') === 'dark') {
|
||||
// console.log("Dark theme detected via class/attribute");
|
||||
return true;
|
||||
}
|
||||
if (document.documentElement.classList.contains('light') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'light' ||
|
||||
document.body.classList.contains('light') ||
|
||||
document.body.getAttribute('data-theme') === 'light') {
|
||||
// console.log("Light theme detected via class/attribute");
|
||||
return false;
|
||||
}
|
||||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
// console.log("Dark theme detected via prefers-color-scheme");
|
||||
return true;
|
||||
}
|
||||
const bgColor = window.getComputedStyle(document.body).backgroundColor;
|
||||
const match = bgColor.match(/rgb\((\d+),\s*(\d+),\s*(\d+)/);
|
||||
if (match) {
|
||||
const r = parseInt(match[1]);
|
||||
const g = parseInt(match[2]);
|
||||
const b = parseInt(match[3]);
|
||||
const brightness = (r * 299 + g * 587 + b * 114) / 1000;
|
||||
// console.log("Background color brightness:", brightness);
|
||||
return brightness < 128;
|
||||
}
|
||||
// console.log("No dark or light theme detected, defaulting to light theme");
|
||||
return false;
|
||||
};
|
||||
|
||||
let darkTheme = isDarkTheme();
|
||||
let modal = null;
|
||||
let modalContent = null;
|
||||
let previousScrollOffset = [window.scrollX, window.scrollY];
|
||||
|
||||
const runMermaid = async (rerun) => {
|
||||
console.log("Running mermaid diagrams, rerun =", rerun);
|
||||
// clear all existing mermaid charts
|
||||
let all_mermaids = document.querySelectorAll(".mermaid");
|
||||
|
||||
if (rerun) {
|
||||
all_mermaids.forEach((el) => {
|
||||
if(!el.hasAttribute("data-original-code")) {
|
||||
// store original code
|
||||
// console.log(`Storing original code for first run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
if(el.getAttribute("data-processed") === "true") {
|
||||
// remove and restore original
|
||||
el.removeAttribute("data-processed");
|
||||
// console.log(`Restoring original code for re-run: `, el.getAttribute('data-original-code'));
|
||||
el.innerHTML = el.getAttribute('data-original-code');
|
||||
} else {
|
||||
// store original code
|
||||
// console.log(`Storing original code for re-run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
});
|
||||
await mermaid.run();
|
||||
}
|
||||
|
||||
all_mermaids = document.querySelectorAll(".mermaid");
|
||||
const mermaids_processed = document.querySelectorAll(".mermaid[data-processed='true']");
|
||||
|
||||
if ("False" === "True") {
|
||||
const mermaids_to_add_zoom = -1 === -1 ? all_mermaids.length : -1;
|
||||
if(mermaids_to_add_zoom > 0) {
|
||||
var svgs = d3.selectAll("");
|
||||
if(all_mermaids.length !== mermaids_processed.length) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else if(svgs.size() !== mermaids_to_add_zoom) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else {
|
||||
svgs.each(function() {
|
||||
var svg = d3.select(this);
|
||||
svg.html("<g class='wrapper'>" + svg.html() + "</g>");
|
||||
var inner = svg.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svg.call(zoom);
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if(all_mermaids.length !== mermaids_processed.length) {
|
||||
// Wait for mermaid to process all diagrams
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
}
|
||||
|
||||
// Stop here if not adding fullscreen capability
|
||||
if ("True" !== "True") return;
|
||||
|
||||
if (modal !== null ) {
|
||||
// Destroy existing modal
|
||||
modal.remove();
|
||||
modal = null;
|
||||
modalContent = null;
|
||||
}
|
||||
|
||||
modal = document.createElement('div');
|
||||
modal.className = 'mermaid-fullscreen-modal' + (darkTheme ? ' dark-theme' : '');
|
||||
modal.setAttribute('role', 'dialog');
|
||||
modal.setAttribute('aria-modal', 'true');
|
||||
modal.setAttribute('aria-label', 'Fullscreen diagram viewer');
|
||||
modal.innerHTML = `
|
||||
<button class="mermaid-fullscreen-close${darkTheme ? ' dark-theme' : ''}" aria-label="Close fullscreen">✕</button>
|
||||
<div class="mermaid-container-fullscreen${darkTheme ? ' dark-theme' : ''}"></div>
|
||||
`;
|
||||
document.body.appendChild(modal);
|
||||
|
||||
modalContent = modal.querySelector('.mermaid-container-fullscreen');
|
||||
const closeBtn = modal.querySelector('.mermaid-fullscreen-close');
|
||||
|
||||
const closeModal = () => {
|
||||
modal.classList.remove('active');
|
||||
modalContent.innerHTML = '';
|
||||
document.body.style.overflow = ''
|
||||
window.scrollTo({left: previousScrollOffset[0], top: previousScrollOffset[1], behavior: 'instant'});
|
||||
};
|
||||
|
||||
closeBtn.addEventListener('click', closeModal);
|
||||
modal.addEventListener('click', (e) => {
|
||||
if (e.target === modal) closeModal();
|
||||
});
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && modal.classList.contains('active')) {
|
||||
closeModal();
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelectorAll('.mermaid').forEach((mermaidDiv) => {
|
||||
if (mermaidDiv.parentNode.classList.contains('mermaid-container') ||
|
||||
mermaidDiv.closest('.mermaid-fullscreen-modal')) {
|
||||
// Already processed, adjust button class if needed
|
||||
const existingBtn = mermaidDiv.parentNode.querySelector('.mermaid-fullscreen-btn');
|
||||
if (existingBtn) {
|
||||
existingBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const container = document.createElement('div');
|
||||
container.className = 'mermaid-container';
|
||||
mermaidDiv.parentNode.insertBefore(container, mermaidDiv);
|
||||
container.appendChild(mermaidDiv);
|
||||
|
||||
const fullscreenBtn = document.createElement('button');
|
||||
fullscreenBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
fullscreenBtn.setAttribute('aria-label', 'View diagram in fullscreen');
|
||||
fullscreenBtn.textContent = '⛶';
|
||||
fullscreenBtn.style.opacity = '50%';
|
||||
|
||||
// Calculate dynamic position based on diagram's margin and padding
|
||||
const diagramStyle = window.getComputedStyle(mermaidDiv);
|
||||
const marginTop = parseFloat(diagramStyle.marginTop) || 0;
|
||||
const marginRight = parseFloat(diagramStyle.marginRight) || 0;
|
||||
const paddingTop = parseFloat(diagramStyle.paddingTop) || 0;
|
||||
const paddingRight = parseFloat(diagramStyle.paddingRight) || 0;
|
||||
fullscreenBtn.style.top = `${marginTop + paddingTop + 4}px`;
|
||||
fullscreenBtn.style.right = `${marginRight + paddingRight + 4}px`;
|
||||
|
||||
fullscreenBtn.addEventListener('click', () => {
|
||||
previousScrollOffset = [window.scroll, window.scrollY];
|
||||
const clone = mermaidDiv.cloneNode(true);
|
||||
modalContent.innerHTML = '';
|
||||
modalContent.appendChild(clone);
|
||||
|
||||
const svg = clone.querySelector('svg');
|
||||
if (svg) {
|
||||
svg.removeAttribute('width');
|
||||
svg.removeAttribute('height');
|
||||
svg.style.width = '100%';
|
||||
svg.style.height = 'auto';
|
||||
svg.style.maxWidth = '100%';
|
||||
svg.style.sdisplay = 'block';
|
||||
|
||||
if ("False" === "True") {
|
||||
setTimeout(() => {
|
||||
const g = svg.querySelector('g');
|
||||
if (g) {
|
||||
var svgD3 = d3.select(svg);
|
||||
svgD3.html("<g class='wrapper'>" + svgD3.html() + "</g>");
|
||||
var inner = svgD3.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svgD3.call(zoom);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
modal.classList.add('active');
|
||||
document.body.style.overflow = 'hidden';
|
||||
});
|
||||
container.appendChild(fullscreenBtn);
|
||||
});
|
||||
};
|
||||
|
||||
const load = async () => {
|
||||
initStyles();
|
||||
|
||||
await runMermaid(true);
|
||||
|
||||
const reRunIfThemeChanges = async () => {
|
||||
const newDarkTheme = isDarkTheme();
|
||||
if (newDarkTheme !== darkTheme) {
|
||||
darkTheme = newDarkTheme;
|
||||
console.log("Theme change detected, re-running mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
await mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
await runMermaid(true);
|
||||
}
|
||||
};
|
||||
|
||||
// Update theme classes when theme changes
|
||||
const themeObserver = new MutationObserver(reRunIfThemeChanges);
|
||||
themeObserver.observe(document.documentElement, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
themeObserver.observe(document.body, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
console.log("Initializing mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
|
||||
window.addEventListener("load", load);
|
||||
window.runMermaid = runMermaid;</script>
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="layout_window.py" href="layout_window_flow.html" />
|
||||
<link rel="prev" title="Flow Diagrams" href="README.html" />
|
||||
|
||||
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head><body>
|
||||
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
|
||||
|
||||
<div class="body" role="main">
|
||||
|
||||
<section id="main-py">
|
||||
<h1><code class="docutils literal notranslate"><span class="pre">main.py</span></code><a class="headerlink" href="#main-py" title="Link to this heading">¶</a></h1>
|
||||
<section id="scopo">
|
||||
<h2>Scopo<a class="headerlink" href="#scopo" title="Link to this heading">¶</a></h2>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">main.py</span></code> è il punto di ingresso dell’applicazione desktop. Inizializza il loop
|
||||
asincrono condiviso, crea il client database condiviso e costruisce il launcher
|
||||
con i pulsanti che aprono i moduli operativi.</p>
|
||||
</section>
|
||||
<section id="flusso-principale">
|
||||
<h2>Flusso principale<a class="headerlink" href="#flusso-principale" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart TD
|
||||
A["Avvio di main.py"] --> B["Configura policy asyncio su Windows"]
|
||||
B --> C["Ottiene loop globale con get_global_loop()"]
|
||||
C --> D["Imposta il loop come default"]
|
||||
D --> E["Costruisce DSN SQL Server"]
|
||||
E --> F["Crea AsyncMSSQLClient condiviso"]
|
||||
F --> G["Istanzia Launcher"]
|
||||
G --> H["Mostra finestra principale"]
|
||||
H --> I{"Click su un pulsante"}
|
||||
I --> J["open_reset_corsie_window()"]
|
||||
I --> K["open_layout_window()"]
|
||||
I --> L["open_celle_multiple_window()"]
|
||||
I --> M["open_search_window()"]
|
||||
I --> N["open_pickinglist_window()"]
|
||||
</pre></section>
|
||||
<section id="schema-di-chiamata">
|
||||
<h2>Schema di chiamata<a class="headerlink" href="#schema-di-chiamata" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart LR
|
||||
Launcher["Launcher.__init__"] --> Reset["open_reset_corsie_window"]
|
||||
Launcher --> Layout["open_layout_window"]
|
||||
Launcher --> Ghost["open_celle_multiple_window"]
|
||||
Launcher --> Search["open_search_window"]
|
||||
Launcher --> Pick["open_pickinglist_window"]
|
||||
Pick --> PickFactory["create_pickinglist_frame"]
|
||||
</pre></section>
|
||||
<section id="note">
|
||||
<h2>Note<a class="headerlink" href="#note" title="Link to this heading">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">db_app</span></code> viene creato una sola volta e poi passato a tutte le finestre.</p></li>
|
||||
<li><p>Alla chiusura del launcher viene chiamato <code class="docutils literal notranslate"><span class="pre">db_app.dispose()</span></code> sul loop globale.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">open_pickinglist_window()</span></code> costruisce la finestra in modo nascosto e la rende
|
||||
visibile solo a layout pronto, per ridurre lo sfarfallio iniziale.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h1 class="logo"><a href="../index.html">warehouse</a></h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<search id="searchbox" style="display: none" role="search">
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="../search.html" method="get">
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search"/>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
</search>
|
||||
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contenuti</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../architecture.html">Architettura Complessiva</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../api_reference.html">Riferimento API</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Flow Diagrams</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html">Flow Diagrams</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">main.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="layout_window_flow.html"><code class="docutils literal notranslate"><span class="pre">layout_window.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="reset_corsie_flow.html"><code class="docutils literal notranslate"><span class="pre">reset_corsie.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="view_celle_multiple_flow.html"><code class="docutils literal notranslate"><span class="pre">view_celle_multiple.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="search_pallets_flow.html"><code class="docutils literal notranslate"><span class="pre">search_pallets.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_pickinglist_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_pickinglist.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_db_flow.html">Infrastruttura Async / DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_msssql_query_flow.html"><code class="docutils literal notranslate"><span class="pre">async_msssql_query.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_aree_frame_async_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_aree_frame_async.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_loop_singleton_flow.html"><code class="docutils literal notranslate"><span class="pre">async_loop_singleton.py</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="relations">
|
||||
<h3>Related Topics</h3>
|
||||
<ul>
|
||||
<li><a href="../index.html">Documentation overview</a><ul>
|
||||
<li><a href="index.html">Flow Diagrams</a><ul>
|
||||
<li>Previous: <a href="README.html" title="previous chapter">Flow Diagrams</a></li>
|
||||
<li>Next: <a href="layout_window_flow.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">layout_window.py</span></code></a></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
©.
|
||||
|
||||
|
|
||||
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 9.1.0</a>
|
||||
& <a href="https://alabaster.readthedocs.io">Alabaster 1.0.0</a>
|
||||
|
||||
|
|
||||
<a href="../_sources/flows/main_flow.md.txt"
|
||||
rel="nofollow">Page source</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
605
docs/_build/html/flows/reset_corsie_flow.html
vendored
Normal file
605
docs/_build/html/flows/reset_corsie_flow.html
vendored
Normal file
@@ -0,0 +1,605 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en" data-content_root="../">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>reset_corsie.py — warehouse 0.0.1 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=5ecbeea2" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/basic.css?v=b08954a9" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=27fed22d" />
|
||||
<script src="../_static/documentation_options.js?v=d45e8c67"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js"></script>
|
||||
<script type="module">import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11.12.1/dist/mermaid.esm.min.mjs";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const initStyles = () => {
|
||||
const defaultStyle = document.createElement('style');
|
||||
defaultStyle.textContent = `pre.mermaid {
|
||||
/* Same as .mermaid-container > pre */
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
pre.mermaid > svg {
|
||||
/* Same as .mermaid-container > pre > svg */
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}`;
|
||||
document.head.appendChild(defaultStyle);
|
||||
|
||||
const fullscreenStyle = document.createElement('style');
|
||||
fullscreenStyle.textContent = `.mermaid-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre > svg {
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.3);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
padding: 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn:hover {
|
||||
opacity: 100% !important;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 3px 10px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal {
|
||||
display: none;
|
||||
position: fixed !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
width: 95vw;
|
||||
height: 100vh;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
z-index: 9999;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.dark-theme {
|
||||
background: rgba(0, 0, 0, 0.98);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.active {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen {
|
||||
position: relative;
|
||||
width: 95vw;
|
||||
height: 90vh;
|
||||
max-width: 95vw;
|
||||
max-height: 90vh;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen.dark-theme {
|
||||
background: #1a1a1a;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen pre.mermaid {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen .mermaid svg {
|
||||
height: 100% !important;
|
||||
width: 100% !important;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close {
|
||||
position: fixed !important;
|
||||
top: 20px !important;
|
||||
right: 20px !important;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
z-index: 10000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
transition: all 0.2s;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close:hover {
|
||||
background: white;
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 6px 16px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal .mermaid-fullscreen-btn {
|
||||
display: none !important;
|
||||
}`;
|
||||
document.head.appendChild(fullscreenStyle);
|
||||
}
|
||||
|
||||
// Detect if page has dark background
|
||||
const isDarkTheme = () => {
|
||||
// We use a set of heuristics:
|
||||
// 1. Check for common dark mode classes or attributes
|
||||
// 2. Check computed background color brightness
|
||||
if (document.documentElement.classList.contains('dark') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'dark' ||
|
||||
document.body.classList.contains('dark') ||
|
||||
document.body.getAttribute('data-theme') === 'dark') {
|
||||
// console.log("Dark theme detected via class/attribute");
|
||||
return true;
|
||||
}
|
||||
if (document.documentElement.classList.contains('light') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'light' ||
|
||||
document.body.classList.contains('light') ||
|
||||
document.body.getAttribute('data-theme') === 'light') {
|
||||
// console.log("Light theme detected via class/attribute");
|
||||
return false;
|
||||
}
|
||||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
// console.log("Dark theme detected via prefers-color-scheme");
|
||||
return true;
|
||||
}
|
||||
const bgColor = window.getComputedStyle(document.body).backgroundColor;
|
||||
const match = bgColor.match(/rgb\((\d+),\s*(\d+),\s*(\d+)/);
|
||||
if (match) {
|
||||
const r = parseInt(match[1]);
|
||||
const g = parseInt(match[2]);
|
||||
const b = parseInt(match[3]);
|
||||
const brightness = (r * 299 + g * 587 + b * 114) / 1000;
|
||||
// console.log("Background color brightness:", brightness);
|
||||
return brightness < 128;
|
||||
}
|
||||
// console.log("No dark or light theme detected, defaulting to light theme");
|
||||
return false;
|
||||
};
|
||||
|
||||
let darkTheme = isDarkTheme();
|
||||
let modal = null;
|
||||
let modalContent = null;
|
||||
let previousScrollOffset = [window.scrollX, window.scrollY];
|
||||
|
||||
const runMermaid = async (rerun) => {
|
||||
console.log("Running mermaid diagrams, rerun =", rerun);
|
||||
// clear all existing mermaid charts
|
||||
let all_mermaids = document.querySelectorAll(".mermaid");
|
||||
|
||||
if (rerun) {
|
||||
all_mermaids.forEach((el) => {
|
||||
if(!el.hasAttribute("data-original-code")) {
|
||||
// store original code
|
||||
// console.log(`Storing original code for first run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
if(el.getAttribute("data-processed") === "true") {
|
||||
// remove and restore original
|
||||
el.removeAttribute("data-processed");
|
||||
// console.log(`Restoring original code for re-run: `, el.getAttribute('data-original-code'));
|
||||
el.innerHTML = el.getAttribute('data-original-code');
|
||||
} else {
|
||||
// store original code
|
||||
// console.log(`Storing original code for re-run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
});
|
||||
await mermaid.run();
|
||||
}
|
||||
|
||||
all_mermaids = document.querySelectorAll(".mermaid");
|
||||
const mermaids_processed = document.querySelectorAll(".mermaid[data-processed='true']");
|
||||
|
||||
if ("False" === "True") {
|
||||
const mermaids_to_add_zoom = -1 === -1 ? all_mermaids.length : -1;
|
||||
if(mermaids_to_add_zoom > 0) {
|
||||
var svgs = d3.selectAll("");
|
||||
if(all_mermaids.length !== mermaids_processed.length) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else if(svgs.size() !== mermaids_to_add_zoom) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else {
|
||||
svgs.each(function() {
|
||||
var svg = d3.select(this);
|
||||
svg.html("<g class='wrapper'>" + svg.html() + "</g>");
|
||||
var inner = svg.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svg.call(zoom);
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if(all_mermaids.length !== mermaids_processed.length) {
|
||||
// Wait for mermaid to process all diagrams
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
}
|
||||
|
||||
// Stop here if not adding fullscreen capability
|
||||
if ("True" !== "True") return;
|
||||
|
||||
if (modal !== null ) {
|
||||
// Destroy existing modal
|
||||
modal.remove();
|
||||
modal = null;
|
||||
modalContent = null;
|
||||
}
|
||||
|
||||
modal = document.createElement('div');
|
||||
modal.className = 'mermaid-fullscreen-modal' + (darkTheme ? ' dark-theme' : '');
|
||||
modal.setAttribute('role', 'dialog');
|
||||
modal.setAttribute('aria-modal', 'true');
|
||||
modal.setAttribute('aria-label', 'Fullscreen diagram viewer');
|
||||
modal.innerHTML = `
|
||||
<button class="mermaid-fullscreen-close${darkTheme ? ' dark-theme' : ''}" aria-label="Close fullscreen">✕</button>
|
||||
<div class="mermaid-container-fullscreen${darkTheme ? ' dark-theme' : ''}"></div>
|
||||
`;
|
||||
document.body.appendChild(modal);
|
||||
|
||||
modalContent = modal.querySelector('.mermaid-container-fullscreen');
|
||||
const closeBtn = modal.querySelector('.mermaid-fullscreen-close');
|
||||
|
||||
const closeModal = () => {
|
||||
modal.classList.remove('active');
|
||||
modalContent.innerHTML = '';
|
||||
document.body.style.overflow = ''
|
||||
window.scrollTo({left: previousScrollOffset[0], top: previousScrollOffset[1], behavior: 'instant'});
|
||||
};
|
||||
|
||||
closeBtn.addEventListener('click', closeModal);
|
||||
modal.addEventListener('click', (e) => {
|
||||
if (e.target === modal) closeModal();
|
||||
});
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && modal.classList.contains('active')) {
|
||||
closeModal();
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelectorAll('.mermaid').forEach((mermaidDiv) => {
|
||||
if (mermaidDiv.parentNode.classList.contains('mermaid-container') ||
|
||||
mermaidDiv.closest('.mermaid-fullscreen-modal')) {
|
||||
// Already processed, adjust button class if needed
|
||||
const existingBtn = mermaidDiv.parentNode.querySelector('.mermaid-fullscreen-btn');
|
||||
if (existingBtn) {
|
||||
existingBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const container = document.createElement('div');
|
||||
container.className = 'mermaid-container';
|
||||
mermaidDiv.parentNode.insertBefore(container, mermaidDiv);
|
||||
container.appendChild(mermaidDiv);
|
||||
|
||||
const fullscreenBtn = document.createElement('button');
|
||||
fullscreenBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
fullscreenBtn.setAttribute('aria-label', 'View diagram in fullscreen');
|
||||
fullscreenBtn.textContent = '⛶';
|
||||
fullscreenBtn.style.opacity = '50%';
|
||||
|
||||
// Calculate dynamic position based on diagram's margin and padding
|
||||
const diagramStyle = window.getComputedStyle(mermaidDiv);
|
||||
const marginTop = parseFloat(diagramStyle.marginTop) || 0;
|
||||
const marginRight = parseFloat(diagramStyle.marginRight) || 0;
|
||||
const paddingTop = parseFloat(diagramStyle.paddingTop) || 0;
|
||||
const paddingRight = parseFloat(diagramStyle.paddingRight) || 0;
|
||||
fullscreenBtn.style.top = `${marginTop + paddingTop + 4}px`;
|
||||
fullscreenBtn.style.right = `${marginRight + paddingRight + 4}px`;
|
||||
|
||||
fullscreenBtn.addEventListener('click', () => {
|
||||
previousScrollOffset = [window.scroll, window.scrollY];
|
||||
const clone = mermaidDiv.cloneNode(true);
|
||||
modalContent.innerHTML = '';
|
||||
modalContent.appendChild(clone);
|
||||
|
||||
const svg = clone.querySelector('svg');
|
||||
if (svg) {
|
||||
svg.removeAttribute('width');
|
||||
svg.removeAttribute('height');
|
||||
svg.style.width = '100%';
|
||||
svg.style.height = 'auto';
|
||||
svg.style.maxWidth = '100%';
|
||||
svg.style.sdisplay = 'block';
|
||||
|
||||
if ("False" === "True") {
|
||||
setTimeout(() => {
|
||||
const g = svg.querySelector('g');
|
||||
if (g) {
|
||||
var svgD3 = d3.select(svg);
|
||||
svgD3.html("<g class='wrapper'>" + svgD3.html() + "</g>");
|
||||
var inner = svgD3.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svgD3.call(zoom);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
modal.classList.add('active');
|
||||
document.body.style.overflow = 'hidden';
|
||||
});
|
||||
container.appendChild(fullscreenBtn);
|
||||
});
|
||||
};
|
||||
|
||||
const load = async () => {
|
||||
initStyles();
|
||||
|
||||
await runMermaid(true);
|
||||
|
||||
const reRunIfThemeChanges = async () => {
|
||||
const newDarkTheme = isDarkTheme();
|
||||
if (newDarkTheme !== darkTheme) {
|
||||
darkTheme = newDarkTheme;
|
||||
console.log("Theme change detected, re-running mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
await mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
await runMermaid(true);
|
||||
}
|
||||
};
|
||||
|
||||
// Update theme classes when theme changes
|
||||
const themeObserver = new MutationObserver(reRunIfThemeChanges);
|
||||
themeObserver.observe(document.documentElement, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
themeObserver.observe(document.body, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
console.log("Initializing mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
|
||||
window.addEventListener("load", load);
|
||||
window.runMermaid = runMermaid;</script>
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="view_celle_multiple.py" href="view_celle_multiple_flow.html" />
|
||||
<link rel="prev" title="layout_window.py" href="layout_window_flow.html" />
|
||||
|
||||
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head><body>
|
||||
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
|
||||
|
||||
<div class="body" role="main">
|
||||
|
||||
<section id="reset-corsie-py">
|
||||
<h1><code class="docutils literal notranslate"><span class="pre">reset_corsie.py</span></code><a class="headerlink" href="#reset-corsie-py" title="Link to this heading">¶</a></h1>
|
||||
<section id="scopo">
|
||||
<h2>Scopo<a class="headerlink" href="#scopo" title="Link to this heading">¶</a></h2>
|
||||
<p>Questo modulo mostra il riepilogo di una corsia e permette, dopo doppia
|
||||
conferma, di cancellare i record di <code class="docutils literal notranslate"><span class="pre">MagazziniPallet</span></code> collegati a quella corsia.</p>
|
||||
</section>
|
||||
<section id="flusso-operativo">
|
||||
<h2>Flusso operativo<a class="headerlink" href="#flusso-operativo" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart TD
|
||||
A["open_reset_corsie_window()"] --> B["ResetCorsieWindow.__init__()"]
|
||||
B --> C["_build_ui()"]
|
||||
C --> D["_load_corsie()"]
|
||||
D --> E["query_json SQL_CORSIE"]
|
||||
E --> F["Seleziona corsia iniziale"]
|
||||
F --> G["refresh()"]
|
||||
G --> H["query_json SQL_RIEPILOGO"]
|
||||
G --> I["query_json SQL_DETTAGLIO"]
|
||||
H --> J["Aggiorna contatori"]
|
||||
I --> K["Aggiorna tree celle occupate"]
|
||||
</pre></section>
|
||||
<section id="flusso-distruttivo">
|
||||
<h2>Flusso distruttivo<a class="headerlink" href="#flusso-distruttivo" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart TD
|
||||
A["Click su Svuota corsia"] --> B["_ask_reset()"]
|
||||
B --> C["query_json SQL_COUNT_DELETE"]
|
||||
C --> D{"Record da cancellare > 0?"}
|
||||
D -- No --> E["Messaggio: niente da rimuovere"]
|
||||
D -- Si --> F["Richiesta conferma testuale"]
|
||||
F --> G{"Testo corretto?"}
|
||||
G -- No --> H["Annulla operazione"]
|
||||
G -- Si --> I["_do_reset(corsia)"]
|
||||
I --> J["query_json SQL_DELETE"]
|
||||
J --> K["Messaggio completato"]
|
||||
K --> L["refresh()"]
|
||||
</pre></section>
|
||||
<section id="note">
|
||||
<h2>Note<a class="headerlink" href="#note" title="Link to this heading">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><p>È il modulo più delicato lato operazioni, perché esegue <code class="docutils literal notranslate"><span class="pre">DELETE</span></code>.</p></li>
|
||||
<li><p>La finestra separa chiaramente fase di ispezione e fase distruttiva.</p></li>
|
||||
<li><p>Tutte le query passano dal client condiviso tramite <code class="docutils literal notranslate"><span class="pre">AsyncRunner</span></code>.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h1 class="logo"><a href="../index.html">warehouse</a></h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<search id="searchbox" style="display: none" role="search">
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="../search.html" method="get">
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search"/>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
</search>
|
||||
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contenuti</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../architecture.html">Architettura Complessiva</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../api_reference.html">Riferimento API</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Flow Diagrams</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html">Flow Diagrams</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="main_flow.html"><code class="docutils literal notranslate"><span class="pre">main.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="layout_window_flow.html"><code class="docutils literal notranslate"><span class="pre">layout_window.py</span></code></a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">reset_corsie.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="view_celle_multiple_flow.html"><code class="docutils literal notranslate"><span class="pre">view_celle_multiple.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="search_pallets_flow.html"><code class="docutils literal notranslate"><span class="pre">search_pallets.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_pickinglist_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_pickinglist.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_db_flow.html">Infrastruttura Async / DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_msssql_query_flow.html"><code class="docutils literal notranslate"><span class="pre">async_msssql_query.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_aree_frame_async_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_aree_frame_async.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_loop_singleton_flow.html"><code class="docutils literal notranslate"><span class="pre">async_loop_singleton.py</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="relations">
|
||||
<h3>Related Topics</h3>
|
||||
<ul>
|
||||
<li><a href="../index.html">Documentation overview</a><ul>
|
||||
<li><a href="index.html">Flow Diagrams</a><ul>
|
||||
<li>Previous: <a href="layout_window_flow.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">layout_window.py</span></code></a></li>
|
||||
<li>Next: <a href="view_celle_multiple_flow.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">view_celle_multiple.py</span></code></a></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
©.
|
||||
|
||||
|
|
||||
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 9.1.0</a>
|
||||
& <a href="https://alabaster.readthedocs.io">Alabaster 1.0.0</a>
|
||||
|
||||
|
|
||||
<a href="../_sources/flows/reset_corsie_flow.md.txt"
|
||||
rel="nofollow">Page source</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
603
docs/_build/html/flows/search_pallets_flow.html
vendored
Normal file
603
docs/_build/html/flows/search_pallets_flow.html
vendored
Normal file
@@ -0,0 +1,603 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en" data-content_root="../">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>search_pallets.py — warehouse 0.0.1 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=5ecbeea2" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/basic.css?v=b08954a9" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=27fed22d" />
|
||||
<script src="../_static/documentation_options.js?v=d45e8c67"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js"></script>
|
||||
<script type="module">import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11.12.1/dist/mermaid.esm.min.mjs";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const initStyles = () => {
|
||||
const defaultStyle = document.createElement('style');
|
||||
defaultStyle.textContent = `pre.mermaid {
|
||||
/* Same as .mermaid-container > pre */
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
pre.mermaid > svg {
|
||||
/* Same as .mermaid-container > pre > svg */
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}`;
|
||||
document.head.appendChild(defaultStyle);
|
||||
|
||||
const fullscreenStyle = document.createElement('style');
|
||||
fullscreenStyle.textContent = `.mermaid-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre > svg {
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.3);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
padding: 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn:hover {
|
||||
opacity: 100% !important;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 3px 10px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal {
|
||||
display: none;
|
||||
position: fixed !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
width: 95vw;
|
||||
height: 100vh;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
z-index: 9999;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.dark-theme {
|
||||
background: rgba(0, 0, 0, 0.98);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.active {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen {
|
||||
position: relative;
|
||||
width: 95vw;
|
||||
height: 90vh;
|
||||
max-width: 95vw;
|
||||
max-height: 90vh;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen.dark-theme {
|
||||
background: #1a1a1a;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen pre.mermaid {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen .mermaid svg {
|
||||
height: 100% !important;
|
||||
width: 100% !important;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close {
|
||||
position: fixed !important;
|
||||
top: 20px !important;
|
||||
right: 20px !important;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
z-index: 10000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
transition: all 0.2s;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close:hover {
|
||||
background: white;
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 6px 16px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal .mermaid-fullscreen-btn {
|
||||
display: none !important;
|
||||
}`;
|
||||
document.head.appendChild(fullscreenStyle);
|
||||
}
|
||||
|
||||
// Detect if page has dark background
|
||||
const isDarkTheme = () => {
|
||||
// We use a set of heuristics:
|
||||
// 1. Check for common dark mode classes or attributes
|
||||
// 2. Check computed background color brightness
|
||||
if (document.documentElement.classList.contains('dark') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'dark' ||
|
||||
document.body.classList.contains('dark') ||
|
||||
document.body.getAttribute('data-theme') === 'dark') {
|
||||
// console.log("Dark theme detected via class/attribute");
|
||||
return true;
|
||||
}
|
||||
if (document.documentElement.classList.contains('light') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'light' ||
|
||||
document.body.classList.contains('light') ||
|
||||
document.body.getAttribute('data-theme') === 'light') {
|
||||
// console.log("Light theme detected via class/attribute");
|
||||
return false;
|
||||
}
|
||||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
// console.log("Dark theme detected via prefers-color-scheme");
|
||||
return true;
|
||||
}
|
||||
const bgColor = window.getComputedStyle(document.body).backgroundColor;
|
||||
const match = bgColor.match(/rgb\((\d+),\s*(\d+),\s*(\d+)/);
|
||||
if (match) {
|
||||
const r = parseInt(match[1]);
|
||||
const g = parseInt(match[2]);
|
||||
const b = parseInt(match[3]);
|
||||
const brightness = (r * 299 + g * 587 + b * 114) / 1000;
|
||||
// console.log("Background color brightness:", brightness);
|
||||
return brightness < 128;
|
||||
}
|
||||
// console.log("No dark or light theme detected, defaulting to light theme");
|
||||
return false;
|
||||
};
|
||||
|
||||
let darkTheme = isDarkTheme();
|
||||
let modal = null;
|
||||
let modalContent = null;
|
||||
let previousScrollOffset = [window.scrollX, window.scrollY];
|
||||
|
||||
const runMermaid = async (rerun) => {
|
||||
console.log("Running mermaid diagrams, rerun =", rerun);
|
||||
// clear all existing mermaid charts
|
||||
let all_mermaids = document.querySelectorAll(".mermaid");
|
||||
|
||||
if (rerun) {
|
||||
all_mermaids.forEach((el) => {
|
||||
if(!el.hasAttribute("data-original-code")) {
|
||||
// store original code
|
||||
// console.log(`Storing original code for first run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
if(el.getAttribute("data-processed") === "true") {
|
||||
// remove and restore original
|
||||
el.removeAttribute("data-processed");
|
||||
// console.log(`Restoring original code for re-run: `, el.getAttribute('data-original-code'));
|
||||
el.innerHTML = el.getAttribute('data-original-code');
|
||||
} else {
|
||||
// store original code
|
||||
// console.log(`Storing original code for re-run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
});
|
||||
await mermaid.run();
|
||||
}
|
||||
|
||||
all_mermaids = document.querySelectorAll(".mermaid");
|
||||
const mermaids_processed = document.querySelectorAll(".mermaid[data-processed='true']");
|
||||
|
||||
if ("False" === "True") {
|
||||
const mermaids_to_add_zoom = -1 === -1 ? all_mermaids.length : -1;
|
||||
if(mermaids_to_add_zoom > 0) {
|
||||
var svgs = d3.selectAll("");
|
||||
if(all_mermaids.length !== mermaids_processed.length) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else if(svgs.size() !== mermaids_to_add_zoom) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else {
|
||||
svgs.each(function() {
|
||||
var svg = d3.select(this);
|
||||
svg.html("<g class='wrapper'>" + svg.html() + "</g>");
|
||||
var inner = svg.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svg.call(zoom);
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if(all_mermaids.length !== mermaids_processed.length) {
|
||||
// Wait for mermaid to process all diagrams
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
}
|
||||
|
||||
// Stop here if not adding fullscreen capability
|
||||
if ("True" !== "True") return;
|
||||
|
||||
if (modal !== null ) {
|
||||
// Destroy existing modal
|
||||
modal.remove();
|
||||
modal = null;
|
||||
modalContent = null;
|
||||
}
|
||||
|
||||
modal = document.createElement('div');
|
||||
modal.className = 'mermaid-fullscreen-modal' + (darkTheme ? ' dark-theme' : '');
|
||||
modal.setAttribute('role', 'dialog');
|
||||
modal.setAttribute('aria-modal', 'true');
|
||||
modal.setAttribute('aria-label', 'Fullscreen diagram viewer');
|
||||
modal.innerHTML = `
|
||||
<button class="mermaid-fullscreen-close${darkTheme ? ' dark-theme' : ''}" aria-label="Close fullscreen">✕</button>
|
||||
<div class="mermaid-container-fullscreen${darkTheme ? ' dark-theme' : ''}"></div>
|
||||
`;
|
||||
document.body.appendChild(modal);
|
||||
|
||||
modalContent = modal.querySelector('.mermaid-container-fullscreen');
|
||||
const closeBtn = modal.querySelector('.mermaid-fullscreen-close');
|
||||
|
||||
const closeModal = () => {
|
||||
modal.classList.remove('active');
|
||||
modalContent.innerHTML = '';
|
||||
document.body.style.overflow = ''
|
||||
window.scrollTo({left: previousScrollOffset[0], top: previousScrollOffset[1], behavior: 'instant'});
|
||||
};
|
||||
|
||||
closeBtn.addEventListener('click', closeModal);
|
||||
modal.addEventListener('click', (e) => {
|
||||
if (e.target === modal) closeModal();
|
||||
});
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && modal.classList.contains('active')) {
|
||||
closeModal();
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelectorAll('.mermaid').forEach((mermaidDiv) => {
|
||||
if (mermaidDiv.parentNode.classList.contains('mermaid-container') ||
|
||||
mermaidDiv.closest('.mermaid-fullscreen-modal')) {
|
||||
// Already processed, adjust button class if needed
|
||||
const existingBtn = mermaidDiv.parentNode.querySelector('.mermaid-fullscreen-btn');
|
||||
if (existingBtn) {
|
||||
existingBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const container = document.createElement('div');
|
||||
container.className = 'mermaid-container';
|
||||
mermaidDiv.parentNode.insertBefore(container, mermaidDiv);
|
||||
container.appendChild(mermaidDiv);
|
||||
|
||||
const fullscreenBtn = document.createElement('button');
|
||||
fullscreenBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
fullscreenBtn.setAttribute('aria-label', 'View diagram in fullscreen');
|
||||
fullscreenBtn.textContent = '⛶';
|
||||
fullscreenBtn.style.opacity = '50%';
|
||||
|
||||
// Calculate dynamic position based on diagram's margin and padding
|
||||
const diagramStyle = window.getComputedStyle(mermaidDiv);
|
||||
const marginTop = parseFloat(diagramStyle.marginTop) || 0;
|
||||
const marginRight = parseFloat(diagramStyle.marginRight) || 0;
|
||||
const paddingTop = parseFloat(diagramStyle.paddingTop) || 0;
|
||||
const paddingRight = parseFloat(diagramStyle.paddingRight) || 0;
|
||||
fullscreenBtn.style.top = `${marginTop + paddingTop + 4}px`;
|
||||
fullscreenBtn.style.right = `${marginRight + paddingRight + 4}px`;
|
||||
|
||||
fullscreenBtn.addEventListener('click', () => {
|
||||
previousScrollOffset = [window.scroll, window.scrollY];
|
||||
const clone = mermaidDiv.cloneNode(true);
|
||||
modalContent.innerHTML = '';
|
||||
modalContent.appendChild(clone);
|
||||
|
||||
const svg = clone.querySelector('svg');
|
||||
if (svg) {
|
||||
svg.removeAttribute('width');
|
||||
svg.removeAttribute('height');
|
||||
svg.style.width = '100%';
|
||||
svg.style.height = 'auto';
|
||||
svg.style.maxWidth = '100%';
|
||||
svg.style.sdisplay = 'block';
|
||||
|
||||
if ("False" === "True") {
|
||||
setTimeout(() => {
|
||||
const g = svg.querySelector('g');
|
||||
if (g) {
|
||||
var svgD3 = d3.select(svg);
|
||||
svgD3.html("<g class='wrapper'>" + svgD3.html() + "</g>");
|
||||
var inner = svgD3.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svgD3.call(zoom);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
modal.classList.add('active');
|
||||
document.body.style.overflow = 'hidden';
|
||||
});
|
||||
container.appendChild(fullscreenBtn);
|
||||
});
|
||||
};
|
||||
|
||||
const load = async () => {
|
||||
initStyles();
|
||||
|
||||
await runMermaid(true);
|
||||
|
||||
const reRunIfThemeChanges = async () => {
|
||||
const newDarkTheme = isDarkTheme();
|
||||
if (newDarkTheme !== darkTheme) {
|
||||
darkTheme = newDarkTheme;
|
||||
console.log("Theme change detected, re-running mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
await mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
await runMermaid(true);
|
||||
}
|
||||
};
|
||||
|
||||
// Update theme classes when theme changes
|
||||
const themeObserver = new MutationObserver(reRunIfThemeChanges);
|
||||
themeObserver.observe(document.documentElement, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
themeObserver.observe(document.body, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
console.log("Initializing mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
|
||||
window.addEventListener("load", load);
|
||||
window.runMermaid = runMermaid;</script>
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="gestione_pickinglist.py" href="gestione_pickinglist_flow.html" />
|
||||
<link rel="prev" title="view_celle_multiple.py" href="view_celle_multiple_flow.html" />
|
||||
|
||||
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head><body>
|
||||
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
|
||||
|
||||
<div class="body" role="main">
|
||||
|
||||
<section id="search-pallets-py">
|
||||
<h1><code class="docutils literal notranslate"><span class="pre">search_pallets.py</span></code><a class="headerlink" href="#search-pallets-py" title="Link to this heading">¶</a></h1>
|
||||
<section id="scopo">
|
||||
<h2>Scopo<a class="headerlink" href="#scopo" title="Link to this heading">¶</a></h2>
|
||||
<p>Questo modulo consente di cercare pallet/UDC, lotti e codici prodotto su tutto
|
||||
il magazzino e di esportare i risultati.</p>
|
||||
</section>
|
||||
<section id="flusso-operativo">
|
||||
<h2>Flusso operativo<a class="headerlink" href="#flusso-operativo" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart TD
|
||||
A["open_search_window()"] --> B["SearchWindow.__init__()"]
|
||||
B --> C["_build_ui()"]
|
||||
C --> D["Utente compila filtri"]
|
||||
D --> E["_do_search()"]
|
||||
E --> F{"Filtri vuoti?"}
|
||||
F -- Si --> G["Richiesta conferma ricerca globale"]
|
||||
F -- No --> H["Prepara parametri SQL"]
|
||||
G --> H
|
||||
H --> I["AsyncRunner.run(query_json SQL_SEARCH)"]
|
||||
I --> J["_ok()"]
|
||||
J --> K["Popola Treeview"]
|
||||
K --> L["Eventuale reset campi"]
|
||||
</pre></section>
|
||||
<section id="ordinamento-ed-export">
|
||||
<h2>Ordinamento ed export<a class="headerlink" href="#ordinamento-ed-export" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart TD
|
||||
A["Doppio click su header"] --> B["_on_heading_double_click()"]
|
||||
B --> C["_sort_by_column()"]
|
||||
C --> D["Riordina righe del Treeview"]
|
||||
|
||||
E["Click Export XLSX"] --> F["_export_xlsx()"]
|
||||
F --> G["Legge righe visibili"]
|
||||
G --> H["Scrive workbook Excel"]
|
||||
</pre></section>
|
||||
<section id="note">
|
||||
<h2>Note<a class="headerlink" href="#note" title="Link to this heading">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><p>Il modulo usa <code class="docutils literal notranslate"><span class="pre">Treeview</span></code> come backend principale.</p></li>
|
||||
<li><p>Le ricerche possono essere molto ampie: per questo, senza filtri, viene chiesta conferma.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">IDCella</span> <span class="pre">=</span> <span class="pre">9999</span></code> viene evidenziata con uno stile dedicato.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h1 class="logo"><a href="../index.html">warehouse</a></h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<search id="searchbox" style="display: none" role="search">
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="../search.html" method="get">
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search"/>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
</search>
|
||||
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contenuti</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../architecture.html">Architettura Complessiva</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../api_reference.html">Riferimento API</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Flow Diagrams</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html">Flow Diagrams</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="main_flow.html"><code class="docutils literal notranslate"><span class="pre">main.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="layout_window_flow.html"><code class="docutils literal notranslate"><span class="pre">layout_window.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="reset_corsie_flow.html"><code class="docutils literal notranslate"><span class="pre">reset_corsie.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="view_celle_multiple_flow.html"><code class="docutils literal notranslate"><span class="pre">view_celle_multiple.py</span></code></a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">search_pallets.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_pickinglist_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_pickinglist.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_db_flow.html">Infrastruttura Async / DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_msssql_query_flow.html"><code class="docutils literal notranslate"><span class="pre">async_msssql_query.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_aree_frame_async_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_aree_frame_async.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_loop_singleton_flow.html"><code class="docutils literal notranslate"><span class="pre">async_loop_singleton.py</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="relations">
|
||||
<h3>Related Topics</h3>
|
||||
<ul>
|
||||
<li><a href="../index.html">Documentation overview</a><ul>
|
||||
<li><a href="index.html">Flow Diagrams</a><ul>
|
||||
<li>Previous: <a href="view_celle_multiple_flow.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">view_celle_multiple.py</span></code></a></li>
|
||||
<li>Next: <a href="gestione_pickinglist_flow.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">gestione_pickinglist.py</span></code></a></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
©.
|
||||
|
||||
|
|
||||
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 9.1.0</a>
|
||||
& <a href="https://alabaster.readthedocs.io">Alabaster 1.0.0</a>
|
||||
|
||||
|
|
||||
<a href="../_sources/flows/search_pallets_flow.md.txt"
|
||||
rel="nofollow">Page source</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
618
docs/_build/html/flows/view_celle_multiple_flow.html
vendored
Normal file
618
docs/_build/html/flows/view_celle_multiple_flow.html
vendored
Normal file
@@ -0,0 +1,618 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en" data-content_root="../">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>view_celle_multiple.py — warehouse 0.0.1 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=5ecbeea2" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/basic.css?v=b08954a9" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=27fed22d" />
|
||||
<script src="../_static/documentation_options.js?v=d45e8c67"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js"></script>
|
||||
<script type="module">import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11.12.1/dist/mermaid.esm.min.mjs";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const initStyles = () => {
|
||||
const defaultStyle = document.createElement('style');
|
||||
defaultStyle.textContent = `pre.mermaid {
|
||||
/* Same as .mermaid-container > pre */
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
pre.mermaid > svg {
|
||||
/* Same as .mermaid-container > pre > svg */
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}`;
|
||||
document.head.appendChild(defaultStyle);
|
||||
|
||||
const fullscreenStyle = document.createElement('style');
|
||||
fullscreenStyle.textContent = `.mermaid-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mermaid-container > pre > svg {
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.3);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
padding: 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn:hover {
|
||||
opacity: 100% !important;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-btn.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 3px 10px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal {
|
||||
display: none;
|
||||
position: fixed !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
width: 95vw;
|
||||
height: 100vh;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
z-index: 9999;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.dark-theme {
|
||||
background: rgba(0, 0, 0, 0.98);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal.active {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen {
|
||||
position: relative;
|
||||
width: 95vw;
|
||||
height: 90vh;
|
||||
max-width: 95vw;
|
||||
max-height: 90vh;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen.dark-theme {
|
||||
background: #1a1a1a;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen pre.mermaid {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mermaid-container-fullscreen .mermaid svg {
|
||||
height: 100% !important;
|
||||
width: 100% !important;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close {
|
||||
position: fixed !important;
|
||||
top: 20px !important;
|
||||
right: 20px !important;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
z-index: 10000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
transition: all 0.2s;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close:hover {
|
||||
background: white;
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme {
|
||||
background: rgba(50, 50, 50, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-close.dark-theme:hover {
|
||||
background: rgba(60, 60, 60, 1);
|
||||
box-shadow: 0 6px 16px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.mermaid-fullscreen-modal .mermaid-fullscreen-btn {
|
||||
display: none !important;
|
||||
}`;
|
||||
document.head.appendChild(fullscreenStyle);
|
||||
}
|
||||
|
||||
// Detect if page has dark background
|
||||
const isDarkTheme = () => {
|
||||
// We use a set of heuristics:
|
||||
// 1. Check for common dark mode classes or attributes
|
||||
// 2. Check computed background color brightness
|
||||
if (document.documentElement.classList.contains('dark') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'dark' ||
|
||||
document.body.classList.contains('dark') ||
|
||||
document.body.getAttribute('data-theme') === 'dark') {
|
||||
// console.log("Dark theme detected via class/attribute");
|
||||
return true;
|
||||
}
|
||||
if (document.documentElement.classList.contains('light') ||
|
||||
document.documentElement.getAttribute('data-theme') === 'light' ||
|
||||
document.body.classList.contains('light') ||
|
||||
document.body.getAttribute('data-theme') === 'light') {
|
||||
// console.log("Light theme detected via class/attribute");
|
||||
return false;
|
||||
}
|
||||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
// console.log("Dark theme detected via prefers-color-scheme");
|
||||
return true;
|
||||
}
|
||||
const bgColor = window.getComputedStyle(document.body).backgroundColor;
|
||||
const match = bgColor.match(/rgb\((\d+),\s*(\d+),\s*(\d+)/);
|
||||
if (match) {
|
||||
const r = parseInt(match[1]);
|
||||
const g = parseInt(match[2]);
|
||||
const b = parseInt(match[3]);
|
||||
const brightness = (r * 299 + g * 587 + b * 114) / 1000;
|
||||
// console.log("Background color brightness:", brightness);
|
||||
return brightness < 128;
|
||||
}
|
||||
// console.log("No dark or light theme detected, defaulting to light theme");
|
||||
return false;
|
||||
};
|
||||
|
||||
let darkTheme = isDarkTheme();
|
||||
let modal = null;
|
||||
let modalContent = null;
|
||||
let previousScrollOffset = [window.scrollX, window.scrollY];
|
||||
|
||||
const runMermaid = async (rerun) => {
|
||||
console.log("Running mermaid diagrams, rerun =", rerun);
|
||||
// clear all existing mermaid charts
|
||||
let all_mermaids = document.querySelectorAll(".mermaid");
|
||||
|
||||
if (rerun) {
|
||||
all_mermaids.forEach((el) => {
|
||||
if(!el.hasAttribute("data-original-code")) {
|
||||
// store original code
|
||||
// console.log(`Storing original code for first run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
if(el.getAttribute("data-processed") === "true") {
|
||||
// remove and restore original
|
||||
el.removeAttribute("data-processed");
|
||||
// console.log(`Restoring original code for re-run: `, el.getAttribute('data-original-code'));
|
||||
el.innerHTML = el.getAttribute('data-original-code');
|
||||
} else {
|
||||
// store original code
|
||||
// console.log(`Storing original code for re-run: `, el.innerHTML);
|
||||
el.setAttribute('data-original-code', el.innerHTML);
|
||||
}
|
||||
});
|
||||
await mermaid.run();
|
||||
}
|
||||
|
||||
all_mermaids = document.querySelectorAll(".mermaid");
|
||||
const mermaids_processed = document.querySelectorAll(".mermaid[data-processed='true']");
|
||||
|
||||
if ("False" === "True") {
|
||||
const mermaids_to_add_zoom = -1 === -1 ? all_mermaids.length : -1;
|
||||
if(mermaids_to_add_zoom > 0) {
|
||||
var svgs = d3.selectAll("");
|
||||
if(all_mermaids.length !== mermaids_processed.length) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else if(svgs.size() !== mermaids_to_add_zoom) {
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
} else {
|
||||
svgs.each(function() {
|
||||
var svg = d3.select(this);
|
||||
svg.html("<g class='wrapper'>" + svg.html() + "</g>");
|
||||
var inner = svg.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svg.call(zoom);
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if(all_mermaids.length !== mermaids_processed.length) {
|
||||
// Wait for mermaid to process all diagrams
|
||||
setTimeout(() => runMermaid(false), 200);
|
||||
return;
|
||||
}
|
||||
|
||||
// Stop here if not adding fullscreen capability
|
||||
if ("True" !== "True") return;
|
||||
|
||||
if (modal !== null ) {
|
||||
// Destroy existing modal
|
||||
modal.remove();
|
||||
modal = null;
|
||||
modalContent = null;
|
||||
}
|
||||
|
||||
modal = document.createElement('div');
|
||||
modal.className = 'mermaid-fullscreen-modal' + (darkTheme ? ' dark-theme' : '');
|
||||
modal.setAttribute('role', 'dialog');
|
||||
modal.setAttribute('aria-modal', 'true');
|
||||
modal.setAttribute('aria-label', 'Fullscreen diagram viewer');
|
||||
modal.innerHTML = `
|
||||
<button class="mermaid-fullscreen-close${darkTheme ? ' dark-theme' : ''}" aria-label="Close fullscreen">✕</button>
|
||||
<div class="mermaid-container-fullscreen${darkTheme ? ' dark-theme' : ''}"></div>
|
||||
`;
|
||||
document.body.appendChild(modal);
|
||||
|
||||
modalContent = modal.querySelector('.mermaid-container-fullscreen');
|
||||
const closeBtn = modal.querySelector('.mermaid-fullscreen-close');
|
||||
|
||||
const closeModal = () => {
|
||||
modal.classList.remove('active');
|
||||
modalContent.innerHTML = '';
|
||||
document.body.style.overflow = ''
|
||||
window.scrollTo({left: previousScrollOffset[0], top: previousScrollOffset[1], behavior: 'instant'});
|
||||
};
|
||||
|
||||
closeBtn.addEventListener('click', closeModal);
|
||||
modal.addEventListener('click', (e) => {
|
||||
if (e.target === modal) closeModal();
|
||||
});
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && modal.classList.contains('active')) {
|
||||
closeModal();
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelectorAll('.mermaid').forEach((mermaidDiv) => {
|
||||
if (mermaidDiv.parentNode.classList.contains('mermaid-container') ||
|
||||
mermaidDiv.closest('.mermaid-fullscreen-modal')) {
|
||||
// Already processed, adjust button class if needed
|
||||
const existingBtn = mermaidDiv.parentNode.querySelector('.mermaid-fullscreen-btn');
|
||||
if (existingBtn) {
|
||||
existingBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const container = document.createElement('div');
|
||||
container.className = 'mermaid-container';
|
||||
mermaidDiv.parentNode.insertBefore(container, mermaidDiv);
|
||||
container.appendChild(mermaidDiv);
|
||||
|
||||
const fullscreenBtn = document.createElement('button');
|
||||
fullscreenBtn.className = 'mermaid-fullscreen-btn' + (darkTheme ? ' dark-theme' : '');
|
||||
fullscreenBtn.setAttribute('aria-label', 'View diagram in fullscreen');
|
||||
fullscreenBtn.textContent = '⛶';
|
||||
fullscreenBtn.style.opacity = '50%';
|
||||
|
||||
// Calculate dynamic position based on diagram's margin and padding
|
||||
const diagramStyle = window.getComputedStyle(mermaidDiv);
|
||||
const marginTop = parseFloat(diagramStyle.marginTop) || 0;
|
||||
const marginRight = parseFloat(diagramStyle.marginRight) || 0;
|
||||
const paddingTop = parseFloat(diagramStyle.paddingTop) || 0;
|
||||
const paddingRight = parseFloat(diagramStyle.paddingRight) || 0;
|
||||
fullscreenBtn.style.top = `${marginTop + paddingTop + 4}px`;
|
||||
fullscreenBtn.style.right = `${marginRight + paddingRight + 4}px`;
|
||||
|
||||
fullscreenBtn.addEventListener('click', () => {
|
||||
previousScrollOffset = [window.scroll, window.scrollY];
|
||||
const clone = mermaidDiv.cloneNode(true);
|
||||
modalContent.innerHTML = '';
|
||||
modalContent.appendChild(clone);
|
||||
|
||||
const svg = clone.querySelector('svg');
|
||||
if (svg) {
|
||||
svg.removeAttribute('width');
|
||||
svg.removeAttribute('height');
|
||||
svg.style.width = '100%';
|
||||
svg.style.height = 'auto';
|
||||
svg.style.maxWidth = '100%';
|
||||
svg.style.sdisplay = 'block';
|
||||
|
||||
if ("False" === "True") {
|
||||
setTimeout(() => {
|
||||
const g = svg.querySelector('g');
|
||||
if (g) {
|
||||
var svgD3 = d3.select(svg);
|
||||
svgD3.html("<g class='wrapper'>" + svgD3.html() + "</g>");
|
||||
var inner = svgD3.select("g");
|
||||
var zoom = d3.zoom().on("zoom", function(event) {
|
||||
inner.attr("transform", event.transform);
|
||||
});
|
||||
svgD3.call(zoom);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
modal.classList.add('active');
|
||||
document.body.style.overflow = 'hidden';
|
||||
});
|
||||
container.appendChild(fullscreenBtn);
|
||||
});
|
||||
};
|
||||
|
||||
const load = async () => {
|
||||
initStyles();
|
||||
|
||||
await runMermaid(true);
|
||||
|
||||
const reRunIfThemeChanges = async () => {
|
||||
const newDarkTheme = isDarkTheme();
|
||||
if (newDarkTheme !== darkTheme) {
|
||||
darkTheme = newDarkTheme;
|
||||
console.log("Theme change detected, re-running mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
await mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
await runMermaid(true);
|
||||
}
|
||||
};
|
||||
|
||||
// Update theme classes when theme changes
|
||||
const themeObserver = new MutationObserver(reRunIfThemeChanges);
|
||||
themeObserver.observe(document.documentElement, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
themeObserver.observe(document.body, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'style', 'data-theme']
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
console.log("Initializing mermaid with", darkTheme ? "dark" : "default", "theme");
|
||||
mermaid.initialize(
|
||||
{...JSON.parse(
|
||||
`{"startOnLoad": false}`
|
||||
),
|
||||
...{ darkMode: darkTheme, theme: darkTheme ? 'dark' : 'default' },
|
||||
}
|
||||
);
|
||||
|
||||
window.addEventListener("load", load);
|
||||
window.runMermaid = runMermaid;</script>
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="search_pallets.py" href="search_pallets_flow.html" />
|
||||
<link rel="prev" title="reset_corsie.py" href="reset_corsie_flow.html" />
|
||||
|
||||
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head><body>
|
||||
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
|
||||
|
||||
<div class="body" role="main">
|
||||
|
||||
<section id="view-celle-multiple-py">
|
||||
<h1><code class="docutils literal notranslate"><span class="pre">view_celle_multiple.py</span></code><a class="headerlink" href="#view-celle-multiple-py" title="Link to this heading">¶</a></h1>
|
||||
<section id="scopo">
|
||||
<h2>Scopo<a class="headerlink" href="#scopo" title="Link to this heading">¶</a></h2>
|
||||
<p>Questo modulo esplora le celle che contengono più pallet del previsto,
|
||||
organizzando i risultati in un albero:</p>
|
||||
<ul class="simple">
|
||||
<li><p>corsia</p></li>
|
||||
<li><p>cella duplicata</p></li>
|
||||
<li><p>pallet contenuti nella cella</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="flusso-operativo">
|
||||
<h2>Flusso operativo<a class="headerlink" href="#flusso-operativo" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart TD
|
||||
A["open_celle_multiple_window()"] --> B["CelleMultipleWindow.__init__()"]
|
||||
B --> C["_build_layout()"]
|
||||
C --> D["_bind_events()"]
|
||||
D --> E["refresh_all()"]
|
||||
E --> F["_load_corsie()"]
|
||||
E --> G["_load_riepilogo()"]
|
||||
F --> H["query_json SQL_CORSIE"]
|
||||
G --> I["query_json SQL_RIEPILOGO_PERCENTUALI"]
|
||||
H --> J["_fill_corsie()"]
|
||||
I --> K["_fill_riepilogo()"]
|
||||
</pre></section>
|
||||
<section id="lazy-loading-dell-albero">
|
||||
<h2>Lazy loading dell’albero<a class="headerlink" href="#lazy-loading-dell-albero" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart TD
|
||||
A["Espansione nodo tree"] --> B["_on_open_node()"]
|
||||
B --> C{"Nodo corsia o nodo cella?"}
|
||||
C -- Corsia --> D["_load_celle_for_corsia()"]
|
||||
D --> E["query_json SQL_CELLE_DUP_PER_CORSIA"]
|
||||
E --> F["_fill_celle()"]
|
||||
C -- Cella --> G["_load_pallet_for_cella()"]
|
||||
G --> H["query_json SQL_PALLET_IN_CELLA"]
|
||||
H --> I["_fill_pallet()"]
|
||||
</pre></section>
|
||||
<section id="schema-di-chiamata">
|
||||
<h2>Schema di chiamata<a class="headerlink" href="#schema-di-chiamata" title="Link to this heading">¶</a></h2>
|
||||
<pre class="mermaid">
|
||||
flowchart LR
|
||||
Refresh["refresh_all"] --> Corsie["_load_corsie"]
|
||||
Refresh --> Riep["_load_riepilogo"]
|
||||
Open["_on_open_node"] --> LoadCelle["_load_celle_for_corsia"]
|
||||
Open --> LoadPallet["_load_pallet_for_cella"]
|
||||
Export["export_to_xlsx"] --> Tree["tree dati dettaglio"]
|
||||
Export --> Sum["sum_tbl riepilogo"]
|
||||
</pre></section>
|
||||
<section id="note">
|
||||
<h2>Note<a class="headerlink" href="#note" title="Link to this heading">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><p>L’albero è caricato a richiesta, non tutto in una sola query.</p></li>
|
||||
<li><p>Questo riduce il costo iniziale e rende il modulo più scalabile.</p></li>
|
||||
<li><p>L’export legge sia il dettaglio dell’albero sia la tabella di riepilogo.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h1 class="logo"><a href="../index.html">warehouse</a></h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<search id="searchbox" style="display: none" role="search">
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="../search.html" method="get">
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search"/>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
</search>
|
||||
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contenuti</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../architecture.html">Architettura Complessiva</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../api_reference.html">Riferimento API</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Flow Diagrams</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html">Flow Diagrams</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="main_flow.html"><code class="docutils literal notranslate"><span class="pre">main.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="layout_window_flow.html"><code class="docutils literal notranslate"><span class="pre">layout_window.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="reset_corsie_flow.html"><code class="docutils literal notranslate"><span class="pre">reset_corsie.py</span></code></a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">view_celle_multiple.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="search_pallets_flow.html"><code class="docutils literal notranslate"><span class="pre">search_pallets.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_pickinglist_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_pickinglist.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_db_flow.html">Infrastruttura Async / DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_msssql_query_flow.html"><code class="docutils literal notranslate"><span class="pre">async_msssql_query.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="gestione_aree_frame_async_flow.html"><code class="docutils literal notranslate"><span class="pre">gestione_aree_frame_async.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="async_loop_singleton_flow.html"><code class="docutils literal notranslate"><span class="pre">async_loop_singleton.py</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="relations">
|
||||
<h3>Related Topics</h3>
|
||||
<ul>
|
||||
<li><a href="../index.html">Documentation overview</a><ul>
|
||||
<li><a href="index.html">Flow Diagrams</a><ul>
|
||||
<li>Previous: <a href="reset_corsie_flow.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">reset_corsie.py</span></code></a></li>
|
||||
<li>Next: <a href="search_pallets_flow.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">search_pallets.py</span></code></a></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
©.
|
||||
|
||||
|
|
||||
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 9.1.0</a>
|
||||
& <a href="https://alabaster.readthedocs.io">Alabaster 1.0.0</a>
|
||||
|
||||
|
|
||||
<a href="../_sources/flows/view_celle_multiple_flow.md.txt"
|
||||
rel="nofollow">Page source</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user