X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fqueryupdater%2Fstatic%2Fjs%2Fqueryupdater.js;h=3057cf5bb787fede4c1d55a0a06966eb762dbb1c;hb=3018b838efd77bc3b7b9ee1df727e328c8464db1;hp=7718253c7c3c52d096d1d0b53dd3471169691ea7;hpb=3a41bf6525b4c0cddaa08998a7279aefaaf7440e;p=unfold.git diff --git a/plugins/queryupdater/static/js/queryupdater.js b/plugins/queryupdater/static/js/queryupdater.js index 7718253c..3057cf5b 100644 --- a/plugins/queryupdater/static/js/queryupdater.js +++ b/plugins/queryupdater/static/js/queryupdater.js @@ -79,6 +79,7 @@ var accepted_sla = Array(); var count = 0; + var self = e.data; // XXX check that the query is not disabled console.log("DATA VALUE: " + data.value); @@ -93,12 +94,13 @@ var flagVW = false; var flagWi = false; + promt.append('

SLA description

'); + var wilabForm = ""; - var wimessage = '

SLA description

to be deployed

'; + wilabForm += ""; //var wallmessage = '

SLA description

Testbed guarantees 0.99 Uptime rate for 0.99 rate of the VirtualWall resources during the sliver lifetime

'; var wallForm = ""; + wallForm += ""; + var flagDouble = false; if(flagWi) { flagDouble = true; + promt.append('

Testbed guarantees 0.99 Uptime rate for 0.99 rate of the WiLab2 resources during the sliver lifetime

'); promt.append(wilabForm); + promt.append('
'); } if(flagVW) { //promt.append(wallmessage); flagDouble = true; + promt.append('

Testbed guarantees 0.99 Uptime rate for 0.99 rate of the VirtualWall resources during the sliver lifetime

'); promt.append(wallForm); + promt.append('
'); } // var wimessage = '

SLA description

Testbed guarantees 0.99 Uptime rate for 0.99 rate of the VirtualWall resources during the sliver lifetime

' + if(flagWi || flagVW){ $('#sla_dialog').show(); + $('#slamodal-wilab2').modal('show'); - + } + else + { + + + var username = e.data.options.username; + var urn = data.value; + // XXX check that the query is not disabled + + self.spin(); + console.log("do_update"); + // XXX check that the query is not disabled + manifold.raise_event(self.options.query_uuid, RUN_UPDATE); + return; + } $("#accept_sla_wilab2").click(function(){ console.log("SLA ACCEPTED"); @@ -182,14 +207,20 @@ $('#slamodal-wilab2').modal('hide'); accepted_sla["wilab2"] = true; - this.do_update(e); + manifold.raise_event(self.options.query_uuid, RUN_UPDATE); } + $('#modal-body').empty(); }); $("#dismiss_sla_wilab2").click(function(){ console.log("SLA NOT ACCEPTED"); $('#slamodal-wilab2').modal('hide'); + $('#modal-body').empty(); }); + + // } else { + // this.do_update(e); + // } // for(var iter = 0; iter < arrayselectedresources.length; iter++){ // var list = ''+arrayselectedresources[iter].toLowerCase()+'
';