1 {% load portal_filters %}
2 {# This is required by insert_above #}{% insert_handler %}<!DOCTYPE html>
4 <title>{{theme}} portal - {{ section }}</title>
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <link rel="shortcut icon" href="/static/img/favicon.ico">
7 {# This is where insert_str will end up #}{% media_container prelude %}
8 {% include 'messages-transient-header.html' %}
9 <script type="text/javascript"> {# raw js code - use {% insert prelude_js %} ... {% endinsert %} #} {% container prelude_js %}</script>
10 <!--<script src="{{ STATIC_URL }}js/jquery-ui.js"></script>-->
11 <script src="{{ STATIC_URL }}js/jquery.dataTables.min.js"></script>
12 <script src="{{ STATIC_URL }}js/jquery.qtip.min.js"></script>
13 <script src="{{ STATIC_URL }}js/bootstrap.datatables.js"></script>
14 <!-- <script src="{{ STATIC_URL }}js/stash.min.js"></script> -->
15 <script src="{{ STATIC_URL }}js/myslice.js"></script>
16 <script src="{{ STATIC_URL }}js/myslice-ui.js"></script>
17 <style type="text/css">{# In case we need to add raw css code #}{% container prelude_css %}</style>
19 {% block head %} {% endblock head %}
20 {# let's add these ones no matter what #}
21 {% insert_str prelude "js/jquery.min.js" %}
22 {% insert_str prelude "js/angular/angular.min.js" %}
23 {% insert_str prelude "js/jquery.html5storage.min.js" %}
24 {% insert_str prelude "js/messages-runtime.js" %}
25 {% insert_str prelude "js/class.js" %}
26 {% insert_str prelude "js/plugin-helper.js" %}
27 {% insert_str prelude "js/mustache.js" %}
28 {% insert_str prelude "js/hashtable.js" %}
29 {% insert_str prelude "js/plugin.js" %}
30 {% insert_str prelude "js/manifold.js" %}
31 {% insert_str prelude "css/manifold.css" %}
32 {% insert_str prelude "css/plugin.css" %}
33 {% insert_str prelude "js/bootstrap.js" %}
34 {% insert_str prelude "css/bootstrap.css" %}
35 {% insert_str prelude "js/bootstrap-datepicker.js" %}
36 {% insert_str prelude "css/datepicker.css" %}
37 {% insert_str prelude "js/bootstrap-slider.js" %}
38 {% insert_str prelude "css/slider.css" %}
39 {% insert_str prelude "css/topmenu.css" %}
40 {% insert_str prelude "js/logout.js" %}
41 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/{{ theme }}.css">
42 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/jquery.qtip.min.css">
45 <script type="text/javascript">
48 This list of slices should go into SESSION !
50 $(document).ready(function() {
54 user = myslice.user();
57 if($.isEmptyObject(user)){
58 $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
60 drawSlices(data[0].slices);
62 $("div#home-slice-list").html(
63 "<div>You do not yet have a slice</div>");
64 $("ul#dropdown-slice-list").append("<li>no slice</li>");
65 slices.push("no slice");
74 Launch queries to get the resources and leases in Manifold Cache
77 $.post("/rest/resource/", function( data ) {
79 $.post("/rest/lease/", function( data ) {
83 function drawSlices(slices){
86 $.each( slices, function(i, val) {
87 items.push( "<li><a href=\"/resources/"+val+"\">" + val + "</a></li>" );
89 Launch a Query for each slice to get resources and leases in Manifold Cache
91 $.post("/rest/slice/", { 'filters': { 'slice_hrn' : val } }, function(data) {
94 $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
95 $("ul#dropdown-slice-list").append(items.join( "" ));
98 jQuery('[title!=""]').qtip();
102 <body ng-app="ManifoldApp">
103 {% block container %}
105 {% widget "_widget-topmenu.html" %}
106 {% endblock topmenu %}
107 {% block base_content %}
109 {% endblock container %}
110 {% widget "_footer.html" %}
111 <div class="loading">
112 <div><img src="{{ STATIC_URL }}/img/loading.gif" /> Loading...</div>
114 <div class="message"></div>