wip: logs broken
This commit is contained in:
+1
-1
@@ -183,7 +183,6 @@ cargo_test () {
|
||||
release_flow() {
|
||||
check_git
|
||||
get_git_remote_url
|
||||
cargo fmt
|
||||
cargo_test
|
||||
cd "${CWD}" || error_close "Can't find ${CWD}"
|
||||
check_tag
|
||||
@@ -195,6 +194,7 @@ release_flow() {
|
||||
ask_changelog_update
|
||||
git checkout -b "$RELEASE_BRANCH"
|
||||
update_version_number_in_files
|
||||
cargo fmt
|
||||
git add .
|
||||
git commit -m "chore: release $NEW_TAG_WITH_V"
|
||||
|
||||
|
||||
@@ -117,15 +117,16 @@ impl State {
|
||||
_ => Color::Red,
|
||||
}
|
||||
}
|
||||
pub fn as_text(&self) -> &'static str {
|
||||
// Dirty way to create order for the state, rather than impl Ord
|
||||
pub fn order(&self) -> &'static str {
|
||||
match self {
|
||||
Self::Dead => "dead",
|
||||
Self::Exited => "exited",
|
||||
Self::Paused => "paused",
|
||||
Self::Removing => "removing",
|
||||
Self::Restarting => "restarting",
|
||||
Self::Running => "running",
|
||||
Self::Unknown => "unknown",
|
||||
Self::Running => "a",
|
||||
Self::Paused => "b",
|
||||
Self::Restarting => "c",
|
||||
Self::Removing => "d",
|
||||
Self::Exited => "e",
|
||||
Self::Dead => "f",
|
||||
Self::Unknown => "g",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-17
@@ -86,24 +86,10 @@ impl AppData {
|
||||
init: false,
|
||||
logs_parsed: false,
|
||||
show_error: false,
|
||||
sorted_by: None,
|
||||
sorted_by: Some((Header::State, SortedOrder::Asc))
|
||||
}
|
||||
}
|
||||
|
||||
// fn heading_click(&self) {
|
||||
// if let Some(data) = self
|
||||
// .heading_map
|
||||
// .iter()
|
||||
// .filter(|i| i.1.intersects(rect))
|
||||
// .collect::<Vec<_>>()
|
||||
// .get(0)
|
||||
// {
|
||||
// // self.selected_panel = *data.0;
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
// Current time as unix timestamp
|
||||
fn get_systemtime(&self) -> u64 {
|
||||
SystemTime::now()
|
||||
@@ -199,11 +185,11 @@ impl AppData {
|
||||
SortedOrder::Asc => self
|
||||
.containers
|
||||
.items
|
||||
.sort_by(|a, b| a.state.as_text().cmp(b.state.as_text())),
|
||||
.sort_by(|a, b| a.state.order().cmp(b.state.order())),
|
||||
SortedOrder::Desc => self
|
||||
.containers
|
||||
.items
|
||||
.sort_by(|a, b| b.state.as_text().cmp(a.state.as_text())),
|
||||
.sort_by(|a, b| b.state.order().cmp(a.state.order())),
|
||||
},
|
||||
Header::Status => match so {
|
||||
SortedOrder::Asc => self
|
||||
|
||||
Reference in New Issue
Block a user