Spaces:
Sleeping
Sleeping
| {% extends "base.html" %} | |
| {% block title %}Batch Results - {{ settings.app_name }}{% endblock %} | |
| {% block content %} | |
| <div class="max-w-7xl mx-auto py-8 px-4 sm:px-6 lg:px-8"> | |
| <!-- Header --> | |
| <div class="mb-6"> | |
| <nav class="flex" aria-label="Breadcrumb"> | |
| <ol class="flex items-center space-x-2"> | |
| <li> | |
| <a href="/" class="text-gray-400 hover:text-gray-500"> | |
| <svg class="h-5 w-5" fill="currentColor" viewBox="0 0 20 20"> | |
| <path d="M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z" /> | |
| </svg> | |
| </a> | |
| </li> | |
| <li> | |
| <svg class="h-5 w-5 text-gray-300" fill="currentColor" viewBox="0 0 20 20"> | |
| <path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" /> | |
| </svg> | |
| </li> | |
| <li> | |
| <a href="/history" class="text-sm font-medium text-gray-500 hover:text-gray-700">History</a> | |
| </li> | |
| <li> | |
| <svg class="h-5 w-5 text-gray-300" fill="currentColor" viewBox="0 0 20 20"> | |
| <path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" /> | |
| </svg> | |
| </li> | |
| <li> | |
| <span class="text-sm font-medium text-gray-500">Batch Results</span> | |
| </li> | |
| </ol> | |
| </nav> | |
| <h1 class="mt-2 text-2xl font-bold text-gray-900" id="job-title">Batch Results</h1> | |
| <p class="text-sm text-gray-500">Job ID: <code class="bg-gray-100 px-2 py-1 rounded text-xs">{{ job_id }}</code></p> | |
| </div> | |
| <!-- Loading State --> | |
| <div id="loading-state" class="text-center py-12"> | |
| <svg class="animate-spin h-10 w-10 text-primary-600 mx-auto" fill="none" viewBox="0 0 24 24"> | |
| <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle> | |
| <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path> | |
| </svg> | |
| <p class="mt-4 text-gray-500" id="loading-text">Loading results...</p> | |
| </div> | |
| <!-- Results Container (hidden initially) --> | |
| <div id="results-container" class="hidden space-y-6"> | |
| <!-- Search and Export --> | |
| <div class="flex flex-wrap gap-4 items-center justify-between"> | |
| <div class="flex-1 min-w-[200px] max-w-md"> | |
| <input type="text" id="search-results" | |
| class="block w-full rounded-md border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 text-sm" | |
| placeholder="Search by name or sequence..."> | |
| </div> | |
| <div class="flex gap-2"> | |
| <a id="export-csv" href="#" class="inline-flex items-center px-3 py-1.5 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"> | |
| <svg class="mr-1.5 h-4 w-4 text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | |
| <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" /> | |
| </svg> | |
| CSV | |
| </a> | |
| <button onclick="copyLink()" class="inline-flex items-center px-3 py-1.5 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"> | |
| <svg class="mr-1.5 h-4 w-4 text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | |
| <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3" /> | |
| </svg> | |
| Copy Link | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Results Table --> | |
| <div class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden"> | |
| <table class="min-w-full divide-y divide-gray-200"> | |
| <thead class="bg-gray-50"> | |
| <tr> | |
| <th scope="col" class="w-10 px-4 py-3"></th> | |
| <th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Name</th> | |
| <th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Sequence</th> | |
| <th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">PSI</th> | |
| <th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th> | |
| </tr> | |
| </thead> | |
| <tbody id="results-table-body" class="bg-white divide-y divide-gray-200"> | |
| <!-- Populated by JavaScript --> | |
| </tbody> | |
| </table> | |
| </div> | |
| <!-- Pagination --> | |
| <div id="pagination" class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-sm text-gray-700"> | |
| Showing <span id="page-start">1</span> to <span id="page-end">25</span> of <span id="total-results">0</span> results | |
| </p> | |
| </div> | |
| <div> | |
| <nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination" id="page-buttons"> | |
| <!-- Populated by JavaScript --> | |
| </nav> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Error State --> | |
| <div id="error-state" class="hidden"> | |
| <div class="rounded-lg bg-red-50 border border-red-200 p-6 text-center"> | |
| <svg class="h-12 w-12 text-red-400 mx-auto" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | |
| <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> | |
| </svg> | |
| <h3 class="mt-4 text-lg font-medium text-red-800">Error Loading Results</h3> | |
| <p id="error-message" class="mt-2 text-red-700"></p> | |
| <a href="/" class="mt-4 inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md text-red-700 bg-red-100 hover:bg-red-200"> | |
| Try Again | |
| </a> | |
| </div> | |
| </div> | |
| </div> | |
| {% endblock %} | |
| {% block scripts %} | |
| <script> | |
| </script> | |
| <script src="/static/js/batch-result.js?v=3"></script> | |
| {% endblock %} | |