Добавлены вспомогательные служебные диалоги:
- для принудительной перезагрузки кеша задач - для показа размера очереди на перезагрузку кеша задач
This commit is contained in:
parent
b9ee0ad380
commit
81c611ab9c
1 changed files with 19 additions and 0 deletions
|
|
@ -37,11 +37,30 @@ export const KanbanBoards = observer((props: Props) => {
|
||||||
}
|
}
|
||||||
treeRefreshMenuItem = <button onClick={onTreeRefreshClick}>Force tree refresh</button>;
|
treeRefreshMenuItem = <button onClick={onTreeRefreshClick}>Force tree refresh</button>;
|
||||||
}
|
}
|
||||||
|
const onIssuesRefreshClick = (e: React.MouseEvent) => {
|
||||||
|
if (e.target !== e.currentTarget) return;
|
||||||
|
e.stopPropagation();
|
||||||
|
const rawInput = prompt("Force issues refresh (delimiters - space, comma, semicolon or tab)", "");
|
||||||
|
if (!rawInput) return;
|
||||||
|
const list = rawInput.split(" ,;\t").map(item => Number(item)).filter(item => Number.isFinite(item));
|
||||||
|
if (!list) return;
|
||||||
|
axios.post(`/redmine-event-emitter/append-issues`, list);
|
||||||
|
};
|
||||||
|
const onGetIssuesQueueSizeClick = async (e: React.MouseEvent): Promise<void> => {
|
||||||
|
if (e.target !== e.currentTarget) return;
|
||||||
|
e.stopPropagation();
|
||||||
|
const resp = await axios.get(`/redmine-event-emitter/get-issues-queue-size`);
|
||||||
|
console.debug(`resp -`, resp); // DEBUG
|
||||||
|
if (!resp || typeof resp.data !== 'number') return;
|
||||||
|
alert(`Issues queue size - ${resp.data}`);
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<TopRightMenuNs.TopRightMenu store={topRightMenuStore}>
|
<TopRightMenuNs.TopRightMenu store={topRightMenuStore}>
|
||||||
<button onClick={onAllReadClick}>Всё прочитано</button>
|
<button onClick={onAllReadClick}>Всё прочитано</button>
|
||||||
{treeRefreshMenuItem}
|
{treeRefreshMenuItem}
|
||||||
|
<button onClick={onIssuesRefreshClick}>Force issues refresh</button>
|
||||||
|
<button onClick={onGetIssuesQueueSizeClick}>Get issues queue size</button>
|
||||||
</TopRightMenuNs.TopRightMenu>
|
</TopRightMenuNs.TopRightMenu>
|
||||||
{list}
|
{list}
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue