Skip to content

Commit

Permalink
Fix darkmode fullscreen (#1157)
Browse files Browse the repository at this point in the history
  • Loading branch information
scudette authored Jul 23, 2021
1 parent 66aed2b commit 8bc8a90
Show file tree
Hide file tree
Showing 12 changed files with 324 additions and 51 deletions.
27 changes: 14 additions & 13 deletions api/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
crypto_utils "www.velocidex.com/golang/velociraptor/crypto/utils"
file_store "www.velocidex.com/golang/velociraptor/file_store"
"www.velocidex.com/golang/velociraptor/file_store/api"
"www.velocidex.com/golang/velociraptor/paths"
"www.velocidex.com/golang/velociraptor/paths/artifacts"
"www.velocidex.com/golang/velociraptor/result_sets"
"www.velocidex.com/golang/velociraptor/services"
users "www.velocidex.com/golang/velociraptor/users"
"www.velocidex.com/golang/velociraptor/utils"
Expand Down Expand Up @@ -207,28 +207,29 @@ func listAvailableEventTimestamps(
},
}

timestamps, err := listAvailableEventTimestampFiles(ctx, path_manager)
timestamps, err := listAvailableEventTimestampFiles(ctx, self, path_manager)
result.Logs[0].RowTimestamps = timestamps

timestamps, err = listAvailableEventTimestampFiles(ctx, path_manager.Logs())
timestamps, err = listAvailableEventTimestampFiles(
ctx, self, path_manager.Logs())
result.Logs[0].LogTimestamps = timestamps

return result, nil
}

func listAvailableEventTimestampFiles(
ctx context.Context, path_manager api.PathManager) ([]int32, error) {
ctx context.Context, self *ApiServer, path_manager api.PathManager) ([]int32, error) {
result := []int32{}

for _, prop := range path_manager.GetAvailableFiles(ctx) {
if prop.Size == 0 {
continue
}
date_name := path.Base(prop.Path)
ts := paths.DayNameToTimestamp(date_name)
if ts != 0 {
result = append(result, int32(ts))
}
file_store_factory := file_store.GetFileStore(self.config)
reader, err := result_sets.NewTimedResultSetReader(
ctx, file_store_factory, path_manager)
if err != nil {
return nil, err
}

for _, prop := range reader.GetAvailableFiles(ctx) {
result = append(result, int32(prop.StartTime.Unix()))
}
return result, nil
}
Expand Down
36 changes: 18 additions & 18 deletions api/proto/api.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 19 additions & 9 deletions api/proto/completions.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions api/proto/completions.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ message Completion {
string description = 2;
string type = 3;
repeated ArgDescriptor args = 4;
string category = 5;
}

message KeywordCompletions {
Expand Down
Loading

0 comments on commit 8bc8a90

Please sign in to comment.