Skip to content

Commit b140686

Browse files
committed
Added a message box and improved error message for unlocking process.
1 parent d85703e commit b140686

4 files changed

Lines changed: 17 additions & 5 deletions

File tree

debian/changelog

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openmediavault-luksencryption (1.3.1) UNRELEASED; urgency=medium
1+
openmediavault-luksencryption (1.3.2) UNRELEASED; urgency=medium
22

33
* Added check on matching UUID for header restore function (with override).
44
* Added test passphrase method that reports which keyslot was unlocked.
@@ -9,8 +9,9 @@ openmediavault-luksencryption (1.3.1) UNRELEASED; urgency=medium
99
* Add icons to keys and header sub-menus items.
1010
* Added kill slot functionality.
1111
* Added missing gettext() for strings that need translation.
12+
* Improve UI notification for locking.
1213

13-
-- OpenMediaVault Plugin Developers <plugins@omv-extras.org> Thu, 12 Nov 2015 15:04:12 +0000
14+
-- OpenMediaVault Plugin Developers <plugins@omv-extras.org> Thu, 12 Nov 2015 15:54:19 +0000
1415

1516
openmediavault-luksencryption (1.1.0) unstable; urgency=medium
1617

usr/share/openmediavault/engined/rpc/luks.inc

100755100644
File mode changed.

usr/share/php/openmediavault/luks.inc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,10 @@ class OMVLuksContainer extends OMVStorageDeviceAbstract {
469469
escapeshellarg($this->getDecryptedName()));
470470
@OMVUtil::exec($cmd, $output, $result);
471471
if ($result !== 0) {
472-
$this->setLastError($output);
472+
// Just report the last line of the output to avoid, e.g. repeated
473+
// 'device-mapper: remove ioctl failed: Device or resource busy'
474+
// messages. The last line says, e.g. 'Device is still in use'.
475+
$this->setLastError(end($output));
473476
return FALSE;
474477
}
475478
$this->refresh();

var/www/openmediavault/js/omv/module/admin/storage/luks/Containers.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,13 +1093,21 @@ Ext.define("OMV.module.admin.storage.luks.Containers", {
10931093
var me = this;
10941094
var record = me.getSelected();
10951095
var df = record.get("devicefile");
1096+
// Display waiting dialog
1097+
OMV.MessageBox.wait(null, _("Locking device ..."));
10961098
// Execute RPC.
10971099
OMV.Rpc.request({
10981100
scope: me,
10991101
callback: function(df, success, response) {
1100-
this.doReload();
1102+
OMV.MessageBox.updateProgress(1);
1103+
OMV.MessageBox.hide();
1104+
if (success) {
1105+
this.doReload();
1106+
} else {
1107+
OMV.MessageBox.error(null, response);
1108+
}
11011109
},
1102-
relayErrors: false,
1110+
relayErrors: true,
11031111
rpcData: {
11041112
service: "LuksMgmt",
11051113
method: "closeContainer",

0 commit comments

Comments
 (0)