[Insights]

- Session Browser: Added support for multiple selection. Can now delete multiple trace files at once.
  - Session Browser: Added "Copy Trace Id" in context menu. Copies the unique id of the selected trace session.
  - Session Browser: Added "Copy Full Path" in context menu. Copies the full path of the selected trace file.
  - Session Browser: Added "Open Containing Folder" in context menu. Opens the containing folder of the selected trace file.

#jira UE-152579
#rb Catalin.Dragoiu

[CL 29918374 by ionut matasaru in ue5-main branch]
This commit is contained in:
ionut matasaru
2023-11-24 07:50:04 -05:00
parent 72d3559c65
commit cc7eb0db59
4 changed files with 354 additions and 143 deletions

View File

@@ -292,7 +292,6 @@ void FStoreBrowser::UpdateTraces()
FStoreBrowserTraceInfo& Trace = *TracePtr;
Trace.TraceId = TraceId;
Trace.TraceIndex = TraceIndex;
const FUtf8StringView Utf8NameView = TraceInfo->GetName();
Trace.Name = FString(Utf8NameView);
@@ -303,7 +302,7 @@ void FStoreBrowser::UpdateTraces()
}
else
{
// Fallback for older versions of UTS which didn't write uri
// Fallback for older versions of UTS which didn't write URI.
Trace.Uri = FPaths::SetExtension(FPaths::Combine(StoreDirectory, Trace.Name), TEXT(".utrace"));
FPaths::MakePlatformFilename(Trace.Uri);
}

View File

@@ -25,7 +25,6 @@ namespace Insights
struct FStoreBrowserTraceInfo
{
uint32 TraceId = 0;
int32 TraceIndex = -1;
uint64 ChangeSerial = 0;

View File

@@ -68,8 +68,9 @@ ENUM_CLASS_FLAGS(ETraceDirOperations);
struct FTraceViewModel
{
uint32 TraceId = 0;
int32 TraceIndex = -1; // debug
static constexpr uint32 InvalidTraceId = 0;
uint32 TraceId = InvalidTraceId;
uint64 ChangeSerial = 0;
@@ -91,7 +92,6 @@ struct FTraceViewModel
bool bIsMetadataUpdated = false;
bool bIsRenaming = false;
bool bWasJustRenamed = false;
bool bIsLive = false;
uint32 IpAddress = 0;
@@ -296,9 +296,22 @@ private:
TSharedPtr<SWidget> TraceList_GetMenuContent();
bool CanEditTraceFile() const;
void RenameTraceFile();
void DeleteTraceFile();
bool CanRenameSelectedTrace() const;
void RenameSelectedTrace();
bool CanDeleteSelectedTraces() const;
void DeleteSelectedTraces();
bool DeleteTrace(const TSharedPtr<FTraceViewModel>& TraceToDelete);
bool CanCopyTraceId() const;
void CopyTraceId();
bool CanCopyFullPath() const;
void CopyFullPath();
bool CanOpenContainingFolder() const;
void OpenContainingFolder();
bool HasAnyLiveTrace() const;
//////////////////////////////////////////////////
@@ -354,6 +367,8 @@ private:
void UpdateTrace(FTraceViewModel& InOutTrace, const Insights::FStoreBrowserTraceInfo& InSourceTrace);
void OnTraceListChanged();
TSharedPtr<FTraceViewModel> GetSingleSelectedTrace() const;
void TraceList_OnSelectionChanged(TSharedPtr<FTraceViewModel> InTrace, ESelectInfo::Type SelectInfo);
void TraceList_OnMouseButtonDoubleClick(TSharedPtr<FTraceViewModel> InTrace);
@@ -545,7 +560,6 @@ private:
TSharedPtr<STableViewBase> WatchDirsListView;
TSharedPtr<SListView<TSharedPtr<FTraceViewModel>>> TraceListView;
TSharedPtr<FTraceViewModel> SelectedTrace;
bool bIsUserSelectedTrace = false;
//////////////////////////////////////////////////