From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 25 Sep 2007 03:50:34 -0000 Subject: [Cluster-devel] conga/luci/storage cache_report check-batch cl ... Message-ID: <20070925035034.7005.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: conga Changes by: rmccabe at sourceware.org 2007-09-25 03:50:28 Modified files: luci/storage : cache_report check-batch clu_portlet_fetcher form-chooser form-macros index_html mappings_macros mappings_provider portlet_cluconfig portlet_cluconfig_macro validate_html Removed files: luci/storage : 100wait.gif black_bar_40.png black_right_end_40.png blue_bar_40.png blue_cap_40.png blue_right_end_40.png icon_bd_LV.png icon_bd_LV_snapshot.png icon_bd_crypto.png icon_bd_ide.png icon_bd_multipath.png icon_bd_net.png icon_bd_partition.png icon_bd_raid.png icon_bd_scsi.png icon_content_FS.png icon_content_PV.png icon_mapper_PT.png icon_mapper_VG.png icon_mapper_crypto.png icon_mapper_multipath.png icon_mapper_raid.png red_bar_40.png red_cap_40.png red_right_end_40.png selection_1px_40.png selection_bar_40.png selection_left_end_40.png selection_right_end_40.png snapshot.gif tree_bullet.gif tree_closed.gif tree_opened.gif tree_transparent.gif Log message: Cleanup: - First pass of making the look and feel of this consistent with the rest of the app - Move all the image files into the site custom directory so they can be cached Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/cache_report.diff?cvsroot=cluster&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/check-batch.diff?cvsroot=cluster&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/clu_portlet_fetcher.diff?cvsroot=cluster&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/form-chooser.diff?cvsroot=cluster&r1=1.7&r2=1.8 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/form-macros.diff?cvsroot=cluster&r1=1.25&r2=1.26 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/index_html.diff?cvsroot=cluster&r1=1.10&r2=1.11 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/mappings_macros.diff?cvsroot=cluster&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/mappings_provider.diff?cvsroot=cluster&r1=1.6&r2=1.7 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/portlet_cluconfig.diff?cvsroot=cluster&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/portlet_cluconfig_macro.diff?cvsroot=cluster&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/validate_html.diff?cvsroot=cluster&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/100wait.gif.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/black_bar_40.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/black_right_end_40.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/blue_bar_40.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/blue_cap_40.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/blue_right_end_40.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/icon_bd_LV.png.diff?cvsroot=cluster&r1=1.2&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/icon_bd_LV_snapshot.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/icon_bd_crypto.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/icon_bd_ide.png.diff?cvsroot=cluster&r1=1.2&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/icon_bd_multipath.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/icon_bd_net.png.diff?cvsroot=cluster&r1=1.2&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/icon_bd_partition.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/icon_bd_raid.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/icon_bd_scsi.png.diff?cvsroot=cluster&r1=1.2&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/icon_content_FS.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/icon_content_PV.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/icon_mapper_PT.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/icon_mapper_VG.png.diff?cvsroot=cluster&r1=1.2&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/icon_mapper_crypto.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/icon_mapper_multipath.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/icon_mapper_raid.png.diff?cvsroot=cluster&r1=1.2&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/red_bar_40.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/red_cap_40.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/red_right_end_40.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/selection_1px_40.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/selection_bar_40.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/selection_left_end_40.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/selection_right_end_40.png.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/snapshot.gif.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/tree_bullet.gif.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/tree_closed.gif.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/tree_opened.gif.diff?cvsroot=cluster&r1=1.1&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/tree_transparent.gif.diff?cvsroot=cluster&r1=1.1&r2=NONE --- conga/luci/storage/cache_report 2007/09/11 16:04:35 1.4 +++ conga/luci/storage/cache_report 2007/09/25 03:50:27 1.5 @@ -1,15 +1,18 @@ - - - - + + + + + + + + + tal:replace="structure cache_result" /> + + tal:replace="string: Insufficient Rights" /> --- conga/luci/storage/check-batch 2007/09/11 16:04:35 1.3 +++ conga/luci/storage/check-batch 2007/09/25 03:50:27 1.4 @@ -1,60 +1,48 @@ - - - + + + + - - -FAILURE - -You are not authorized to modify storage system !!! - - - - - - - - -DONE - - - - - -NOT_DONE - - - - - - - + FAILURE - - - - - - - - - + + You are not authorized to access system + + + + + + + + DONE + + + + + + NOT_DONE + + + + + + + FAILURE + + + + + --- conga/luci/storage/clu_portlet_fetcher 2007/09/11 16:04:35 1.2 +++ conga/luci/storage/clu_portlet_fetcher 2007/09/25 03:50:27 1.3 @@ -1,43 +1,14 @@ - + i18n:domain="plone"> - - -
- - -
- + +
+ +
+ - - - --- conga/luci/storage/form-chooser 2007/09/11 16:04:35 1.7 +++ conga/luci/storage/form-chooser 2007/09/25 03:50:27 1.8 @@ -1,80 +1,69 @@ - - The title - - - - - - - - - - - -

