feat(PingServices): add cache refresh option to fetchPingServices function and update tooltip for manual refresh
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 4m3s

This commit is contained in:
2026-02-22 21:31:07 +07:00
parent fbd740aef7
commit 800f94354b
2 changed files with 6 additions and 5 deletions
+4 -4
View File
@@ -304,9 +304,9 @@ function Dashboard() {
return () => { cancelled = true; };
}, []);
function fetchPingServices() {
function fetchPingServices(forceRefresh = false) {
setPingLoading(true);
api.get('/ping-services')
api.get('/ping-services', { params: forceRefresh ? { refresh: 1 } : {} })
.then(({ data }) => {
const next = data && typeof data === 'object' ? data : null;
setPingServices((current) => {
@@ -370,11 +370,11 @@ function Dashboard() {
{/* Пинг до сервисов (список из настроек / Пинг сервисов) */}
<div className="d-flex align-items-center justify-content-between mb-2">
<h3 className="mb-0">Пинг сервисов</h3>
<Tooltip content="Обновить замеры пинга (история и тренд накапливаются)">
<Tooltip content="Принудительно обновить пинг (без учёта кэша), история и тренд накапливаются">
<button
type="button"
className="btn btn-outline-primary btn-sm"
onClick={() => fetchPingServices()}
onClick={() => fetchPingServices(true)}
disabled={pingLoading}
>
<IconRefresh className={pingLoading ? 'spin me-1' : 'me-1'} size={16} />