remove refresh button, updates will be automatic
parent
ab9a2e717d
commit
b2118c8cae
|
|
@ -1,4 +1,17 @@
|
|||
|
||||
function confirm_restart_workers(_) {
|
||||
return confirm('Restart remote workers?')
|
||||
}
|
||||
}
|
||||
|
||||
// live updates
|
||||
function update() {
|
||||
try {
|
||||
let refresh_button = document.getElementById('distributed-refresh-status')
|
||||
refresh_button.click()
|
||||
} catch (e) {
|
||||
if (!(e instanceof TypeError)) {
|
||||
throw e
|
||||
}
|
||||
}
|
||||
}
|
||||
setInterval(update, 1500)
|
||||
|
|
@ -236,8 +236,8 @@ class UI:
|
|||
info='top-most message is newest'
|
||||
)
|
||||
|
||||
refresh_status_btn = gradio.Button(value='Refresh 🔄', size='sm')
|
||||
refresh_status_btn.click(self.status_btn, inputs=[], outputs=[jobs, status, logs])
|
||||
refresh_status_btn = gradio.Button(value='Refresh 🔄', size='sm', elem_id='distributed-refresh-status', visible=False)
|
||||
refresh_status_btn.click(self.status_btn, inputs=[], outputs=[jobs, status, logs], show_progress=False)
|
||||
|
||||
status_tab.select(fn=self.status_btn, inputs=[], outputs=[jobs, status, logs])
|
||||
components += [status, jobs, logs, refresh_status_btn]
|
||||
|
|
|
|||
Loading…
Reference in New Issue