mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-12-20 01:11:03 +08:00
all: imp code
Some checks failed
build / test (macOS-latest) (push) Has been cancelled
build / test (ubuntu-latest) (push) Has been cancelled
build / test (windows-latest) (push) Has been cancelled
lint / go-lint (push) Has been cancelled
lint / eslint (push) Has been cancelled
build / build-release (push) Has been cancelled
build / notify (push) Has been cancelled
lint / notify (push) Has been cancelled
Some checks failed
build / test (macOS-latest) (push) Has been cancelled
build / test (ubuntu-latest) (push) Has been cancelled
build / test (windows-latest) (push) Has been cancelled
lint / go-lint (push) Has been cancelled
lint / eslint (push) Has been cancelled
build / build-release (push) Has been cancelled
build / notify (push) Has been cancelled
lint / notify (push) Has been cancelled
This commit is contained in:
@@ -108,7 +108,7 @@ type statusResponse struct {
|
|||||||
ProtectionDisabledDuration int64 `json:"protection_disabled_duration"`
|
ProtectionDisabledDuration int64 `json:"protection_disabled_duration"`
|
||||||
|
|
||||||
// StartTime is the start time of the web API server in Unix milliseconds.
|
// StartTime is the start time of the web API server in Unix milliseconds.
|
||||||
StartTime int64 `json:"start_time"`
|
StartTime aghhttp.JSONTime `json:"start_time"`
|
||||||
|
|
||||||
ProtectionEnabled bool `json:"protection_enabled"`
|
ProtectionEnabled bool `json:"protection_enabled"`
|
||||||
// TODO(e.burkov): Inspect if front-end doesn't requires this field as
|
// TODO(e.burkov): Inspect if front-end doesn't requires this field as
|
||||||
@@ -160,7 +160,7 @@ func (web *webAPI) handleStatus(w http.ResponseWriter, r *http.Request) {
|
|||||||
DNSPort: config.DNS.Port,
|
DNSPort: config.DNS.Port,
|
||||||
HTTPPort: config.HTTPConfig.Address.Port(),
|
HTTPPort: config.HTTPConfig.Address.Port(),
|
||||||
ProtectionDisabledDuration: protectionDisabledDuration,
|
ProtectionDisabledDuration: protectionDisabledDuration,
|
||||||
StartTime: web.startTime,
|
StartTime: aghhttp.JSONTime(web.startTime),
|
||||||
ProtectionEnabled: protEnabled,
|
ProtectionEnabled: protEnabled,
|
||||||
IsRunning: isRunning(),
|
IsRunning: isRunning(),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ type webAPI struct {
|
|||||||
httpsServer httpsServer
|
httpsServer httpsServer
|
||||||
|
|
||||||
// startTime is the start time of the web API server in Unix milliseconds.
|
// startTime is the start time of the web API server in Unix milliseconds.
|
||||||
startTime int64
|
startTime time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
// newWebAPI creates a new instance of the web UI and API server. conf must be
|
// newWebAPI creates a new instance of the web UI and API server. conf must be
|
||||||
@@ -165,7 +165,7 @@ func newWebAPI(ctx context.Context, conf *webConfig) (w *webAPI) {
|
|||||||
baseLogger: conf.baseLogger,
|
baseLogger: conf.baseLogger,
|
||||||
tlsManager: conf.tlsManager,
|
tlsManager: conf.tlsManager,
|
||||||
auth: conf.auth,
|
auth: conf.auth,
|
||||||
startTime: time.Now().UnixMilli(),
|
startTime: time.Now(),
|
||||||
}
|
}
|
||||||
|
|
||||||
clientFS := http.FileServer(http.FS(conf.clientFS))
|
clientFS := http.FileServer(http.FS(conf.clientFS))
|
||||||
|
|||||||
@@ -1501,8 +1501,8 @@
|
|||||||
'type': 'string'
|
'type': 'string'
|
||||||
'example': 'en'
|
'example': 'en'
|
||||||
'start_time':
|
'start_time':
|
||||||
'type': 'integer'
|
'type': 'number'
|
||||||
'format': 'int64'
|
'format': 'double'
|
||||||
'example': 1700000000000
|
'example': 1700000000000
|
||||||
'description': 'Start time of the web API server (Unix time in milliseconds).'
|
'description': 'Start time of the web API server (Unix time in milliseconds).'
|
||||||
'DNSConfig':
|
'DNSConfig':
|
||||||
|
|||||||
Reference in New Issue
Block a user