Skip to content

Commit c00cf19

Browse files
committed
Detail view: Allow passing error with custom action's complete fn
1 parent 9768dff commit c00cf19

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎ui/scripts/ui/widgets/detailView.js‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,21 @@
147147

148148
var $item = args.$item;
149149
var $row = $detailView.data('list-view-row');
150+
var error = args.error;
150151

151152
notification.desc = messages.notification(args.messageArgs);
152153
notification._custom = $.extend(args._custom ? args._custom : {}, {
153154
$detailView: $detailView
154155
});
155156

157+
if (error) {
158+
notification.interval = 1;
159+
notification.poll = function(args) {
160+
cloudStack.dialog.notice({ message: error });
161+
args.error(error);
162+
}
163+
}
164+
156165
cloudStack.ui.notifications.add(
157166
notification,
158167

0 commit comments

Comments
 (0)