Added spinner when loading command prompts (#420)

## Changes
Added spinner when loading command prompts

## Tests
```
andrew.nester@HFW9Y94129 multiples-tasks % cli jobs get-run
⡿ No RUN_ID argument specified. Loading names for Jobs drop-down.```
This commit is contained in:
Andrew Nester 2023-06-02 14:13:18 +02:00 committed by GitHub
parent a6c9533c1c
commit f8255f356b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
39 changed files with 405 additions and 2 deletions

View File

@ -96,7 +96,10 @@ var {{.CamelName}}Cmd = &cobra.Command{
} else { } else {
{{- if $hasIdPrompt}} {{- if $hasIdPrompt}}
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No{{range .Request.RequiredFields}} {{.ConstantName}}{{end}} argument specified. Loading names for {{.Service.TitleName}} drop-down."
names, err := {{if .Service.IsAccounts}}a{{else}}w{{end}}.{{(.Service.TrimPrefix "account").PascalName}}.{{.Service.List.NamedIdMap.PascalName}}(ctx{{if .Service.List.Request}}, {{.Service.Package.Name}}.{{.Service.List.Request.PascalName}}{}{{end}}) names, err := {{if .Service.IsAccounts}}a{{else}}w{{end}}.{{(.Service.TrimPrefix "account").PascalName}}.{{.Service.List.NamedIdMap.PascalName}}(ctx{{if .Service.List.Request}}, {{.Service.Package.Name}}.{{.Service.List.Request.PascalName}}{}{{end}})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -94,7 +94,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No BUDGET_ID argument specified. Loading names for Budgets drop-down."
names, err := a.Budgets.BudgetWithStatusNameToBudgetIdMap(ctx) names, err := a.Budgets.BudgetWithStatusNameToBudgetIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -150,7 +153,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No BUDGET_ID argument specified. Loading names for Budgets drop-down."
names, err := a.Budgets.BudgetWithStatusNameToBudgetIdMap(ctx) names, err := a.Budgets.BudgetWithStatusNameToBudgetIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -113,7 +113,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No CREDENTIALS_ID argument specified. Loading names for Credentials drop-down."
names, err := a.Credentials.CredentialCredentialsNameToCredentialsIdMap(ctx) names, err := a.Credentials.CredentialCredentialsNameToCredentialsIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -169,7 +172,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No CREDENTIALS_ID argument specified. Loading names for Credentials drop-down."
names, err := a.Credentials.CredentialCredentialsNameToCredentialsIdMap(ctx) names, err := a.Credentials.CredentialCredentialsNameToCredentialsIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -111,7 +111,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Account Groups drop-down."
names, err := a.Groups.GroupDisplayNameToIdMap(ctx, iam.ListAccountGroupsRequest{}) names, err := a.Groups.GroupDisplayNameToIdMap(ctx, iam.ListAccountGroupsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -166,7 +169,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Account Groups drop-down."
names, err := a.Groups.GroupDisplayNameToIdMap(ctx, iam.ListAccountGroupsRequest{}) names, err := a.Groups.GroupDisplayNameToIdMap(ctx, iam.ListAccountGroupsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -278,7 +284,10 @@ var patchCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Account Groups drop-down."
names, err := a.Groups.GroupDisplayNameToIdMap(ctx, iam.ListAccountGroupsRequest{}) names, err := a.Groups.GroupDisplayNameToIdMap(ctx, iam.ListAccountGroupsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -341,7 +350,10 @@ var updateCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Account Groups drop-down."
names, err := a.Groups.GroupDisplayNameToIdMap(ctx, iam.ListAccountGroupsRequest{}) names, err := a.Groups.GroupDisplayNameToIdMap(ctx, iam.ListAccountGroupsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -132,7 +132,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No IP_ACCESS_LIST_ID argument specified. Loading names for Account Ip Access Lists drop-down."
names, err := a.IpAccessLists.IpAccessListInfoLabelToListIdMap(ctx) names, err := a.IpAccessLists.IpAccessListInfoLabelToListIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -187,7 +190,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No IP_ACCESS_LIST_ID argument specified. Loading names for Account Ip Access Lists drop-down."
names, err := a.IpAccessLists.IpAccessListInfoLabelToListIdMap(ctx) names, err := a.IpAccessLists.IpAccessListInfoLabelToListIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -183,7 +183,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No LOG_DELIVERY_CONFIGURATION_ID argument specified. Loading names for Log Delivery drop-down."
names, err := a.LogDelivery.LogDeliveryConfigurationConfigNameToConfigIdMap(ctx, billing.ListLogDeliveryRequest{}) names, err := a.LogDelivery.LogDeliveryConfigurationConfigNameToConfigIdMap(ctx, billing.ListLogDeliveryRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -58,7 +58,10 @@ var createCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No NETWORK_NAME argument specified. Loading names for Networks drop-down."
names, err := a.Networks.NetworkNetworkNameToNetworkIdMap(ctx) names, err := a.Networks.NetworkNetworkNameToNetworkIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -118,7 +121,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No NETWORK_ID argument specified. Loading names for Networks drop-down."
names, err := a.Networks.NetworkNetworkNameToNetworkIdMap(ctx) names, err := a.Networks.NetworkNetworkNameToNetworkIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -174,7 +180,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No NETWORK_ID argument specified. Loading names for Networks drop-down."
names, err := a.Networks.NetworkNetworkNameToNetworkIdMap(ctx) names, err := a.Networks.NetworkNetworkNameToNetworkIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -123,7 +123,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No PRIVATE_ACCESS_SETTINGS_ID argument specified. Loading names for Private Access drop-down."
names, err := a.PrivateAccess.PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap(ctx) names, err := a.PrivateAccess.PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -185,7 +188,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No PRIVATE_ACCESS_SETTINGS_ID argument specified. Loading names for Private Access drop-down."
names, err := a.PrivateAccess.PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap(ctx) names, err := a.PrivateAccess.PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -110,7 +110,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Account Service Principals drop-down."
names, err := a.ServicePrincipals.ServicePrincipalDisplayNameToIdMap(ctx, iam.ListAccountServicePrincipalsRequest{}) names, err := a.ServicePrincipals.ServicePrincipalDisplayNameToIdMap(ctx, iam.ListAccountServicePrincipalsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -166,7 +169,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Account Service Principals drop-down."
names, err := a.ServicePrincipals.ServicePrincipalDisplayNameToIdMap(ctx, iam.ListAccountServicePrincipalsRequest{}) names, err := a.ServicePrincipals.ServicePrincipalDisplayNameToIdMap(ctx, iam.ListAccountServicePrincipalsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -279,7 +285,10 @@ var patchCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Account Service Principals drop-down."
names, err := a.ServicePrincipals.ServicePrincipalDisplayNameToIdMap(ctx, iam.ListAccountServicePrincipalsRequest{}) names, err := a.ServicePrincipals.ServicePrincipalDisplayNameToIdMap(ctx, iam.ListAccountServicePrincipalsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -345,7 +354,10 @@ var updateCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Account Service Principals drop-down."
names, err := a.ServicePrincipals.ServicePrincipalDisplayNameToIdMap(ctx, iam.ListAccountServicePrincipalsRequest{}) names, err := a.ServicePrincipals.ServicePrincipalDisplayNameToIdMap(ctx, iam.ListAccountServicePrincipalsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -109,7 +109,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No STORAGE_CONFIGURATION_ID argument specified. Loading names for Storage drop-down."
names, err := a.Storage.StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap(ctx) names, err := a.Storage.StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -164,7 +167,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No STORAGE_CONFIGURATION_ID argument specified. Loading names for Storage drop-down."
names, err := a.Storage.StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap(ctx) names, err := a.Storage.StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -119,7 +119,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Account Users drop-down."
names, err := a.Users.UserUserNameToIdMap(ctx, iam.ListAccountUsersRequest{}) names, err := a.Users.UserUserNameToIdMap(ctx, iam.ListAccountUsersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -174,7 +177,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Account Users drop-down."
names, err := a.Users.UserUserNameToIdMap(ctx, iam.ListAccountUsersRequest{}) names, err := a.Users.UserUserNameToIdMap(ctx, iam.ListAccountUsersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -287,7 +293,10 @@ var patchCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Account Users drop-down."
names, err := a.Users.UserUserNameToIdMap(ctx, iam.ListAccountUsersRequest{}) names, err := a.Users.UserUserNameToIdMap(ctx, iam.ListAccountUsersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -353,7 +362,10 @@ var updateCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Account Users drop-down."
names, err := a.Users.UserUserNameToIdMap(ctx, iam.ListAccountUsersRequest{}) names, err := a.Users.UserUserNameToIdMap(ctx, iam.ListAccountUsersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -65,7 +65,10 @@ var createCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No VPC_ENDPOINT_NAME argument specified. Loading names for Vpc Endpoints drop-down."
names, err := a.VpcEndpoints.VpcEndpointVpcEndpointNameToVpcEndpointIdMap(ctx) names, err := a.VpcEndpoints.VpcEndpointVpcEndpointNameToVpcEndpointIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -128,7 +131,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No VPC_ENDPOINT_ID argument specified. Loading names for Vpc Endpoints drop-down."
names, err := a.VpcEndpoints.VpcEndpointVpcEndpointNameToVpcEndpointIdMap(ctx) names, err := a.VpcEndpoints.VpcEndpointVpcEndpointNameToVpcEndpointIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -187,7 +193,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No VPC_ENDPOINT_ID argument specified. Loading names for Vpc Endpoints drop-down."
names, err := a.VpcEndpoints.VpcEndpointVpcEndpointNameToVpcEndpointIdMap(ctx) names, err := a.VpcEndpoints.VpcEndpointVpcEndpointNameToVpcEndpointIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -84,7 +84,10 @@ var createCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No WORKSPACE_NAME argument specified. Loading names for Workspaces drop-down."
names, err := a.Workspaces.WorkspaceWorkspaceNameToWorkspaceIdMap(ctx) names, err := a.Workspaces.WorkspaceWorkspaceNameToWorkspaceIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -163,7 +166,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No WORKSPACE_ID argument specified. Loading names for Workspaces drop-down."
names, err := a.Workspaces.WorkspaceWorkspaceNameToWorkspaceIdMap(ctx) names, err := a.Workspaces.WorkspaceWorkspaceNameToWorkspaceIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -234,7 +240,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No WORKSPACE_ID argument specified. Loading names for Workspaces drop-down."
names, err := a.Workspaces.WorkspaceWorkspaceNameToWorkspaceIdMap(ctx) names, err := a.Workspaces.WorkspaceWorkspaceNameToWorkspaceIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -445,7 +454,10 @@ var updateCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No WORKSPACE_ID argument specified. Loading names for Workspaces drop-down."
names, err := a.Workspaces.WorkspaceWorkspaceNameToWorkspaceIdMap(ctx) names, err := a.Workspaces.WorkspaceWorkspaceNameToWorkspaceIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -106,7 +106,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ALERT_ID argument specified. Loading names for Alerts drop-down."
names, err := w.Alerts.AlertNameToIdMap(ctx) names, err := w.Alerts.AlertNameToIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -161,7 +164,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ALERT_ID argument specified. Loading names for Alerts drop-down."
names, err := w.Alerts.AlertNameToIdMap(ctx) names, err := w.Alerts.AlertNameToIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -78,7 +78,10 @@ var createCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No NAME argument specified. Loading names for Cluster Policies drop-down."
names, err := w.ClusterPolicies.PolicyNameToPolicyIdMap(ctx, compute.ListClusterPoliciesRequest{}) names, err := w.ClusterPolicies.PolicyNameToPolicyIdMap(ctx, compute.ListClusterPoliciesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -134,7 +137,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No POLICY_ID argument specified. Loading names for Cluster Policies drop-down."
names, err := w.ClusterPolicies.PolicyNameToPolicyIdMap(ctx, compute.ListClusterPoliciesRequest{}) names, err := w.ClusterPolicies.PolicyNameToPolicyIdMap(ctx, compute.ListClusterPoliciesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -245,7 +251,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No POLICY_ID argument specified. Loading names for Cluster Policies drop-down."
names, err := w.ClusterPolicies.PolicyNameToPolicyIdMap(ctx, compute.ListClusterPoliciesRequest{}) names, err := w.ClusterPolicies.PolicyNameToPolicyIdMap(ctx, compute.ListClusterPoliciesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -169,7 +169,10 @@ var createCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No SPARK_VERSION argument specified. Loading names for Clusters drop-down."
names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{}) names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -249,7 +252,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No CLUSTER_ID argument specified. Loading names for Clusters drop-down."
names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{}) names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -437,7 +443,10 @@ var eventsCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No CLUSTER_ID argument specified. Loading names for Clusters drop-down."
names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{}) names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -498,7 +507,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No CLUSTER_ID argument specified. Loading names for Clusters drop-down."
names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{}) names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -671,7 +683,10 @@ var permanentDeleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No CLUSTER_ID argument specified. Loading names for Clusters drop-down."
names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{}) names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -728,7 +743,10 @@ var pinCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No CLUSTER_ID argument specified. Loading names for Clusters drop-down."
names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{}) names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -792,7 +810,10 @@ var resizeCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No CLUSTER_ID argument specified. Loading names for Clusters drop-down."
names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{}) names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -872,7 +893,10 @@ var restartCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No CLUSTER_ID argument specified. Loading names for Clusters drop-down."
names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{}) names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -984,7 +1008,10 @@ var startCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No CLUSTER_ID argument specified. Loading names for Clusters drop-down."
names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{}) names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -1058,7 +1085,10 @@ var unpinCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No CLUSTER_ID argument specified. Loading names for Clusters drop-down."
names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{}) names, err := w.Clusters.ClusterInfoClusterNameToClusterIdMap(ctx, compute.ListClustersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -105,7 +105,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No DASHBOARD_ID argument specified. Loading names for Dashboards drop-down."
names, err := w.Dashboards.DashboardNameToIdMap(ctx, sql.ListDashboardsRequest{}) names, err := w.Dashboards.DashboardNameToIdMap(ctx, sql.ListDashboardsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -161,7 +164,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No DASHBOARD_ID argument specified. Loading names for Dashboards drop-down."
names, err := w.Dashboards.DashboardNameToIdMap(ctx, sql.ListDashboardsRequest{}) names, err := w.Dashboards.DashboardNameToIdMap(ctx, sql.ListDashboardsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -268,7 +274,10 @@ var restoreCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No DASHBOARD_ID argument specified. Loading names for Dashboards drop-down."
names, err := w.Dashboards.DashboardNameToIdMap(ctx, sql.ListDashboardsRequest{}) names, err := w.Dashboards.DashboardNameToIdMap(ctx, sql.ListDashboardsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -60,7 +60,10 @@ var createCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No GIT_PROVIDER argument specified. Loading names for Git Credentials drop-down."
names, err := w.GitCredentials.CredentialInfoGitProviderToCredentialIdMap(ctx) names, err := w.GitCredentials.CredentialInfoGitProviderToCredentialIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -115,7 +118,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No CREDENTIAL_ID argument specified. Loading names for Git Credentials drop-down."
names, err := w.GitCredentials.CredentialInfoGitProviderToCredentialIdMap(ctx) names, err := w.GitCredentials.CredentialInfoGitProviderToCredentialIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -173,7 +179,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No CREDENTIAL_ID argument specified. Loading names for Git Credentials drop-down."
names, err := w.GitCredentials.CredentialInfoGitProviderToCredentialIdMap(ctx) names, err := w.GitCredentials.CredentialInfoGitProviderToCredentialIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -263,7 +272,10 @@ var updateCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No CREDENTIAL_ID argument specified. Loading names for Git Credentials drop-down."
names, err := w.GitCredentials.CredentialInfoGitProviderToCredentialIdMap(ctx) names, err := w.GitCredentials.CredentialInfoGitProviderToCredentialIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -109,7 +109,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No SCRIPT_ID argument specified. Loading names for Global Init Scripts drop-down."
names, err := w.GlobalInitScripts.GlobalInitScriptDetailsNameToScriptIdMap(ctx) names, err := w.GlobalInitScripts.GlobalInitScriptDetailsNameToScriptIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -164,7 +167,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No SCRIPT_ID argument specified. Loading names for Global Init Scripts drop-down."
names, err := w.GlobalInitScripts.GlobalInitScriptDetailsNameToScriptIdMap(ctx) names, err := w.GlobalInitScripts.GlobalInitScriptDetailsNameToScriptIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -111,7 +111,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Groups drop-down."
names, err := w.Groups.GroupDisplayNameToIdMap(ctx, iam.ListGroupsRequest{}) names, err := w.Groups.GroupDisplayNameToIdMap(ctx, iam.ListGroupsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -166,7 +169,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Groups drop-down."
names, err := w.Groups.GroupDisplayNameToIdMap(ctx, iam.ListGroupsRequest{}) names, err := w.Groups.GroupDisplayNameToIdMap(ctx, iam.ListGroupsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -278,7 +284,10 @@ var patchCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Groups drop-down."
names, err := w.Groups.GroupDisplayNameToIdMap(ctx, iam.ListGroupsRequest{}) names, err := w.Groups.GroupDisplayNameToIdMap(ctx, iam.ListGroupsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -341,7 +350,10 @@ var updateCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Groups drop-down."
names, err := w.Groups.GroupDisplayNameToIdMap(ctx, iam.ListGroupsRequest{}) names, err := w.Groups.GroupDisplayNameToIdMap(ctx, iam.ListGroupsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -128,7 +128,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No INSTANCE_POOL_ID argument specified. Loading names for Instance Pools drop-down."
names, err := w.InstancePools.InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap(ctx) names, err := w.InstancePools.InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -245,7 +248,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No INSTANCE_POOL_ID argument specified. Loading names for Instance Pools drop-down."
names, err := w.InstancePools.InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap(ctx) names, err := w.InstancePools.InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -133,7 +133,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No IP_ACCESS_LIST_ID argument specified. Loading names for Ip Access Lists drop-down."
names, err := w.IpAccessLists.IpAccessListInfoLabelToListIdMap(ctx) names, err := w.IpAccessLists.IpAccessListInfoLabelToListIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -188,7 +191,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No IP_ACCESS_LIST_ID argument specified. Loading names for Ip Access Lists drop-down."
names, err := w.IpAccessLists.IpAccessListInfoLabelToListIdMap(ctx) names, err := w.IpAccessLists.IpAccessListInfoLabelToListIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -69,7 +69,10 @@ var cancelAllRunsCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No JOB_ID argument specified. Loading names for Jobs drop-down."
names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{}) names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -133,7 +136,10 @@ var cancelRunCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No RUN_ID argument specified. Loading names for Jobs drop-down."
names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{}) names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -203,6 +209,7 @@ func init() {
createCmd.Flags().IntVar(&createReq.MaxConcurrentRuns, "max-concurrent-runs", createReq.MaxConcurrentRuns, `An optional maximum allowed number of concurrent runs of the job.`) createCmd.Flags().IntVar(&createReq.MaxConcurrentRuns, "max-concurrent-runs", createReq.MaxConcurrentRuns, `An optional maximum allowed number of concurrent runs of the job.`)
createCmd.Flags().StringVar(&createReq.Name, "name", createReq.Name, `An optional name for the job.`) createCmd.Flags().StringVar(&createReq.Name, "name", createReq.Name, `An optional name for the job.`)
// TODO: complex arg: notification_settings // TODO: complex arg: notification_settings
// TODO: complex arg: run_as
// TODO: complex arg: schedule // TODO: complex arg: schedule
// TODO: map via StringToStringVar: tags // TODO: map via StringToStringVar: tags
// TODO: array: tasks // TODO: array: tasks
@ -278,7 +285,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No JOB_ID argument specified. Loading names for Jobs drop-down."
names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{}) names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -336,7 +346,10 @@ var deleteRunCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No RUN_ID argument specified. Loading names for Jobs drop-down."
names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{}) names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -396,7 +409,10 @@ var exportRunCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No RUN_ID argument specified. Loading names for Jobs drop-down."
names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{}) names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -454,7 +470,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No JOB_ID argument specified. Loading names for Jobs drop-down."
names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{}) names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -519,7 +538,10 @@ var getRunCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No RUN_ID argument specified. Loading names for Jobs drop-down."
names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{}) names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -586,7 +608,10 @@ var getRunOutputCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No RUN_ID argument specified. Loading names for Jobs drop-down."
names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{}) names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -772,7 +797,10 @@ var repairRunCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No RUN_ID argument specified. Loading names for Jobs drop-down."
names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{}) names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -918,7 +946,10 @@ var runNowCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No JOB_ID argument specified. Loading names for Jobs drop-down."
names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{}) names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -1092,7 +1123,10 @@ var updateCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No JOB_ID argument specified. Loading names for Jobs drop-down."
names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{}) names, err := w.Jobs.BaseJobSettingsNameToJobIdMap(ctx, jobs.ListJobsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -196,7 +196,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Metastores drop-down."
names, err := w.Metastores.MetastoreInfoNameToMetastoreIdMap(ctx) names, err := w.Metastores.MetastoreInfoNameToMetastoreIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -252,7 +255,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Metastores drop-down."
names, err := w.Metastores.MetastoreInfoNameToMetastoreIdMap(ctx) names, err := w.Metastores.MetastoreInfoNameToMetastoreIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -477,7 +483,10 @@ var updateCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Metastores drop-down."
names, err := w.Metastores.MetastoreInfoNameToMetastoreIdMap(ctx) names, err := w.Metastores.MetastoreInfoNameToMetastoreIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -538,7 +547,10 @@ var updateAssignmentCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No WORKSPACE_ID argument specified. Loading names for Metastores drop-down."
names, err := w.Metastores.MetastoreInfoNameToMetastoreIdMap(ctx) names, err := w.Metastores.MetastoreInfoNameToMetastoreIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -605,8 +605,8 @@ func init() {
var deleteTransitionRequestCmd = &cobra.Command{ var deleteTransitionRequestCmd = &cobra.Command{
Use: "delete-transition-request NAME VERSION STAGE CREATOR", Use: "delete-transition-request NAME VERSION STAGE CREATOR",
Short: `Delete a ransition request.`, Short: `Delete a transition request.`,
Long: `Delete a ransition request. Long: `Delete a transition request.
Cancels a model version stage transition request.`, Cancels a model version stage transition request.`,

View File

@ -131,7 +131,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No PIPELINE_ID argument specified. Loading names for Pipelines drop-down."
names, err := w.Pipelines.PipelineStateInfoNameToPipelineIdMap(ctx, pipelines.ListPipelinesRequest{}) names, err := w.Pipelines.PipelineStateInfoNameToPipelineIdMap(ctx, pipelines.ListPipelinesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -189,7 +192,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No PIPELINE_ID argument specified. Loading names for Pipelines drop-down."
names, err := w.Pipelines.PipelineStateInfoNameToPipelineIdMap(ctx, pipelines.ListPipelinesRequest{}) names, err := w.Pipelines.PipelineStateInfoNameToPipelineIdMap(ctx, pipelines.ListPipelinesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -298,7 +304,10 @@ var listPipelineEventsCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No PIPELINE_ID argument specified. Loading names for Pipelines drop-down."
names, err := w.Pipelines.PipelineStateInfoNameToPipelineIdMap(ctx, pipelines.ListPipelinesRequest{}) names, err := w.Pipelines.PipelineStateInfoNameToPipelineIdMap(ctx, pipelines.ListPipelinesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -409,7 +418,10 @@ var listUpdatesCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No PIPELINE_ID argument specified. Loading names for Pipelines drop-down."
names, err := w.Pipelines.PipelineStateInfoNameToPipelineIdMap(ctx, pipelines.ListPipelinesRequest{}) names, err := w.Pipelines.PipelineStateInfoNameToPipelineIdMap(ctx, pipelines.ListPipelinesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -469,7 +481,10 @@ var resetCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No PIPELINE_ID argument specified. Loading names for Pipelines drop-down."
names, err := w.Pipelines.PipelineStateInfoNameToPipelineIdMap(ctx, pipelines.ListPipelinesRequest{}) names, err := w.Pipelines.PipelineStateInfoNameToPipelineIdMap(ctx, pipelines.ListPipelinesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -546,7 +561,10 @@ var startUpdateCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No PIPELINE_ID argument specified. Loading names for Pipelines drop-down."
names, err := w.Pipelines.PipelineStateInfoNameToPipelineIdMap(ctx, pipelines.ListPipelinesRequest{}) names, err := w.Pipelines.PipelineStateInfoNameToPipelineIdMap(ctx, pipelines.ListPipelinesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -606,7 +624,10 @@ var stopCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No PIPELINE_ID argument specified. Loading names for Pipelines drop-down."
names, err := w.Pipelines.PipelineStateInfoNameToPipelineIdMap(ctx, pipelines.ListPipelinesRequest{}) names, err := w.Pipelines.PipelineStateInfoNameToPipelineIdMap(ctx, pipelines.ListPipelinesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -698,7 +719,10 @@ var updateCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No PIPELINE_ID argument specified. Loading names for Pipelines drop-down."
names, err := w.Pipelines.PipelineStateInfoNameToPipelineIdMap(ctx, pipelines.ListPipelinesRequest{}) names, err := w.Pipelines.PipelineStateInfoNameToPipelineIdMap(ctx, pipelines.ListPipelinesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -106,7 +106,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No NAME argument specified. Loading names for Providers drop-down."
names, err := w.Providers.ProviderInfoNameToMetastoreIdMap(ctx, sharing.ListProvidersRequest{}) names, err := w.Providers.ProviderInfoNameToMetastoreIdMap(ctx, sharing.ListProvidersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -163,7 +166,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No NAME argument specified. Loading names for Providers drop-down."
names, err := w.Providers.ProviderInfoNameToMetastoreIdMap(ctx, sharing.ListProvidersRequest{}) names, err := w.Providers.ProviderInfoNameToMetastoreIdMap(ctx, sharing.ListProvidersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -272,7 +278,10 @@ var listSharesCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No NAME argument specified. Loading names for Providers drop-down."
names, err := w.Providers.ProviderInfoNameToMetastoreIdMap(ctx, sharing.ListProvidersRequest{}) names, err := w.Providers.ProviderInfoNameToMetastoreIdMap(ctx, sharing.ListProvidersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -335,7 +344,10 @@ var updateCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No NAME argument specified. Loading names for Providers drop-down."
names, err := w.Providers.ProviderInfoNameToMetastoreIdMap(ctx, sharing.ListProvidersRequest{}) names, err := w.Providers.ProviderInfoNameToMetastoreIdMap(ctx, sharing.ListProvidersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -116,7 +116,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No QUERY_ID argument specified. Loading names for Queries drop-down."
names, err := w.Queries.QueryNameToIdMap(ctx, sql.ListQueriesRequest{}) names, err := w.Queries.QueryNameToIdMap(ctx, sql.ListQueriesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -172,7 +175,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No QUERY_ID argument specified. Loading names for Queries drop-down."
names, err := w.Queries.QueryNameToIdMap(ctx, sql.ListQueriesRequest{}) names, err := w.Queries.QueryNameToIdMap(ctx, sql.ListQueriesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -281,7 +287,10 @@ var restoreCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No QUERY_ID argument specified. Loading names for Queries drop-down."
names, err := w.Queries.QueryNameToIdMap(ctx, sql.ListQueriesRequest{}) names, err := w.Queries.QueryNameToIdMap(ctx, sql.ListQueriesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -344,7 +353,10 @@ var updateCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No QUERY_ID argument specified. Loading names for Queries drop-down."
names, err := w.Queries.QueryNameToIdMap(ctx, sql.ListQueriesRequest{}) names, err := w.Queries.QueryNameToIdMap(ctx, sql.ListQueriesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -111,7 +111,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No NAME argument specified. Loading names for Recipients drop-down."
names, err := w.Recipients.RecipientInfoNameToMetastoreIdMap(ctx, sharing.ListRecipientsRequest{}) names, err := w.Recipients.RecipientInfoNameToMetastoreIdMap(ctx, sharing.ListRecipientsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -168,7 +171,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No NAME argument specified. Loading names for Recipients drop-down."
names, err := w.Recipients.RecipientInfoNameToMetastoreIdMap(ctx, sharing.ListRecipientsRequest{}) names, err := w.Recipients.RecipientInfoNameToMetastoreIdMap(ctx, sharing.ListRecipientsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -329,7 +335,10 @@ var sharePermissionsCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No NAME argument specified. Loading names for Recipients drop-down."
names, err := w.Recipients.RecipientInfoNameToMetastoreIdMap(ctx, sharing.ListRecipientsRequest{}) names, err := w.Recipients.RecipientInfoNameToMetastoreIdMap(ctx, sharing.ListRecipientsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -392,7 +401,10 @@ var updateCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No NAME argument specified. Loading names for Recipients drop-down."
names, err := w.Recipients.RecipientInfoNameToMetastoreIdMap(ctx, sharing.ListRecipientsRequest{}) names, err := w.Recipients.RecipientInfoNameToMetastoreIdMap(ctx, sharing.ListRecipientsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -112,7 +112,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No REPO_ID argument specified. Loading names for Repos drop-down."
names, err := w.Repos.RepoInfoPathToIdMap(ctx, workspace.ListReposRequest{}) names, err := w.Repos.RepoInfoPathToIdMap(ctx, workspace.ListReposRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -170,7 +173,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No REPO_ID argument specified. Loading names for Repos drop-down."
names, err := w.Repos.RepoInfoPathToIdMap(ctx, workspace.ListReposRequest{}) names, err := w.Repos.RepoInfoPathToIdMap(ctx, workspace.ListReposRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -284,7 +290,10 @@ var updateCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No REPO_ID argument specified. Loading names for Repos drop-down."
names, err := w.Repos.RepoInfoPathToIdMap(ctx, workspace.ListReposRequest{}) names, err := w.Repos.RepoInfoPathToIdMap(ctx, workspace.ListReposRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -109,7 +109,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No FULL_NAME argument specified. Loading names for Schemas drop-down."
names, err := w.Schemas.SchemaInfoNameToFullNameMap(ctx, catalog.ListSchemasRequest{}) names, err := w.Schemas.SchemaInfoNameToFullNameMap(ctx, catalog.ListSchemasRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -166,7 +169,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No FULL_NAME argument specified. Loading names for Schemas drop-down."
names, err := w.Schemas.SchemaInfoNameToFullNameMap(ctx, catalog.ListSchemasRequest{}) names, err := w.Schemas.SchemaInfoNameToFullNameMap(ctx, catalog.ListSchemasRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -282,7 +288,10 @@ var updateCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No FULL_NAME argument specified. Loading names for Schemas drop-down."
names, err := w.Schemas.SchemaInfoNameToFullNameMap(ctx, catalog.ListSchemasRequest{}) names, err := w.Schemas.SchemaInfoNameToFullNameMap(ctx, catalog.ListSchemasRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -110,7 +110,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Service Principals drop-down."
names, err := w.ServicePrincipals.ServicePrincipalDisplayNameToIdMap(ctx, iam.ListServicePrincipalsRequest{}) names, err := w.ServicePrincipals.ServicePrincipalDisplayNameToIdMap(ctx, iam.ListServicePrincipalsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -166,7 +169,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Service Principals drop-down."
names, err := w.ServicePrincipals.ServicePrincipalDisplayNameToIdMap(ctx, iam.ListServicePrincipalsRequest{}) names, err := w.ServicePrincipals.ServicePrincipalDisplayNameToIdMap(ctx, iam.ListServicePrincipalsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -279,7 +285,10 @@ var patchCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Service Principals drop-down."
names, err := w.ServicePrincipals.ServicePrincipalDisplayNameToIdMap(ctx, iam.ListServicePrincipalsRequest{}) names, err := w.ServicePrincipals.ServicePrincipalDisplayNameToIdMap(ctx, iam.ListServicePrincipalsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -345,7 +354,10 @@ var updateCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Service Principals drop-down."
names, err := w.ServicePrincipals.ServicePrincipalDisplayNameToIdMap(ctx, iam.ListServicePrincipalsRequest{}) names, err := w.ServicePrincipals.ServicePrincipalDisplayNameToIdMap(ctx, iam.ListServicePrincipalsRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -61,7 +61,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No FULL_NAME argument specified. Loading names for Tables drop-down."
names, err := w.Tables.TableInfoNameToTableIdMap(ctx, catalog.ListTablesRequest{}) names, err := w.Tables.TableInfoNameToTableIdMap(ctx, catalog.ListTablesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -122,7 +125,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No FULL_NAME argument specified. Loading names for Tables drop-down."
names, err := w.Tables.TableInfoNameToTableIdMap(ctx, catalog.ListTablesRequest{}) names, err := w.Tables.TableInfoNameToTableIdMap(ctx, catalog.ListTablesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -250,7 +256,10 @@ var listSummariesCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No CATALOG_NAME argument specified. Loading names for Tables drop-down."
names, err := w.Tables.TableInfoNameToTableIdMap(ctx, catalog.ListTablesRequest{}) names, err := w.Tables.TableInfoNameToTableIdMap(ctx, catalog.ListTablesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -105,7 +105,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No TOKEN_ID argument specified. Loading names for Token Management drop-down."
names, err := w.TokenManagement.TokenInfoCommentToTokenIdMap(ctx, settings.ListTokenManagementRequest{}) names, err := w.TokenManagement.TokenInfoCommentToTokenIdMap(ctx, settings.ListTokenManagementRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -160,7 +163,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No TOKEN_ID argument specified. Loading names for Token Management drop-down."
names, err := w.TokenManagement.TokenInfoCommentToTokenIdMap(ctx, settings.ListTokenManagementRequest{}) names, err := w.TokenManagement.TokenInfoCommentToTokenIdMap(ctx, settings.ListTokenManagementRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -106,7 +106,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No TOKEN_ID argument specified. Loading names for Tokens drop-down."
names, err := w.Tokens.TokenInfoCommentToTokenIdMap(ctx) names, err := w.Tokens.TokenInfoCommentToTokenIdMap(ctx)
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -119,7 +119,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Users drop-down."
names, err := w.Users.UserUserNameToIdMap(ctx, iam.ListUsersRequest{}) names, err := w.Users.UserUserNameToIdMap(ctx, iam.ListUsersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -174,7 +177,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Users drop-down."
names, err := w.Users.UserUserNameToIdMap(ctx, iam.ListUsersRequest{}) names, err := w.Users.UserUserNameToIdMap(ctx, iam.ListUsersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -287,7 +293,10 @@ var patchCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Users drop-down."
names, err := w.Users.UserUserNameToIdMap(ctx, iam.ListUsersRequest{}) names, err := w.Users.UserUserNameToIdMap(ctx, iam.ListUsersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -353,7 +362,10 @@ var updateCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Users drop-down."
names, err := w.Users.UserUserNameToIdMap(ctx, iam.ListUsersRequest{}) names, err := w.Users.UserUserNameToIdMap(ctx, iam.ListUsersRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -134,7 +134,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No FULL_NAME_ARG argument specified. Loading names for Volumes drop-down."
names, err := w.Volumes.VolumeInfoNameToVolumeIdMap(ctx, catalog.ListVolumesRequest{}) names, err := w.Volumes.VolumeInfoNameToVolumeIdMap(ctx, catalog.ListVolumesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -253,7 +256,10 @@ var readCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No FULL_NAME_ARG argument specified. Loading names for Volumes drop-down."
names, err := w.Volumes.VolumeInfoNameToVolumeIdMap(ctx, catalog.ListVolumesRequest{}) names, err := w.Volumes.VolumeInfoNameToVolumeIdMap(ctx, catalog.ListVolumesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -319,7 +325,10 @@ var updateCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No FULL_NAME_ARG argument specified. Loading names for Volumes drop-down."
names, err := w.Volumes.VolumeInfoNameToVolumeIdMap(ctx, catalog.ListVolumesRequest{}) names, err := w.Volumes.VolumeInfoNameToVolumeIdMap(ctx, catalog.ListVolumesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -148,7 +148,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Warehouses drop-down."
names, err := w.Warehouses.EndpointInfoNameToIdMap(ctx, sql.ListWarehousesRequest{}) names, err := w.Warehouses.EndpointInfoNameToIdMap(ctx, sql.ListWarehousesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -246,7 +249,10 @@ var editCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Warehouses drop-down."
names, err := w.Warehouses.EndpointInfoNameToIdMap(ctx, sql.ListWarehousesRequest{}) names, err := w.Warehouses.EndpointInfoNameToIdMap(ctx, sql.ListWarehousesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -330,7 +336,10 @@ var getCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Warehouses drop-down."
names, err := w.Warehouses.EndpointInfoNameToIdMap(ctx, sql.ListWarehousesRequest{}) names, err := w.Warehouses.EndpointInfoNameToIdMap(ctx, sql.ListWarehousesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -525,7 +534,10 @@ var startCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Warehouses drop-down."
names, err := w.Warehouses.EndpointInfoNameToIdMap(ctx, sql.ListWarehousesRequest{}) names, err := w.Warehouses.EndpointInfoNameToIdMap(ctx, sql.ListWarehousesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -609,7 +621,10 @@ var stopCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No ID argument specified. Loading names for Warehouses drop-down."
names, err := w.Warehouses.EndpointInfoNameToIdMap(ctx, sql.ListWarehousesRequest{}) names, err := w.Warehouses.EndpointInfoNameToIdMap(ctx, sql.ListWarehousesRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }

View File

@ -62,7 +62,10 @@ var deleteCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No PATH argument specified. Loading names for Workspace drop-down."
names, err := w.Workspace.ObjectInfoPathToObjectIdMap(ctx, workspace.ListWorkspaceRequest{}) names, err := w.Workspace.ObjectInfoPathToObjectIdMap(ctx, workspace.ListWorkspaceRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -127,7 +130,10 @@ var exportCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No PATH argument specified. Loading names for Workspace drop-down."
names, err := w.Workspace.ObjectInfoPathToObjectIdMap(ctx, workspace.ListWorkspaceRequest{}) names, err := w.Workspace.ObjectInfoPathToObjectIdMap(ctx, workspace.ListWorkspaceRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -183,7 +189,10 @@ var getStatusCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No PATH argument specified. Loading names for Workspace drop-down."
names, err := w.Workspace.ObjectInfoPathToObjectIdMap(ctx, workspace.ListWorkspaceRequest{}) names, err := w.Workspace.ObjectInfoPathToObjectIdMap(ctx, workspace.ListWorkspaceRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -246,7 +255,10 @@ var importCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No PATH argument specified. Loading names for Workspace drop-down."
names, err := w.Workspace.ObjectInfoPathToObjectIdMap(ctx, workspace.ListWorkspaceRequest{}) names, err := w.Workspace.ObjectInfoPathToObjectIdMap(ctx, workspace.ListWorkspaceRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }
@ -358,7 +370,10 @@ var mkdirsCmd = &cobra.Command{
} }
} else { } else {
if len(args) == 0 { if len(args) == 0 {
promptSpinner := cmdio.Spinner(ctx)
promptSpinner <- "No PATH argument specified. Loading names for Workspace drop-down."
names, err := w.Workspace.ObjectInfoPathToObjectIdMap(ctx, workspace.ListWorkspaceRequest{}) names, err := w.Workspace.ObjectInfoPathToObjectIdMap(ctx, workspace.ListWorkspaceRequest{})
close(promptSpinner)
if err != nil { if err != nil {
return err return err
} }