Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7dc4836c71 | ||
|
|
efc3812e12 |
@@ -691,7 +691,8 @@ export default function DashboardPage() {
|
||||
}
|
||||
}
|
||||
|
||||
const loadingBlock = probesLoading && liveProbes === null
|
||||
const liveDataPending = liveServersResolved === null || liveProbes === null
|
||||
const loadingBlock = liveDataPending || (probesLoading && liveProbes === null)
|
||||
const srvList = liveServersResolved ?? []
|
||||
const totalSrv = srvList.length
|
||||
const onlineSrv = srvList.filter((s) => s.status === "online").length
|
||||
|
||||
@@ -321,7 +321,7 @@ wait_for_health() {
|
||||
while (( SECONDS < deadline )); do
|
||||
if [[ "$health_type" == "http" ]]; then
|
||||
local status
|
||||
status="$(curl --silent --output /dev/null --write-out '%{http_code}' --max-time 5 "$health_url" || true)"
|
||||
status="$(curl --silent --location --output /dev/null --write-out '%{http_code}' --max-time 5 "$health_url" || true)"
|
||||
last_status="$status"
|
||||
if [[ "$status" == "$expect_status" ]]; then
|
||||
log info "target=${target_id} action=health_ok status=${status}"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"image": "git.shts.su/denozord/mikrotikmanager-frontend:latest",
|
||||
"health": {
|
||||
"type": "http",
|
||||
"url": "http://frontend:3000/",
|
||||
"url": "http://frontend:3000/dashboard",
|
||||
"expect_status": 200
|
||||
}
|
||||
}
|
||||
|
||||
+3
-7
@@ -59,13 +59,9 @@ function normalizeBackendUrl(url: string): string {
|
||||
}
|
||||
|
||||
export function DataSourceProvider({ children }: { children: React.ReactNode }) {
|
||||
const [mode, setModeState] = useState<DataSourceMode>(() =>
|
||||
typeof window === "undefined" ? defaultDataSourceMode() : readStoredMode(),
|
||||
)
|
||||
const [backendUrl, setBackendUrlState] = useState(() =>
|
||||
typeof window === "undefined" ? LOCAL_DEFAULT_BACKEND_URL : readStoredBackendUrl(),
|
||||
)
|
||||
const [prefsHydrated, setPrefsHydrated] = useState(() => typeof window !== "undefined")
|
||||
const [mode, setModeState] = useState<DataSourceMode>(defaultDataSourceMode)
|
||||
const [backendUrl, setBackendUrlState] = useState(LOCAL_DEFAULT_BACKEND_URL)
|
||||
const [prefsHydrated, setPrefsHydrated] = useState(false)
|
||||
const [backendStatus, setBackendStatus] = useState<boolean | undefined>(undefined)
|
||||
const backendUrlLocked = isBackendUrlLocked()
|
||||
const mockModeAvailable = isMockDataSourceAvailable()
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user