Skip to content

Commit

Permalink
AP Details update
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragnt committed Jan 28, 2024
1 parent 74eb7b6 commit 9b01279
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 27 deletions.
16 changes: 2 additions & 14 deletions src/devices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -806,24 +806,12 @@ impl WiFiDeviceList<AccessPoint> {
];
let mut height = 1;
if selected_row.is_some() && idx == selected_row.unwrap() {
height = 5;
for _ in 0..3 {
for col in &mut ap_row {
col.push('\n');
}
}
height = 6;
if ap.client_list.size() >= 1 {
height += 1; // Add 1 for the "Clients" text
//ap_row = add_client_header(ap_row);
for (idx, client) in ap.client_list.clone().get_devices().values().enumerate() {
for _ in ap.client_list.clone().get_devices().values() {
height += 1; // add 1 for each client
}
/*for (idx, client) in ap.client_list.clone().get_devices().values().enumerate() {
let last = idx == ap.client_list.size() - 1;
let merged = add_client_rows(ap_row, client, last);
ap_row = merged;
height += 1;
}*/
}
}
rows.push((ap_row, height));
Expand Down
11 changes: 1 addition & 10 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2452,11 +2452,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
Duration::from_millis(50)
};

/*
let mut last_interactions_clear = Instant::now();
let interactions_interval = Duration::from_secs(120);
*/

// Setup hop data
let mut last_hop_time = Instant::now();
let mut first_channel = (0u8, 0u8);
Expand Down Expand Up @@ -2590,11 +2585,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
if (band, channel) == first_channel {
hop_cycle += 1;
}
if let Err(e) = oxide
.if_hardware
.netlink
.set_interface_chan(idx, channel, band)
{
if let Err(e) = set_interface_chan(idx, channel, band) {
oxide.status_log.add_message(StatusMessage::new(
MessageType::Error,
format!("Channel Switch Error: {e:?}"),
Expand Down
6 changes: 3 additions & 3 deletions src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -703,13 +703,13 @@ fn create_ap_page(oxide: &mut OxideRuntime, frame: &mut Frame<'_>, area: Rect) {
if let Some(area) = select_area {
if let Some(ap) = selected_object {
let block_area = Rect {
x: area.x + 9,
x: area.x + 2,
y: area.y,
width: area.width - 18,
width: area.width - 4,
height: area.height,
};

let block = Block::default().borders(Borders::LEFT | Borders::BOTTOM | Borders::RIGHT);
let block = Block::default().borders(Borders::ALL).title(" Details ");
let block_inner = block.inner(block_area);
frame.render_widget(block, block_area);

Expand Down

0 comments on commit 9b01279

Please sign in to comment.