From: javier Date: Tue, 17 Jun 2014 10:36:44 +0000 (+0200) Subject: - Modified some SLA texts X-Git-Tag: myslice-1.1~64^2~12 X-Git-Url: http://git.onelab.eu/?p=unfold.git;a=commitdiff_plain;h=dd36aa85411b2985e8d6a321acf0544f2887345a - Modified some SLA texts - Added img resources for Service Directory - Added print information to console to detect bad json parsing error --- diff --git a/plugins/queryupdater/static/js/queryupdater.js b/plugins/queryupdater/static/js/queryupdater.js index 7718253c..8c68037f 100644 --- a/plugins/queryupdater/static/js/queryupdater.js +++ b/plugins/queryupdater/static/js/queryupdater.js @@ -93,12 +93,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('
'); } diff --git a/portal/static/css/fed4fire.css b/portal/static/css/fed4fire.css index fd9bc193..ad8c3322 100644 --- a/portal/static/css/fed4fire.css +++ b/portal/static/css/fed4fire.css @@ -488,8 +488,8 @@ div#appservices div.row { padding: 15px 15px; } -div.portfolio-item { - +div.portfolio-item img{ + width: 150px; } div.portfolio-item p[id*='name-'] { diff --git a/portal/static/img/servicedirectory/hadoop.png b/portal/static/img/servicedirectory/hadoop.png new file mode 100755 index 00000000..5e8affe8 Binary files /dev/null and b/portal/static/img/servicedirectory/hadoop.png differ diff --git a/portal/static/img/servicedirectory/smartsantander.png b/portal/static/img/servicedirectory/smartsantander.png new file mode 100755 index 00000000..806e459e Binary files /dev/null and b/portal/static/img/servicedirectory/smartsantander.png differ diff --git a/portal/templates/servicedirectory.html b/portal/templates/servicedirectory.html index 7a1893f6..ebd98d89 100644 --- a/portal/templates/servicedirectory.html +++ b/portal/templates/servicedirectory.html @@ -109,10 +109,17 @@ loadedTabs = []; $.each(data, function(i, item){ - console.log(item); + var imgsrc; + + if(item.name.toLowerCase().indexOf("santander") >= 0){ + imgsrc = "smartsantander.png"; + } else if(item.name.toLowerCase().indexOf("hadoop") >= 0){ + imgsrc = "hadoop.png"; + } + var row = $('
').append( $('
').addClass("col-md-3 portfolio-item").append( - $('').attr('src', "http://placehold.it/150x150") + $('').attr('src', "{{ STATIC_URL }}img/servicedirectory/" + imgsrc) ), $('
').addClass("col-md-6 portfolio-item").append( $('

').text(item.name), diff --git a/sla/slaclient/restclient.py b/sla/slaclient/restclient.py index cdada8a5..9d1306b1 100755 --- a/sla/slaclient/restclient.py +++ b/sla/slaclient/restclient.py @@ -117,6 +117,7 @@ class Client(object): result = requests.get(url, **kwargs) print "GET {} {} {}".format( result.url, result.status_code, result.text[0:70]) + return result def post(self, path, data=None, **kwargs): @@ -279,9 +280,20 @@ class Agreements(object): """ path = _buildpath_(agreementid, "guaranteestatus") r = self.res.client.get(path, headers={'accept': 'application/json'}) + + print "---- JSON Response ----" + print r.text + json_obj = r.json() + print "-- json_obj() --" + print type(json_obj) + print json_obj + status = wsag_model.AgreementStatus.json_decode(json_obj) + print "---- STATUS ----" + print status + return status, r def create(self, agreement):