v0.25.5
This commit is contained in:
1 parent
1dea7f55c8
commit
c819f0a335
151 files changed
+7610
-4264
No files matched your search
+14
-4
@@ -158,8 +158,8 @@ fn status_payload(state: &App) -> Value {
|
||||
payload["transform_resources"] = json!(&transform_resources);
|
||||
payload["geoip"] = json!(state.geoip.view());
|
||||
let system = state.diagnostics.view();
|
||||
let cache_ram_bytes = (cache_view.hot_allocated_bytes as u64)
|
||||
.saturating_add(cache_view.transient_bytes);
|
||||
let cache_ram_bytes =
|
||||
(cache_view.hot_allocated_bytes as u64).saturating_add(cache_view.transient_bytes);
|
||||
let non_cache_rss_bytes = system
|
||||
.process_rss_bytes
|
||||
.map(|rss| rss.saturating_sub(cache_ram_bytes));
|
||||
@@ -359,7 +359,12 @@ async fn config_history(
|
||||
.configuration_revision(revision)
|
||||
.await
|
||||
.map_err(auth::internal)?
|
||||
.ok_or_else(|| ApiError(StatusCode::NOT_FOUND, "configuration revision not found".into()))?;
|
||||
.ok_or_else(|| {
|
||||
ApiError(
|
||||
StatusCode::NOT_FOUND,
|
||||
"configuration revision not found".into(),
|
||||
)
|
||||
})?;
|
||||
return Ok(Json(json!({"revision": detail})));
|
||||
}
|
||||
let limit = query.limit.unwrap_or(512).clamp(1, 512);
|
||||
@@ -393,7 +398,12 @@ async fn restore_config_history(
|
||||
.configuration_revision(input.revision)
|
||||
.await
|
||||
.map_err(auth::internal)?
|
||||
.ok_or_else(|| ApiError(StatusCode::NOT_FOUND, "configuration revision not found".into()))?;
|
||||
.ok_or_else(|| {
|
||||
ApiError(
|
||||
StatusCode::NOT_FOUND,
|
||||
"configuration revision not found".into(),
|
||||
)
|
||||
})?;
|
||||
state
|
||||
.restore_as(
|
||||
Update {
|
||||
|
||||
Reference in new issue
Block a user