Caching: Resources, Leases and Slices pre-loaded on the dashboard using REST
[myslice.git] / portal / templates / base.html
index 970eefd..df8fd9c 100644 (file)
@@ -3,7 +3,7 @@
 <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_fed4fire.ico">
+<link rel="shortcut icon" href="/static/img/favicon.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>
@@ -69,11 +69,27 @@ $(document).ready(function() {
         slices = user.slices;
         drawSlices(slices);
     }
+
+    /*
+        Launch queries to get the resources and leases in Manifold Cache
+    */
+        
+    $.post("/rest/resource/", function( data ) {
+    });
+    $.post("/rest/lease/", function( data ) {
+    });
+
+   
     function drawSlices(slices){
         var items = [];
                
         $.each( slices, function(i, val) {
             items.push( "<li><a href=\"/resources/"+val+"\">" + val + "</a></li>" );
+            /*
+            Launch a Query for each slice to get resources and leases in Manifold Cache
+            */
+            $.post("/rest/slice/", { 'filters': { 'slice_hrn' : val } }, function(data) {
+            });
         });
         $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
         $("ul#dropdown-slice-list").append(items.join( "" ));
@@ -88,9 +104,14 @@ $(document).ready(function() {
        {% block topmenu %}
        {% widget "_widget-topmenu.html" %}
        {% endblock topmenu %}
-       {% include 'messages-transient.html' %}
        {% block base_content %}
        {% endblock %}
 {% endblock container %}
+{% widget "_footer.html" %}
+<div class="loading">
+       <div><img src="{{ STATIC_URL }}/img/loading.gif" /> Loading...</div>
+       <div>&nbsp;</div>
+       <div class="message"></div>
+</div>
 </body>
 </html>