TMP fix: base.html template Query myslice:user is faster than user
[myslice.git] / portal / templates / base.html
index 5989508..cc60f7f 100644 (file)
@@ -3,10 +3,11 @@
 <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>
+<!--<script src="{{ STATIC_URL }}js/jquery-ui.js"></script>-->
 <script src="{{ STATIC_URL }}js/jquery.dataTables.min.js"></script>
 <script src="{{ STATIC_URL }}js/jquery.qtip.min.js"></script>
 <script src="{{ STATIC_URL }}js/bootstrap.datatables.js"></script>
 {% block head %} {% endblock head %}
 {# let's add these ones no matter what #}
 {% insert_str prelude "js/jquery.min.js" %}
+{% insert_str prelude "js/angular/angular.min.js" %}
 {% insert_str prelude "js/jquery.html5storage.min.js" %}
 {% insert_str prelude "js/messages-runtime.js" %}
 {% insert_str prelude "js/class.js" %}
 {% insert_str prelude "js/plugin-helper.js" %}
 {% insert_str prelude "js/mustache.js" %}
+{% insert_str prelude "js/hashtable.js" %}
 {% insert_str prelude "js/plugin.js" %}
 {% insert_str prelude "js/manifold.js" %}
 {% insert_str prelude "css/manifold.css" %}
 {% insert_str prelude "css/plugin.css" %}
 {% insert_str prelude "js/bootstrap.js" %}
 {% insert_str prelude "css/bootstrap.css" %}
+{% insert_str prelude "js/bootstrap-datepicker.js" %}
+{% insert_str prelude "css/datepicker.css" %}
+{% insert_str prelude "js/bootstrap-slider.js" %}
+{% insert_str prelude "css/slider.css" %}
 {% insert_str prelude "css/topmenu.css" %}
 {% insert_str prelude "js/logout.js" %}
 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/{{ theme }}.css">
@@ -48,7 +55,7 @@ $(document).ready(function() {
     
     var slices = [];
     if($.isEmptyObject(user)){
-        $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
+        $.post("/rest/myslice:user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
             if(data.length > 0){
                 drawSlices(data[0].slices);  
             }else{
@@ -62,11 +69,22 @@ $(document).ready(function() {
         slices = user.slices;
         drawSlices(slices);
     }
+
+    /*
+        Launch queries to get the resources and leases in Manifold Cache
+    */
+        
     function drawSlices(slices){
         var items = [];
                
         $.each( slices, function(i, val) {
-            items.push( "<li><a href=\"/slice/"+val+"\">" + val + "</a></li>" );
+            items.push( "<li><a href=\"/resources/"+val+"\">" + val + "</a></li>" );
+            /*
+            // Launch a Query for each slice to get resources and leases in Manifold Cache
+            // Now only done in Homeview to speed up the other pages
+            $.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( "" ));
@@ -76,14 +94,19 @@ $(document).ready(function() {
 });
 </script>
 </head>
-<body>
+<body ng-app="ManifoldApp">
 {% block container %}
        {% 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>