fixed scheduler
authorJordan Augé <jordan.auge@lip6.fr>
Mon, 21 Jul 2014 08:53:17 +0000 (10:53 +0200)
committerJordan Augé <jordan.auge@lip6.fr>
Mon, 21 Jul 2014 08:53:17 +0000 (10:53 +0200)
manifoldapi/static/js/manifold.js
plugins/scheduler2/static/css/scheduler2.css
portal/homeview.py
portal/sliceresourceview.py

index b959c10..7dfcb4d 100644 (file)
@@ -1302,7 +1302,7 @@ case TYPE_LIST_OF_VALUES:
                 */
                 case TYPE_LIST_OF_VALUES: // XXX Until fixed
                 case TYPE_LIST_OF_RECORDS:
-                    var new_state,cur_query_uuid;
+                    var key, new_state, cur_query_uuid;
 
                     cur_query_uuid = query.analyzed_query.subqueries[field].query_uuid;
 
@@ -1310,7 +1310,15 @@ case TYPE_LIST_OF_VALUES:
                     //  - update_query_orig.params.resource = resources in slice before update
                     //  - update_query.params.resource = resource requested in slice
                     //  - keys from field = resources obtained
-                    var key = manifold.metadata.get_key(field);
+                
+                    if (field == 'lease') {
+                         // lease_id has been added to be repeated when
+                         // constructing request rspec. We don't want it for
+                         // comparisons
+                        key = ['start_time', 'end_time', 'resource'];
+                    } else {
+                        key = manifold.metadata.get_key(field);
+                    }
                     if (!key)
                         continue;
                     /*
index 2fcf063..cda74b1 100755 (executable)
     cursor: not-allowed;\r
 }\r
 \r
-#scheduler-reservation-table tbody tr td.success {\r
+#scheduler-reservation-table tbody tr td.success:after {\r
        content: "✓";\r
 }\r
-#scheduler-reservation-table tbody tr td.failure {\r
+#scheduler-reservation-table tbody tr td.failure:after {\r
        content: "✗";\r
 }\r
 \r
index d46ed65..4576431 100644 (file)
@@ -101,6 +101,7 @@ class HomeView (FreeAccessView, ThemeView):
             ## check user is pi or not
             platform_query  = Query().get('local:platform').select('platform_id','platform','gateway_type','disabled')
             account_query  = Query().get('local:account').select('user_id','platform_id','auth_type','config')
+            # XXX Something like an invalid session seems to make the execute fail sometimes, and thus gives an error on the main page
             platform_details = execute_query(self.request, platform_query)
             account_details = execute_query(self.request, account_query)
             for platform_detail in platform_details:
index db72dca..db7413d 100644 (file)
@@ -256,6 +256,8 @@ class SliceResourceView (LoginRequiredView, ThemeView):
         account_query  = Query().get('local:account').select('user_id','platform_id','auth_type','config')
         platform_details = execute_query(self.request, platform_query)
         account_details = execute_query(self.request, account_query)
+
+        # XXX When session has expired, this is None and thus not iterable
         for platform_detail in platform_details:
             for account_detail in account_details:
                 if platform_detail['platform_id'] == account_detail['platform_id']: