mirror of
https://github.com/kodxana/madiator-docker-runpod.git
synced 2024-12-04 07:30:13 +01:00
Compare commits
3 commits
ae6b5014ff
...
63a67b2eb6
Author | SHA1 | Date | |
---|---|---|---|
|
63a67b2eb6 | ||
|
6a30c77e82 | ||
|
7b3a885f66 |
2 changed files with 37 additions and 31 deletions
|
@ -2403,6 +2403,7 @@
|
|||
{% for app_key, app_info in apps.items() %}
|
||||
<div class="app">
|
||||
<h2>{{ app_info.name }}</h2>
|
||||
{% if app_status[app_key]['installed'] %}
|
||||
<div class="button-group">
|
||||
<button onclick="startApp('{{ app_key }}')" id="start-{{ app_key }}" class="start-button" {% if app_status[app_key]['status'] == 'running' %}disabled{% endif %}>
|
||||
<i class="fas fa-play"></i> Start
|
||||
|
@ -2420,17 +2421,39 @@
|
|||
<i class="fas fa-times-circle"></i> Force Kill
|
||||
</button>
|
||||
</div>
|
||||
{% if app_key == 'bcomfy' and app_status[app_key]['installed'] %}
|
||||
{% if app_key == 'bcomfy' %}
|
||||
<button onclick="fixCustomNodes('{{ app_key }}')" id="fix-custom-nodes-{{ app_key }}" class="fix-custom-nodes-button">
|
||||
<i class="fas fa-wrench"></i> Fix Custom Nodes
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if not app_status[app_key]['installed'] %}
|
||||
<button onclick="installApp('{{ app_key }}')" id="install-{{ app_key }}" class="install-button">
|
||||
<i class="fas fa-download"></i> Install
|
||||
</button>
|
||||
{% endif %}
|
||||
<div class="status">Status: {{ app_status[app_key]['status'] }}</div>
|
||||
{% else %}
|
||||
<div class="install-container">
|
||||
<button onclick="installApp('{{ app_key }}')" id="install-{{ app_key }}" class="install-button">
|
||||
<i class="fas fa-download"></i> Install
|
||||
</button>
|
||||
<div id="install-progress-{{ app_key }}" class="install-progress" style="display: none;">
|
||||
<div class="progress-container">
|
||||
<div class="progress-label">Download Progress:</div>
|
||||
<div class="progress-bar">
|
||||
<div class="progress-bar-fill download-progress" style="width: 0%">0%</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-container">
|
||||
<div class="progress-label">Unpack Progress:</div>
|
||||
<div class="progress-bar">
|
||||
<div class="progress-bar-fill unpack-progress" style="width: 0%">0%</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="download-info">
|
||||
<span class="download-speed"></span>
|
||||
<span class="download-eta"></span>
|
||||
</div>
|
||||
<div class="install-stage"></div>
|
||||
</div>
|
||||
<div id="install-logs-{{ app_key }}" class="install-logs" style="display: none;"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@ -3475,7 +3498,7 @@
|
|||
//loadHFToken(); // lutzapps - added HF_TOKEN Support
|
||||
} else if (tabName === 'settings-tab') {
|
||||
loadSshDetails();
|
||||
updateFileBrowserStatus();
|
||||
// Remove updateFileBrowserStatus() from here
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3581,43 +3604,26 @@
|
|||
const response = await fetch(`/${action}_filebrowser`);
|
||||
const result = await response.json();
|
||||
if (result.status === 'started' || result.status === 'stopped') {
|
||||
updateFileBrowserStatus();
|
||||
// Remove updateFileBrowserStatus() from here
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error controlling File Browser:', error);
|
||||
}
|
||||
}
|
||||
|
||||
function updateFileBrowserStatus() {
|
||||
fetch('/filebrowser_status')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
const statusElement = document.getElementById('filebrowser-status');
|
||||
if (statusElement) {
|
||||
statusElement.textContent = data.status;
|
||||
}
|
||||
const startButton = document.getElementById('start-filebrowser');
|
||||
const stopButton = document.getElementById('stop-filebrowser');
|
||||
if (startButton && stopButton) {
|
||||
startButton.disabled = (data.status === 'running');
|
||||
stopButton.disabled = (data.status === 'stopped');
|
||||
}
|
||||
})
|
||||
.catch(error => console.error('Error updating File Browser status:', error));
|
||||
}
|
||||
|
||||
// Reduce the frequency of status updates
|
||||
setInterval(updateFileBrowserStatus, 30000); // Check every 30 seconds instead of 5 seconds
|
||||
// Remove this interval
|
||||
// setInterval(updateFileBrowserStatus, 30000); // Check every 30 seconds instead of 5 seconds
|
||||
|
||||
// Update the DOMContentLoaded event listener
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
updateFileBrowserStatus();
|
||||
loadSshDetails();
|
||||
// ... (other initialization code)
|
||||
});
|
||||
// Call this function when the Settings tab is opened
|
||||
// Update the Settings tab click handler
|
||||
document.querySelector('.navbar-tabs a[onclick="openTab(event, \'settings-tab\')"]').addEventListener('click', function() {
|
||||
loadSshDetails();
|
||||
updateFileBrowserStatus();
|
||||
// Remove updateFileBrowserStatus() from here
|
||||
});
|
||||
|
||||
async function installApp(appKey) {
|
||||
|
|
|
@ -34,7 +34,7 @@ app_configs = {
|
|||
'repo_url': 'https://github.com/comfyanonymous/ComfyUI.git',
|
||||
'branch_name': '', # empty branch_name means default = 'master'
|
||||
'commit': '', # or commit hash (NYI)
|
||||
'recursive': False,
|
||||
'clone_recursive': False,
|
||||
'refresh': False,
|
||||
'custom_nodes': [ # following custom_nodes will be git cloned and installed with "pip install -r requirements.txt" (in Testing)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue