mirror of https://github.com/jetkvm/kvm.git
Compare commits
5 Commits
70e4c7fa50
...
84e4b44df0
Author | SHA1 | Date |
---|---|---|
|
84e4b44df0 | |
|
a1ed28c676 | |
|
1674a6666c | |
|
772527849f | |
|
19871517ec |
4
Makefile
4
Makefile
|
@ -2,8 +2,8 @@ BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
|
||||||
BUILDDATE ?= $(shell date -u +%FT%T%z)
|
BUILDDATE ?= $(shell date -u +%FT%T%z)
|
||||||
BUILDTS ?= $(shell date -u +%s)
|
BUILDTS ?= $(shell date -u +%s)
|
||||||
REVISION ?= $(shell git rev-parse HEAD)
|
REVISION ?= $(shell git rev-parse HEAD)
|
||||||
VERSION_DEV := 0.4.4-dev$(shell date +%Y%m%d%H%M)
|
VERSION_DEV ?= 0.4.5-dev$(shell date +%Y%m%d%H%M)
|
||||||
VERSION := 0.4.3
|
VERSION ?= 0.4.4
|
||||||
|
|
||||||
PROMETHEUS_TAG := github.com/prometheus/common/version
|
PROMETHEUS_TAG := github.com/prometheus/common/version
|
||||||
KVM_PKG_NAME := github.com/jetkvm/kvm
|
KVM_PKG_NAME := github.com/jetkvm/kvm
|
||||||
|
|
|
@ -95,16 +95,27 @@ func (t *TimeSync) queryMultipleHttp(urls []string, timeout time.Duration) (now
|
||||||
} else if errors.Is(err, context.Canceled) {
|
} else if errors.Is(err, context.Canceled) {
|
||||||
metricHttpCancelCount.WithLabelValues(url).Inc()
|
metricHttpCancelCount.WithLabelValues(url).Inc()
|
||||||
metricHttpTotalCancelCount.Inc()
|
metricHttpTotalCancelCount.Inc()
|
||||||
|
results <- nil
|
||||||
} else {
|
} else {
|
||||||
scopedLogger.Warn().
|
scopedLogger.Warn().
|
||||||
Str("error", err.Error()).
|
Str("error", err.Error()).
|
||||||
Int("status", status).
|
Int("status", status).
|
||||||
Msg("failed to query HTTP server")
|
Msg("failed to query HTTP server")
|
||||||
|
results <- nil
|
||||||
}
|
}
|
||||||
}(url)
|
}(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
return <-results
|
for range urls {
|
||||||
|
result := <-results
|
||||||
|
if result == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
now = result
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func queryHttpTime(
|
func queryHttpTime(
|
||||||
|
|
|
@ -295,6 +295,10 @@ if (isOnDevice) {
|
||||||
path: "hardware",
|
path: "hardware",
|
||||||
element: <SettingsHardwareRoute />,
|
element: <SettingsHardwareRoute />,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "network",
|
||||||
|
element: <SettingsNetworkRoute />,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "access",
|
path: "access",
|
||||||
children: [
|
children: [
|
||||||
|
@ -350,10 +354,11 @@ if (isOnDevice) {
|
||||||
loader: DeviceIdRename.loader,
|
loader: DeviceIdRename.loader,
|
||||||
action: DeviceIdRename.action,
|
action: DeviceIdRename.action,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "devices",
|
path: "devices",
|
||||||
element: <DevicesRoute />,
|
element: <DevicesRoute />,
|
||||||
loader: DevicesRoute.loader },
|
loader: DevicesRoute.loader
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue