diff --git a/osc_tui/popup.py b/osc_tui/popup.py index e0db8b7..a1b9baa 100644 --- a/osc_tui/popup.py +++ b/osc_tui/popup.py @@ -775,6 +775,7 @@ def associateRoutetable(): exit() def delete_cb(): + main.GATEWAY.DeleteSubnet(SubnetId=name) form.current_grid.h_refresh(None) exit() delete.whenPressed = delete_cb diff --git a/osc_tui/vpcsGrid.py b/osc_tui/vpcsGrid.py index a61c8be..25ecb2b 100644 --- a/osc_tui/vpcsGrid.py +++ b/osc_tui/vpcsGrid.py @@ -30,7 +30,7 @@ def refresh(self): class subnetGrid(selectableGrid.SelectableGrid): def __init__(self, screen, *args, **keywords): super().__init__(screen, *args, **keywords) - self.col_titles = ["ID", "CIDR", "NET ID"] + self.col_titles = ["ID", "CIDR", "Net ID", "State"] def on_selection(line): popup.editSubnet(self.form, line) @@ -43,9 +43,9 @@ def refresh_call(self, name_filter=None): return groups def refresh(self): - groups = main.do_search(self.data.copy(), ["SubnetId", "IpRange", "NetId"]) + groups = main.do_search(self.data.copy(), ["SubnetId", "IpRange", "NetId", "State"]) values = list() for g in groups: values.append([g['SubnetId'], - g['IpRange'], g['NetId']]) + g['IpRange'], g['NetId'], g['State']]) self.values = values