Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/runners/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type ActionRunner struct {
config_manager *services.ConfigManagerService
}

func NewActionRunner(client *client.IapClient) *ActionRunner {
func NewActionRunner(client client.Client) *ActionRunner {
return &ActionRunner{
config_manager: services.NewConfigManagerService(client),
}
Expand Down
28 changes: 27 additions & 1 deletion internal/runners/localclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,33 @@ func NewLocalClientRunner(client client.Client, cfg *config.Config) LocalClientR
func (r *LocalClientRunner) ShowConfig(in Request) (*Response, error) {
logger.Trace()

b, err := json.MarshalIndent(r.client.Profile(), "", " ")
profile, err := r.config.ActiveProfile()
if err != nil {
return nil, err
}

var port int

if profile.UseTLS {
port = 443
} else if !profile.UseTLS {
port = 80
} else {
port = profile.Port
}

config := map[string]interface{}{
"host": profile.Host,
"port": port,
"use_tls": profile.UseTLS,
"verify": profile.Verify,
"username": profile.Username,
"password": "********",
"client_id": profile.ClientID,
"client_secret": "********",
}

b, err := json.MarshalIndent(config, "", " ")
if err != nil {
return nil, err
}
Expand Down
Loading