Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+12
-12
@@ -92,13 +92,13 @@ Core::FunctionReplyObject ObjectOperator::updateExercises(const std::vector<int>
|
||||
}
|
||||
if (mapping.visibleParties().empty())
|
||||
{
|
||||
DEBUG_LOG()<< "Update Operator visible Parties for Execise: No parties found for " << exerciseId << " use default (ex0)";
|
||||
DEBUG_LOG(m_logger)<< "Update Operator visible Parties for Execise: No parties found for " << exerciseId << " use default (ex0)";
|
||||
// Add default visibleParties from ex0
|
||||
mapping.visibleParties = m_data.visibleParties;
|
||||
}
|
||||
|
||||
if (!m_mainHandler->db()->insert(mapping))
|
||||
INFO_LOG() << "Can not add operator " << mapping.operatorId << " to exercise " << exerciseId << " - exercise does no longer exist";
|
||||
INFO_LOG(m_logger) << "Can not add operator " << mapping.operatorId << " to exercise " << exerciseId << " - exercise does no longer exist";
|
||||
else
|
||||
{
|
||||
if (std::find(m_exercises.begin(), m_exercises.end(), exerciseId) == m_exercises.end())
|
||||
@@ -116,7 +116,7 @@ Core::FunctionReplyObject ObjectOperator::updateExercises(const std::vector<int>
|
||||
Core::FunctionReplyObject ObjectOperator::updateObject(const Database::OpmOperator &data)
|
||||
{
|
||||
m_data.name = data.name;
|
||||
DEBUG_LOG() << "ObjectOperator::updateObject"
|
||||
DEBUG_LOG(m_logger) << "ObjectOperator::updateObject"
|
||||
<< " data.id = " << data.id
|
||||
<< " data.rolePresetId = " << data.rolePresetId;
|
||||
m_data.description = data.description;
|
||||
@@ -133,7 +133,7 @@ Core::FunctionReplyObject ObjectOperator::updateObject(const Database::OpmOperat
|
||||
|
||||
if (!m_mainHandler->db()->update(m_data))
|
||||
{
|
||||
ERROR_LOG()<< "Error updating Operator in database: " << m_mainHandler->db()->getLastError().text();
|
||||
ERROR_LOG(m_logger)<< "Error updating Operator in database: " << m_mainHandler->db()->getLastError().text();
|
||||
return Core::FunctionReplyObject(0, tr_lts("dds", "Error updating operator in database."));
|
||||
}
|
||||
m_data.primaryGroupId = data.primaryGroupId;
|
||||
@@ -144,13 +144,13 @@ Core::FunctionReplyObject ObjectOperator::updateObject(const Database::OpmOperat
|
||||
|
||||
Core::FunctionReplyObject ObjectOperator::updateOperatorExercise(const Database::OpmOperatorExercise &data)
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << data.operatorId << " " << data.exerciseId;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << data.operatorId << " " << data.exerciseId;
|
||||
|
||||
// insert can fail due to (deleted) exerciseId
|
||||
m_mainHandler->db()->setEmitMessageOnError(false);
|
||||
for (int i=0; i < m_dataExercise.size(); ++i)
|
||||
{
|
||||
DEBUG_LOG() << "** m_dataExercise.at(" << i << "): " << m_dataExercise.at(i).exerciseId << "==" << data.exerciseId;
|
||||
DEBUG_LOG(m_logger) << "** m_dataExercise.at(" << i << "): " << m_dataExercise.at(i).exerciseId << "==" << data.exerciseId;
|
||||
if (m_dataExercise.at(i).exerciseId != data.exerciseId)
|
||||
continue;
|
||||
Database::OpmOperatorExercise mapping = m_dataExercise.at(i);
|
||||
@@ -159,16 +159,16 @@ Core::FunctionReplyObject ObjectOperator::updateOperatorExercise(const Database:
|
||||
mapping.properties = data.properties;
|
||||
m_dataExercise.replace(i, mapping);
|
||||
|
||||
DEBUG_LOG() << "** m_dataExercise.at(" << i << "): " << m_dataExercise.at(i).operatorId << ", "
|
||||
DEBUG_LOG(m_logger) << "** m_dataExercise.at(" << i << "): " << m_dataExercise.at(i).operatorId << ", "
|
||||
<< m_dataExercise.at(i).exerciseId << ", "
|
||||
<< m_dataExercise.at(i).visibleParties.toPgString() << ", "
|
||||
<< m_dataExercise.at(i).hiddenParties.toPgString();
|
||||
DEBUG_LOG() << "** mapping: " << mapping.operatorId << ", "
|
||||
DEBUG_LOG(m_logger) << "** mapping: " << mapping.operatorId << ", "
|
||||
<< mapping.exerciseId << ", "
|
||||
<< mapping.visibleParties.toPgString() << ", "
|
||||
<< mapping.hiddenParties.toPgString();
|
||||
if (!m_mainHandler->db()->update(mapping))
|
||||
ERROR_LOG()<< "Error updating OperatorExecise in database: " << m_mainHandler->db()->getLastError().text();
|
||||
ERROR_LOG(m_logger)<< "Error updating OperatorExecise in database: " << m_mainHandler->db()->getLastError().text();
|
||||
}
|
||||
m_mainHandler->db()->setEmitMessageOnError(true);
|
||||
|
||||
@@ -236,7 +236,7 @@ void ObjectOperator::reloadAcls(bool force)
|
||||
// QStringList stringList;
|
||||
// for (int acl : calculatedAcls)
|
||||
// stringList << QString::number(acl);
|
||||
// DEBUG_LOG() << "Effective ACLs for Operator " << m_data.name << "(id: " << m_data.id << "): " << stringList.join(QLatin1String(", "));
|
||||
// DEBUG_LOG(m_logger) << "Effective ACLs for Operator " << m_data.name << "(id: " << m_data.id << "): " << stringList.join(QLatin1String(", "));
|
||||
|
||||
if (force || m_effectiveAcls != calculatedAcls)
|
||||
updateEffectiveAcls(calculatedAcls);
|
||||
@@ -336,12 +336,12 @@ void ObjectOperator::onPublishData()
|
||||
op.rolePresetId(m_data.rolePresetId);
|
||||
op.properties(m_data.properties.toStdString());
|
||||
|
||||
INFO_LOG() << "Publish OpmOperator-data to dds (" << m_data.id
|
||||
INFO_LOG(m_logger) << "Publish OpmOperator-data to dds (" << m_data.id
|
||||
<< " rolePresetId =" << m_data.rolePresetId
|
||||
<< ") ...";
|
||||
|
||||
if (!m_mainHandler->dts()->publish(op))
|
||||
ERROR_LOG() << "Error publishing OpmOperator-data to dds";
|
||||
ERROR_LOG(m_logger) << "Error publishing OpmOperator-data to dds";
|
||||
}
|
||||
|
||||
std::vector<OperatorManagement::PartiesByExercise> ObjectOperator::toDdsData(const QVector<Database::OpmOperatorExercise> &dbData)
|
||||
|
||||
Reference in new issue
Block a user