Merge branch 'master' of ssh://git.onelab.eu/git/myslice
authorYasin <mohammed-yasin.rahman@lip6.fr>
Fri, 15 Nov 2013 14:48:12 +0000 (15:48 +0100)
committerYasin <mohammed-yasin.rahman@lip6.fr>
Fri, 15 Nov 2013 14:48:12 +0000 (15:48 +0100)
manifold/metadata.py
ui/static/css/topmenu.css

index 4fbbc06..90a09ea 100644 (file)
@@ -27,24 +27,29 @@ class MetaData:
             except:
                 print "metadata.work_offline: failed to decode %s"%offline_filename
         manifold_api = ManifoldAPI(self.auth)
-        fields = ['table', 'column.name', 'column.qualifier', 'column.type', 'column.is_array', 'column.description', 'column.default', 'key', 'capability']
+        fields = ['table', 'column.name', 'column.qualifier', 'column.type', 
+                  'column.is_array', 'column.description', 'column.default', 'key', 'capability']
         #fields = ['table', 'column.column',
         #          'column.description','column.header', 'column.title',
         #          'column.unit', 'column.info_type',
         #          'column.resource_type', 'column.value_type',
         #          'column.allowed_values', 'column.platforms.platform',
         #          'column.platforms.platform_url']
-        result = manifold_api.forward({
-            'action': 'get',
-            'object': 'local:object', # proposed to replace metadata:table
-            'fields':     fields 
-        })
+        request={ 'action': 'get',
+                  'object': 'local:object', # proposed to replace metadata:table
+                  'fields':  fields ,
+                  }
+        result = manifold_api.forward(request)
 
+        # xxx need a way to export error messages to the UI
         if result['code'] == 1: # warning
-            messages.warning(request, result['description'])
+            # messages.warning(request, result['description'])
+            print ("METADATA WARNING -",request,result['description'])
         elif result['code'] == 2:
-            messages.error(request, result['description'])
+            # messages.error(request, result['description'])
+            print ("METADATA ERROR -",request,result['description'])
             # XXX FAIL HERE XXX
+            return
 
         rows = result.ok_value()
 # API errors will be handled by the outer logic
index 792377b..70acc0e 100644 (file)
@@ -1,13 +1,12 @@
 /* this is to get the content below the navbar */
 body {
     padding-top: 60px;
-    padding-bottom: 20px;
 }
 
 /* center the buttons vertically in the header */
 div.topmenu { padding-top: 7px; }
 ul.logged-in { 
-    padding-top: 12px; 
+    padding-top: 14px; 
 }
 button.logged-in { 
     font-size: small;