X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fqueryupdater%2Fstatic%2Fjs%2Fqueryupdater.js;h=5d017b9dcf113a31cda96ecb453a0da127c2815f;hb=f320a65ac7928a4a1c8315443880dce1d7afc997;hp=8c68037fc895db05207af98fd3422bc41712235b;hpb=10f5e0a7e25604e93f85727ce35acea95e162679;p=unfold.git diff --git a/plugins/queryupdater/static/js/queryupdater.js b/plugins/queryupdater/static/js/queryupdater.js index 8c68037f..5d017b9d 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); @@ -134,7 +135,7 @@ { 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(wilabForm); promt.append('
'); } if(flagVW) @@ -142,16 +143,32 @@ //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(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"); @@ -186,18 +203,24 @@ "user": username, "expiration_time": new Date().toISOString() }); - + $('#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()+'
';