Alingment
This commit is contained in:
parent
2819df185e
commit
3a87c7a011
9 changed files with 325 additions and 78 deletions
|
|
@ -1,6 +1,7 @@
|
|||
use crate::api::{UptimeKumaClient, UptimeKumaEndpoints};
|
||||
use crate::core;
|
||||
use crate::i18n::{t, t_with_args};
|
||||
use crate::ui::components::render_footer;
|
||||
use crate::ui::{
|
||||
components::{render_header, render_monitor_list},
|
||||
dashboard::model::DashboardViewState,
|
||||
|
|
@ -110,7 +111,11 @@ impl App {
|
|||
let chunks = Layout::default()
|
||||
.direction(Direction::Vertical)
|
||||
.margin(1)
|
||||
.constraints([Constraint::Length(3), Constraint::Min(1)])
|
||||
.constraints([
|
||||
Constraint::Length(3),
|
||||
Constraint::Min(1),
|
||||
Constraint::Length(1),
|
||||
])
|
||||
.split(area);
|
||||
|
||||
render_header(frame, chunks[0], &self.state);
|
||||
|
|
@ -119,11 +124,12 @@ impl App {
|
|||
Self::render_loading(frame, chunks[1]);
|
||||
} else if let Some(error) = &self.state.error_message {
|
||||
Self::render_error(frame, chunks[1], error);
|
||||
} else if self.state.monitors.is_empty() {
|
||||
} else if self.state.groups.is_empty() || self.state.get_all_monitors().is_empty() {
|
||||
Self::render_no_data(frame, chunks[1]);
|
||||
} else {
|
||||
render_monitor_list(frame, chunks[1], &self.state);
|
||||
}
|
||||
render_footer(frame, chunks[2]);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue