Changed server widget status texzt

This commit is contained in:
Ultradesu
2026-06-29 21:13:50 +03:00
parent 266b493966
commit c3db347da6
3 changed files with 12 additions and 8 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ translations! {
configs_config_hash: "Config hash" , "Хэш конфига";
configs_status_applied: "applied" , "применён";
configs_status_starting: "starting" , "стартует";
configs_status_pending_restart: "pending restart" , "ждёт рестарт";
configs_status_pending_apply: "pending apply" , "ждёт применения";
configs_status_error: "reload error" , "ошибка reload";
configs_status_unknown: "unknown" , "неизвестно";
configs_never: "n/a" , "н/д";
+3 -3
View File
@@ -820,10 +820,10 @@ fn rollout_status(
let effective_applied_at_ms = started_at_ms.into_iter().chain(config_applied_at_ms).max();
match (config_updated_at_ms, effective_applied_at_ms) {
(None, _) => "unknown".to_owned(),
(Some(_), None) => "pending_restart".to_owned(),
(Some(_), None) => "pending_apply".to_owned(),
(Some(updated), Some(started)) if started >= updated && ready => "applied".to_owned(),
(Some(updated), Some(started)) if started >= updated => "starting".to_owned(),
(Some(_), Some(_)) => "pending_restart".to_owned(),
(Some(_), Some(_)) => "pending_apply".to_owned(),
}
}
@@ -1088,7 +1088,7 @@ mod tests {
);
assert_eq!(
rollout_status(Some(2_000), Some(1_000), None, None, true),
"pending_restart"
"pending_apply"
);
}