Skip to content

Commit

Permalink
Revert "add shortcuts for navigation : Create / Keypairs"
Browse files Browse the repository at this point in the history
This reverts commit 78b59da.
  • Loading branch information
outscale-mal committed Sep 14, 2023
1 parent a7c65e7 commit 1d974dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 49 deletions.
36 changes: 3 additions & 33 deletions osc_tui/mainForm.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ def actionHighlighted(self, act_on_this, key_press):
elif MODE == 'Nets':
if act_on_this == 'Create new':
self.form.parentApp.addForm(
"CREATE_VPCS",
createVpcs.CreateVpcs,
"CREATE_VPCs",
createVpcs.createVpcs,
name="osc-tui")
self.form.parentApp.switchForm("CREATE_VPCS")
self.form.parentApp.switchForm("CREATE_VPCs")
return
elif MODE == 'Images':
if act_on_this == 'Filter':
Expand Down Expand Up @@ -331,36 +331,6 @@ def build_line(size):
rely=2,
)

def create_new(self, _):
global MODE
if MODE == "Vms":
self.parentApp.addForm("CREATE_VM", createVm.CreateVm, name="osc-tui")
self.parentApp.switchForm("CREATE_VM")
elif MODE == "Security":
popup.newSecurityGroup(self)
elif MODE == "Volumes":
self.parentApp.addForm("CREATE_VOLUME", createVolume.CreateVolume, name="osc-tui")
self.parentApp.switchForm("CREATE_VOLUME")
elif MODE == "Snapshots":
self.parentApp.addForm("CREATE_SNAPSHOT", createSnapshot.CreateSnapshot, name="osc-tui")
self.parentApp.switchForm("CREATE_SNAPSHOT")
elif MODE == "Keypairs":
self.parentApp.addForm("CREATE_KEYPAIR", createKeyPair.CreateKeyPair, name="osc-tui")
self.parentApp.switchForm("CREATE_KEYPAIR")
elif MODE == "Images":
self.parentApp.addForm("CREATE_Images", createImage.CreateImage, name="osc-tui")
self.parentApp.switchForm("CREATE_Images")
elif MODE == "LoadBalancers":
self.parentApp.addForm("CREATE_LOADBALANCER", createLoadbalancer.CreateLoadbalancer, name="osc-tui")
self.parentApp.switchForm("CREATE_LOADBALANCER")
elif MODE == "Nets":
self.parentApp.addForm("CREATE_VPCS", createVpcs.CreateVpcs, name="osc-tui")
self.parentApp.switchForm("CREATE_VPCS")
elif MODE == "NetAccessPoints":
self.parentApp.addForm("CREATE_NET-ACCESS-POINT", createNetAccessPoint.CreateNetAccessPoint, name="osc-tui")
self.parentApp.switchForm("CREATE_NET-ACCESS-POINT")


def on_screen(self):
super().on_screen()

Expand Down
17 changes: 1 addition & 16 deletions osc_tui/popup.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ def capsule():
" |/\n" +
" +\n",

" \| \n" +
r" \| \n" +
" +\n",

" \\ \n" +
Expand Down Expand Up @@ -1075,18 +1075,3 @@ def ok():

F.on_ok = ok
F.edit()

def errorPopup(message):
F = displayPopup(name = "Error")
F.preserve_selected_widget = True

ft = F.add_widget(
oscscreen.Pager,
)
ft.values = [message]

def ok():
exit()

F.on_ok = ok
F.edit()

0 comments on commit 1d974dd

Please sign in to comment.