Cox-Automotive / alks-cli

CLI for working with the ALKS service.
MIT License
40 stars 30 forks source link

[FEATURE] Make it easier to find a specific account in a list #185

Open amagana3 opened 3 years ago

amagana3 commented 3 years ago

Feature Request 🚀 When opening a session, it can be difficult to find the specific account I'm looking for in the list of available ones. That's because they are sorted by account #, not name. Also - the varying role name lengths make it difficult to read through the list of names.

Describe Your Feature Request

I'd like the list of accounts to be sorted by account name, not account # (or make that configurable). Also, if the different attributes of the row were formatted into columns, it would be easier to see the differences.

Additional Info Here's how my accounts are currently displayed:

$ alks sessions open -No idea
ALKS v3.0.8
? Please select an ALKS account/role (Use arrow keys)
❯ 055985823062/ALKSReadOnly - awscommonorgdzcp1np :: ReadOnly
  118078152803/ALKSAdmin - awsepdpops :: Admin
  137386787517/ALKSReadOnly - awscommonorgcp1 :: ReadOnly
  221508814545/ALKSAdmin - awsepdpappsnp :: Admin
  224526364523/ALKSReadOnly - awssignincell2 :: ReadOnly
  261782789091/ALKSReadOnly - awsclntmgmntcp1 :: ReadOnly
  469759795247/ALKSReadOnlyPlusApproval - awsbridgeops :: ReadOnlyPlusApproval
  507452165201/ALKSReadOnly - awssignincell3 :: ReadOnly
  550629699577/ALKSAdmin - awsbridgedzcp1np :: Admin
  551664769586/ALKSAdmin - awsepdpapps :: Admin
  585246496791/ALKSLabAdmin - awscoxautolabs11 :: LabAdmin
  635030964719/ALKSAdmin - awsclntmgmntdzcp1np :: Admin
  640543234732/ALKSAdmin - awsbridgedzcell1np :: ReadOnly
  657046243912/ALKSReadOnly - awsbridgedzcell2np :: ReadOnly
  842430935180/ALKSReadOnly - awssignincell1 :: ReadOnly
  986533904591/ALKSReadOnly - awsbridgecp1 :: ReadOnly

Here's an idea of what would make my life easier:

ALKS v3.0.8
? Please select an ALKS account/role (Use arrow keys)
❯ 986533904591/ALKSReadOnly ........... - awsbridgecp1        :: ReadOnly  
  640543234732/ALKSReadOnly ........... - awsbridgedzcell1np  :: ReadOnly
  657046243912/ALKSReadOnly ........... - awsbridgedzcell2np  :: ReadOnly
  550629699577/ALKSAdmin .............. - awsbridgedzcp1np    :: Admin
  469759795247/ALKSReadOnlyPlusApproval - awsbridgeops        :: ReadOnlyPlusApproval
  261782789091/ALKSReadOnly ........... - awsclntmgmntcp1     :: ReadOnly
  635030964719/ALKSAdmin .............. - awsclntmgmntdzcp1np :: Admin
  137386787517/ALKSReadOnly ........... - awscommonorgcp1     :: ReadOnly
  055985823062/ALKSReadOnly ........... - awscommonorgdzcp1np :: ReadOnly
  585246496791/ALKSLabAdmin ........... - awscoxautolabs11    :: LabAdmin
  551664769586/ALKSAdmin .............. - awsepdpapps         :: Admin
  221508814545/ALKSAdmin .............. - awsepdpappsnp       :: Admin
  118078152803/ALKSAdmin .............. - awsepdpops          :: Admin
  842430935180/ALKSReadOnly ........... - awssignincell1      :: ReadOnly
  224526364523/ALKSReadOnly ........... - awssignincell2      :: ReadOnly
  507452165201/ALKSReadOnly ........... - awssignincell3      :: ReadOnly

This feature request is originally from: https://ghe.coxautoinc.com/ETS-CloudAutomation/ALKS/issues/956

fisherevans commented 3 years ago

Maybe we consider merging #173 with this, and in general improve the output of this account list.