[Cluster-devel] conga/luci site/luci/Extensions/StorageReport. ...
kupcevic at sourceware.org
kupcevic at sourceware.org
Sat Oct 14 20:01:53 UTC 2006
CVSROOT: /cvs/cluster
Module name: conga
Changes by: kupcevic at sourceware.org 2006-10-14 20:01:52
Modified files:
luci/site/luci/Extensions: StorageReport.py
luci/storage : form-macros
Log message:
luci storage: since cylinders work properly in VGs only, don't display them, by default, at other mappers' views
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/StorageReport.py.diff?cvsroot=cluster&r1=1.13&r2=1.14
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/form-macros.diff?cvsroot=cluster&r1=1.11&r2=1.12
--- conga/luci/site/luci/Extensions/StorageReport.py 2006/10/09 19:11:59 1.13
+++ conga/luci/site/luci/Extensions/StorageReport.py 2006/10/14 20:01:52 1.14
@@ -481,6 +481,15 @@
if type == MAPPER_VG_TYPE:
link_snapshots(mapper_ret)
+ # cylinders work properly for VGs only, for now
+ mapper_ret['graphical_view'] = type == MAPPER_VG_TYPE
+ if mapper_ret['graphical_view']:
+ mapper_ret['mappings-view_css_classnames'] = {'graphical_view' : 'visible',
+ 'textual_view' : 'invisible'}
+ else:
+ mapper_ret['mappings-view_css_classnames'] = {'graphical_view' : 'invisible',
+ 'textual_view' : 'visible'}
+
mapper_ret['need_apply_button'] = mutable_props(mapper_ret['props'])
return mapper_ret
--- conga/luci/storage/form-macros 2006/10/09 19:11:59 1.11
+++ conga/luci/storage/form-macros 2006/10/14 20:01:52 1.12
@@ -433,7 +433,8 @@
<li tal:define="bd_data source;
prefix python:mapper['mapper_id'] + '_source_' + bd_data['path'] + '_';
properties_span_id python:prefix + 'properties_span_id'">
- <span tal:attributes="id properties_span_id">
+ <span tal:define="displaying_source python:True"
+ tal:attributes="id properties_span_id">
<div metal:use-macro="here/form-macros/macros/display-BD"/>
</span>
</li>
@@ -504,12 +505,14 @@
<input type="checkbox"
id="graphics_checkbox_id"
- checked=""
+ tal:attributes="checked mapper/graphical_view"
onchange="var s = (this.checked)?'graphical_view':'textual_view'; singleVisibleSpan('mappings_view', s);"/>
Graphical View
- <span id="mappings_view">
+ <span id="mappings_view"
+ tal:define="mappings_view_classnames mapper/mappings-view_css_classnames">
- <div id="graphical_view" class="visible"
+ <div id="graphical_view"
+ tal:attributes="class mappings_view_classnames/graphical_view"
tal:define="global bd_path request/bd_path|nothing">
<span tal:omit-tag=""
tal:condition="not: bd_path">
@@ -522,7 +525,8 @@
height string:180"></iframe>
</div>
- <div id="textual_view" class="invisible">
+ <div id="textual_view"
+ tal:attributes="class mappings_view_classnames/textual_view">
<br/>
<div>
<h3>
More information about the Cluster-devel
mailing list