-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
15 changed files
with
276 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package aws | ||
|
||
func GetAllRegions() []string { | ||
return []string{ | ||
"us-east-1", "us-east-2", "us-west-1", "us-west-2", "af-south-1", "ap-east-1", | ||
"ap-southeast-3", "ap-south-1", "ap-northeast-3", "ap-northeast-2", | ||
"ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ca-central-1", "eu-central-1", | ||
"eu-west-1", "eu-west-2", "eu-south-1", "eu-west-3", "eu-north-1", | ||
"me-south-1", "me-central-1", "sa-east-1", "us-gov-east-1", "us-gov-west-1"} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package ui | ||
|
||
import ( | ||
"github.com/derailed/tview" | ||
"github.com/gdamore/tcell/v2" | ||
) | ||
|
||
type DropDown struct { | ||
*tview.DropDown | ||
label string | ||
options []string | ||
} | ||
|
||
func NewDropDown(label string, options []string) *DropDown { | ||
d := DropDown{ | ||
DropDown: tview.NewDropDown(), | ||
label: label, | ||
options: options, | ||
} | ||
d.build() | ||
return &d | ||
} | ||
|
||
func (d *DropDown) SetSelectedFn(selectedFn DropdownSelectedFn) { | ||
d.SetSelectedFunc(func(text string, index int) { | ||
selectedFn(text, index) | ||
}) | ||
} | ||
|
||
func (d *DropDown) build() { | ||
d.SetLabel(d.label) | ||
d.SetLabelColor(tcell.ColorOrange) | ||
d.SetOptions(d.options, func(text string, index int) {}) | ||
d.SetCurrentOption(0) | ||
d.SetBorderPadding(0, 0, 0, 0) | ||
//profileDropdown.SetBorder(true) | ||
} |
Oops, something went wrong.