SFA Rest client: most of the functions are supported
[unfold.git] / portal / templates / resources.html
1 {% extends "layout.html" %}
2 {% load i18n %}
3
4 {% block head %}
5 <script type="text/javascript" src="//goessner.net/download/prj/jsonxml/json2xml.js"></script>
6 <script type="text/javascript" src="//goessner.net/download/prj/jsonxml/xml2json.js"></script>
7 {% endblock head %}
8 {% block content %}
9         <div class="row">
10                 <div class="col-md-12">
11                         <h1><img src="{{ STATIC_URL }}icons/slices-xs.png" alt="List of Resources" /> Resources List</h1>
12                 </div>
13         </div>
14
15         {% if errors %}
16         <div class="row">
17                 <div class="col-md-12">
18                 <ul>
19                   {% for error in errors %}
20                   <li>{{ error }}</li>
21                   {% endfor %}
22                 </ul>
23                 </div>
24         </div>
25         {% endif %}
26         
27         <div class="row" id="table">
28         </div>
29                 
30 <script>
31 jQuery(document).ready(function(){
32     /*
33     // sfa/Describe?hrn=onelab.upmc.projectx.slicex&type=slice
34     $.post("/sfa/Describe",{'hrn':'{{slicename}}','type':'slice','platform':['ple'],'display':'table'}, function( data ) {
35         console.log(data);
36         $('#table').html(data);
37     });
38     */
39     $.post("/sfa/ListResources",{'platform':['ple'],'display':'table'}, function( data ) {
40     //$.post("/sfa/ListResources",{'display':'table'}, function( data ) {
41         console.log(data);
42         $('#table').html(data);
43     });
44
45     /*
46     //$.post("/sfa/ListResources",{'platform':['ple'],'display':'table'}, function( data ) {
47     $.post("/sfa/ListResources",{}, function( data ) {
48         console.log(data);
49         $.each(data, function(key) {
50             if(key=='nitos'){
51                 $('#table').html(data[key]['value']);
52             }
53         });
54     });
55     $.post("/sfa/Renew",{'hrn':'{{slicename}}','type':'slice'}, function( data ) {
56         console.log(data);
57     });
58     */
59
60 });
61 </script>
62 {% endblock %}
63