Nessun oggetto della modifica
Nessun oggetto della modifica
 
(14 versioni intermedie di uno stesso utente non sono mostrate)
Riga 1: Riga 1:
<html>
<html>
<!-- 🔧 DASHBOARD OPERATIVA – MASTICATIONPEDIA -->
<h2>🔧 Dashboard Operativa – Masticationpedia</h2>
<h2>🔧 Dashboard Operativa – Masticationpedia</h2>
<p><em>Centro di comando per progetti, API, file e backup</em></p>
<p><em>Centro di comando per progetti, API, file e backup</em></p>
Riga 7: Riga 6:
<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>
  <button class="dashboard-toggle" onclick="toggleDashboardBox('activity-log')">📘 Registro Attività</button>
  <button class="dashboard-toggle" onclick="uploadToOpenAI()">📤 Carica in OpenAI</button>
</div>
</div>
<button class="dashboard-toggle" onclick="toggleDashboardBox('activity-log')">📘 Registro Attività</button>
<button class="dashboard-toggle" onclick="uploadToOpenAI()">📤 Carica in OpenAI</button>


 
<!-- 📦 Connessione API -->
 
<div id="api-settings" style="display:none; padding:1rem; border:1px solid #ccc; border-radius:8px; background:#f9f9f9;">
 
 
<!-- 📦 Box: Connessione API -->
<div id="api-settings" style="display:none; padding:1rem; border:1px solid #ccc; border-radius:8px; background:#f9f9f9; margin-bottom:1rem;">
   <strong>Connessione API:</strong><br><br>
   <strong>Connessione API:</strong><br><br>
   <input id="api-key" placeholder="🔑 Inserisci API Key" style="width:100%; margin-bottom:0.5rem;"><br>
   <input id="api-key" placeholder="🔑 Inserisci API Key" style="width:100%; margin-bottom:0.5rem;"><br>
Riga 31: Riga 25:
</div>
</div>


<!-- 📊 Stato Progetti -->
<div id="project-status" style="display:none; padding:1rem; border:1px solid #ccc; border-radius:8px; background:#f9f9f9;">
  <strong>Stato Progetti:</strong><br><br>
  <button onclick="openProjectDialog()" style="margin-bottom:1rem; background:#007bff; color:white; border:none; padding:0.5rem 1rem; border-radius:5px; font-weight:bold;">➕ Nuovo Progetto</button>


 
<div id="newProjectDialog" style="display:none; padding:1rem; border:1px solid #ccc; margin-top:1rem;">
 
   <h4>➕ Crea Nuovo Progetto</h4>
<!-- 📦 Box: Accesso File Server -->
   <input id="newProjectTitle" placeholder="Titolo progetto" style="width:100%; margin-bottom:0.5rem;" />
<div id="server-files" style="display:none; padding:1rem; border:1px solid #ccc; border-radius:8px; background:#f9f9f9; margin-bottom:1rem;">
   <input id="newProjectNotes" placeholder="Note (opzionale)" style="width:100%; margin-bottom:0.5rem;" />
   <strong>File Server:</strong> Accesso ai file CSS, JS, configurazioni.<br><br>
   <button onclick="addNewProject()">💾 Salva</button>
   <select id="fileSelect" style="margin-bottom:0.5rem;">
   <button onclick="closeProjectDialog()">❌ Chiudi</button>
    <option value="common.css">common.css</option>
    <option value="common.js">common.js</option>
    <option value="LocalSettings.php">LocalSettings.php</option>
  </select><br>
   <textarea id="fileContent" rows="10" style="width:100%; display:none;"></textarea><br>
   <button onclick="saveMockFile()" style="display:none;" id="saveBtn">📀 Salva</button>
</div>
 
<div id="admin-file-box" style="display:none;">
  <select id="file-select">
    <option value="common.css">common.css</option>
    <option value="common.js">common.js</option>
    <option value="LocalSettings.php">LocalSettings.php</option>
    <option value="CommonTranslate.js">CommonTranslate.js</option>
  </select>
  <button onclick="loadRealFileContent()">📂 Carica file</button>
   <button onclick="saveRealFileContent()">💾 Salva file</button><br><br>
  <textarea id="file-preview" style="width:100%;height:300px;"></textarea>
</div>
</div>


<script>
  const currentUser = mw.config.get("wgUserName") || "";
  if (currentUser === "GianniFrisardi") {
    document.getElementById("admin-file-box").style.display = "block";
  }
