Skip to content

Commit

Permalink
Move autoalloc fragments to its screen module
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol committed Oct 21, 2024
1 parent 2ca3ee2 commit 6d00a74
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 13 deletions.

This file was deleted.

1 change: 0 additions & 1 deletion crates/hyperqueue/src/dashboard/ui/fragments/mod.rs

This file was deleted.

1 change: 0 additions & 1 deletion crates/hyperqueue/src/dashboard/ui/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub mod fragments;
pub mod screen;
pub mod screens;
pub mod styles;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ use std::time::SystemTime;

use crate::dashboard::data::timelines::alloc_timeline::AllocationQueueInfo;
use crate::dashboard::data::DashboardData;
use crate::dashboard::ui::fragments::auto_allocator::alloc_timeline_chart::AllocationsChart;
use crate::dashboard::ui::fragments::auto_allocator::allocations_info_table::AllocationInfoTable;
use crate::dashboard::ui::fragments::auto_allocator::queue_info_table::AllocationQueueInfoTable;
use crate::dashboard::ui::fragments::auto_allocator::queue_params_display::QueueParamsTable;
use crate::dashboard::ui::screens::autoalloc::alloc_timeline_chart::AllocationsChart;
use crate::dashboard::ui::screens::autoalloc::allocations_info_table::AllocationInfoTable;
use crate::dashboard::ui::screens::autoalloc::queue_info_table::AllocationQueueInfoTable;
use crate::dashboard::ui::screens::autoalloc::queue_params_display::QueueParamsTable;
use crate::server::autoalloc::QueueId;
use ratatui::layout::{Constraint, Direction, Layout, Rect};

Expand Down Expand Up @@ -104,7 +104,7 @@ impl AutoAllocatorFragment {
FocusedComponent::AllocationInfoTable => self.allocations_info_table.handle_key(key),
};

match key.code{
match key.code {
KeyCode::Char('1') => {
self.component_in_focus = FocusedComponent::QueueParamsTable;
self.allocations_info_table.clear_selection();
Expand Down
8 changes: 7 additions & 1 deletion crates/hyperqueue/src/dashboard/ui/screens/autoalloc/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
use crate::dashboard::data::DashboardData;
use crate::dashboard::ui::fragments::auto_allocator::fragment::AutoAllocatorFragment;
use crate::dashboard::ui::screen::Screen;
use crate::dashboard::ui::terminal::DashboardFrame;
use crossterm::event::KeyEvent;
use fragment::AutoAllocatorFragment;
use ratatui::layout::Rect;

mod alloc_timeline_chart;
mod allocations_info_table;
mod fragment;
mod queue_info_table;
mod queue_params_display;

#[derive(Default)]
pub struct AutoAllocScreen {
auto_allocator_fragment: AutoAllocatorFragment,
Expand Down

0 comments on commit 6d00a74

Please sign in to comment.