Commit 1fc28516 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit Committed by Kitware Robot

Merge topic 'session-label-fixes'

572f7805 fix logic to label server in Pipeline browser.
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Mathieu Westphal's avatarMathieu Westphal <mathieu.westphal@kitware.com>
Merge-request: !2872
parents f2e0b003 572f7805
Pipeline #123276 failed with stage
in 0 seconds
......@@ -801,13 +801,15 @@ QVariant pqPipelineModel::data(const QModelIndex& idx, int role) const
if (server)
{
const pqServerResource& resource = server->getResource();
const auto name = resource.configuration().isNameDefault()
? resource.toURI()
: resource.configuration().name();
const bool is_configuration_default = resource.configuration().isNameDefault();
const auto name =
is_configuration_default ? resource.toURI() : resource.configuration().name();
int time = server->getRemainingLifeTime();
QString timeLeft =
time > -1 ? QString(" (%1min left)").arg(QString::number(time)) : QString();
return QString("%1 (%2)%3").arg(name).arg(resource.configuration().URI()).arg(timeLeft);
return is_configuration_default
? QString("%1 %3").arg(name).arg(timeLeft)
: QString("%1 (%2)%3").arg(name).arg(resource.configuration().URI()).arg(timeLeft);
}
else if (source)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment