Nessun oggetto della modifica
Nessun oggetto della modifica
(4 versioni intermedie di uno stesso utente non sono mostrate)
Riga 7: Riga 7:
<div style="margin: 2rem 0; display: flex; flex-wrap: wrap; gap: 1rem;">
<div style="margin: 2rem 0; display: flex; flex-wrap: wrap; gap: 1rem;">
   <button class="dashboard-toggle" onclick="toggleDashboardBox('api-settings')">⚙️ Connessione API</button>
   <button class="dashboard-toggle" onclick="toggleDashboardBox('api-settings')">⚙️ Connessione API</button>
  <button class="dashboard-toggle" onclick="toggleDashboardBox('server-files')">📀 Accesso File Server</button>
 
 
 
   <button class="dashboard-toggle" onclick="toggleDashboardBox('project-status')">📊 Stato Progetti</button>
   <button class="dashboard-toggle" onclick="toggleDashboardBox('project-status')">📊 Stato Progetti</button>
   <button class="dashboard-toggle" onclick="toggleDashboardBox('test-tools')">🧪 Strumenti di Test</button>
   <button class="dashboard-toggle" onclick="toggleDashboardBox('test-tools')">🧪 Strumenti di Test</button>
</div>
 
<button class="dashboard-toggle" onclick="toggleDashboardBox('activity-log')">📘 Registro Attività</button>
<button class="dashboard-toggle" onclick="toggleDashboardBox('activity-log')">📘 Registro Attività</button>
<button class="dashboard-toggle" onclick="uploadToOpenAI()">📤 Carica in OpenAI</button>
<button class="dashboard-toggle" onclick="uploadToOpenAI()">📤 Carica in OpenAI</button>
</div>




Riga 30: Riga 38:
   <pre id="api-result" style="background:#f0f0f0; padding:1rem; border:1px solid #ccc; margin-top:1rem; white-space:pre-wrap;"></pre>
   <pre id="api-result" style="background:#f0f0f0; padding:1rem; border:1px solid #ccc; margin-top:1rem; white-space:pre-wrap;"></pre>
</div>
</div>
<!-- 📦 Box: Accesso File Server -->
<div style="margin-top: 2rem; padding: 1rem; border: 1px solid #ccc; background: #f9f9f9; border-radius: 8px;">
  <h3 style="margin-top: 0;">📂 Accesso File Server</h3>
  <p>Inserisci il nome completo del file MediaWiki che desideri leggere, ad esempio: <code>MediaWiki:Common.css</code></p>
  <input id="readFileName" type="text" style="width: 100%; padding: 8px; font-family: monospace; font-size: 14px;" placeholder="MediaWiki:CommonDashboard.js">
  <button id="readFileBtn" class="mw-ui-button" style="margin-top: 10px;">📂 Leggi file</button>
  <div id="readFileResult" style="margin-top: 1rem; border: 1px solid #ddd; padding: 1rem; background: #fff; font-family: monospace; font-size: 14px; white-space: pre-wrap; max-height: 400px; overflow: auto;">
    <em>📄 Il contenuto del file verrà mostrato qui...</em>
  </div>
</div>
<script>
document.querySelector('#readFileBtn')?.addEventListener('click', async () => {
  const filenameInput = document.querySelector('#readFileName');
  const fileContentDiv = document.querySelector('#readFileResult');
  const filename = filenameInput.value.trim();
  if (!filename) {
    fileContentDiv.innerHTML = '<span style="color:red;">⚠️ Inserisci un nome di file.</span>';
    return;
  }
  try {
    const response = await fetch('/wiki/dashboard/api/read_file.php?filename=' + encodeURIComponent(filename));
    const data = await response.json();
    if (data.status === 'success') {
      fileContentDiv.innerHTML = `<pre style="background:#f4f4f4;border:1px solid #ccc;padding:8px;max-height:400px;overflow:auto;font-size:14px;">${data.content}</pre>`;
    } else {
      fileContentDiv.innerHTML = `<span style="color:red;">❌ Errore: ${data.message}</span>`;
    }
  } catch (error) {
    fileContentDiv.innerHTML = `<span style="color:red;">❌ Errore di connessione.</span>`;
    console.error('Errore JS:', error);
  }
});
</script>




Riga 101: Riga 63:
     </tbody>
     </tbody>
   </table>
   </table>
<!-- 🔧 Riquadro per inserire un nuovo progetto -->
<div id="newProjectDialog" style="display:none; background:#fff; border:1px solid #ccc; padding:1rem; border-radius:8px; margin-top:1rem;">
  <label for="newProjectTitle">Titolo progetto:</label><br>
  <input id="newProjectTitle" type="text" style="width:100%; margin-bottom:0.5rem;"><br>
  <label for="newProjectNotes">Note:</label><br>
  <textarea id="newProjectNotes" style="width:100%; height:4rem; margin-bottom:0.5rem;"></textarea><br>
  <button onclick="addNewProject()" style="background:green; color:white; border:none; padding:0.5rem 1rem; border-radius:5px;">✅ Salva</button>
  <button onclick="closeProjectDialog()" style="background:gray; color:white; border:none; padding:0.5rem 1rem; border-radius:5px; margin-left:0.5rem;">✖ Annulla</button></div>
</div>
</div>
<div id="prompt-section" style="margin-top:2rem;">
  <h3>📄 Prompt attuale:</h3>
  <textarea id="promptArea" style="width:100%; height:200px; font-family:monospace;"></textarea>
  <br>
  <button onclick="loadPrompt()" style="margin-top:0.5rem;">🔄 Carica prompt.txt</button>
  <button onclick="savePrompt()" style="margin-top:0.5rem;">💾 Salva prompt.txt</button>
</div>


<!-- 📦 Box: Strumenti di Test -->
<!-- 📦 Box: Strumenti di Test -->

Versione delle 18:32, 1 ago 2025

🔧 Dashboard Operativa – Masticationpedia

Centro di comando per progetti, API, file e backup

📄 Prompt attuale:


📜 Registro attività:
Registro avviato...