cleaned style on the slice page and fixed menu
authorCiro Scognamiglio <ciro.scognamiglio@cslash.net>
Thu, 13 Mar 2014 16:51:35 +0000 (17:51 +0100)
committerCiro Scognamiglio <ciro.scognamiglio@cslash.net>
Thu, 13 Mar 2014 16:51:35 +0000 (17:51 +0100)
myslice/urls.py
portal/slicetabexperiment.py
portal/static/css/onelab.css
portal/templates/experimentview.html [deleted file]
portal/templates/onelab/onelab_widget-slice-sections.html
portal/templates/slice-tab-experiment.html [new file with mode: 0644]
portal/templates/slice-tab-info.html
portal/templates/slice-tab-testbeds.html

index b1cb78e..5a8455b 100644 (file)
@@ -82,12 +82,11 @@ urls = [
     # Portal
     
     (r'^resources/(?P<slicename>[^/]+)/?$', portal.sliceresourceview.SliceResourceView.as_view()),
+    (r'^users/(?P<slicename>[^/]+)/?$', SliceUserView.as_view()),
     
     (r'^slice/(?P<slicename>[^/]+)/?$', portal.sliceview.SliceView.as_view()),
-    
     (r'^info/(?P<slicename>[^/]+)/?$', portal.slicetabinfo.SliceInfoView.as_view()),
     (r'^testbeds/(?P<slicename>[^/]+)/?$', portal.slicetabtestbeds.SliceTabTestbeds.as_view()),
-    (r'^users/(?P<slicename>[^/]+)/?$', SliceUserView.as_view()),
     (r'^experiment/(?P<slicename>[^/]+)/?$', portal.slicetabexperiment.ExperimentView.as_view()),
     url(r'^portal/', include('portal.urls')),
 ]
index f13c9d8..cd1d6ad 100644 (file)
@@ -15,7 +15,7 @@ from myslice.configengine import ConfigEngine
 from theme import ThemeView
 
 class ExperimentView (FreeAccessView, ThemeView):
-    template_name = 'experimentview.html'
+    template_name = 'slice-tab-experiment.html'
 
     def get (self, request, slicename, state=None):
         