</script>
<div style="margin-top:20px;">
  <button id="readFileBtn" class="mw-ui-button">📂 Accesso File Server</button><br><br>
  <label for="readFileName">Inserisci nome file MediaWiki (es: <code>MediaWiki:Common.css</code>)</label><br>
  <input id="readFileName" type="text" style="width:100%;padding:5px;margin:5px 0;" placeholder="MediaWiki:CommonTranslate.js">
  <div id="readFileResult" style="margin-top:10px;"></div>
</div>




<!-- 📦 Box: Stato Progetti -->
<div id="project-status" style="display:none; padding:1rem; border:1px solid #ccc; border-radius:8px; background:#f9f9f9; margin-bottom:1rem;">
  <strong>Stato Progetti:</strong> Riepilogo visuale dei moduli operativi.<br><br>
  <button onclick="openProjectDialog()" style="margin-bottom:1rem; background:#007bff; color:white; border:none; padding:0.5rem 1rem; border-radius:5px; font-weight:bold;">➕ Nuovo Progetto</button>


   <table id="projectTable" style="width:100%; border-collapse: collapse; font-size: 0.95rem;">
   <table id="projectTable" style="width:100%; border-collapse: collapse; font-size: 0.95rem;">
     <thead>
     <thead>
       <tr style="background:#eaeaea;">
       <tr style="background:#eaeaea;">
         <th style="padding:0.5rem; border:1px solid #ccc;">🧱 Modulo</th>
         <th>🧱 Modulo</th><th>📊 Stato</th><th>📅 Data</th><th>🔍 Note</th>
        <th style="padding:0.5rem; border:1px solid #ccc;">📊 Stato</th>
        <th style="padding:0.5rem; border:1px solid #ccc;">📅 Data</th>
        <th style="padding:0.5rem; border:1px solid #ccc;">🔍 Note</th>
       </tr>
       </tr>
     </thead>
     </thead>
     <tbody id="projectRows">
     <tbody id="projectRows">
       <tr>
       <tr>
         <td style="padding:0.5rem; border:1px solid #ccc;">Connessione API</td>
         <td>Connessione API</td>
         <td style="padding:0.5rem; border:1px solid #ccc; color:green; font-weight:bold;">✅ Completato</td>
         <td style="color:green; font-weight:bold;">✅ Completato</td>
         <td style="padding:0.5rem; border:1px solid #ccc;">6 apr 2025</td>
         <td>6 apr 2025</td>
         <td style="padding:0.5rem; border:1px solid #ccc;">Setup funzionante</td>
         <td>Setup funzionante</td>
       </tr>
       </tr>
     </tbody>
     </tbody>
Riga 100: Riga 58:
</div>
</div>


<!-- 📦 Box: Strumenti di Test -->
<!-- 📄 Prompt + Risposta GPT + Salvataggio -->
<div id="test-tools" style="display:none; padding:1rem; border:1px solid #ccc; border-radius:8px; background:#f9f9f9; margin-bottom:1rem;">
<div style="margin-top:2rem;">
   <strong>Mini console:</strong><br><br>
   <h3>📄 Prompt attuale:</h3>
   <textarea id="codeArea" placeholder="Scrivi codice JS da testare..." style="width:100%; height:100px;"></textarea><br>
   <textarea id="promptArea" style="width:100%; height:200px; font-family:monospace;"></textarea><br>
   <button onclick="runTestCode()">▶️ Esegui</button><br><br>
   <button onclick="loadPrompt()">📂 Carica prompt.txt</button>
   <pre id="consoleOutput" style="background:#000; color:#0f0; padding:1rem; border-radius:8px; font-family:monospace;"></pre>
   <button onclick="savePrompt()">💾 Salva prompt.txt</button>
</div>
</div>
<!-- 📘 Box: Registro Attività -->
 
<div id="activity-log" style="display:none; padding:1rem; border:1px solid #ccc; border-radius:8px; background:#fdfdfd; margin-bottom:1rem;">
<div style="margin-top:2rem;">
  <strong>Registro Attività:</strong><br><br>
  <h3>📥 Risposta GPT da salvare:</h3>
   <div id="activityLogContent" style="background:#f4f4f4; border:1px solid #ccc; padding:1rem; height:200px; overflow-y:auto; font-family:monospace; font-size:0.9rem;">
  <textarea id="gpt-response-area" rows="8" style="width:100%; margin-bottom:0.5rem;" placeholder="Inserisci qui la risposta generata da GPT"></textarea><br>
     <p><em>In attesa di attività...</em></p>
   <input type="text" id="gpt-filename" placeholder="Nome file (es: login.php)" style="width:60%;">
   </div>
  <select id="gpt-subfolder">
   <br>
     <option value="php">php</option>
   <button onclick="clearActivityLog()" style="background:#e74c3c; color:white; border:none; padding:0.4rem 1rem; border-radius:6px; font-weight:bold;">🧹 Pulisci Log</button>
    <option value="docs">docs</option>
    <option value="json">json</option>
   </select>
   <input type="text" id="newProjectTitle" value="SSO_LinkedIn" placeholder="Project">
   <button onclick="salvaFileDaTextarea()" style="background:#28a745; color:white; border:none; padding:0.4rem 1rem; border-radius:5px; font-weight:bold;">💾 Salva nel progetto</button>
