Skip to content

Commit 80ae483

Browse files
committed
CLOUDSTACK-4010: Events/alerts: Pass start date / end date
Original submitter: Sanjay Tripathi <sanjay.tripathi@citrix.com> Reviewed by: Brian Federle <brian.federle@citrix.com>
1 parent 6f63817 commit 80ae483

1 file changed

Lines changed: 67 additions & 26 deletions

File tree

‎ui/scripts/events.js‎

Lines changed: 67 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,13 @@
7575
label: 'By event type',
7676
docID: 'helpEventsDeleteType'
7777
},
78-
date: {
79-
label: 'By date (older than)',
78+
startdate: {
79+
label: 'By date (start date)',
80+
docID: 'helpEventsDeleteDate',
81+
isDatepicker: true
82+
},
83+
enddate: {
84+
label: 'By date (end date)',
8085
docID: 'helpEventsDeleteDate',
8186
isDatepicker: true
8287
}
@@ -91,9 +96,14 @@
9196
type: args.data.type
9297
});
9398

94-
if (args.data.date != "")
99+
if (args.data.startdate != "")
95100
$.extend(data, {
96-
olderthan: args.data.date
101+
startdate: args.data.startdate
102+
});
103+
104+
if (args.data.enddate != "")
105+
$.extend(data, {
106+
enddate: args.data.enddate
97107
});
98108

99109
$.ajax({
@@ -132,11 +142,16 @@
132142
label: 'By event type',
133143
docID: 'helpEventsArchiveType'
134144
},
135-
date: {
136-
label: 'By date (older than)',
145+
startdate: {
146+
label: 'By date (start date)',
137147
docID: 'helpEventsArchiveDate',
138148
isDatepicker: true
139149
},
150+
enddate: {
151+
label: 'By date (end date)',
152+
docID: 'helpEventsArchiveDate',
153+
isDatepicker: true
154+
}
140155
}
141156
},
142157
action: function(args) {
@@ -147,9 +162,14 @@
147162
type: args.data.type
148163
});
149164

150-
if (args.data.date != "")
165+
if (args.data.startdate != "")
151166
$.extend(data, {
152-
olderthan: args.data.date
167+
startdate: args.data.startdate
168+
});
169+
170+
if (args.data.enddate != "")
171+
$.extend(data, {
172+
enddate: args.data.enddate
153173
});
154174

155175
$.ajax({
@@ -250,16 +270,16 @@
250270
}
251271
}
252272
/*
253-
,
254-
startdate: {
255-
label: 'Start Date',
256-
isDatepicker: true
257-
},
258-
enddate: {
259-
label: 'End Date',
260-
isDatepicker: true
261-
}
262-
*/
273+
,
274+
startdate: {
275+
label: 'Start Date',
276+
isDatepicker: true
277+
},
278+
enddate: {
279+
label: 'End Date',
280+
isDatepicker: true
281+
}
282+
*/
263283
},
264284

265285
dataProvider: function(args) {
@@ -424,8 +444,13 @@
424444
label: 'By Alert type',
425445
docID: 'helpAlertsDeleteType'
426446
},
427-
date: {
428-
label: 'By date (older than)',
447+
startdate: {
448+
label: 'By date (start date)',
449+
docID: 'helpAlertsDeleteDate',
450+
isDatepicker: true
451+
},
452+
enddate: {
453+
label: 'By date (end than)',
429454
docID: 'helpAlertsDeleteDate',
430455
isDatepicker: true
431456
}
@@ -440,9 +465,14 @@
440465
type: args.data.type
441466
});
442467

443-
if (args.data.date != "")
468+
if (args.data.startdate != "")
444469
$.extend(data, {
445-
olderthan: args.data.date
470+
startdate: args.data.startdate
471+
});
472+
473+
if (args.data.enddate != "")
474+
$.extend(data, {
475+
enddate: args.data.enddate
446476
});
447477

448478
$.ajax({
@@ -481,11 +511,17 @@
481511
label: 'By Alert type',
482512
docID: 'helpAlertsArchiveType'
483513
},
484-
date: {
485-
label: 'By date (older than)',
514+
startdate: {
515+
label: 'By date (start date)',
516+
docID: 'helpAlertsArchiveDate',
517+
isDatepicker: true
518+
},
519+
enddate: {
520+
label: 'By date (end date)',
486521
docID: 'helpAlertsArchiveDate',
487522
isDatepicker: true
488523
}
524+
489525
}
490526
},
491527
action: function(args) {
@@ -496,9 +532,14 @@
496532
type: args.data.type
497533
});
498534

499-
if (args.data.date != "")
535+
if (args.data.startdate != "")
536+
$.extend(data, {
537+
startdate: args.data.startdate
538+
});
539+
540+
if (args.data.enddate != "")
500541
$.extend(data, {
501-
olderthan: args.data.date
542+
enddate: args.data.enddate
502543
});
503544

504545
$.ajax({

0 commit comments

Comments
 (0)