conga/luci site/luci/Extensions/StorageReport. ...
CVSROOT: /cvs/cluster
Module name: conga
Changes by: kupcevic at sourceware.org 2006-10-09 17:03:17
Modified files:
luci/site/luci/Extensions: StorageReport.py
luci/storage : form-macros
Log message:
luci storage: GoTo links to move up/down block device hierarchy
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/StorageReport.py.diff?cvsroot=cluster&r1=1.11&r2=1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/form-macros.diff?cvsroot=cluster&r1=1.9&r2=1.10
luci/site/luci/Extensions/StorageReport.py +7 -0
@@ -1669,6 +1669,7 @@ for name in old_props: new_props['content_variable_' + d['id'] + '_' + name] = old_props[name] d['props'] = new_props + d['is_source'] = False # content's color and icon color = 'black'
@@ -1678,9 +1679,15 @@ icon_name = get_fs_icon(d['xml'].getAttribute('fs_type')) elif type == 'mapper_source': mapper_type = d['xml'].getAttribute('mapper_type') + mapper_id = d['xml'].getAttribute('mapper_id') + pretty_mapper_type, dummy1, dummy2 = get_pretty_mapper_info(mapper_type) dummy1, dummy2, icon_name = get_mapper_icons(mapper_type) if mapper_type == MAPPER_VG_TYPE: color = '#a43737' + d['is_source'] = True + d['mapper_type'] = mapper_type + d['mapper_id'] = mapper_id + d['pretty_mapper_type'] = pretty_mapper_type elif type == 'none': pass elif type == 'hidden':
luci/storage/form-macros +25 -3
@@ -589,20 +589,21 @@ <span tal:omit-tag="" tal:repeat="bd_data mapper/targets"> <div tal:attributes="id bd_data/path; - class string:invisible"> + class string:invisible"> <div metal:use-macro="here/form-macros/macros/display-BD"/> </div> </span> <span tal:omit-tag="" tal:repeat="bd_data mapper/new_targets"> <div tal:attributes="id bd_data/path; - class string:invisible"> + class string:invisible"> <div metal:use-macro="here/form-macros/macros/display-BD"/> </div> </span> <span tal:omit-tag="" tal:repeat="bd_data mapper/sources"> - <div tal:attributes="id bd_data/path; + <div tal:define="displaying_source python:True" + tal:attributes="id bd_data/path; class string:invisible"> <div metal:use-macro="here/form-macros/macros/display-BD"/> </div>
@@ -1419,6 +1420,15 @@ <span tal:omit-tag="" tal:condition="not: bd_data/new"> <span tal:replace="bd_data/pretty_type"/> '<span tal:replace="bd_data/pretty_name"/>' - <span tal:replace="bd_data/path"/> + <span tal:omit-tag="" + tal:condition="displaying_source|nothing"> + <br/> + <a tal:define="tmp_URL context/storage/index_html/absolute_url; + URL python:tmp_URL + '?storagename=' + storagename + '&pagetype=62'" + tal:attributes="href python:URL + '&mapper_type=' + bd_data['mapper_type'] + '&mapper_id=' + bd_data['mapper_id'] + '&bd_path=' + bd_data['path']" + style="font-size: xx-small;" + tal:content="python: 'Go to ' + bd_data['pretty_mapper_type']"></a> + </span> </span> <span tal:omit-tag="" tal:condition="bd_data/new">
@@ -1485,6 +1495,18 @@ value cont/id"/> <span tal:replace="cont/name"/> </span> + <span tal:omit-tag="" + tal:define="cont python:conts[0]" + tal:condition="not: displaying_source|nothing"> + <span tal:condition="cont/is_source"> + <br/> + <a tal:define="tmp_URL context/storage/index_html/absolute_url; + URL python:tmp_URL + '?storagename=' + storagename + '&pagetype=52'" + tal:attributes="href python:URL + '&mapper_type=' + cont['mapper_type'] + '&mapper_id=' + cont['mapper_id']" + style="font-size: xx-small;" + tal:content="python: 'Go to ' + cont['pretty_mapper_type']"></a> + </span> + </span> </td> <td style="min-width: 30px;">