fix: #124 enqueue button sometime not working

fix/new_gradio
Tung Nguyen 2023-09-11 21:21:29 +07:00
parent 310bb4eace
commit 097fe4e5c9
3 changed files with 6 additions and 4 deletions

View File

@ -76,7 +76,7 @@ git clone "https://github.com/ArtVentureX/sd-webui-agent-scheduler.git" extensio
8**Bookmark** task to easier filtering. 8**Bookmark** task to easier filtering.
9⃣ Double click the task id to **rename**. Click ↩️ to **Requeue** old task. 9⃣ Double click the task id to **rename** and quickly update basic parameters. Click ↩️ to **Requeue** old task.
🔟 Click on each task to **view** the generation results. 🔟 Click on each task to **view** the generation results.

File diff suppressed because one or more lines are too long

View File

@ -69,8 +69,6 @@ const historyStore = createHistoryTasksStore({
// load samplers and checkpoints // load samplers and checkpoints
const samplers: string[] = []; const samplers: string[] = [];
const checkpoints: string[] = ['System']; const checkpoints: string[] = ['System'];
sharedStore.getSamplers().then(res => samplers.push(...res));
sharedStore.getCheckpoints().then(res => checkpoints.push(...res));
const sharedGridOptions: GridOptions<Task> = { const sharedGridOptions: GridOptions<Task> = {
// default col def properties get applied to all columns // default col def properties get applied to all columns
@ -552,6 +550,10 @@ function initTabChangeHandler() {
function initPendingTab() { function initPendingTab() {
const store = pendingStore; const store = pendingStore;
// load data for edit
sharedStore.getSamplers().then(res => samplers.push(...res));
sharedStore.getCheckpoints().then(res => checkpoints.push(...res));
// init actions // init actions
const refreshButton = gradioApp().querySelector<HTMLButtonElement>('#agent_scheduler_action_reload')!; const refreshButton = gradioApp().querySelector<HTMLButtonElement>('#agent_scheduler_action_reload')!;
refreshButton.addEventListener('click', () => store.refresh()); refreshButton.addEventListener('click', () => store.refresh());