Updated Branches: refs/heads/ui-event-alert-deletion [created] ff3664f19
Add base actions to remove/archive events. Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/ff3664f1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/ff3664f1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/ff3664f1 Branch: refs/heads/ui-event-alert-deletion Commit: ff3664f198e976e3942b97fa7e39effba8e531eb Parents: c9ee055 Author: Brian Federle <[email protected]> Authored: Thu Mar 7 12:10:25 2013 -0800 Committer: Brian Federle <[email protected]> Committed: Thu Mar 7 12:10:25 2013 -0800 ---------------------------------------------------------------------- ui/scripts/events.js | 98 ++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 97 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ff3664f1/ui/scripts/events.js ---------------------------------------------------------------------- diff --git a/ui/scripts/events.js b/ui/scripts/events.js index 38f7728..73f198f 100644 --- a/ui/scripts/events.js +++ b/ui/scripts/events.js @@ -41,7 +41,62 @@ account: { label: 'label.account' }, created: { label: 'label.date', converter: cloudStack.converters.toLocalDate } }, - + actions: { + // Remove multiple events + remove: { + label: 'Delete multiple', + isHeader: true, + addRow: false, + messages: { + notification: function(args) { + return 'Remove events'; + } + }, + createForm: { + desc: '', + fields: { + type: { label: 'By event type' }, + date: { label: 'By date range' } + } + }, + action: function(args) { + // + args.response.success(); + // + + // Reloads window with events removed + $(window).trigger('cloudStack.fullRefresh'); + } + }, + + // Archive multiple events + archive: { + label: 'Archive multiple', + isHeader: true, + addRow: false, + messages: { + notification: function(args) { + return 'Archive events'; + } + }, + createForm: { + desc: '', + fields: { + type: { label: 'By event type' }, + date: { label: 'By date range' } + } + }, + action: function(args) { + // + args.response.success(); + // + + // Reloads window with events removed + $(window).trigger('cloudStack.fullRefresh'); + } + } + + }, advSearchFields: { level: { label: 'label.level', @@ -132,6 +187,47 @@ }, detailView: { name: 'label.details', + actions: { + + // Remove single event + remove: { + label: 'Delete', + messages: { + notification: function(args) { + return 'Remove event'; + }, + confirm: function() { + return 'Are you sure you want to remove this event?'; + } + }, + action: function(args) { + // + args.response.success(); + // + } + }, + + // Archive single event + archive: { + label: 'Archive', + messages: { + notification: function(args) { + return 'Remove events'; + }, + confirm: function() { + return 'Please confirm that you want to archive this event.'; + } + }, + action: function(args) { + // + args.response.success(); + // + + // Reloads window with item archived + $(window).trigger('cloudStack.fullRefresh'); + } + } + }, tabs: { details: { title: 'label.details',