index c39de29..1d73942 100644 (file)
@@ -342,6 +342,9 @@ div#ticket-request p {
 ul.nav-sliceview {}
 ul.nav-sliceview li {
     
+}
+ul.nav-sliceview li a {
+    border-bottom:0;
 }
 ul.nav-sliceview li:first-child {
     padding:0;
@@ -350,6 +353,9 @@ ul.nav-sliceview li:first-child a {
     font-weight:bold;
     padding:6px 15px 4px 15px;
 }
+ul.nav-sliceview li:first-child.active a {
+    padding:6px 15px 3px 15px;
+}
 ul.nav-sliceview li:first-child img {
     margin:0 4px 1px 0;
     padding:0;
@@ -388,6 +394,22 @@ a.list-group-item p.list-group-item-text {
     font-style:italic;
 }
 
+div#slice-info {
+    margin-top:25px;
+}
+div#slice-info table {
+    width:100%;
+    margin:0 auto;
+}
+div#slice-info table td:first-child {
+    text-align:right;
+    font-weight:bold;
+    padding-right:15px;
+}
+div#slice-info td {
+    padding:5px;
+}
+
 /* SLICE VIEW sections */
 .slice-sections, .slice-pending {
     margin:0;
diff --git a/portal/templates/experimentview.html b/portal/templates/experimentview.html
deleted file mode 100644 (file)
index 9056eb4..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<h2>Secure Shell (SSH)</h2>
-<p>
-Secure Shell (SSH) is a cryptographic network protocol for secure data communication, remote command-line login, remote command execution, and other secure network services between two networked computers that connects, via a secure channel over an insecure network, a server and a client (running SSH server and SSH client programs, respectively). The protocol specification distinguishes between two major versions that are referred to as SSH-1 and SSH-2.
-</p>
-<p> More Info: <a href="http://en.wikipedia.org/wiki/Secure_Shell" target="_blank">http://en.wikipedia.org/wiki/Secure_Shell</a></p>
-
-
-<h2>NEPI</h2>
-<p>NEPI, the Network Experimentation Programming Interface, is a life-cycle management tool for network experiments. The idea behind NEPI is to provide a single tool to design, deploy, and control network experiments, and gather the experiment results. Going further, NEPI was specially conceived to function with arbitrary experimentation platforms, so researchers could use a single tool to work with network simulators, emulators, or physical testbeds, or even a mixture of them. To accomplish this, NEPI provides a high-level interface to describe experiments that is independent from any experimentation platform, but is able to capture platform specific configurations. Experiment definitions can be stored in XML format to be later reproduced, and modified according to experimentation needs. Experiment execution is orchestrated by a global experiment controller, that is platform independent, and different platform-dependent testbed controllers, creating a control hierarchy that is able t adapt to platform specific requirements while providing an integrated control scheme.</p>
-<p> More Info: <a href="http://nepi.inria.fr" target="_blank">http://nepi.inria.fr</a></p>
-
-<h2>OMF</h2>
-<p>OMF is a Testbed Control, Measurement and Management Framework.</p>
-<p>
-OMF was originally developed for the ORBIT wireless testbed at Winlab, Rutgers University. Since 2007, OMF has been actively extended to operate on testbeds with many different type of network and resource technologies. It is now deployed and used on different testbeds in Australia, Europe, and in the U.S. OMF is currently being extended further to support exciting new features and technologies. This website is hosting this ongoing activity. OMF development is now conducted essentially within the TEMPO project at NICTA (Australia) in strong collaboration with Winlab (Rutgers University).
-</p>
-
-<p>In addition to the main OMF software, this site also hosts OMF sub-projects addressing various related aspects of a testbed's control, measurement, and management.</p>
-
-
-<p>More Info: <a href="http://mytestbed.net/projects/omf" target="_blank">http://mytestbed.net/projects/omf</a></p>
\ No newline at end of file
index 47dea17..6a98632 100644 (file)
@@ -1,13 +1,22 @@
+{% if section == "resources" %}
 <ul class="nav nav-tabs nav-sliceview">
-       <li {% if section != "resources" %}class="active"{% endif %}>
-               <a href="#info"><img src="{{ STATIC_URL }}icons/slices-xs.png" alt="About MySlice" /> {{ slice }}</a>
-       </li>
-       <li><a href="#testbeds">Testbeds</a></li>
-       <li {% if section == "resources" %}class="active"{% endif %}><a class="link" href="/resources/{{ slice }}">Resources</a></li>
-       <li><a href="#users">Users</a></li>
-       <li><a href="#experiment">Statistics</a></li>
-       <li><a href="#experiment">Measurements</a></li>
-       <li><a href="#experiment" data-toggle="tab">Experiment</a></li>
+       <li><a href="/slice/{{ slice }}#info"><img src="{{ STATIC_URL }}icons/slices-xs.png" alt="About MySlice" /> {{ slice }}</a></li>
+       <li><a href="/slice/{{ slice }}#testbeds">Testbeds</a></li>
+       <li class="active"><a class="link" href="/resources/{{ slice }}">Resources</a></li>
+       <li><a href="/slice/{{ slice }}#users">Users</a></li>
+       <li><a href="/slice/{{ slice }}#experiment">Statistics</a></li>
+       <li><a href="/slice/{{ slice }}#experiment">Measurements</a></li>
+       <li><a href="/slice/{{ slice }}#experiment" data-toggle="tab">Experiment</a></li>
+</ul>
+{% else %}
+<ul class="nav nav-tabs nav-sliceview">
+       <li class="active"><a href="#info"><img src="{{ STATIC_URL }}icons/slices-xs.png" alt="About MySlice" /> {{ slice }}</a></li>
+       <li class="testbeds"><a href="#testbeds">Testbeds</a></li>
+       <li><a class="link" href="/resources/{{ slice }}">Resources</a></li>
+       <li class="users"><a href="#users">Users</a></li>
+       <li class="statistics"><a href="#experiment">Statistics</a></li>
+       <li class="measurements"><a href="#experiment">Measurements</a></li>
+       <li class="experiment"><a href="#experiment" data-toggle="tab">Experiment</a></li>
 </ul>
 <script>
 $(document).ready(function() {
@@ -21,3 +30,4 @@ $(document).ready(function() {
        $('div#info').load('/info/{{ slice }}/');
 });
 </script>
+{% endif %}
\ No newline at end of file
diff --git a/portal/templates/slice-tab-experiment.html b/portal/templates/slice-tab-experiment.html
new file mode 100644 (file)
index 0000000..f1b2cba
--- /dev/null
@@ -0,0 +1,27 @@
+<div class="col-md-2">
+</div>
+<div class="col-md-8">
+       <h2>Secure Shell (SSH)</h2>
+       <p>
+       Secure Shell (SSH) is a cryptographic network protocol for secure data communication, remote command-line login, remote command execution, and other secure network services between two networked computers that connects, via a secure channel over an insecure network, a server and a client (running SSH server and SSH client programs, respectively). The protocol specification distinguishes between two major versions that are referred to as SSH-1 and SSH-2.
+       </p>
+       <p> More Info: <a href="http://en.wikipedia.org/wiki/Secure_Shell" target="_blank">http://en.wikipedia.org/wiki/Secure_Shell</a></p>
+       
+       
+       <h2>NEPI</h2>
+       <p>NEPI, the Network Experimentation Programming Interface, is a life-cycle management tool for network experiments. The idea behind NEPI is to provide a single tool to design, deploy, and control network experiments, and gather the experiment results. Going further, NEPI was specially conceived to function with arbitrary experimentation platforms, so researchers could use a single tool to work with network simulators, emulators, or physical testbeds, or even a mixture of them. To accomplish this, NEPI provides a high-level interface to describe experiments that is independent from any experimentation platform, but is able to capture platform specific configurations. Experiment definitions can be stored in XML format to be later reproduced, and modified according to experimentation needs. Experiment execution is orchestrated by a global experiment controller, that is platform independent, and different platform-dependent testbed controllers, creating a control hierarchy that is able t adapt to platform specific requirements while providing an integrated control scheme.</p>
+       <p> More Info: <a href="http://nepi.inria.fr" target="_blank">http://nepi.inria.fr</a></p>
+       
+       <h2>OMF</h2>
+       <p>OMF is a Testbed Control, Measurement and Management Framework.</p>
+       <p>
+       OMF was originally developed for the ORBIT wireless testbed at Winlab, Rutgers University. Since 2007, OMF has been actively extended to operate on testbeds with many different type of network and resource technologies. It is now deployed and used on different testbeds in Australia, Europe, and in the U.S. OMF is currently being extended further to support exciting new features and technologies. This website is hosting this ongoing activity. OMF development is now conducted essentially within the TEMPO project at NICTA (Australia) in strong collaboration with Winlab (Rutgers University).
+       </p>
+       
+       <p>In addition to the main OMF software, this site also hosts OMF sub-projects addressing various related aspects of a testbed's control, measurement, and management.</p>
+       
+       
+       <p>More Info: <a href="http://mytestbed.net/projects/omf" target="_blank">http://mytestbed.net/projects/omf</a></p>
+</div>
+<div class="col-md-2">
+</div>
\ No newline at end of file
index 78be6ff..747f3a1 100644 (file)
@@ -1,11 +1,7 @@
 <div class="col-md-2">
 </div>
 <div class="col-md-8">
-       <div id="slice-tab-loading"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
-       <div id="slice-tab-loaded" style="display:none;margin-top:15px;">
-           <table id="slice-tab">
-           </table>
-       </div>
+       <div id="slice-info"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
 </div>
 <div class="col-md-2">
 </div>
                     slice_url="<a href='"+val.slice_url+"' target='_blank'>"+val.slice_url+"</a>";
                 }
                 
-                slice_row = "<tr><td><b>Description:</b></td><td>"+val.slice_description+"</td></tr>";
-                slice_row += "<tr><td><b>url:</b></td><td><a href='"+val.slice_url+" target='_blank'>"+val.slice_url+"</a></td></tr>";
-                slice_row += "<tr><td><b>users:</b></td><td>"+user_length+"</td></tr>";
-                slice_row += "<tr><td><b>resources:</b></td><td>"+nodes_length+"</td></tr>";
-                slice_row += "<tr><td><b>created:</b></td><td>"+val.created+"</td></tr>";
-                slice_row += "<tr><td><b>last update:</b></td><td>"+val.last_updated+"</td></tr>";
-                slice_row += "<tr><td><b>expires:</b></td><td>"+val.slice_expires+"</td></tr>";
+                slice_row = "<tr><td>Description:</b></td><td>"+val.slice_description+"</td></tr>";
+                slice_row += "<tr><td>url:</td><td><a href='"+val.slice_url+" target='_blank'>"+val.slice_url+"</a></td></tr>";
+                slice_row += "<tr><td>users:</td><td>"+user_length+"</td></tr>";
+                slice_row += "<tr><td>resources:</td><td>"+nodes_length+"</td></tr>";
+                slice_row += "<tr><td>created:</td><td>"+val.created+"</td></tr>";
+                slice_row += "<tr><td>last update:</td><td>"+val.last_updated+"</td></tr>";
+                slice_row += "<tr><td>expires:</td><td>"+val.slice_expires+"</td></tr>";
                 table_slices.push(slice_row);
             });
