Upload folder using huggingface_hub
Browse filesFiles changed (3)
- README.md+1-2
- index.htmlAdded+118
- requirements.txt+1-1
2 unmodified lines3456789102 unmodified linesemoji: 🔧colorFrom: bluecolorTo: greensdk: gradiosdk_version: "5.0.0"app_file: app.pypinned: false---2 unmodified lines34567892 unmodified linesemoji: 🔧colorFrom: bluecolorTo: greensdk: staticapp_file: app.pypinned: false---
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Jenkins Error Explainer</title> <style> * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; padding: 20px; } .container { max-width: 800px; margin: 0 auto; } h1 { color: #333; margin-bottom: 10px; } .description { color: #666; margin-bottom: 20px; } textarea { width: 100%; height: 200px; padding: 15px; border: 1px solid #ddd; border-radius: 8px; font-family: monospace; font-size: 14px; resize: vertical; } button { background: #4CAF50; color: white; border: none; padding: 12px 24px; font-size: 16px; border-radius: 8px; cursor: pointer; margin-top: 10px; } button:hover { background: #45a049; } button:disabled { background: #ccc; cursor: not-allowed; } #result { margin-top: 20px; padding: 20px; background: white; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); } .error-category { color: #e74c3c; font-weight: bold; } .summary { margin: 15px 0; } .causes ul { margin-left: 20px; } .references { margin-top: 15px; font-size: 14px; color: #666; } .loading { color: #666; font-style: italic; } </style></head><body> <div class="container"> <h1>🔧 Jenkins Error Explainer</h1> <p class="description">AI-powered Jenkins pipeline error diagnosis</p> <textarea id="logInput" placeholder="Paste your Jenkins error log here..."></textarea> <br> <button onclick="explainError()" id="submitBtn">Explain Error</button> <div id="result"></div> </div>
<script> function explainError() { const logText = document.getElementById('logInput').value; const resultDiv = document.getElementById('result'); const btn = document.getElementById('submitBtn'); if (!logText.trim()) { resultDiv.innerHTML = '<p class="loading">Please provide a Jenkins error log.</p>'; return; } btn.disabled = true; btn.textContent = 'Analyzing...'; const category = detectError(logText); const explanations = getExplanation(category); resultDiv.innerHTML = ` <p class="error-category">Error Category: ${category}</p> <p class="summary"><strong>Summary:</strong> ${explanations.summary}</p> <div class="causes"> <strong>Likely Causes:</strong> <ul>${explanations.causes.map(c => `<li>${c}</li>`).join('')}</ul> </div> `; btn.disabled = false; btn.textContent = 'Explain Error'; } function detectError(log) { const lower = log.toLowerCase(); if (lower.includes('groovy') || lower.includes('syntax') || lower.includes("expecting '}'")) return 'groovy_syntax_error'; if (lower.includes('agent') && lower.includes('none')) return 'missing_agent'; if (lower.includes('no node') || lower.includes('no such agent')) return 'no_node_available'; if (lower.includes('no such DSL') || lower.includes('undefined method')) return 'missing_plugin'; if (lower.includes('credentials') || lower.includes('not found')) return 'missing_credentials'; if (lower.includes('file not found') || lower.includes('no such file')) return 'file_not_found'; if (lower.includes('authentication') || lower.includes('git')) return 'git_authentication_error'; return 'unknown'; } function getExplanation(category) { const explanations = { groovy_syntax_error: { summary: 'The pipeline failed due to a Groovy syntax error, most likely caused by an invalid or incomplete Jenkinsfile.', causes: ['Missing or mismatched braces in the Jenkinsfile', 'Invalid declarative pipeline structure'] }, missing_agent: { summary: 'The pipeline attempted to execute a step that requires a node, but no agent was allocated.', causes: ["Using 'agent none' without defining a stage-level agent", "Executing node-dependent steps without a workspace"] }, no_node_available: { summary: 'The pipeline could not be scheduled because no Jenkins node matched the requested label.', causes: ['The specified node label does not exist', 'All matching nodes are offline or busy'] }, missing_plugin: { summary: 'The pipeline referenced a step that is not available, indicating a missing or uninstalled plugin.', causes: ['Required plugin is not installed', 'Incorrect step name in the Jenkinsfile'] }, missing_credentials: { summary: 'The pipeline referenced credentials that do not exist in Jenkins.', causes: ['Credentials ID is incorrect or misspelled', 'Credentials were not configured in Jenkins'] }, file_not_found: { summary: 'The pipeline attempted to access a file that does not exist in the workspace.', causes: ['File path is incorrect', 'File was not generated or checked out'] }, git_authentication_error: { summary: 'Jenkins failed to authenticate with the Git repository during checkout.', causes: ['Invalid or missing Git credentials', 'Repository requires token-based authentication'] }, unknown: { summary: 'The error could not be confidently identified. Please check the error message for more details.', causes: ['Review the full error log', 'Check Jenkins system logs'] } }; return explanations[category] || explanations.unknown; } </script></body></html>3 unmodified lines45673 unmodified linesfaiss-cpunumpypydanticgradio==4.44.13 unmodified lines45673 unmodified linesfaiss-cpunumpypydanticgradio
README.md+1-2
index.htmlAdded+118
requirements.txt+1-1