var flagVW = false;
var flagWi = false;
+ promt.append('<p>SLA description</p>');
+
var wilabForm = "";
- var wimessage = '<p>SLA description</p><p>to be deployed</p>';
+ wilabForm += "<ul>";
for(var iter = 0; iter < arrayselectedresources.length; iter++){
- var list = '<p class="wi'+iter+'" name=wi"'+iter+'">'+arrayselectedresources[iter].toLowerCase()+'</p><br>';
+ var list = '<li class="wi'+iter+'" name=wi"'+iter+'">'+arrayselectedresources[iter].toLowerCase()+'</li>';
-
if (arrayselectedresources[iter].toLowerCase().indexOf("wilab2") >= 0){
accepted_sla.push({"wilab2":false});
}
}
+ wilabForm += "</ul>";
//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>';
var wallForm = "";
+ wallForm += "<ul>";
for(var iter = 0; iter < arrayselectedresources.length; iter++){
- var list = '<class="wall'+iter+'" name=wall"'+iter+'" >'+arrayselectedresources[iter].toLowerCase()+'</p><br>';
+ var list = '<li class="wall'+iter+'" name=wall"'+iter+'" >'+arrayselectedresources[iter].toLowerCase()+'</li>';
if (arrayselectedresources[iter].toLowerCase().indexOf("wall2") >= 0){
}
}
- promt.append(wimessage);
+ wallForm += "</ul>";
+
var flagDouble = false;
if(flagWi)
{
flagDouble = true;
+ promt.append('<p>Testbed guarantees 0.99 Uptime rate for 0.99 rate of the WiLab2 resources during the sliver lifetime</p>');
promt.append(wilabForm);
+ promt.append('<br />');
}
if(flagVW)
{
//promt.append(wallmessage);
flagDouble = true;
+ promt.append('<p>Testbed guarantees 0.99 Uptime rate for 0.99 rate of the VirtualWall resources during the sliver lifetime</p>');
promt.append(wallForm);
+ promt.append('<br />');
}
$('#slamodal-wilab2').modal('hide');
accepted_sla["wilab2"] = true;
- //this.do_update(e);
+ this.do_update(e);
}
});
# Until we have a proper way to access queries in Python
self.query = query
- self.query_network = query_network
- self.query_network_uuid = query_network.query_uuid if query_network else None
-
self.query_all = query_all
self.query_all_uuid = query_all.query_uuid if query_all else None
# query_uuid will pass self.query results to the javascript
# and will be available as "record" in :
# on_new_record: function(record)
- return ['plugin_uuid', 'domid', 'query_uuid', 'query_all_uuid', 'query_network_uuid']
+ return ['plugin_uuid', 'domid', 'query_uuid', 'query_all_uuid']
def export_json_settings (self):
return True
/* Member variables */
this.filters = Array();
-
+ this.testbeds = Array();
/* Plugin events */
/* Setup query and record handlers */
// Some can be less efficient
this.listen_query(options.query_uuid);
this.listen_query(options.query_all_uuid, 'all');
- this.listen_query(options.query_network_uuid, 'network');
/* GUI setup and event binding */
// call function
// ... be sure to list all events here
/* RECORD HANDLERS */
- on_network_new_record: function(record)
+ on_all_new_record: function(record)
{
- row = '<a href="#" class="list-group-item sl-platform" id="testbeds-filter_'+record["network_hrn"]+'" data-platform="'+record["network_hrn"]+'">';
- row += '<span class="list-group-item-heading">'+record["platform"]+'</span>';
- //row += '<span class="list-group-item-heading">'+record["network_hrn"]+'</span></a>';
- row += '<p class="list-group-item-text">'+record["network_hrn"]+'</p></a>';
- $('#testbeds-filter').append(row);
+ var self = this;
+ // If the resource has a network_hrn
+ if(record["network_hrn"]!="None" && record["network_hrn"]!="" && record["network_hrn"]!=null){
+ // If this network_hrn is not listed yet
+ if(jQuery.inArray(record["network_hrn"],self.testbeds)==-1){
+ row = '<a href="#" class="list-group-item sl-platform" id="testbeds-filter_'+record["network_hrn"]+'" data-platform="'+record["network_hrn"]+'">';
+ //row += '<span class="list-group-item-heading">'+record["platform"]+'</span>';
+ //row += '<span class="list-group-item-heading">'+record["network_hrn"]+'</span></a>';
+ row += '<p class="list-group-item-heading">'+record["network_hrn"]+'</p></a>';
+ $('#testbeds-filter').append(row);
+ self.testbeds.push(record["network_hrn"]);
+ }
+ }
},
- /* When the network query is done, add the click event to the elements */
- on_network_query_done: function() {
+ /* When the query is done, add the click event to the elements */
+ on_all_query_done: function() {
var self = this;
console.log('query network DONE');
$("[id^='testbeds-filter_']").on('click',function(e) {
network_md = metadata.details_by_object('network')
network_fields = [column['name'] for column in network_md['column']]
- query_network = Query.get('network').select(network_fields)
- page.enqueue_query(query_network)
+ #query_network = Query.get('network').select(network_fields)
+ #page.enqueue_query(query_network)
filter_testbeds = TestbedsPlugin(
page = page,
title = 'Filter by testbeds',
query = sq_resource,
query_all = query_resource_all,
- query_network = query_network,
+ #query_network = query_network,
init_key = "network_hrn",
checkboxes = True,
datatables_options = {
padding: 15px 15px;
}
-div.portfolio-item {
-
+div.portfolio-item img{
+ width: 150px;
}
div.portfolio-item p[id*='name-'] {
font-weight: bold;
cursor: pointer;
-}
\ No newline at end of file
+}
<html lang="en"><head>
<title>{{theme}} portal - {{ section }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<link rel="shortcut icon" href="/static/img/favicon.ico">
+<link rel="shortcut icon" href="/static/img/favicon_fed4fire.ico">
{# This is where insert_str will end up #}{% media_container prelude %}
{% include 'messages-transient-header.html' %}
<script type="text/javascript"> {# raw js code - use {% insert prelude_js %} ... {% endinsert %} #} {% container prelude_js %}</script>
<a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a>
</div>
<div>
- <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request slice</button>
+ <button id="slicerequestbtn" type="button" style="width: 150px;" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request slice</button>
</div>
<div>
<div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
</div>
<div>
<ul><li>
- <a class="button2" href='http://jfed.iminds.be/releases/r1306/webstart/experimenter/jfed-experimenter.jnlp'
+ <a class="button2" href='http://jfed.iminds.be/releases/r1389/webstart/experimenter/jfed-experimenter.jnlp'
title="Click here to start your experiment with jFed"
- onclick="return launchApplication('http://jfed.iminds.be/releases/r1306/webstart/experimenter/jfed-experimenter.jnlp');">jFed</a>
+ onclick="return launchApplication('http://jfed.iminds.be/releases/r1389/webstart/experimenter/jfed-experimenter.jnlp');">jFed</a>
</li></ul>
</div>
</div>
<a href="http://doc.fed4fire.eu/support.html"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a>
</div>
<div>
- <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-envelope"></span> Contact</button>
+ <button id="ticketbtn" type="button" style="width: 150px;" class="btn btn-default"><span class="glyphicon glyphicon-envelope"></span> Contact</button>
</div>
<p></p>
<div>
- <button id="statbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-stats"></span>Testbeds' status</button>
+ <button id="statbtn" type="button" style="width: 150px;" class="btn btn-default"><span class="glyphicon glyphicon-stats"></span>Testbeds' status</button>
</div>
</div>
<a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a>
</div>
<div>
- <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
+ <button id="logoutbtn" type="button" style="width: 150px;" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
</div>
<div>
{% if person.last_name %}
$.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 = $('<div class="row">').append(
$('<div>').addClass("col-md-3 portfolio-item").append(
- $('<img>').attr('src', "http://placehold.it/150x150")
+ $('<img>').attr('src', "{{ STATIC_URL }}img/servicedirectory/" + imgsrc)
),
$('<div>').addClass("col-md-6 portfolio-item").append(
$('<p id="name-' + item.name.replace(/ /g,'') + '">').text(item.name),
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):
"""
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):