-           $("table#slice-tab").html(table_slices.join( "" ));
-           $("div#slice-tab-loaded").css("display","block");
-           $("div#slice-tab-loading").css("display","none");
+           $("div#slice-info").html("<table>" + table_slices.join( "" ) + "</table>");
         });
     });
 </script>
\ No newline at end of file
index e609bcf..c8d6a77 100644 (file)
@@ -3,14 +3,15 @@
 <div class="col-md-8">         
        <div id="testbed-list-loading"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Testbeds" /></div>
        <div id="testbed-list-loaded" style="display:none;margin-top:15px;">
-               <table cellpadding="0" cellspacing="0" border="0" class="table" id="testbedList"></table>
+               <table cellpadding="0" cellspacing="0" border="0" class="table" id="testbedList">
+               </table>
        </div>
 </div>
 <div class="col-md-2">
 </div>
 <script>
 $(document).ready(function() {
-       $.post("/rest/network/", { "fields" : ["network_hrn", "network_longname", "description"]}, function(data) {
+       $.post("/rest/network/", { "fields" : ["network_hrn", "network_longname", "description"] }, function(data) {
                        var testbed_data = [];
                        var testbed_row = "<thead>";
                        testbed_row += "<tr>";
@@ -23,7 +24,7 @@ $(document).ready(function() {
                        testbed_row += "</thead>";
                        testbed_data.push(testbed_row);
                        $.each( data, function(key, val) {
-                               testbed_row = "<tr data-keys=\""+val.network_hrn+"\" class=\"odd\">"
+                               testbed_row = "<tr data-keys=\""+val.network_hrn+"\" class=\"odd\">";
                                testbed_row += "<td><input type=\"checkbox\" name=\"network_hrn\" value=\""+val.network_hrn+"\"/></td>";
                                testbed_row += "<td><img src='/static/img/testbeds/"+val.network_hrn+".png' alt='' /></td>";
                                testbed_row += "<td>"+val.network_hrn+"</td>";
@@ -40,7 +41,7 @@ $(document).ready(function() {
                $("input[type=checkbox]").click(function() {
                        var cnt = 0;
                        var id = $(this).val();
-                       var row = $(this).parent().parent()
+                       var row = $(this).parent().parent();
                        if (row.hasClass("active")) {
                                row.removeClass("active");
                        } else {