Fix layout show
to not show changes when there are no changes #297
1 changed files with 2 additions and 2 deletions
|
@ -335,14 +335,14 @@ pub fn print_staging_role_changes(layout: &ClusterLayout) -> bool {
|
||||||
.staging
|
.staging
|
||||||
.items()
|
.items()
|
||||||
.iter()
|
.iter()
|
||||||
.any(|(k, _, v)| layout.roles.get(&k) != Some(v));
|
.any(|(k, _, v)| layout.roles.get(k) != Some(v));
|
||||||
|
|
||||||
if has_changes {
|
if has_changes {
|
||||||
println!();
|
println!();
|
||||||
println!("==== STAGED ROLE CHANGES ====");
|
println!("==== STAGED ROLE CHANGES ====");
|
||||||
let mut table = vec!["ID\tTags\tZone\tCapacity".to_string()];
|
let mut table = vec!["ID\tTags\tZone\tCapacity".to_string()];
|
||||||
for (id, _, role) in layout.staging.items().iter() {
|
for (id, _, role) in layout.staging.items().iter() {
|
||||||
if layout.roles.get(&id) == Some(role) {
|
if layout.roles.get(id) == Some(role) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if let Some(role) = &role.0 {
|
if let Some(role) = &role.0 {
|
||||||
|
|
Loading…
Reference in a new issue