- Insufficient rights -

-
- - - -
- - - -
- - - -
- - - -
- - - -
- - - - - - - - - -
- - - -
- - - -
- - - -
- - - -
- + + +</head> + +<body> +<metal:choose-form metal:define-macro="main-form"> + <tal:block tal:define=" + global preferred_size_units python:here.set_persistent_var('preferred_size_units', 'GB')" /> + + <tal:block tal:define=" + global preferred_path_display python:here.set_persistent_var('preferred_path_display', 'path')" /> + + <tal:block tal:condition="python: access_to_host_allowed == False and storagename != None"> + <h2>Insufficient rights</h2> + <div metal:use-macro="here/form-macros/macros/error-form" /> + </tal:block> + + <tal:block tal:condition="python: storage_report == None and storagename != None and access_to_host_allowed"> + <div metal:use-macro="here/form-macros/macros/wait-probing-storage" /> + </tal:block> + + <tal:block tal:condition="python: (pagetype == '0' or pagetype == None) and storagename == None"> + <div metal:use-macro="here/form-macros/macros/systems-form" /> + </tal:block> + + <tal:block tal:condition="python: pagetype=='commit_changes' and storage_report != None"> + <div metal:use-macro="here/form-macros/macros/commit-changes" /> + </tal:block> + + <tal:block tal:condition="python: pagetype == '44' and storage_report != None"> + <div metal:use-macro="here/form-macros/macros/view-mappers-all-form" /> + </tal:block> + + <tal:block tal:condition="python: pagetype == '51' and storage_report != None"> + <div metal:use-macro="here/form-macros/macros/view-mappers-form" /> + </tal:block> + + <tal:block tal:define="mapper_id request/mapper_id|nothing" + tal:condition="mapper_id"> + <tal:block + tal:condition="python: mapper_id != 'hard_drives:' and pagetype == '62'"> + <tal:block tal:define="global pagetype string:52" /> + </tal:block> + </tal:block> + + <tal:block tal:condition="python: pagetype == '52' and storage_report != None"> + <div metal:use-macro="here/form-macros/macros/view-mapper-form" /> + </tal:block> + + <tal:block tal:condition="python: pagetype == '61' and storage_report != None"> + <div metal:use-macro="here/form-macros/macros/view-hard-drives-form" /> + </tal:block> + + <tal:block tal:condition="python: pagetype == '62' and storage_report != None"> + <div metal:use-macro="here/form-macros/macros/view-BD-form" /> + </tal:block> + + <tal:block tal:condition="python: pagetype == '101' and storage_report != None"> + <div metal:use-macro="here/form-macros/macros/create-mapper-form" /> + </tal:block> + + <tal:block tal:condition="python: pagetype == '102' and storage_report != None"> + <div metal:use-macro="here/form-macros/macros/add-sources-form" /> + </tal:block> +</metal:choose-form> - </metal:choose-form> - - </body> +</body> </html> --- conga/luci/storage/form-macros 2007/09/11 16:04:35 1.25 +++ conga/luci/storage/form-macros 2007/09/25 03:50:27 1.26 @@ -38,13 +38,11 @@ } tr.props-form-header th { background-color: #dee7ec; - text-align: center; + text-align: left; } tr.props-form-header th:first-child { - -moz-border-radius-topleft: 15px; } tr.props-form-header th:last-child { - -moz-border-radius-topright: 15px; } tr.props-form-body { @@ -68,10 +66,8 @@ padding: 3px; } tr.props-form-footer td:first-child { - -moz-border-radius-bottomleft: 15px; } tr.props-form-footer td:last-child { - -moz-border-radius-bottomright: 15px; } table.props-inner-table { @@ -182,12 +178,12 @@ <div metal:define-macro="display-committing-changes"> <table style="width: 100%;"> <tr> - <td align="center"> + <td align="left"> <img src="100wait.gif" style="padding-top: 1cm;"/> </td> </tr> <tr> - <td align="center"> + <td align="left"> <div style="padding-bottom: 4cm;">Committing Changes</div> </td> </tr> @@ -236,7 +232,7 @@ <table style="width: 100%;"> <tr> - <td align="center"> + <td align="left"> <img src="100wait.gif" style="padding-top: 1cm;"/> </td> </tr> @@ -350,7 +346,7 @@ <div metal:define-macro="error-form"> <h2>Error Form</h2> - An error has occured, more details once implemented :) + An error has occurred. </div> @@ -599,7 +595,7 @@ <span tal:omit-tag="" tal:define="mapper python:here.get_mapper_data(storage_report, request['mapper_id']); properties_span_id python:mapper['mapper_id'] + '_properties_span_id'"> - <div align="center"> + <div align="left"> <h3> <span tal:content="python:mapper['pretty_type'] + ' '"/> <span style="cursor: pointer; text-decoration: underline" @@ -691,7 +687,7 @@ <div tal:attributes="id properties_span_id" style="width: 700px; min-height: 360px; "> <span id="warning_box" - style="position:absolute; visibility: hidden; border: medium double red; color: red; background-color: white; text-align: center; width: 350px; "> + style="position:absolute; visibility: hidden; border: medium double red; color: red; background-color: white; text-align: left; width: 350px; "> </span> <div tal:attributes="id mapper/mapper_id; @@ -739,7 +735,7 @@ <span tal:omit-tag="" tal:define="bd_data python:here.get_bd_data(storage_report, request['mapper_id'], request['bd_path']); mapper python:here.get_mapper_data(storage_report, request['mapper_id'])"> - <span tal:define="properties_span_id string:if seen in javascript error log -> FIXME"> + <span tal:condition="bd_data"> <div metal:use-macro="here/form-macros/macros/display-BD"/> </span> </span> @@ -1198,11 +1194,7 @@ input { background-image: none; } input.validation_error { border: medium double red; background-color: orange; } input.selected { border: thin solid orange; } - input.form_button { background-color: #fff; - -moz-border-radius-topleft: 7px; - -moz-border-radius-topright: 7px; - -moz-border-radius-bottomleft: 7px; - -moz-border-radius-bottomright: 7px; } + input.form_button { background-color: #fff; } </style> <script language="javascript" type="text/javascript"> @@ -1940,7 +1932,7 @@ <span tal:define="act_name action/name; act_msg action/msg; act_link action/link" - align="center"> + align="left"> <span tal:condition="act_link"> <input tal:define="act_link python:act_link + '&storagename=' + storagename; funct python:'window.location.assign(\'' + act_link + '\')'" --- conga/luci/storage/index_html 2007/09/11 16:04:35 1.10 +++ conga/luci/storage/index_html 2007/09/25 03:50:27 1.11 @@ -79,8 +79,6 @@ } } - - var span_to_replace = ""; var replace_span_button_to_disable_id = ""; @@ -255,10 +253,6 @@ </metal:block> </div> - - - - </body> </html> </metal:page> --- conga/luci/storage/mappings_macros 2007/09/11 16:04:35 1.2 +++ conga/luci/storage/mappings_macros 2007/09/25 03:50:27 1.3 @@ -1,133 +1,124 @@ <html> - <head> - <title tal:content="template/title">The title - - - -

content title or id - optional template title

- - This is Page Template template id. - - - - - - - - - -
- -
-
- - -
-
- - - -
- - - -
- -
-
- -
- - -
- - -
- -
-
- -
- - -
- - - - - - - - - - -
- -
-
-
- -
-
- -
- -
-
-
-
-
-
- - - + + +</head> + +<body> + +<h2> + <span tal:replace="here/title_or_id" /> + <span tal:condition="template/title" tal:replace="template/title" /> +</h2> + +</body> + +<div metal:define-macro="draw-base-cyl" + tal:define="cap python:cyl['color'] + '_cap_40.png'"> + + <div tal:omit-tag="" + tal:define=" + cyls cyl/cyls; + tmp python:cyls.reverse()" + tal:repeat="subcyl cyls"> + + <div + tal:define=" + beg subcyl/beg; + end subcyl/end; + id subcyl/id; + size python:end - beg; + right_end python:subcyl['color'] + '_right_end_40.png'; + bar python:subcyl['color'] + '_bar_40.png'" + tal:attributes=" + class string:visible; + id id; + style python:here.add_commas('position:absolute', here.add_commas('left: ' + str(beg), 'top: 0'))"> + + <img height="40" width="10" + tal:attributes=" + src right_end; + style python:here.add_commas('position:absolute', here.add_commas('left: ' + str(size), 'top: 0'))" /> + + <img height="40" + tal:attributes=" + src bar; + width python:str(size); + style python:here.add_commas('position:absolute', here.add_commas('left: ' + str(0), 'top: 0'))" /> + </div> + </div> + + <img height="40" width="20" + tal:define=" + one_tmp_assignment python:here.add_commas('position:absolute', here.add_commas('left: -' + str(curve_width), 'top: 0'))" + tal:attributes=" + src cap; + style one_tmp_assignment" /> +</div> + + +<div metal:define-macro="draw-highlights"> + <div tal:omit-tag="" tal:repeat="high highs"> + <div class="invisible" + tal:define=" + beg high/beg; + end high/end; + size python:end - beg; + id high/id" + tal:attributes=" + id id; + style python:here.add_commas('position:absolute', here.add_commas('left: ' + str(beg), 'top: 0'))"> + + <tal:block tal:condition="python:high['type'] == 'select'"> + <div metal:use-macro="here/mappings_macros/macros/draw-select" /> + </tal:block> + + <tal:block tal:condition="python:high['type'] == 'snapshot'"> + <div metal:use-macro="here/mappings_macros/macros/draw-snapshot"/> + </tal:block> + + <tal:block tal:condition="python:high['type'] == 'snapshot-origin'"> + <div metal:use-macro="here/mappings_macros/macros/draw-snapshot-origin" /> + </tal:block> + </div> + </div> +</div> + +<div metal:define-macro="draw-select"> + <tal:block tal:condition="python:size > 0 and size < curve_width"> + <tal:block tal:repeat="off python:range(size)"> + <img height="40" src="selection_1px_40.png" + tal:attributes="style python:here.add_commas('position:absolute', here.add_commas('left: ' + str(off), 'top: 0'))" /> + </tal:block> + </tal:block> + + <tal:block tal:condition="python:size >= curve_width"> + <img height="40" width="10" src="selection_left_end_40.png" + tal:attributes="style python:here.add_commas('position:absolute', here.add_commas('left: ' + str(0), 'top: 0'))" /> + + <img src="selection_bar_40.png" height="40" + tal:attributes=" + width python:str(size - curve_width); + style python:here.add_commas('position:absolute', here.add_commas('left: ' + str(curve_width), 'top: 0'))" /> + + <img src="selection_right_end_40.png" height="40" width="10" + tal:attributes=" + style python:here.add_commas('position:absolute', here.add_commas('left: ' + str(size), 'top: 0'))" /> + </tal:block> +</div> + +<div metal:define-macro="draw-snapshot"> + <div style="height:40"></div> + <div tal:attributes="style python:here.add_commas('position:absolute', 'left: ' + str(size/2-12))"> + <img src="snapshot.gif" style="width: 25px; height: 20px;" /> + </div> +</div> + +<div metal:define-macro="draw-snapshot-origin"> + <div> + <div style="border-bottom: medium dotted #0000FF"> + <div tal:attributes="style python:here.add_commas('height: 40', 'width: ' + str(size))" /> + </div> + </div> +</div> </html> --- conga/luci/storage/mappings_provider 2007/09/11 16:04:35 1.6 +++ conga/luci/storage/mappings_provider 2007/09/25 03:50:27 1.7 @@ -3,11 +3,14 @@ <span tal:omit-tag="" tal:define="global pagetype request/pagetype|nothing; global storagename request/storagename|nothing"/> + <span tal:omit-tag="" tal:condition="not: pagetype"> + <span tal:omit-tag="" tal:define="global pagetype python:'0'"/> </span> + <span tal:omit-tag="" tal:define="stosystemss context/systems/storage/objectItems; global allowed_systems python:here.allowed_systems(stosystemss); @@ -26,157 +29,7 @@ <head> <title tal:content="mapper/pretty_name">The title - - +