mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
Detail view: Allow passing error with custom action's complete fn
This commit is contained in:
parent
9dabad0253
commit
d09d21847c
@ -147,12 +147,21 @@
|
|||||||
|
|
||||||
var $item = args.$item;
|
var $item = args.$item;
|
||||||
var $row = $detailView.data('list-view-row');
|
var $row = $detailView.data('list-view-row');
|
||||||
|
var error = args.error;
|
||||||
|
|
||||||
notification.desc = messages.notification(args.messageArgs);
|
notification.desc = messages.notification(args.messageArgs);
|
||||||
notification._custom = $.extend(args._custom ? args._custom : {}, {
|
notification._custom = $.extend(args._custom ? args._custom : {}, {
|
||||||
$detailView: $detailView
|
$detailView: $detailView
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (error) {
|
||||||
|
notification.interval = 1;
|
||||||
|
notification.poll = function(args) {
|
||||||
|
cloudStack.dialog.notice({ message: error });
|
||||||
|
args.error(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cloudStack.ui.notifications.add(
|
cloudStack.ui.notifications.add(
|
||||||
notification,
|
notification,
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user