Fixed SLA dialog duplicated information
[unfold.git] / plugins / queryupdater / static / js / queryupdater.js
1 /**
2  * MySlice QueryUpdater plugin
3  * Version: 0.1.0
4  * URL: http://www.myslice.info
5  * Description: display of selected resources
6  * Requires: 
7  * Author: The MySlice Team
8  * Copyright: Copyright 2012 UPMC Sorbonne Universités
9  * License: GPLv3
10  */
11
12 (function( $ ){
13
14     var debug=false;
15     debug=true;
16
17     // XXX record selected (multiple selection ?)
18     // XXX record disabled ?
19     // XXX out of sync plugin ?
20     // XXX out of date record ?
21     // record tags ???
22     //
23     // criticality of the absence of a handler in a plugin
24     // non-critical only can have switch case
25     // 
26     // Record state through the query cycle
27
28
29     var QueryUpdater = Plugin.extend({
30
31         init: function(options, element) {
32                 this.classname="queryupdater";
33             this._super(options, element);
34
35             var self = this;
36
37             this.initial = Array();
38             this.selected_resources = Array();
39
40             this.table = this.elmt('table').dataTable({
41 // the original querytable layout was
42 //                sDom: "<'row'<'col-xs-5'l><'col-xs-1'r><'col-xs-6'f>>t<'row'<'col-xs-5'i><'col-xs-7'p>>",
43 // however the bottom line with 'showing blabla...' and the navigation widget are not really helpful
44                 sDom: "<'row'<'col-xs-5'l><'col-xs-1'r><'col-xs-6'f>>t>",
45 // so this does not matter anymore now that the pagination area is turned off
46 //                sPaginationType: 'bootstrap',
47                       bAutoWidth: true,
48 //                bJQueryUI      : true,
49 //                bRetrieve      : true,
50 //                sScrollX       : '100%',                 // Horizontal scrolling 
51 //                bSortClasses   : false,              // Disable style for the sorted column
52 //                aaSorting      : [[ 0, 'asc' ]],        // Default sorting on URN
53 //                fnDrawCallback: function() {      // Reassociate close click every time the table is redrawn
54 //                    /* Prevent to loop on click while redrawing table  */
55 //                    $('.ResourceSelectedClose').unbind('click');
56 //                    /* Handle clicks on close span */
57 //                    /* Reassociate close click every time the table is redrawn */
58 //                    $('.ResourceSelectedClose').bind('click', self, self._close_click);
59 //                }
60              });
61             
62             // XXX This should not be done at init...
63             this.elmt('update').click(this, this.do_checksla);
64             this.elmt('refresh').click(this, this.do_refresh);
65             this.elmt('reset').click(this, this.do_reset);
66             this.elmt('clear_annotations').click(this, this.do_clear_annotations);
67
68             this.listen_query(options.query_uuid);
69         },
70
71         /*************************** PLUGIN EVENTS ****************************/
72
73         /***************************** GUI EVENTS *****************************/
74
75         do_checksla: function(e) {
76             var username = e.data.options.username;
77             var urn = data.value;
78             var arrayselectedresources = data.selected_resources;
79
80             var accepted_sla = Array();
81             var count = 0;
82             var self = e.data;
83             // XXX check that the query is not disabled
84
85             console.log("DATA VALUE: " + data.value);
86             
87             //<p>SLA description</p>
88             //<p>Testbed guarantees 0.99 Uptime rate for 0.99 rate of the VirtualWall resources during the sliver lifetime</p>
89             //<p>SLA description</p>
90             //<p>Testbed guarantees 0.99 Uptime rate for 0.99 rate of the WiLab2 resources during the sliver lifetime</p>
91             var promt = $('#modal-body');
92             
93             // id="myModalLabel"
94             var flagVW = false;
95             var  flagWi = false;
96
97             promt.append('<p>SLA description</p>');
98             
99             var wilabForm = "";
100             wilabForm += "<ul>";
101             for(var iter = 0; iter < arrayselectedresources.length; iter++){
102                 var list = '<li class="wi'+iter+'" name=wi"'+iter+'">'+arrayselectedresources[iter].toLowerCase()+'</li>';
103                 
104                 if (arrayselectedresources[iter].toLowerCase().indexOf("wilab2") >= 0){
105
106                     accepted_sla.push({"wilab2":false}); 
107                     wilabForm += list;   
108                     flagWi = true;             
109
110                 }
111
112             }
113             wilabForm += "</ul>";
114
115             //var wallmessage = '<p>SLA description</p><p>Testbed guarantees 0.99 Uptime rate for 0.99 rate of the VirtualWall resources during the sliver lifetime</p>';
116
117             var wallForm = "";
118             wallForm += "<ul>";
119             for(var iter = 0; iter < arrayselectedresources.length; iter++){
120                 var list = '<li class="wall'+iter+'" name=wall"'+iter+'" >'+arrayselectedresources[iter].toLowerCase()+'</li>';
121                 
122                 if (arrayselectedresources[iter].toLowerCase().indexOf("wall2") >= 0){
123
124                     accepted_sla.push({"wall2":false});
125                     wallForm += list;
126                     flagVW = true;
127                     
128                 }
129
130             }
131             wallForm += "</ul>";
132             
133             var flagDouble = false;
134             if(flagWi)
135             {
136                 flagDouble = true;
137                 promt.append('<p>Testbed guarantees 0.99 Uptime rate for 0.99 rate of the WiLab2 resources during the sliver lifetime</p>');
138                 promt.append(wilabForm);
139                 promt.append('<br />');
140             }
141             if(flagVW)
142             {
143                 //promt.append(wallmessage);
144                 flagDouble = true;
145                 promt.append('<p>Testbed guarantees 0.99 Uptime rate for 0.99 rate of the VirtualWall resources during the sliver lifetime</p>');
146                 promt.append(wallForm);
147                 promt.append('<br />');
148             }
149
150                         
151             // var wimessage = '<p>SLA description</p><p>Testbed guarantees 0.99 Uptime rate for 0.99 rate of the VirtualWall resources during the sliver lifetime</p>'
152
153             if(flagWi || flagVW){
154                 $('#sla_dialog').show();
155
156                     $('#slamodal-wilab2').modal('show');
157             }
158             else
159             {
160                 
161
162                 var username = e.data.options.username;
163                 var urn = data.value;
164                 // XXX check that the query is not disabled
165
166                 self.spin();
167                 console.log("do_update");
168                 // XXX check that the query is not disabled
169                 manifold.raise_event(self.options.query_uuid, RUN_UPDATE);
170                 return;
171             }
172                     
173                         $("#accept_sla_wilab2").click(function(){
174                             console.log("SLA ACCEPTED");
175                             console.log("With username: " + username);
176
177                             // var promt = $('#modal-body');
178                             // var notchecked = true;
179                             // for (var i=0;i<50;i++)
180                             // {
181                             //     var wielement = $('#wi'+i);
182                             //     var wallElement = $('#wall'+i);
183                             //     if(wielement != null && !wielement.checked)
184                             //     {
185                             //         notchecked = false;
186                             //     }
187                             //     if(wallElement!= null && !wallElement.checked)
188                             //     {
189                             //         notchecked = false;
190                             //     }
191                             // }
192             
193                                                        
194                                 if(flagDouble)
195                                 {
196                                     $.post("/sla/agreements/simplecreate", 
197                                         { "template_id": "iMindsServiceWiLab2",
198                                           "user": username,
199                                           "expiration_time": new Date().toISOString()
200                                        });
201                                      $.post("/sla/agreements/simplecreate", 
202                                         { "template_id": "iMindsServiceVirtualwall",
203                                           "user": username,
204                                           "expiration_time": new Date().toISOString()
205                                        });
206                             
207                                     $('#slamodal-wilab2').modal('hide');
208                                 accepted_sla["wilab2"] = true;
209                             
210                                 manifold.raise_event(self.options.query_uuid, RUN_UPDATE);
211                             }
212                         }); 
213                     
214                         $("#dismiss_sla_wilab2").click(function(){
215                             console.log("SLA NOT ACCEPTED");
216                             $('#slamodal-wilab2').modal('hide');
217                             $('#modal-body').empty();
218                         }); 
219                 
220             // } else {
221             //     this.do_update(e);
222             // }
223
224             // for(var iter = 0; iter < arrayselectedresources.length; iter++){
225             //     var list = '<input type="checkbox" name="'+iter+'" >'+arrayselectedresources[iter].toLowerCase()+'<br>';
226             //     promt.append(list);
227             //     if (arrayselectedresources[iter].toLowerCase().indexOf("wall2") >= 0){
228
229
230                     
231             //         accepted_sla.push({"wall2":false});
232
233             //         $('#sla_dialog').show();
234             //         $('#slamodal-virtualwall').modal('show');
235                     
236                     
237             //             $("#accept_sla_vwall").click(function(){
238             //                 console.log("SLA ACCEPTED");
239             //                 console.log("With username: " + username);
240                         
241             //                 $.post("/sla/agreements/simplecreate", 
242             //                     { "template_id": "iMindsServiceVirtualwall",
243             //                       "user": username,
244             //                       "expiration_time": new Date()
245             //                     });
246                         
247             //                 $('#slamodal-virtualwall').modal('hide');
248             //                 accepted_sla["wall2"] = true;
249             //             }); 
250
251             //             $("#dismiss_sla_vwall").click(function(){
252             //                 console.log("SLA NOT ACCEPTED");
253             //                 $('#slamodal-vir').modal('hide');
254             //             }); 
255                     
256             //     }
257
258             //     if (arrayselectedresources[iter].toLowerCase().indexOf("wilab2") >= 0){
259
260             //         accepted_sla.push({"wilab2":false});
261
262             //         $('#sla_dialog').show();
263             //         $('#slamodal-wilab2').modal('show');
264                     
265                     
266             //             $("#accept_sla_wilab2").click(function(){
267             //                 console.log("SLA ACCEPTED");
268             //                 console.log("With username: " + username);
269                         
270             //                 $.post("/sla/agreements/simplecreate", 
271             //                     { "template_id": "iMindsServiceWiLab2",
272             //                       "user": username,
273             //                       "expiration_time": new Date()
274             //                     });
275                         
276             //                 $('#slamodal-wilab2').modal('hide');
277             //                 accepted_sla["wilab2"] = true;
278             //             }); 
279                     
280             //             $("#dismiss_sla_wilab2").click(function(){
281             //                 console.log("SLA NOT ACCEPTED");
282             //                 $('#slamodal-wilab2').modal('hide');
283             //             }); 
284                     
285
286             //     }
287
288             // }
289
290             // for(var sla in accepted_sla){
291             //     if(accepted_sla[sla] == true){
292             //         count += 1;
293             //     }
294             // }
295
296             // if(count == accepted_sla.length){
297             //     this.do_update(e);
298             // }
299         },
300
301      
302         do_update: function(e) {
303             var self = e.data;
304
305             var username = e.data.options.username;
306             var urn = data.value;
307             // XXX check that the query is not disabled
308
309             self.spin();
310             console.log("do_update");
311             // XXX check that the query is not disabled
312             //manifold.raise_event(self.options.query_uuid, RUN_UPDATE);
313
314             // how to stop the spinning after the event? 
315             // this should be triggered by some on_updatequery_done ?
316
317         },
318
319         // related buttons are also disabled in the html template
320         do_refresh: function(e)
321         {
322             throw 'resource_selected.do_refresh Not implemented';
323         },
324
325         do_reset: function(e)
326         {
327             throw 'queryupdater.do_reset Not implemented';
328         },
329
330         do_clear_annotations: function(e)
331         {
332             throw 'queryupdater.do_clear_annotations Not implemented';
333         },
334         
335         /************************** GUI MANIPULATION **************************/
336
337         
338         set_button_state: function(name, state)
339         {
340             this.elmt(name).attr('disabled', state ? false : 'disabled');
341         },
342
343         clear: function()
344         {
345
346         },
347
348         find_row: function(key)
349         {
350             // key in third position, column id = 2
351             var KEY_POS = 2;
352
353             var cols = $.grep(this.table.fnSettings().aoData, function(col) {
354                 return (col._aData[KEY_POS] == key);
355             } );
356
357             if (cols.length == 0)
358                 return null;
359             if (cols.length > 1)
360                 throw "Too many same-key rows in ResourceSelected plugin";
361
362             return cols[0];
363         },
364
365         set_state: function(data)
366         {
367             console.log("function set_state");
368             var action;
369             var msg;
370             var button = '';
371
372             var row;
373             
374             // make sure the change is visible : toggle on the whole plugin
375             // this might have to be made an 'auto-toggle' option of this plugin..
376             // also it might be needed to be a little finer-grained here
377
378         // XXX we don't want to show automaticaly the pending when a checkbox is checked
379             //this.toggle_on();
380             
381             switch(data.request) {
382                 case FIELD_REQUEST_ADD_RESET:
383                 case FIELD_REQUEST_REMOVE_RESET:
384                     // find line and delete it
385                     row = this.find_row(data.value);
386                     if (row)
387                         this.table.fnDeleteRow(row.nTr);
388                         $("#badge-pending").data('number', $("#badge-pending").data('number') - 1 );
389                         $("#badge-pending").text($("#badge-pending").data('number'));
390                     return;
391                 case FIELD_REQUEST_CHANGE:
392                     action = 'UPDATE';
393                     break;
394                 case FIELD_REQUEST_ADD:
395                     action = 'ADD';
396                     break;
397                 case FIELD_REQUEST_REMOVE:
398                     action = 'REMOVE';
399                     break;
400             }
401
402             switch(data.status) {
403                 case FIELD_REQUEST_PENDING:
404                     msg   = 'PENDING';
405                     button = "<span class='glyphicon glyphicon-remove ResourceSelectedClose' id='" + data.key + "'/>";
406                     break;
407                 case FIELD_REQUEST_SUCCESS:
408                     msg   = 'SUCCESS';
409                     break;
410                 case FIELD_REQUEST_FAILURE:
411                     msg   = 'FAILURE';
412                     break;
413             }
414
415             var status = msg + status;
416
417             
418
419             // find line
420             // if no, create it, else replace it
421             // XXX it's not just about adding lines, but sometimes removing some
422             // XXX how do we handle status reset ?
423             data.value = JSON.stringify(data.value);
424             data.selected_resources = this.selected_resources;
425             row = this.find_row(data.value);
426             newline = [
427                 action,
428                 data.key,
429                 data.value,
430                 msg,
431                 button
432             ];
433             if (!row) {
434                 // XXX second parameter refresh = false can improve performance. todo in querytable also
435                 this.table.fnAddData(newline);
436                 row = this.find_row(data.value);
437                 $("#badge-pending").data('number', $("#badge-pending").data('number') + 1 );
438                 $("#badge-pending").text($("#badge-pending").data('number'));
439             } else {
440                 // Update row text...
441                 this.table.fnUpdate(newline, row.nTr);
442             }
443
444             // Change cell color according to status
445             if (row) {
446                 $(row.nTr).removeClass('add remove')
447                 var cls = action.toLowerCase();
448                 if (cls)
449                     $(row.nTr).addClass(cls);
450             }
451         },
452
453         /*************************** QUERY HANDLER ****************************/
454
455         // NONE
456
457         /*************************** RECORD HANDLER ***************************/
458
459         on_new_record: function(record)
460         {
461             console.log("query_updater on_new_record");
462             console.log(record);
463
464             // if (not and update) {
465
466                 // initial['resource'], initial['lease'] ?
467                 this.initial.push(record);
468
469             //this.set_record_state(record, RECORD_STATE_ATTACHED);
470                 // We simply add to the table
471             // } else {
472                 //                 \ this.initial_resources
473                 //                  \
474                 // this.             \
475                 // current_resources  \    YES    |   NO
476                 // --------------------+----------+---------
477                 //       YES           | attached | added
478                 //       NO            | removed  |   /
479                 // 
480
481             // }
482         },
483
484         // QUERY STATUS
485         //                                      +-----------------+--------------+
486         //                                      v        R        |              |
487         // +-------+  ?G    +-------+        +-------+        +---+---+          |
488         // |       | -----> |       |  !G    |       |        |       |    DA    |
489         // |  ND   |        |  PG   | -----> |   D   | -----> |  PC   | <------+ |
490         // |       | <----- |       |  ~G    |       |   C    |       |        | | 
491         // +-------+   GE   +-------+        +-------+        +-------+      +------+
492         //                                       ^              ^  |         |      |
493         //                                       | DA        UE |  | ?U      | PCA  |
494         //                                       |              |  v         |      |
495         //                                   +-------+        +-------+      +------+
496         //                                   |       |   !U   |       |         ^
497         //                                   |  AD   | <----- |  PU   | --------+
498         //                                   |       |        |       |   ~U     
499         //                                   +-------+        +-------+          
500         //                                                                       
501         //
502         // LEGEND:
503         // 
504         // Plugins (i) receive state information, (ii) perform actions
505         //
506         // States:                                  Actions:
507         // ND : No data                             ?G : Get query
508         // PG : Pending Get                         !G : Get reply  
509         //  D : Data present                        ~G : Get partial reply
510         // PC : Pending changes                     GE : Get error                            
511         // PU : Pending update                       C : Change request
512         // PCA: Pending change with annotation       R : Reset request
513         // AD : Annotated data                      ?U : Update query
514         //                                          !U : Update reply
515         //                                          ~U : Update partial reply
516         //                                          UE : Update error            
517         //                                          DA : Delete annotation request
518         // NOTE:
519         // - D -> PU directly if the user chooses 'dynamic update'
520         // - Be careful for updates if partial Get success
521
522         // ND: No data == initialization state
523         
524         // PG : Pending get
525         // - on_query_in_progress
526         // NOTE: cannot distinguish get and update here. Is it important ?
527
528         on_query_in_progress: function()
529         {
530                 messages.debug("queryupdater.on_query_in_progress");
531             this.spin();
532         },
533
534         // D : Data present
535         // - on_clear_records (Get)
536         // - on_new_record (shared with AD) XXX
537         // - on_query_done
538         // NOTE: cannot distinguish get and update here. Is it important ?
539         // NOTE: Would record key be sufficient for update ?
540
541         on_clear_records: function()
542         {
543             this.clear();
544         },
545
546         on_query_done: function()
547         {
548             console.log("on_query_done");
549             this.unspin();
550         },
551
552         // PC : Pending changes
553         // NOTE: record_key could be sufficient 
554         on_added_record: function(record)
555         {
556             console.log("on_added_record = ",record);
557             this.set_record_state(record, RECORD_STATE_ADDED);
558             // update pending number
559         },
560
561         on_removed_record: function(record_key)
562         {
563             console.log("on_removed_record = ",record_key);
564             this.set_record_state(RECORD_STATE_REMOVED);
565         },
566
567         // PU : Pending update
568         // - on_query_in_progress (already done)
569         
570         // PCA : Pending change with annotation
571         // NOTE: Manifold will inform the plugin about updates, and thus won't
572         // call new record, even if the same channel UUID is used...
573         // - TODO on_updated_record
574         // - Key and confirmation could be sufficient, or key and record state
575         // XXX move record state to the manifold plugin API
576
577         on_field_state_changed: function(result)
578         {
579             console.log("on_field_state_changed");
580             console.log(result);
581             if(result.request == FIELD_REQUEST_ADD){
582                 this.selected_resources.push(result.value);
583             } else if(result.request == FIELD_REQUEST_REMOVE_RESET){
584                 var i = this.selected_resources.indexOf(result.value);
585                 if(i != -1){
586                     this.selected_resources.splice(i,1);
587                 }
588             }
589             console.log("Resources: " + self.selected_resources);
590             messages.debug(result)
591             /* this.set_state(result.request, result.key, result.value, result.status); */
592             this.set_state(result);
593         },
594
595         // XXX we will have the requests for change
596         // XXX + the requests to move into the query cycle = the buttons aforementioned
597
598         // XXX what happens in case of updates ? not implemented yet
599         // XXX we want resources and leases
600         // listen for SET_ADD and SET_REMOVE for slice query
601
602         /************************** PRIVATE METHODS ***************************/
603
604         _close_click: function(e)
605         {
606             var self = e.data;
607
608             //jQuery.publish('selected', 'add/'+key_value);
609             // this.parentNode is <td> this.parentNode.parentNode is <tr> 
610             // this.parentNode.parentNode.firstChild is the first cell <td> of this line <tr>
611             // this.parentNode.parentNode.firstChild.firstChild is the text in that cell
612             //var firstCellVal=this.parentNode.parentNode.firstChild.firstChild.data;
613             var remove_urn = this.id; 
614             var current_resources = event.data.instance.current_resources;
615             var list_resources = $.grep(current_resources, function(x) {return x.urn != remove_urn});
616             //jQuery.publish('selected', 'cancel/'+this.id+'/'+unfold.get_value(firstCellVal));
617             $.publish('/update-set/' + event.data.instance.options.resource_query_uuid, [list_resources, true]);
618         },
619
620         /******************************** TODO ********************************/
621
622         update_resources: function(resources, change)
623         {
624             messages.debug("update_resources");
625             var my_oTable = this.table.dataTable();
626             var prev_resources = this.current_resources; 
627
628             /*
629              * The first time the query is advertised, don't do anything.  The
630              * component will learn nodes in the slice through the manifest
631              * received through the other subscription 
632              */
633              if (!change)
634                 return;
635              // ioi: Refubrished
636              var initial = this.initial;
637              //var r_removed  = []; //
638              /*-----------------------------------------------------------------------
639                 TODO: remove this dirty hack !!!
640              */
641              resources = jQuery.map(resources, function(x){
642                 if(!('timeslot' in x)){x.timeslot=0;}
643                 return x;
644              });
645              /*
646                 TODO: handle generic keys instead of specific stuff
647                       ex: urn
648                           urn-lease
649              */
650              var initial_urn = $.map(initial, function(x){return x.urn;});
651              var resources_urn = $.map(resources, function(x){return x.urn;});
652              var r_removed = $.grep(initial, function (x) { return $.inArray(x.urn, resources_urn) == -1 });
653              var r_attached = $.grep(initial, function (x) { return $.inArray(x.urn, resources_urn) > -1 });
654              var r_added = $.grep(resources, function (x) { return $.inArray(x.urn, initial_urn) == -1 });
655              exists = false; // ioi
656              /*-----------------------------------------------------------------------*/
657
658              my_oTable.fnClearTable();
659              /*
660                 TODO: factorization of this code !!!
661              */
662              $.each(r_added, function(i, r) { 
663                 //var type = (typeof initial == 'undefined' || r.node != initial.node) ? 'add' : 'attached';
664                 var type = 'add';  
665                 // Create the resource objects
666                 // ioi: refubrished
667                 var urn = r.urn;
668                 time = r.timeslot;
669                               
670                 var SPAN = "<span class='glyphicon glyphicon-remove ResourceSelectedClose' id='"+urn+"'/>";
671                 var slot = "<span id='resource_"+urn+"'>" + time + "</span>"; //ioi
672                 // ioi
673                 var newline=Array();
674                 newline.push(type, urn, slot, SPAN); // ioi
675                 var line = my_oTable.fnAddData(newline);
676                 var nTr = my_oTable.fnSettings().aoData[ line[0] ].nTr;
677                 nTr.className = type;
678              });
679              $.each(r_attached, function(i, r) {  
680                 //var type = (typeof initial == 'undefined' || r.node != initial.node) ? 'add' : 'attached';
681                 var type = 'attached';
682                 // Create the resource objects
683                 // ioi: refubrished
684                 var node = r.urn;
685                 time = r.timeslot;
686
687                 var SPAN = "<span class='glyphicon glyphicon-renomve ResourceSelectedClose' id='"+node+"'/>";
688                 var slot = "<span id='resource_"+node+"'>" + time + "</span>"; //ioi
689                 // ioi
690                 var newline=Array();
691                 newline.push(type, node, slot, SPAN); // ioi
692                 var line = my_oTable.fnAddData(newline);
693                 var nTr = my_oTable.fnSettings().aoData[ line[0] ].nTr;
694                 nTr.className = type;
695              });
696              $.each(r_removed, function(i, r) { 
697                 // The list contains objects
698                 // ioi: refubrished
699                 var node = r.urn;
700                 var time = r.timeslot;
701                     
702                 var SPAN = "<span class='glyphicon glyphicon-remove ResourceSelectedClose' id='"+node+"'/>";
703                 var slot = "<span id='resource_"+node+"'>" + time + "</span>";
704                 // ioi
705                 var newline=Array();
706                 newline.push('remove', node, slot, SPAN); // ioi
707                 var line = my_oTable.fnAddData(newline);
708                 var nTr = my_oTable.fnSettings().aoData[ line[0] ].nTr;
709                 nTr.className = 'remove';
710              });
711
712              this.current_resources = $.merge(r_attached,r_added);
713
714              /* Allow the user to update the slice */
715              //jQuery('#updateslice-' + data.ResourceSelected.plugin_uuid).prop('disabled', false);
716
717         }, // update_resources
718
719     });
720
721     $.plugin('QueryUpdater', QueryUpdater);
722
723 })(jQuery);