mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
fix: Set status tooltip to error message on failed actions
When saving, updating and rechecking an storage fails (which is different to the soft-fail when the action itself succeeds but the status check does not) further details are provided in the error message of the response, which is now set as the tooltip. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
9eeb3cf423
commit
ac1c8c4237
1 changed files with 9 additions and 6 deletions
|
|
@ -1234,8 +1234,9 @@ MountConfigListView.prototype = _.extend({
|
|||
success: function () {
|
||||
$tr.remove();
|
||||
},
|
||||
error: function () {
|
||||
self.updateStatus($tr, StorageConfig.Status.ERROR);
|
||||
error: function (result) {
|
||||
const statusMessage = (result && result.responseJSON) ? result.responseJSON.message : undefined;
|
||||
self.updateStatus($tr, StorageConfig.Status.ERROR, statusMessage);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1270,11 +1271,12 @@ MountConfigListView.prototype = _.extend({
|
|||
}
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
error: function(result) {
|
||||
if (concurrentTimer === undefined
|
||||
|| $tr.data('save-timer') === concurrentTimer
|
||||
) {
|
||||
self.updateStatus($tr, StorageConfig.Status.ERROR);
|
||||
const statusMessage = (result && result.responseJSON) ? result.responseJSON.message : undefined;
|
||||
self.updateStatus($tr, StorageConfig.Status.ERROR, statusMessage);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -1298,8 +1300,9 @@ MountConfigListView.prototype = _.extend({
|
|||
success: function(result) {
|
||||
self.updateStatus($tr, result.status, result.statusMessage);
|
||||
},
|
||||
error: function() {
|
||||
self.updateStatus($tr, StorageConfig.Status.ERROR);
|
||||
error: function(result) {
|
||||
const statusMessage = (result && result.responseJSON) ? result.responseJSON.message : undefined;
|
||||
self.updateStatus($tr, StorageConfig.Status.ERROR, statusMessage);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue