Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab
authorCiro Scognamiglio <ciro.scognamiglio@cslash.net>
Tue, 8 Apr 2014 17:26:40 +0000 (19:26 +0200)
committerCiro Scognamiglio <ciro.scognamiglio@cslash.net>
Tue, 8 Apr 2014 17:26:40 +0000 (19:26 +0200)
Conflicts:
portal/templates/onelab/onelab_home-view.html

1  2 
.settings/org.eclipse.core.resources.prefs
plugins/querytable/static/js/querytable.js
portal/sliceresourceview.py
portal/templates/_widget-topmenu.html
portal/templates/home-view.html
portal/templates/onelab/onelab_widget-topmenu.html

@@@ -1,5 -1,5 +1,8 @@@
  eclipse.preferences.version=1
  encoding//portal/django_passresetview.py=utf-8
++encoding//portal/forms.py=utf-8
++encoding//portal/migrations/0002_extend_slice.py=utf-8
++encoding//portal/models.py=utf-8
  encoding//portal/urls.py=utf-8
  encoding//portal/validationview.py=utf-8
  encoding//portal/views.py=utf-8
              });
              $(".dataTables_filter").append("<div style='display:inline-block;height:27px;width:27px;padding-left:6px;padding-top:4px;'><span class='glyphicon glyphicon-search'></span></div>");
              $(".dataTables_filter input").css("width","100%");
-             $(".columns_selector").append("columns");
-             $(".columns_selector").css("float","right");
-             $(".columns_selector").css("width","inherit");
          }, // initialize_table
  
          /**
              var colnames = cols.map(function(x) {return x.sTitle})
              var nb_col = cols.length;
              /* if we've requested checkboxes, then forget about the checkbox column for now */
 -            if (this.options.checkboxes) nb_col -= 1;
 -
 +            //if (this.options.checkboxes) nb_col -= 1;
 +                      // catch up with the last column if checkboxes were requested 
 +            if (this.options.checkboxes) {
 +                // Use a key instead of hostname (hard coded...)
 +                line.push(this.checkbox_html(record));
 +              }
 +              
              /* fill in stuff depending on the column name */
 -            for (var j = 0; j < nb_col; j++) {
 +            for (var j = 1; j < nb_col; j++) {
                  if (typeof colnames[j] == 'undefined') {
                      line.push('...');
                  } else if (colnames[j] == 'hostname') {
                      }
                      /* XXX TODO: Remove this and have something consistant */
                      if(obj=='resource'){
 -                        line.push('<a href="../'+obj+'/'+record['urn']+'"><span class="glyphicon glyphicon-search"></span></a> '+record[this.init_key]);
 +                        //line.push('<a href="../'+obj+'/'+record['urn']+'"><span class="glyphicon glyphicon-search"></span></a> '+record[this.init_key]);
                      }else{
 -                        line.push('<a href="../'+obj+'/'+record[this.init_key]+'"><span class="glyphicon glyphicon-search"></span></a> '+record[this.init_key]);
 +                        //line.push('<a href="../'+obj+'/'+record[this.init_key]+'"><span class="glyphicon glyphicon-search"></span></a> '+record[this.init_key]);
                      }
 +                    line.push(record[this.init_key]);
                  } else {
                      if (record[colnames[j]])
                          line.push(record[colnames[j]]);
                  }
              }
      
 -            // catch up with the last column if checkboxes were requested 
 -            if (this.options.checkboxes) {
 -                // Use a key instead of hostname (hard coded...)
 -                line.push(this.checkbox_html(record));
 -              }
 +            
      
            // adding an array in one call is *much* more efficient
                // this.table.fnAddData(line);
       was in fact given as a third argument, and not second 
       as the various online resources had it - go figure */
      $.fn.dataTableExt.afnSortData['dom-checkbox'] = function  ( oSettings, _, iColumn ) {
 -      return $.map( oSettings.oApi._fnGetTrNodes(oSettings), function (tr, i) {
 -          return result=$('td:eq('+iColumn+') input', tr).prop('checked') ? '1' : '0';
 -      );
 -    }
 +              return $.map( oSettings.oApi._fnGetTrNodes(oSettings), function (tr, i) {
 +                  return result=$('td:eq('+iColumn+') input', tr).prop('checked') ? '1' : '0';
 +              });
 +    };
  
  })(jQuery);
  
