Skip to content

Commit

Permalink
Adjust order of health checks
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Sep 13, 2023
1 parent 44448a0 commit 90f2816
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crates/nix_health/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ impl<'a> IntoIterator for &'a NixHealth {
/// Return an iterator to iterate on the fields of [NixHealth]
fn into_iter(self) -> Self::IntoIter {
let items: Vec<Self::Item> = vec![
&self.min_nix_version,
&self.flake_enabled,
&self.max_jobs,
&self.caches,
&self.flake_enabled,
&self.min_nix_version,
&self.trusted_users,
];
items.into_iter()
Expand Down
7 changes: 4 additions & 3 deletions src/app/health.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,19 @@ pub fn NixHealthRoute(cx: Scope) -> impl IntoView {
fn NixHealthView(cx: Scope, health: NixHealth) -> impl IntoView {
view! { cx,
<div class="flex flex-col items-stretch justify-start space-y-8 text-left">
// NOTE: Aim to keep this order in alignment with that of the IntoIterator impl
<ViewCheck name=health.min_nix_version.name() report=health.min_nix_version.report()>
<MinNixVersionView v=&health.min_nix_version/>
</ViewCheck>
<ViewCheck name=health.flake_enabled.name() report=health.flake_enabled.report()>
<FlakeEnabledView v=&health.flake_enabled/>
</ViewCheck>
<ViewCheck name=health.max_jobs.name() report=health.max_jobs.report()>
<MaxJobsView v=&health.max_jobs/>
</ViewCheck>
<ViewCheck name=health.caches.name() report=health.caches.report()>
<CachesView v=&health.caches/>
</ViewCheck>
<ViewCheck name=health.flake_enabled.name() report=health.flake_enabled.report()>
<FlakeEnabledView v=&health.flake_enabled/>
</ViewCheck>
<ViewCheck name=health.trusted_users.name() report=health.trusted_users.report()>
<TrustedUsersView v=&health.trusted_users/>
</ViewCheck>
Expand Down

0 comments on commit 90f2816

Please sign in to comment.