Skip to contentSkip to conversation

conga/luci site/luci/Extensions/HelperFunction ...

Cluster-devel [email protected] 1 participant 1 message Oct 5, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: kupcevic at sourceware.org 2006-10-05 23:21:40

Modified files:
luci/site/luci/Extensions: HelperFunctions.py StorageReport.py
luci/storage : cache_report form-macros

Log message:
luci storage: error reporting during probes

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/HelperFunctions.py.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/StorageReport.py.diff?cvsroot=cluster&r1=1.8&r2=1.9
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/cache_report.diff?cvsroot=cluster&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/form-macros.diff?cvsroot=cluster&r1=1.4&r2=1.5

luci/site/luci/Extensions/HelperFunctions.py +1 -1
@@ -87,6 +87,6 @@
                 value)
     response.setCookie(cookie_prefix + var_name,
                        value, 
-                       expires='Tue, 30 Jun 2020 12:00:00 GMT')
+                       expires='Tue, 30 Jun 2060 12:00:00 GMT')
     
     return value
luci/site/luci/Extensions/StorageReport.py +47 -9

98 lines not on this page · raw message

luci/storage/cache_report +14 -16
@@ -1,17 +1,15 @@
-<span tal:omit-tag="" 
-      tal:define="global storagename request/storagename|nothing"/>
-<span tal:omit-tag="" 
-      tal:define="stosystemss context/systems/storage/objectItems;
+<span tal:define="global storagename request/storagename|nothing"
+      tal:replace="string:"/>
+<span tal:define="stosystemss context/systems/storage/objectItems;
                   global allowed_systems python:here.allowed_systems(user, stosystemss);
-                  global access_to_host_allowed python:here.access_to_host_allowed(storagename, allowed_systems)"/>
-<span tal:omit-tag="" 
-      tal:define="global ricci python:here.get_ricci_communicator(storagename, allowed_systems);
-                  global storage_report python:here.get_storage_report(ricci, request.SESSION)"/>
-<span tal:omit-tag=""
-      tal:condition="storage_report">
-OK
-</span>
-<span tal:omit-tag=""
-      tal:condition="not: storage_report">
-error
-</span>
+                  global access_to_host_allowed python:here.access_to_host_allowed(storagename, allowed_systems)"
+      tal:replace="string:"/>
+<span tal:define="global ricci python:here.get_ricci_communicator(storagename, allowed_systems);
+                  global cache_result python:here.cache_storage_report(ricci, request.SESSION)"
+      tal:replace="string:"/>
+<span tal:condition="python: cache_result == True" 
+      tal:replace="string:OK"/>
+<span tal:condition="python: cache_result != True and access_to_host_allowed"
+      tal:replace="structure cache_result"/>
+<span tal:condition="python: not access_to_host_allowed"
+      tal:replace="string: Insufficient Rights"/>
luci/storage/form-macros +2 -2
@@ -141,11 +141,11 @@
         if (res.substr(0, 2) == "OK") {
            window.location.reload();
         } else {
-           alert('An error has occured while probing storage');
+           alert('An error has occured while probing storage:\n\n' + res);
            window.location = list_URL;
         }
     } else {
-        alert("Error retrieving data from server");
+        alert("Error retrieving data from Luci server");
         window.location = list_URL;
     }
   }