@@@ -143,7 -143,7 +143,7 @@@ class SliceResourceView (LoginRequiredV
              # center on Paris
              latitude   = 49.,
              longitude  = 9,
-             zoom       = 4,
+             zoom       = 8,
          )
  
          # --------------------------------------------------------------------------
  
          template_env = {}
          template_env['list_resources'] = list_resources.render(self.request)
 -        template_env['list_reserved_resources'] = list_reserved_resources.render(self.request)
 +        template_env['list_reserved_resources'] = list_reserved_resources.render(self.request)
  
          template_env['columns_editor'] = filter_column_editor.render(self.request)
  
@@@ -7,7 -7,7 +7,7 @@@
                
                <div id="secondary">
                        <ul>
 -                              <li>News</li>
 +                              <li><a href="/news">News</a></li>
                                <li><a href="/portal/about">About</a></li>
                                <li><a target="_blank" href="http://www.onelab.eu">Public Website</a></li>
                                <li><a target="_blank" href="http://intranet.onelab.eu">Intranet</a></li>
                        </a>
                                
                                <div class="dropdown-menu" style="z-index:99;">
-                                               <ul>
+                                               <ul id="dropdown-slice-list">
                                                        <li><a href="/portal/slice_request/">Request Slice</a></li>
-                                                       <li><a href="/slice/ple.upmc.agent3/">ple.upmc.agent3</a></li>
-                                                   <li><a href="/slice/ple.upmc.agent/">ple.upmc.agent</a></li>
-                                                   <li><a href="/slice/ple.upmc.myslicedemo/">ple.upmc.myslicedemo</a></li>
-                                                   <li><a href="/slice/ple.upmc.slicestat/">ple.upmc.slicestat</a></li>
-                                                   <li><a href="/slice/ple.upmc.agent2/">ple.upmc.agent2</a></li>
                                                </ul>
                                </div>
                                </li>
@@@ -2,9 -2,6 +2,9 @@@
  {% load portal_filters %}
  
  {% block content %}
 +<div class="row">
 +{% widget '_widget_news.html' %}
 +</div>
  <div class="row" id="home-dashboard">
        <ul class="nav nav-tabs">
          <li class="active"><a class="home-tab" data-panel="user" href="#">USER</a></li>
@@@ -89,7 -86,7 +89,7 @@@
                </table>
        </div>
  </div>
- <script>
+ <script type="text/javascript">
        $(document).ready(function() {
                $('a.home-tab').click(function() {
                        $('ul.nav-tabs li').removeClass('active');
                $('button#slicerequestbtn').click(function() {
                        window.location="/portal/slice_request/";
                });
-               
-               {% if person %}
-         $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
-                 var items = [];
-           if(data.length > 0){
-                 $.each( data[0].slices, function(i, val) {
-                       items.push( "<li><a href=\"/slice/"+val+"\">" + val + "</a></li>" );
-                 });
-                 
-                 $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
-                 }else{
-                 $("div#home-slice-list").html("no slice");
-           } 
-               });
-               {% endif %}
-       });
+ /*-------
+ List of slices has been moved in 
+ portal/templates/base.html
+ This should go into session
+ --------*/
+ });
  </script>
  {% endblock %}
@@@ -7,7 -7,7 +7,7 @@@
                
                <div id="secondary">
                        <ul>
 -                              <li>News</li>
 +                              <li><a href="/news">News</a></li>
                                <li><a href="/portal/about">About</a></li>
                                <li><a target="_blank" href="http://www.onelab.eu">Public Website</a></li>
                                <li><a target="_blank" href="http://intranet.onelab.eu">Intranet</a></li>
                        </a>
                                
                                <div class="dropdown-menu" style="z-index:99;">
-                                               <ul>
+                                               <ul id="dropdown-slice-list">
                                                        <li><a href="/portal/slice_request/">Request Slice</a></li>
-                                                       <li><a href="/slice/ple.upmc.agent3/">ple.upmc.agent3</a></li>
-                                                   <li><a href="/slice/ple.upmc.agent/">ple.upmc.agent</a></li>
-                                                   <li><a href="/slice/ple.upmc.myslicedemo/">ple.upmc.myslicedemo</a></li>
-                                                   <li><a href="/slice/ple.upmc.slicestat/">ple.upmc.slicestat</a></li>
-                                                   <li><a href="/slice/ple.upmc.agent2/">ple.upmc.agent2</a></li>
                                                </ul>
                                </div>
                                </li>