Index: sources/device/DeviceView.cpp =================================================================== diff -u -r5a4a26f106ba03759e3a89b19690fa678f8a3aca -r46231564422493a69e3120459adefe1320eba255 --- sources/device/DeviceView.cpp (.../DeviceView.cpp) (revision 5a4a26f106ba03759e3a89b19690fa678f8a3aca) +++ sources/device/DeviceView.cpp (.../DeviceView.cpp) (revision 46231564422493a69e3120459adefe1320eba255) @@ -69,6 +69,8 @@ void VDevice::cryptSetupRequest(const QString &vCommand) { // DEBUG : qDebug() << "HERE Request" << vValue; + cryptSetupEnabled(false); + DeviceCryptSetupRequestData data; data.mCommand = vCommand; bool ok = false; @@ -88,11 +90,12 @@ // cryptsetup attribute will containe the command to be sent to the cryptsetup script // and the retrurned message can be the model message in vData.mMessage status(vData.mMessage); - cryptSetupEnabled(vData.mAccepted); accepted(vData.mAccepted); reason (vData.mReason ); + cryptSetupEnabled(true); + // has to be the last one response(true); } @@ -188,6 +191,9 @@ void VDevice::factoryResetRequest(const QString &vCommand) { Q_UNUSED(vCommand) // DEBUG : qDebug() << "HERE Request" << vCommand; + + factoryResetEnabled(false); + DeviceFactoryResetRequestData data; emit didAttributeRequest(data); } @@ -197,12 +203,11 @@ // this has to be called to let Gui to set to old value that device controller provided. status(vData.mMessage); - // Either the script exited successfully or the script failed and the reason is provided - factoryResetEnabled(vData.mAccepted || (!vData.mAccepted && vData.mReason!=0)); - accepted(vData.mAccepted); reason (vData.mReason ); + factoryResetEnabled(true); + // has to be the last one response(true); } @@ -215,6 +220,9 @@ void VDevice::decommissionRequest(const QString &vCommand) { Q_UNUSED(vCommand) // DEBUG : qDebug() << "HERE Request" << vCommand; + + decommissionEnabled(true); + DeviceDecommissionRequestData data; bool ok = false; data.mPassword = encryption::configurationsPassword( ok ); @@ -232,12 +240,11 @@ // this has to be called to let Gui to set to old value that device controller provided. status(vData.mMessage); - // Either the script exited successfully or the script failed and the reason is provided - decommissionEnabled(vData.mAccepted || (!vData.mAccepted && vData.mReason!=0)); - accepted(vData.mAccepted); reason (vData.mReason ); + decommissionEnabled(true); + // has to be the last one response(true); } Index: sources/gui/qml/pages/settings/SettingsDecommission.qml =================================================================== diff -u -ra7693f04e693294338aa9829d14f4ed7aa99a7a5 -r46231564422493a69e3120459adefe1320eba255 --- sources/gui/qml/pages/settings/SettingsDecommission.qml (.../SettingsDecommission.qml) (revision a7693f04e693294338aa9829d14f4ed7aa99a7a5) +++ sources/gui/qml/pages/settings/SettingsDecommission.qml (.../SettingsDecommission.qml) (revision 46231564422493a69e3120459adefe1320eba255) @@ -26,25 +26,15 @@ * which asks for confirmation of performing a factory reset and doing it if confirmed */ UserConfirmation{ id: _root - title : qsTr("Device Decommissioning") - message : vDevice.factoryResetEnabled ? qsTr("Do you want to perform a decommissioning of this device?") - : qsTr("Decommissioning...") + message : vDevice.decommissionEnabled ? qsTr("Do you want to perform the %1?").arg(title.toLowerCase()) + : qsTr("Please wait ...") itemIndex : SettingsStack.Decommission notificationText : vDevice.status - confirmVisible : true + confirmVisible : true confirmEnabled : vDevice.decommissionEnabled onConfirmClicked : vDevice.decommission = "" // Need to set to something (ie: emtpy string) to trigger CPP code backVisible : true backEnabled : vDevice.decommissionEnabled - onBackClicked : _root.notificationText = "" - - Connections{ target:vDevice - function onAcceptedChanged() { - if(_root.visible) { // indicate reset screen is shown - _root.notificationText = vDevice.status - } - } - } } Index: sources/gui/qml/pages/settings/SettingsFactoryReset.qml =================================================================== diff -u -r945614a28df94075bfccdfde7c876e4f53ed3410 -r46231564422493a69e3120459adefe1320eba255 --- sources/gui/qml/pages/settings/SettingsFactoryReset.qml (.../SettingsFactoryReset.qml) (revision 945614a28df94075bfccdfde7c876e4f53ed3410) +++ sources/gui/qml/pages/settings/SettingsFactoryReset.qml (.../SettingsFactoryReset.qml) (revision 46231564422493a69e3120459adefe1320eba255) @@ -26,25 +26,15 @@ * which asks for confirmation of performing a factory reset and doing it if confirmed */ UserConfirmation{ id: _root - title : qsTr("Factory Reset") - message : vDevice.factoryResetEnabled ? qsTr("Do you want to perform a factory reset?") - : qsTr("Resetting...") + message : vDevice.factoryResetEnabled ? qsTr("Do you want to perform the %1?").arg(title.toLowerCase()) + : qsTr("Please wait ...") itemIndex : SettingsStack.FactoryReset notificationText : vDevice.status - confirmVisible : true + confirmVisible : true confirmEnabled : vDevice.factoryResetEnabled onConfirmClicked : vDevice.factoryReset = "" // Need to set to something (ie: emtpy string) to trigger CPP code backVisible : true backEnabled : vDevice.factoryResetEnabled - onBackClicked : _root.notificationText = "" - - Connections{ target:vDevice - function onAcceptedChanged() { - if(_root.visible) { // indicate reset screen is shown - _root.notificationText = vDevice.status - } - } - } } Index: sources/gui/qml/pages/settings/SettingsManufacturingSetup.qml =================================================================== diff -u -r0e122c98700951af539d9f47c5578e26d640fcc7 -r46231564422493a69e3120459adefe1320eba255 --- sources/gui/qml/pages/settings/SettingsManufacturingSetup.qml (.../SettingsManufacturingSetup.qml) (revision 0e122c98700951af539d9f47c5578e26d640fcc7) +++ sources/gui/qml/pages/settings/SettingsManufacturingSetup.qml (.../SettingsManufacturingSetup.qml) (revision 46231564422493a69e3120459adefe1320eba255) @@ -18,17 +18,21 @@ // Qml imports import "qrc:/globals" +import "qrc:/pages" import "qrc:/compounds" - /*! * \brief SettingsManufacturingSetup is the screen * which helps the manufacturing during the device setup */ -SettingsBase { id: _root +UserConfirmation { id: _root + message : vDevice.cryptSetupEnabled ? qsTr("Do you want to perform the %1?").arg(title.toLowerCase()) + : qsTr("Please wait ...") + itemIndex : SettingsStack.DeviceConfiguration + notificationText: vDevice.status + confirmVisible : true confirmEnabled : vDevice.cryptSetupEnabled - onConfirmClicked: vDevice.cryptSetup = "setup"; - notificationText: vDevice.status + onConfirmClicked: vDevice.cryptSetup = "setup" } Index: sources/gui/qml/pages/settings/SettingsStack.qml =================================================================== diff -u -r9ef6badf8e172436bba2bfad1642ae7e469e0361 -r46231564422493a69e3120459adefe1320eba255 --- sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 9ef6badf8e172436bba2bfad1642ae7e469e0361) +++ sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 46231564422493a69e3120459adefe1320eba255) @@ -35,7 +35,7 @@ StackItem { id : _root objectName: "_SettingsStack" - stackView.initialItem : null + stackView.initialItem : _settingsHome property bool serviceMode : false @@ -75,7 +75,7 @@ qsTr("Software Update" ), // SWUpdate qsTr("Enable Root SSH" ), // RootSSHAccess qsTr("Factory Reset" ), // FactoryReset - qsTr("Decommission" ), // Decommission + qsTr("Decommissioning" ), // Decommission ] property var itemsEnabled : [ true , // Information @@ -109,7 +109,7 @@ false /* serviceMode phase 1 */ , // Language false /* serviceMode phase 1 */ , // Calibration _GuiView.manufactMode && serviceMode , // Device Configuration // && serviceMode added to make sure the service mode is confirmed by HD - /*_GuiView.manufactMode &&*/ serviceMode , // DeviceRegistration // && serviceMode added to make sure the service mode is confirmed by HD // *** manyfactMode removed for testing + _GuiView.manufactMode && serviceMode , // DeviceRegistration // && serviceMode added to make sure the service mode is confirmed by HD false /* serviceMode phase 1 */ , // SWUpdate serviceMode , // RootSSHAccess serviceMode , // FactoryReset @@ -220,6 +220,7 @@ SettingsDecommission { id: _serviceDecommission } function gotoServiceMode( vservice ) { + //DEBUG console.log (" 0 ---------- ", _GuiView.manufactMode, _GuiView.manufactSetup, vservice, stackView.initialItem, stackView.currentItem, stackView.depth) if ( ! _servicePassword.isPassword_Accepted ) return serviceMode = vservice if ( vservice ) @@ -256,7 +257,7 @@ } push(stackView.initialItem) - //DEBUG console.log (" ----------",_GuiView.manufactMode, _GuiView.manufactSetup, vPass, stackView.initialItem, stackView.currentItem, stackView.depth) + //DEBUG console.log (" 1 ---------- ", _GuiView.manufactMode, _GuiView.manufactSetup, vPass, stackView.initialItem, stackView.currentItem, stackView.depth) if ( _GuiView.manufactSetup ) { _settingsHome.notificationText = vPass ? "" : qsTr("Application POST Failed") }