initial commit

This commit is contained in:
2026-01-18 22:01:50 +01:00
parent ab25613358
commit c40874d7f0
20 changed files with 6287 additions and 11 deletions

1078
static/script.js Normal file

File diff suppressed because it is too large Load Diff

750
static/style.css Normal file
View File

@@ -0,0 +1,750 @@
/* Ollama Utils Web Interface - Clean & Simple CSS */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--bg-primary: #1e1e1e;
--bg-secondary: #2d2d2d;
--bg-tertiary: #3d3d3d;
--text-primary: #e0e0e0;
--text-secondary: #b0b0b0;
--accent-primary: #4a9eff;
--accent-hover: #6eb3ff;
--success: #4caf50;
--warning: #ff9800;
--danger: #f44336;
--border: #404040;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
background-color: var(--bg-primary);
color: var(--text-primary);
line-height: 1.6;
}
.container {
display: flex;
height: 100vh;
overflow: hidden;
}
/* Sidebar */
.sidebar {
width: 300px;
background-color: var(--bg-secondary);
padding: 20px;
overflow-y: auto;
border-right: 1px solid var(--border);
}
.sidebar h1 {
font-size: 24px;
margin-bottom: 20px;
color: var(--accent-primary);
}
.sidebar h2 {
font-size: 16px;
margin: 20px 0 10px 0;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.5px;
}
.stats-section {
margin-bottom: 30px;
}
.stat-group {
margin-bottom: 15px;
}
.stat-label {
font-size: 12px;
color: var(--text-secondary);
margin-bottom: 4px;
}
.stat-value {
font-size: 18px;
font-weight: 600;
color: var(--text-primary);
}
.progress-bar {
width: 100%;
height: 6px;
background-color: var(--bg-tertiary);
border-radius: 3px;
margin-top: 5px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background-color: var(--accent-primary);
transition: width 0.3s ease;
}
.running-models-section {
margin-top: 20px;
}
.running-model {
background-color: var(--bg-tertiary);
padding: 10px;
margin-bottom: 8px;
border-radius: 4px;
font-size: 13px;
}
.running-model-name {
font-weight: 600;
margin-bottom: 4px;
word-break: break-all;
}
.running-model-stats {
font-size: 11px;
color: var(--text-secondary);
}
.no-models {
color: var(--text-secondary);
font-size: 13px;
font-style: italic;
}
/* Main Content */
.main-content {
flex: 1;
overflow-y: auto;
padding: 20px;
}
/* Tabs */
.tabs {
display: flex;
gap: 10px;
margin-bottom: 20px;
border-bottom: 1px solid var(--border);
}
.tab-button {
padding: 12px 24px;
background: none;
border: none;
color: var(--text-secondary);
cursor: pointer;
font-size: 14px;
font-weight: 500;
border-bottom: 2px solid transparent;
transition: all 0.2s;
}
.tab-button:hover {
color: var(--text-primary);
}
.tab-button.active {
color: var(--accent-primary);
border-bottom-color: var(--accent-primary);
}
.tab-content {
display: none;
}
.tab-content.active {
display: block;
}
.tab-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.tab-header h2 {
font-size: 22px;
}
.tab-actions {
display: flex;
gap: 10px;
}
/* Buttons */
.btn {
padding: 10px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: all 0.2s;
}
.btn-primary {
background-color: var(--accent-primary);
color: white;
}
.btn-primary:hover {
background-color: var(--accent-hover);
}
.btn-secondary {
background-color: var(--bg-tertiary);
color: var(--text-primary);
}
.btn-secondary:hover {
background-color: var(--bg-secondary);
}
.btn-danger {
background-color: var(--danger);
color: white;
}
.btn-danger:hover {
background-color: #d32f2f;
}
.btn-small {
padding: 6px 12px;
font-size: 12px;
}
.button-group {
display: flex;
gap: 10px;
align-items: center;
}
/* Installation Progress */
.install-progress {
background-color: var(--bg-primary);
border: 1px solid var(--border);
border-radius: 4px;
padding: 15px;
margin: 10px 0;
}
.install-progress-header {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 10px;
font-weight: 500;
color: var(--accent-primary);
}
.install-status-icon {
font-size: 18px;
}
.install-status-text {
font-size: 14px;
}
.install-progress-bar-container {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 10px;
}
.install-progress-bar {
flex: 1;
height: 24px;
background-color: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 4px;
overflow: hidden;
}
.install-progress-bar-fill {
height: 100%;
background: linear-gradient(90deg, var(--accent-primary), var(--accent-hover));
transition: width 0.3s ease;
display: flex;
align-items: center;
justify-content: flex-end;
}
.install-progress-percent {
font-size: 13px;
font-weight: 500;
color: var(--text-primary);
min-width: 48px;
text-align: right;
}
.install-progress-actions {
display: flex;
justify-content: flex-end;
}
/* Models List */
.models-list {
display: grid;
gap: 15px;
}
.model-card {
background-color: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 6px;
padding: 15px;
transition: border-color 0.2s;
}
.model-card:hover {
border-color: var(--accent-primary);
}
.model-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 10px;
}
.model-name {
font-size: 16px;
font-weight: 600;
color: var(--text-primary);
word-break: break-all;
}
.model-actions {
display: flex;
gap: 5px;
}
.model-info {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 10px;
margin-top: 10px;
}
.model-info-item {
font-size: 13px;
}
.model-info-label {
color: var(--text-secondary);
font-size: 11px;
margin-bottom: 2px;
}
.model-info-value {
color: var(--text-primary);
}
.model-badges {
display: flex;
gap: 5px;
margin-top: 10px;
flex-wrap: wrap;
}
.badge {
padding: 4px 8px;
border-radius: 3px;
font-size: 11px;
font-weight: 500;
}
.badge-modelfile {
background-color: var(--success);
color: white;
}
.badge-ollama {
background-color: var(--accent-primary);
color: white;
}
.badge-capability {
background-color: var(--bg-tertiary);
color: var(--text-secondary);
}
.badge-warning {
background-color: var(--warning);
color: white;
margin-left: 8px;
}
/* Model Card States */
.model-not-installed {
opacity: 0.8;
border-color: var(--warning);
}
.model-not-installed:hover {
opacity: 1;
}
/* Results Table */
.results-table {
width: 100%;
border-collapse: collapse;
margin-top: 15px;
}
.results-table th,
.results-table td {
padding: 10px;
text-align: left;
border-bottom: 1px solid var(--border);
}
.results-table th {
background-color: var(--bg-tertiary);
font-weight: 600;
font-size: 13px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.results-table td {
font-size: 14px;
}
.results-table tbody tr:hover {
background-color: rgba(74, 158, 255, 0.05);
}
.results-table code {
background-color: var(--bg-tertiary);
padding: 2px 6px;
border-radius: 3px;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
font-size: 12px;
}
/* Loading */
.loading {
text-align: center;
padding: 40px;
color: var(--text-secondary);
}
/* Performance Tools */
.performance-tools {
display: grid;
gap: 30px;
}
.tool-section {
background-color: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 6px;
padding: 20px;
}
.tool-section h3 {
font-size: 18px;
margin-bottom: 10px;
}
.tool-section p {
color: var(--text-secondary);
font-size: 14px;
margin-bottom: 15px;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-size: 13px;
font-weight: 500;
}
.form-control {
width: 100%;
padding: 10px;
background-color: var(--bg-primary);
border: 1px solid var(--border);
border-radius: 4px;
color: var(--text-primary);
font-size: 14px;
font-family: inherit;
}
.form-control:focus {
outline: none;
border-color: var(--accent-primary);
}
.form-group small {
display: block;
margin-top: 4px;
font-size: 12px;
color: var(--text-secondary);
}
.modelfile-editor {
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
font-size: 13px;
line-height: 1.5;
resize: vertical;
}
.results-box, .output-box {
margin-top: 15px;
padding: 15px;
background-color: var(--bg-primary);
border: 1px solid var(--border);
border-radius: 4px;
font-size: 13px;
max-height: 300px;
overflow-y: auto;
}
.results-box:empty, .output-box:empty {
display: none;
}
.result-item {
padding: 8px 0;
border-bottom: 1px solid var(--border);
}
.result-item:last-child {
border-bottom: none;
}
/* Modals */
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
}
.modal.active {
display: flex;
justify-content: center;
align-items: center;
}
.modal-content {
background-color: var(--bg-secondary);
border-radius: 8px;
width: 90%;
max-width: 800px;
max-height: 90vh;
display: flex;
flex-direction: column;
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
border-bottom: 1px solid var(--border);
}
.modal-header h2 {
font-size: 20px;
margin: 0;
}
.modal-close {
background: none;
border: none;
color: var(--text-secondary);
font-size: 28px;
cursor: pointer;
padding: 0;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
}
.modal-close:hover {
color: var(--text-primary);
}
.modal-body {
padding: 20px;
overflow-y: auto;
}
.modal-actions {
display: flex;
gap: 10px;
margin-top: 15px;
}
/* Install Options */
.install-options {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 15px;
margin-bottom: 20px;
}
.install-option {
background-color: var(--bg-primary);
border: 2px solid var(--border);
border-radius: 6px;
padding: 20px;
cursor: pointer;
transition: all 0.2s;
text-align: left;
}
.install-option:hover {
border-color: var(--accent-primary);
}
.install-option.active {
border-color: var(--accent-primary);
background-color: rgba(74, 158, 255, 0.1);
}
.install-option h3 {
font-size: 16px;
margin-bottom: 5px;
}
.install-option p {
font-size: 13px;
color: var(--text-secondary);
margin: 0;
}
.install-form {
display: none;
}
.install-form.active {
display: block;
}
.info-text {
background-color: rgba(74, 158, 255, 0.1);
border-left: 3px solid var(--accent-primary);
padding: 10px;
margin-bottom: 15px;
font-size: 13px;
}
.info-text a {
color: var(--accent-primary);
text-decoration: none;
}
.info-text a:hover {
text-decoration: underline;
}
.warning-text {
background-color: rgba(255, 152, 0, 0.1);
border-left: 3px solid var(--warning);
padding: 10px;
margin-bottom: 15px;
font-size: 13px;
}
.warning-text a {
color: var(--warning);
text-decoration: none;
font-weight: 500;
}
.warning-text a:hover {
text-decoration: underline;
}
.modelfile-section {
margin-top: 20px;
}
.modelfile-section h3 {
font-size: 16px;
margin-bottom: 10px;
}
/* Success/Error Messages */
.success-message {
color: var(--success);
padding: 10px;
background-color: rgba(76, 175, 80, 0.1);
border-left: 3px solid var(--success);
border-radius: 4px;
margin-top: 10px;
}
.error-message {
color: var(--danger);
padding: 10px;
background-color: rgba(244, 67, 54, 0.1);
border-left: 3px solid var(--danger);
border-radius: 4px;
margin-top: 10px;
}
/* Scrollbar */
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
background: var(--bg-tertiary);
border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--border);
}
/* Responsive */
@media (max-width: 768px) {
.container {
flex-direction: column;
}
.sidebar {
width: 100%;
border-right: none;
border-bottom: 1px solid var(--border);
}
.install-options {
grid-template-columns: 1fr;
}
.model-info {
grid-template-columns: 1fr;
}
}