Skip to content

Commit fe158ea

Browse files
authored
Revert "Scheduled Search V2 (#185)" (#186)
This reverts commit c178856.
1 parent c178856 commit fe158ea

25 files changed

+1594
-9964
lines changed

cmd/humioctl/aggregate_alerts_list.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ func newAggregateAlertsListCmd() *cobra.Command {
4444
format.String(strings.Join(aggregateAlert.Labels, ", ")),
4545
format.Bool(aggregateAlert.Enabled),
4646
format.StringPtr(aggregateAlert.ThrottleField),
47-
format.Int64(aggregateAlert.ThrottleTimeSeconds),
48-
format.Int64(aggregateAlert.SearchIntervalSeconds),
47+
format.Int(aggregateAlert.ThrottleTimeSeconds),
48+
format.Int(aggregateAlert.SearchIntervalSeconds),
4949
format.String(aggregateAlert.QueryTimestampType),
5050
format.String(aggregateAlert.TriggerMode),
5151
format.String(aggregateAlert.OwnershipRunAsID),

cmd/humioctl/aggregate_alerts_show.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ func newAggregateAlertsShowCmd() *cobra.Command {
5151
{format.String("Name"), format.String(aggregateAlert.Name)},
5252
{format.String("Description"), format.StringPtr(aggregateAlert.Description)},
5353
{format.String("Query String"), format.String(aggregateAlert.QueryString)},
54-
{format.String("Search Interval Seconds"), format.Int64(aggregateAlert.SearchIntervalSeconds)},
54+
{format.String("Search Interval Seconds"), format.Int(aggregateAlert.SearchIntervalSeconds)},
5555
{format.String("Actions"), format.String(strings.Join(aggregateAlert.ActionNames, ", "))},
5656
{format.String("Labels"), format.String(strings.Join(aggregateAlert.Labels, ", "))},
5757
{format.String("Enabled"), format.Bool(aggregateAlert.Enabled)},
5858
{format.String("Throttle Field"), format.StringPtr(aggregateAlert.ThrottleField)},
59-
{format.String("Throttle Time Seconds"), format.Int64(aggregateAlert.ThrottleTimeSeconds)},
59+
{format.String("Throttle Time Seconds"), format.Int(aggregateAlert.ThrottleTimeSeconds)},
6060
{format.String("Query Timestamp Type"), format.String(aggregateAlert.QueryTimestampType)},
6161
{format.String("Trigger Mode"), format.String(aggregateAlert.TriggerMode)},
6262
{format.String("Run As User ID"), format.String(aggregateAlert.OwnershipRunAsID)},

cmd/humioctl/alerts_show.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ func newAlertsShowCmd() *cobra.Command {
4242
{format.String("Query Start"), format.String(alert.QueryStart)},
4343
{format.String("Query String"), format.String(alert.QueryString)},
4444
{format.String("Labels"), format.String(strings.Join(alert.Labels, ", "))},
45-
{format.String("Throttle Time Millis"), format.Int64(alert.ThrottleTimeMillis)},
45+
{format.String("Throttle Time Millis"), format.Int(alert.ThrottleTimeMillis)},
4646
{format.String("Is Starred"), format.Bool(alert.IsStarred)},
4747
{format.String("Last Error"), format.StringPtr(alert.LastError)},
4848
{format.String("Throttle Field"), format.StringPtr(alert.ThrottleField)},
49-
{format.String("Time Of Last Trigger"), format.Int64Ptr(alert.TimeOfLastTrigger)},
49+
{format.String("Time Of Last Trigger"), format.IntPtr(alert.TimeOfLastTrigger)},
5050
{format.String("Run As User ID"), format.String(alert.RunAsUserID)},
5151
{format.String("Query Ownership Type"), format.String(alert.QueryOwnershipType)},
5252
}

cmd/humioctl/cluster_nodes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func newClusterNodesCmd() *cobra.Command {
3535

3636
func printClusterNodeDetailsTable(cmd *cobra.Command, node api.ClusterNode) {
3737
details := [][]format.Value{
38-
{format.String("ID"), format.Int64(node.Id)},
38+
{format.String("ID"), format.Int(node.Id)},
3939
{format.String("Name"), format.String(node.Name)},
4040
{format.String("URI"), format.String(node.Uri)},
4141
{format.String("UUID"), format.String(node.Uuid)},

cmd/humioctl/cluster_nodes_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func newClusterNodesListCmd() *cobra.Command {
4040
rows := make([][]format.Value, len(nodes))
4141
for i, node := range nodes {
4242
rows[i] = []format.Value{
43-
format.Int64(node.Id),
43+
format.Int(node.Id),
4444
format.String(node.Name),
4545
format.Bool(node.CanBeSafelyUnregistered),
4646
format.StringPtr(node.Zone),

cmd/humioctl/filter_alerts_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func newFilterAlertsListCmd() *cobra.Command {
4343
format.StringPtr(filterAlert.Description),
4444
format.String(strings.Join(filterAlert.ActionNames, ", ")),
4545
format.String(strings.Join(filterAlert.Labels, ", ")),
46-
format.Int64Ptr(filterAlert.ThrottleTimeSeconds),
46+
format.IntPtr(filterAlert.ThrottleTimeSeconds),
4747
format.StringPtr(filterAlert.ThrottleField),
4848
format.String(filterAlert.OwnershipRunAsID),
4949
format.String(filterAlert.QueryOwnershipType),

cmd/humioctl/filter_alerts_show.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func newFilterAlertsShowCmd() *cobra.Command {
5454
{format.String("Query String"), format.String(filterAlert.QueryString)},
5555
{format.String("Labels"), format.String(strings.Join(filterAlert.Labels, ", "))},
5656
{format.String("Actions"), format.String(strings.Join(filterAlert.ActionNames, ", "))},
57-
{format.String("Throttle Time Seconds"), format.Int64Ptr(filterAlert.ThrottleTimeSeconds)},
57+
{format.String("Throttle Time Seconds"), format.IntPtr(filterAlert.ThrottleTimeSeconds)},
5858
{format.String("Throttle Field"), format.StringPtr(filterAlert.ThrottleField)},
5959
{format.String("Run As User ID"), format.String(filterAlert.OwnershipRunAsID)},
6060
{format.String("Query Ownership Type"), format.String(filterAlert.QueryOwnershipType)},

cmd/humioctl/license.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func printLicenseDetailsTable(cmd *cobra.Command, license api.License) {
3939
details = append(details, []format.Value{format.String("License ID"), format.String(onprem.ID)})
4040
details = append(details, []format.Value{format.String("Issued To"), format.String(onprem.IssuedTo)})
4141
if onprem.NumberOfSeats != nil {
42-
details = append(details, []format.Value{format.String("Number Of Seats"), format.Int64(*onprem.NumberOfSeats)})
42+
details = append(details, []format.Value{format.String("Number Of Seats"), format.Int(*onprem.NumberOfSeats)})
4343
}
4444
}
4545

cmd/humioctl/root.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ Common Management Commands:
123123
rootCmd.AddCommand(newAlertsCmd())
124124
rootCmd.AddCommand(newFilterAlertsCmd())
125125
rootCmd.AddCommand(newScheduledSearchesCmd())
126-
rootCmd.AddCommand(newScheduledSearchesV2Cmd())
127126
rootCmd.AddCommand(newAggregateAlertsCmd())
128127
rootCmd.AddCommand(newPackagesCmd())
129128
rootCmd.AddCommand(newGroupsCmd())

cmd/humioctl/scheduled_searches_install.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ The install command allows you to install scheduled searches from a URL or from
7676

7777
cmd.Flags().StringVar(&filePath, "file", "", "The local file path to the scheduled search to install.")
7878
cmd.Flags().StringVar(&url, "url", "", "A URL to fetch the scheduled search file from.")
79-
cmd.Flags().StringVarP(&name, "name", "n", "", "Install the scheduled search under a specific name, ignoring the `name` attribute in the scheduled search file.")
79+
cmd.Flags().StringVarP(&name, "name", "n", "", "Install the alert under a specific name, ignoring the `name` attribute in the alert file.")
8080
cmd.MarkFlagsMutuallyExclusive("file", "url")
8181
return &cmd
8282
}

0 commit comments

Comments
 (0)