** see devel/django-install.txt in case of trouble
$ apt-get install python-django
$ apt-get install python-django-south
-
+$ apt-get install python-pip
+$ pip install requests
+$ pip install djangorestframework
* git clone git://git.onelab.eu/myslice.git
-- or --
* git clone ssh://yourlogin@git.onelab.eu/git/myslice.git
# 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 = {
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 %}