en load refiner, track server job state

This commit is contained in:
Vladimir Mandic
2023-09-29 11:01:26 -04:00
parent a2b00f34ec
commit 9cbe496d68
18 changed files with 107 additions and 39 deletions
+4
View File
@@ -1,5 +1,6 @@
let logMonitorEl = null;
let logMonitorStatus = true;
let jobStatusEl = null;
async function logMonitor() {
if (logMonitorStatus) setTimeout(logMonitor, opts.logmonitor_refresh_period);
@@ -51,6 +52,9 @@ async function initLogMonitor() {
</table>
`;
el.style.display = 'none';
jobStatusEl = document.createElement('div');
jobStatusEl.className = 'jobStatus';
gradioApp().appendChild(jobStatusEl);
fetch(`/sdapi/v1/start?agent=${encodeURI(navigator.userAgent)}`);
logMonitor();
log('initLogMonitor');