Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2022-10-13 21:39:43 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-10-13 21:39:43 +0300
commit8dec765f5f7150a33a6a54ad2af62c80a3c0251f (patch)
tree2335d5f22cfe0b8933b40732b04ae9fe908af18d /server
parent94fd3b664e5428c245b04c57baad0d427adda7c2 (diff)
Require attention on failure popups.
Diffstat (limited to 'server')
-rw-r--r--server/TracyView.cpp12
-rw-r--r--server/TracyView.hpp5
2 files changed, 17 insertions, 0 deletions
diff --git a/server/TracyView.cpp b/server/TracyView.cpp
index e2d740db..3ba01c3b 100644
--- a/server/TracyView.cpp
+++ b/server/TracyView.cpp
@@ -227,18 +227,22 @@ static const char* CompressionDesc[] = {
static_assert( sizeof( CompressionName ) == sizeof( CompressionDesc ), "Unmatched compression names and descriptions" );
+
bool View::Draw()
{
HandshakeStatus status = (HandshakeStatus)m_worker.GetHandshakeStatus();
switch( status )
{
case HandshakeProtocolMismatch:
+ Attention( m_attnProtoMismatch );
ImGui::OpenPopup( "Protocol mismatch" );
break;
case HandshakeNotAvailable:
+ Attention( m_attnNotAvailable );
ImGui::OpenPopup( "Client not ready" );
break;
case HandshakeDropped:
+ Attention( m_attnDropped );
ImGui::OpenPopup( "Client disconnected" );
break;
default:
@@ -248,6 +252,7 @@ bool View::Draw()
const auto& failure = m_worker.GetFailureType();
if( failure != Worker::Failure::None )
{
+ Attention( m_attnFailure );
ImGui::OpenPopup( "Instrumentation failure" );
}
@@ -262,6 +267,7 @@ bool View::Draw()
{
ImGui::CloseCurrentPopup();
ImGui::EndPopup();
+ m_attnProtoMismatch = false;
return false;
}
ImGui::SameLine();
@@ -270,6 +276,7 @@ bool View::Draw()
ImGui::CloseCurrentPopup();
ImGui::EndPopup();
m_reconnectRequested = true;
+ m_attnProtoMismatch = false;
return false;
}
ImGui::EndPopup();
@@ -286,6 +293,7 @@ bool View::Draw()
{
ImGui::CloseCurrentPopup();
ImGui::EndPopup();
+ m_attnNotAvailable = false;
return false;
}
ImGui::SameLine();
@@ -294,6 +302,7 @@ bool View::Draw()
ImGui::CloseCurrentPopup();
ImGui::EndPopup();
m_reconnectRequested = true;
+ m_attnNotAvailable = false;
return false;
}
ImGui::EndPopup();
@@ -310,6 +319,7 @@ bool View::Draw()
{
ImGui::CloseCurrentPopup();
ImGui::EndPopup();
+ m_attnDropped = false;
return false;
}
ImGui::SameLine();
@@ -318,6 +328,7 @@ bool View::Draw()
ImGui::CloseCurrentPopup();
ImGui::EndPopup();
m_reconnectRequested = true;
+ m_attnDropped = false;
return false;
}
ImGui::EndPopup();
@@ -490,6 +501,7 @@ bool View::Draw()
{
ImGui::CloseCurrentPopup();
m_worker.ClearFailure();
+ m_attnFailure = false;
}
ImGui::EndPopup();
}
diff --git a/server/TracyView.hpp b/server/TracyView.hpp
index 36b02118..98f3811c 100644
--- a/server/TracyView.hpp
+++ b/server/TracyView.hpp
@@ -834,6 +834,11 @@ private:
} m_sendQueueWarning;
std::vector<std::pair<int, int>> m_cpuUsageBuf;
+
+ bool m_attnProtoMismatch = false;
+ bool m_attnNotAvailable = false;
+ bool m_attnDropped = false;
+ bool m_attnFailure = false;
};
}