Improve output, esecially to ISMAS
This commit is contained in:
parent
4dba36a420
commit
0a43654f9b
59
worker.h
59
worker.h
@ -212,13 +212,16 @@ class Worker : public QThread{
|
|||||||
QStringList lst = m_worker->m_ismasTriggerStatusMessage;
|
QStringList lst = m_worker->m_ismasTriggerStatusMessage;
|
||||||
m_worker->GUI(lst) << (m_worker->CONSOLE(lst) << (m_worker->ISMAS(lst) << UPDATE_STEP::UPDATE_NOT_NECESSARY));
|
m_worker->GUI(lst) << (m_worker->CONSOLE(lst) << (m_worker->ISMAS(lst) << UPDATE_STEP::UPDATE_NOT_NECESSARY));
|
||||||
} else {
|
} else {
|
||||||
m_worker->ISMAS() << (m_worker->GUI() << (m_worker->CONSOLE() << UPDATE_STEP::UPDATE_SUCCEEDED));
|
QStringList lst(QString(m_worker->smap[UPDATE_STEP::UPDATE_SUCCEEDED]));
|
||||||
|
m_worker->ISMAS(lst) << (m_worker->GUI(lst) << (m_worker->CONSOLE(lst) << UPDATE_STEP::UPDATE_SUCCEEDED));
|
||||||
m_worker->setProgress(_UPDATE_SUCCEEDED);
|
m_worker->setProgress(_UPDATE_SUCCEEDED);
|
||||||
|
|
||||||
m_worker->ISMAS() << (m_worker->GUI() << (m_worker->CONSOLE() << UPDATE_STEP::UPDATE_ACTIVATED));
|
lst = QStringList(QString(m_worker->smap[UPDATE_STEP::UPDATE_ACTIVATED]));
|
||||||
|
m_worker->ISMAS(lst) << (m_worker->GUI(lst) << (m_worker->CONSOLE(lst) << UPDATE_STEP::UPDATE_ACTIVATED));
|
||||||
m_worker->setProgress(_UPDATE_ACTIVATED);
|
m_worker->setProgress(_UPDATE_ACTIVATED);
|
||||||
|
|
||||||
m_worker->ISMAS() << (m_worker->GUI() << (m_worker->CONSOLE() << UPDATE_STEP::FINISHED));
|
lst = QStringList(QString(m_worker->smap[UPDATE_STEP::FINISHED]));
|
||||||
|
m_worker->CONSOLE(lst) << UPDATE_STEP::FINISHED;
|
||||||
m_worker->setProgress(_FINISHED);
|
m_worker->setProgress(_FINISHED);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -233,15 +236,17 @@ class Worker : public QThread{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (m_worker->m_automaticUpdate) {
|
if (m_worker->m_automaticUpdate) {
|
||||||
QStringList lst = (QStringList() << "AUTOMATIC UPDATE");
|
QStringList lst(QString(m_worker->smap[UPDATE_STEP::SEND_LAST_VERSION]));
|
||||||
|
lst << "AUTOMATIC UPDATE";
|
||||||
if (m_worker->m_updateNotNecessary) {
|
if (m_worker->m_updateNotNecessary) {
|
||||||
lst << "UPDATE NOT NECESSARY";
|
lst << "UPDATE NOT NECESSARY";
|
||||||
}
|
}
|
||||||
m_worker->ISMAS(lst) << (m_worker->GUI(lst) << (m_worker->CONSOLE(lst)
|
m_worker->ISMAS(lst) << (m_worker->GUI(lst) << (m_worker->CONSOLE(lst)
|
||||||
<< UPDATE_STEP::SEND_LAST_VERSION));
|
<< UPDATE_STEP::SEND_LAST_VERSION));
|
||||||
} else {
|
} else {
|
||||||
m_worker->ISMAS() << (m_worker->GUI() << (m_worker->CONSOLE()
|
QStringList lst(QString(m_worker->smap[UPDATE_STEP::SEND_LAST_VERSION]));
|
||||||
<< UPDATE_STEP::SEND_LAST_VERSION));
|
m_worker->ISMAS(lst) << (m_worker->GUI(lst) << (m_worker->CONSOLE(lst)
|
||||||
|
<< UPDATE_STEP::SEND_LAST_VERSION));
|
||||||
}
|
}
|
||||||
m_worker->stopProgressLoop();
|
m_worker->stopProgressLoop();
|
||||||
|
|
||||||
@ -741,7 +746,7 @@ private:
|
|||||||
"U0010",
|
"U0010",
|
||||||
_CLONE_REPOSITORY_SUCCESS,
|
_CLONE_REPOSITORY_SUCCESS,
|
||||||
IsmasClient::RESULT_CODE::SUCCESS,
|
IsmasClient::RESULT_CODE::SUCCESS,
|
||||||
smap[step],
|
smap[UPDATE_STEP::CLONE_REPOSITORY],
|
||||||
QString("CLONED REPOSITORY %1 AND CHECKED OUT BRANCH %2")
|
QString("CLONED REPOSITORY %1 AND CHECKED OUT BRANCH %2")
|
||||||
.arg(instance->m_customerRepository)
|
.arg(instance->m_customerRepository)
|
||||||
.arg(instance->m_gc.branchName()).toStdString().c_str(),
|
.arg(instance->m_gc.branchName()).toStdString().c_str(),
|
||||||
@ -757,7 +762,7 @@ private:
|
|||||||
"U0003",
|
"U0003",
|
||||||
_CLONE_REPOSITORY_FAILURE,
|
_CLONE_REPOSITORY_FAILURE,
|
||||||
IsmasClient::RESULT_CODE::INSTALL_ERROR,
|
IsmasClient::RESULT_CODE::INSTALL_ERROR,
|
||||||
smap[step],
|
smap[UPDATE_STEP::CHECKOUT_REPOSITORY],
|
||||||
QString("CLONING REPOSITORY %1 OR CHECKING OUT BRANCH %2 FAILED")
|
QString("CLONING REPOSITORY %1 OR CHECKING OUT BRANCH %2 FAILED")
|
||||||
.arg(instance->m_customerRepository)
|
.arg(instance->m_customerRepository)
|
||||||
.arg(instance->m_gc.branchName()).toStdString().c_str(),
|
.arg(instance->m_gc.branchName()).toStdString().c_str(),
|
||||||
@ -802,7 +807,7 @@ private:
|
|||||||
"U0003",
|
"U0003",
|
||||||
_CHECK_ISMAS_TRIGGER_FAILURE,
|
_CHECK_ISMAS_TRIGGER_FAILURE,
|
||||||
IsmasClient::RESULT_CODE::INSTALL_ERROR,
|
IsmasClient::RESULT_CODE::INSTALL_ERROR,
|
||||||
smap[step],
|
smap[UPDATE_STEP::CHECK_ISMAS_TRIGGER],
|
||||||
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
ismasClient.sendRequestReceiveResponse(
|
ismasClient.sendRequestReceiveResponse(
|
||||||
@ -814,9 +819,20 @@ private:
|
|||||||
case UPDATE_STEP::INITIAL_CLONE_WITH_ACTIVE_ISMAS_TRIGGER:
|
case UPDATE_STEP::INITIAL_CLONE_WITH_ACTIVE_ISMAS_TRIGGER:
|
||||||
ismasClient.setProgressInPercent(_INITIAL_CLONE_WITH_ACTIVE_ISMAS_TRIGGER);
|
ismasClient.setProgressInPercent(_INITIAL_CLONE_WITH_ACTIVE_ISMAS_TRIGGER);
|
||||||
break;
|
break;
|
||||||
case UPDATE_STEP::CHECKOUT_BRANCH:
|
case UPDATE_STEP::CHECKOUT_BRANCH: {
|
||||||
ismasClient.setProgressInPercent(_CHECKOUT_BRANCH);
|
ismasClient.setProgressInPercent(_CHECKOUT_BRANCH);
|
||||||
break;
|
QString const &ismasUpdateNews =
|
||||||
|
QString("#M=APISM#C=CMD_EVENT#J=") +
|
||||||
|
ismasClient.updateNewsToIsmas(
|
||||||
|
"U0010",
|
||||||
|
_CHECKOUT_BRANCH_SUCCESS,
|
||||||
|
IsmasClient::RESULT_CODE::SUCCESS,
|
||||||
|
smap[UPDATE_STEP::CHECKOUT_BRANCH],
|
||||||
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
|
ismasClient.sendRequestReceiveResponse(
|
||||||
|
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
|
||||||
|
} break;
|
||||||
case UPDATE_STEP::CHECKOUT_BRANCH_SUCCESS: {
|
case UPDATE_STEP::CHECKOUT_BRANCH_SUCCESS: {
|
||||||
ismasClient.setProgressInPercent(_CHECKOUT_BRANCH_SUCCESS);
|
ismasClient.setProgressInPercent(_CHECKOUT_BRANCH_SUCCESS);
|
||||||
QString const &ismasUpdateNews =
|
QString const &ismasUpdateNews =
|
||||||
@ -825,7 +841,7 @@ private:
|
|||||||
"U0010",
|
"U0010",
|
||||||
_CHECKOUT_BRANCH_SUCCESS,
|
_CHECKOUT_BRANCH_SUCCESS,
|
||||||
IsmasClient::RESULT_CODE::SUCCESS,
|
IsmasClient::RESULT_CODE::SUCCESS,
|
||||||
smap[step],
|
smap[UPDATE_STEP::CHECKOUT_BRANCH],
|
||||||
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
ismasClient.sendRequestReceiveResponse(
|
ismasClient.sendRequestReceiveResponse(
|
||||||
@ -839,7 +855,7 @@ private:
|
|||||||
"U0003",
|
"U0003",
|
||||||
_CHECKOUT_BRANCH_FAILURE,
|
_CHECKOUT_BRANCH_FAILURE,
|
||||||
IsmasClient::RESULT_CODE::INSTALL_ERROR,
|
IsmasClient::RESULT_CODE::INSTALL_ERROR,
|
||||||
smap[step],
|
smap[UPDATE_STEP::CHECKOUT_BRANCH],
|
||||||
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
ismasClient.sendRequestReceiveResponse(
|
ismasClient.sendRequestReceiveResponse(
|
||||||
@ -981,6 +997,17 @@ private:
|
|||||||
} break;
|
} break;
|
||||||
case UPDATE_STEP::EXEC_OPKG_COMMAND_SUCCESS: {
|
case UPDATE_STEP::EXEC_OPKG_COMMAND_SUCCESS: {
|
||||||
ismasClient.setProgressInPercent(_EXEC_OPKG_COMMAND_SUCCESS);
|
ismasClient.setProgressInPercent(_EXEC_OPKG_COMMAND_SUCCESS);
|
||||||
|
QString const &ismasUpdateNews =
|
||||||
|
QString("#M=APISM#C=CMD_EVENT#J=") +
|
||||||
|
ismasClient.updateNewsToIsmas(
|
||||||
|
_ISMAS_CONTINUE,
|
||||||
|
ismasClient.getProgressInPercent(),
|
||||||
|
IsmasClient::RESULT_CODE::SUCCESS,
|
||||||
|
smap[UPDATE_STEP::EXEC_OPKG_COMMANDS],
|
||||||
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
|
ismasClient.sendRequestReceiveResponse(
|
||||||
|
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
|
||||||
} break;
|
} break;
|
||||||
case UPDATE_STEP::EXEC_OPKG_COMMAND_FAILURE: {
|
case UPDATE_STEP::EXEC_OPKG_COMMAND_FAILURE: {
|
||||||
ismasClient.setProgressInPercent(_EXEC_OPKG_COMMAND_FAILURE);
|
ismasClient.setProgressInPercent(_EXEC_OPKG_COMMAND_FAILURE);
|
||||||
@ -1016,7 +1043,7 @@ private:
|
|||||||
_ISMAS_CONTINUE,
|
_ISMAS_CONTINUE,
|
||||||
ismasClient.getProgressInPercent(),
|
ismasClient.getProgressInPercent(),
|
||||||
IsmasClient::RESULT_CODE::SUCCESS,
|
IsmasClient::RESULT_CODE::SUCCESS,
|
||||||
smap[step],
|
smap[UPDATE_STEP::DOWNLOAD_DEVICE_CONTROLLER],
|
||||||
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
ismasClient.sendRequestReceiveResponse(
|
ismasClient.sendRequestReceiveResponse(
|
||||||
@ -1033,7 +1060,7 @@ private:
|
|||||||
_ISMAS_CONTINUE,
|
_ISMAS_CONTINUE,
|
||||||
ismasClient.getProgressInPercent(),
|
ismasClient.getProgressInPercent(),
|
||||||
IsmasClient::RESULT_CODE::SUCCESS,
|
IsmasClient::RESULT_CODE::SUCCESS,
|
||||||
smap[step],
|
smap[UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE],
|
||||||
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
ismasClient.sendRequestReceiveResponse(
|
ismasClient.sendRequestReceiveResponse(
|
||||||
@ -1053,7 +1080,7 @@ private:
|
|||||||
_ISMAS_CONTINUE,
|
_ISMAS_CONTINUE,
|
||||||
ismasClient.getProgressInPercent(),
|
ismasClient.getProgressInPercent(),
|
||||||
IsmasClient::RESULT_CODE::SUCCESS,
|
IsmasClient::RESULT_CODE::SUCCESS,
|
||||||
smap[step],
|
smap[UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY],
|
||||||
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
ismasClient.sendRequestReceiveResponse(
|
ismasClient.sendRequestReceiveResponse(
|
||||||
|
Loading…
Reference in New Issue
Block a user