</div>
</div>


<!-- 📂 Caricamento File GPT -->
<div style="margin-top:2rem;">
  <h3>📂 Carica File GPT</h3>
  <label>📁 Project: <input type="text" id="gpt-load-project" value="SSO_LinkedIn" /></label>
  <label>📂 Subfolder: <input type="text" id="gpt-load-subfolder" value="php" /></label>
  <label>📄 Filename: <input type="text" id="gpt-load-filename" placeholder="es: testGPT.php" /></label>
  <button onclick="caricaFileGPT()">📂 Carica file</button>
</div>


<!-- 🪟 Dialog Nuovo Progetto -->
<!-- 🧪 Console JS -->
<div id="newProjectDialog" style="display:none; position:fixed; top:20%; left:50%; transform:translateX(-50%); background:white; padding:1.5rem; border-radius:12px; box-shadow:0 4px 20px rgba(0,0,0,0.3); z-index:999; max-width:500px;">
<div id="test-tools" style="display:none; padding:1rem; border:1px solid #ccc; border-radius:8px; background:#f9f9f9;">
   <h3>🆕 Nuovo Progetto</h3>
   <strong>Console JS:</strong><br>
  <label>Titolo:</label><br>
   <textarea id="codeArea" placeholder="Scrivi codice JS da testare..." style="width:100%; height:100px;"></textarea><br>
   <input id="newProjectTitle" style="width:100%; margin-bottom:0.5rem;"><br>
   <button onclick="runTestCode()">▶️ Esegui</button>
  <label>Descrizione o Note:</label><br>
   <pre id="consoleOutput" style="background:#000; color:#0f0; padding:1rem; border-radius:8px; font-family:monospace;"></pre>
   <textarea id="newProjectNotes" rows="4" style="width:100%;"></textarea><br><br>
   <button onclick="addNewProject()" style="background:#28a745; color:white; border:none; padding:0.5rem 1rem; border-radius:6px; font-weight:bold;">💾 Salva</button>
  <button onclick="closeProjectDialog()" style="margin-left:1rem;">❌ Annulla</button>
</div>
</div>


<!-- 📜 Registro attività -->
<!-- 📘 Registro Attività -->
<div style="margin-top:2rem; padding:1rem; border:1px solid #ccc; border-radius:8px; background:#fdfdfd;">
<div id="activity-log" style="display:none; padding:1rem; border:1px solid #ccc; border-radius:8px; background:#fdfdfd;">
   <strong>📜 Registro attività:</strong>
   <strong>📘 Registro attività:</strong>
   <button onclick="clearActivityLog()" style="float:right; background:#dc3545; color:white; border:none; padding:0.3rem 0.8rem; border-radius:6px; font-weight:bold;">🧹 Svuota</button>
   <button onclick="clearActivityLog()" style="float:right; background:#e74c3c; color:white; border:none; padding:0.4rem 1rem; border-radius:6px; font-weight:bold;">🧹 Svuota</button>
   <div id="activityLogContent" style="margin-top:1rem; max-height:250px; overflow-y:auto; background:#f0f0f0; padding:1rem; border:1px solid #ccc; border-radius:6px; font-family:monospace; font-size:0.85rem;">
   <div id="activityLogContent" style="margin-top:1rem; max-height:250px; overflow-y:auto; background:#f0f0f0; padding:1rem; border:1px solid #ccc; border-radius:6px; font-family:monospace; font-size:0.85rem;">
     <em><span style="color:#888;">Registro avviato...</span></em>
     <em><span style="color:#888;">Registro avviato...</span></em>
   </div>
   </div>
</div>
</div>
</html>
</html>

Versione attuale delle 12:16, 2 ago 2025

🔧 Dashboard Operativa – Masticationpedia

Centro di comando per progetti, API, file e backup

📄 Prompt attuale:


📥 Risposta GPT da salvare:


📂 Carica File GPT