Skip to contentSkip to conversation

conga/luci site/luci/Extensions/StorageReport. ...

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

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: kupcevic at sourceware.org 2006-10-15 05:44:03

Modified files:
luci/site/luci/Extensions: StorageReport.py
luci/storage : mappings_provider

Log message:
luci storage: add 'new logical volume' button to VG view

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/StorageReport.py.diff?cvsroot=cluster&r1=1.15&r2=1.16
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/mappings_provider.diff?cvsroot=cluster&r1=1.3&r2=1.4

luci/site/luci/Extensions/StorageReport.py +9 -0
@@ -476,6 +476,15 @@
                   'msg'  : 'Are you sure you want to remove ' + pretty_type + ' \\\'' + pretty_name + '\\\'?',
                   'link' : ''}
         actions.append(action)
+    if type == MAPPER_VG_TYPE:
+        for nt in mapper_ret['new_targets']:
+            if nt['props']['snapshot']['value'] == 'false':
+                if nt['new']:
+                    action = {'name' : 'New Logical Volume',
+                              'msg'  : '',
+                              'link' : './?' + PAGETYPE + '=' + VIEW_BD + '&' + PT_MAPPER_ID + '=' + mapper_ret['mapper_id'] + '&' + PT_MAPPER_TYPE + '=' + mapper_ret['mapper_type'] + '&' + PT_PATH + '=' + nt['path']}
+                    actions.append(action)
+                    break
     mapper_ret['actions'] = actions
     
     if type == MAPPER_VG_TYPE:
luci/storage/mappings_provider +2 -2
@@ -250,7 +250,7 @@
      </span>
      
      <div id="upper_msg_board"
-          style="position: absolute; border: 2px solid black; padding: 2px; background-color: lightyellow; visibility: hidden; z-index: 100; white-space: nowrap;">
+          style="position: absolute; border: 2px solid black; padding: 2px; background-color: lightyellow; visibility: hidden; z-index: 100; white-space: nowrap; font-size: small;">
      </div>
      
     </div>
@@ -294,7 +294,7 @@
      </span>
      
      <div id="lower_msg_board"
-          style="position: absolute; border: 2px solid black; padding: 2px; background-color: lightyellow; visibility: hidden; z-index: 100; white-space: nowrap;">
+          style="position: absolute; border: 2px solid black; padding: 2px; background-color: lightyellow; visibility: hidden; z-index: 100; white-space: nowrap; font-size: small;">
      </div>
      
     </div>