[Cluster-devel] conga/luci/storage cache_report check-batch cy ...
rmccabe at sourceware.org
rmccabe at sourceware.org
Tue Sep 25 18:55:14 UTC 2007
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2007-09-25 18:55:13
Modified files:
luci/storage : cache_report check-batch cylinder_select.js
form-chooser form-macros mappings_macros
mappings_provider storage_svs.js validate_html
Log message:
Cleanup and refactor
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/cache_report.diff?cvsroot=cluster&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/check-batch.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/cylinder_select.js.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.8&r2=1.9
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/form-macros.diff?cvsroot=cluster&r1=1.27&r2=1.28
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/mappings_macros.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/mappings_provider.diff?cvsroot=cluster&r1=1.7&r2=1.8
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/storage_svs.js.diff?cvsroot=cluster&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/validate_html.diff?cvsroot=cluster&r1=1.5&r2=1.6
--- conga/luci/storage/cache_report 2007/09/25 03:50:27 1.5
+++ conga/luci/storage/cache_report 2007/09/25 18:55:13 1.6
@@ -1,3 +1,12 @@
+<tal:comment tal:replace="nothing">
+** Copyright (C) 2006-2007 Red Hat, Inc.
+**
+** This program is free software; you can redistribute
+** it and/or modify it under the terms of version 2 of the
+** GNU General Public License as published by the
+** Free Software Foundation.
+</tal:comment>
+
<tal:block tal:define="global storagename request/storagename|nothing" />
<tal:block tal:define="
--- conga/luci/storage/check-batch 2007/09/25 03:50:27 1.4
+++ conga/luci/storage/check-batch 2007/09/25 18:55:13 1.5
@@ -1,3 +1,12 @@
+<tal:comment tal:replace="nothing">
+** Copyright (C) 2006-2007 Red Hat, Inc.
+**
+** This program is free software; you can redistribute
+** it and/or modify it under the terms of version 2 of the
+** GNU General Public License as published by the
+** Free Software Foundation.
+</tal:comment>
+
<tal:block tal:define="
global storagename request/storagename;
global batch_id request/batch_id" />
--- conga/luci/storage/cylinder_select.js 2007/09/25 16:49:36 1.2
+++ conga/luci/storage/cylinder_select.js 2007/09/25 18:55:13 1.3
@@ -62,7 +62,7 @@
for (var i = 0 ; i < parent.childNodes.length ; i++) {
var item = parent.childNodes[i];
- var item_type = item.nodeName.lower();
+ var item_type = item.nodeName.toLowerCase();
if (item_type == 'span' || item.type == 'div') {
if (item.id == current_selection) {
item.className = 'visible';
@@ -94,7 +94,7 @@
function cyl_over(msg_board, X, Y, c_data, h_data) {
if (Y < 0 || Y > 40) {
- msg_board.style.visibility = 'invisible';
+ msg_board.style.visibility = 'hidden';
return;
}
@@ -116,5 +116,5 @@
return;
}
}
- msg_board.style.visibility = 'invisible';
+ msg_board.style.visibility = 'hidden';
}
--- conga/luci/storage/form-chooser 2007/09/25 03:50:27 1.8
+++ conga/luci/storage/form-chooser 2007/09/25 18:55:13 1.9
@@ -1,3 +1,12 @@
+<tal:comment tal:replace="nothing">
+** Copyright (C) 2006-2007 Red Hat, Inc.
+**
+** This program is free software; you can redistribute
+** it and/or modify it under the terms of version 2 of the
+** GNU General Public License as published by the
+** Free Software Foundation.
+</tal:comment>
+
<html>
<head>
<title id="pagetitle" tal:content="template/title" />
--- conga/luci/storage/form-macros 2007/09/25 16:49:36 1.27
+++ conga/luci/storage/form-macros 2007/09/25 18:55:13 1.28
@@ -1,10 +1,18 @@
+<tal:comment tal:replace="nothing">
+** Copyright (C) 2006-2007 Red Hat, Inc.
+**
+** This program is free software; you can redistribute
+** it and/or modify it under the terms of version 2 of the
+** GNU General Public License as published by the
+** Free Software Foundation.
+</tal:comment>
+
<html>
<head>
<title tal:content="string:" />
</head>
<body>
-
<div metal:define-macro="forms-css">
<style type="text/css">
<!-- @import url(conga_storage.css); -->
@@ -12,167 +20,135 @@
</div>
<div metal:define-macro="commit-changes">
- <span tal:omit-tag=""
- tal:define="batch_id python:here.apply_storage_changes(ricci, storage_report, request);
- check_URL context/storage/check-batch/absolute_url;
- check_url python:check_URL + '?storagename=' + storagename + '&batch_id=' + batch_id">
- <div metal:use-macro="here/form-macros/macros/display-committing-changes"/>
- <form id="urls_form">
- <input tal:attributes="type string:hidden;
- name string:check_url;
- value check_url"/>
- </form>
- </span>
-
-
-<script type="text/javascript" src="storage_utils.js"></script>
-
+ <script type="text/javascript" src="storage_utils.js"></script>
+ <span tal:omit-tag=""
+ tal:define="batch_id python:here.apply_storage_changes(ricci, storage_report, request);
+ check_URL context/storage/check-batch/absolute_url;
+ check_url python:check_URL + '?storagename=' + storagename + '&batch_id=' + batch_id">
+
+ <div metal:use-macro="here/form-macros/macros/display-committing-changes" />
+ <form id="urls_form">
+ <input type="hidden" name="check_url"
+ tal:attributes="value check_url" />
+ </form>
+ </span>
</div>
-
-
-
-
<div metal:define-macro="display-committing-changes">
- <table style="width: 100%;">
- <tr>
- <td align="left">
- <img src="100wait.gif" style="padding-top: 1cm;"/>
- </td>
- </tr>
- <tr>
- <td align="left">
- <div style="padding-bottom: 4cm;">Committing Changes</div>
- </td>
- </tr>
- </table>
+ <table style="width: 100%;">
+ <tr>
+ <td align="center">
+ <img src="100wait.gif" style="padding-top: 1cm;" />
+ </td>
+ </tr>
+ <tr>
+ <td align="center">
+ <div style="padding-bottom: 4cm;">Committing Changes</div>
+ </td>
+ </tr>
+ </table>
</div>
-
-
-
<div metal:define-macro="wait-probing-storage">
<script type="text/javascript" src="storage_probing.js"></script>
- <table style="width: 100%;">
- <tr>
- <td align="left">
- <img src="100wait.gif" style="padding-top: 1cm;"/>
- </td>
- </tr>
- <tr>
- <td align="center">
- <div style="padding-bottom: 4cm;">Probing storage</div>
- </td>
- </tr>
- </table>
+ <table style="width: 100%;">
+ <tr>
+ <td align="center">
+ <img src="100wait.gif" style="padding-top: 1cm;" />
+ </td>
+ </tr>
+ <tr>
+ <td align="center">
+ <div style="padding-bottom: 4cm;">Probing storage</div>
+ </td>
+ </tr>
+ </table>
</div>
+<div metal:define-macro="systems-form">
+ <fieldset>
+ <legend>
+ Storage Configuration Preferences
+ </legend>
+ <form>
+ <table>
+ <tr>
+ <td>
+ Display Sizes in
+ </td>
+ <td>
+ <select name="preferred_size_units"
+ onchange="this.form.submit()">
+ <option value="MB" tal:attributes="selected python:preferred_size_units == 'MB'">MB - Megabytes</option>
+ <option value="GB" tal:attributes="selected python:preferred_size_units == 'GB'">GB - Gigabytes</option>
+ <option value="TB" tal:attributes="selected python:preferred_size_units == 'TB'">TB - Terabytes</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Display Devices by
+ </td>
+ <td>
+ <select name="preferred_path_display"
+ onchange="this.form.submit()" style="width: 100%;">
+ <option value="path" tal:attributes="selected python:preferred_path_display == 'path'">Device Path</option>
+ <option value="scsi" tal:attributes="selected python:preferred_path_display == 'scsi'">SCSI ID</option>
+ </select>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </fieldset>
+
+ <dl tal:define="
+ tmp_triple python:here.group_systems_by_cluster(allowed_systems, from_cache=True);
+ nonclu_list python:tmp_triple[0];
+ clu_list python:tmp_triple[1];
+ bad_list python:tmp_triple[2]">
+ <dt>
+ You are authorized to administer the systems in the list to the left
+ </dt>
+ <dd>
+ Please select one to administer
+ </dd>
+ <dt>
+ <span tal:condition="not: bad_list">
+ All systems are up and running
+ </span>
+ <span tal:condition="bad_list">
+ You are authorized but unable to modify following systems:
+ </span>
+ </dt>
+ <dd>
+ <table tal:condition="bad_list">
+ <tr>
+ <th>Hostname</th>
+ <th>Reason</th>
+ </tr>
+ <tr tal:repeat="b bad_list">
+ <td>
+ <span style="color: red;" tal:content="b/hostname" />
+ </td>
+ <td>
+ <tal:block tal:condition="b/available">
+ Requires system reauthentication
+ </tal:block>
+ <tal:block tal:condition="not: b/available">
+ Inaccessible
+ </tal:block>
+ </td>
+ </tr>
+ </table>
+ </dd>
+ </dl>
+</div>
-
-
- <div metal:define-macro="systems-form">
-
- <fieldset>
- <legend>
- Storage Configuration Preferences
- </legend>
- <form>
- <table>
- <tr>
- <td>
- Display Sizes in
- </td>
- <td>
- <select name="preferred_size_units" onchange="this.form.submit()">
- <option value="MB"
- tal:attributes="selected python:preferred_size_units == 'MB'">MB - Megabytes</option>
- <option value="GB"
- tal:attributes="selected python:preferred_size_units == 'GB'">GB - Gigabytes</option>
- <option value="TB"
- tal:attributes="selected python:preferred_size_units == 'TB'">TB - Terabytes</option>
- </select>
- </td>
- </tr>
- <tr>
- <td>
- Display Devices by
- </td>
- <td>
- <select name="preferred_path_display"
- onchange="this.form.submit()"
- style="width: 100%;">
- <option value="path"
- tal:attributes="selected python:preferred_path_display == 'path'">Device Path</option>
- <option value="scsi"
- tal:attributes="selected python:preferred_path_display == 'scsi'">SCSI ID</option>
- </select>
- </td>
- </tr>
- </table>
- </form>
- </fieldset>
-
- <dl tal:define="tmp_triple python:here.group_systems_by_cluster(allowed_systems, from_cache=True);
- nonclu_list python:tmp_triple[0];
- clu_list python:tmp_triple[1];
- bad_list python:tmp_triple[2]">
-
- <dt>
- You are authorized to administer Storage Systems on the list to the left
- </dt>
- <dd>
- Please, select one to administer
- </dd>
-
- <dt>
- <span tal:condition="not: bad_list">
- All systems are up and running
- </span>
- <span tal:condition="bad_list">
- You are authorized but unable to modify following systems:
- </span>
- </dt>
- <dd>
- <table tal:condition="bad_list">
- <tr>
- <th>
- Hostname
- </th>
- <th>
- Reason
- </th>
- </tr>
- <span tal:omit-tag=""
- tal:repeat="b bad_list">
- <tr>
- <td>
- <span style="color: red;"
- tal:content="b/hostname"></span>
- </td>
- <td>
- <span tal:omit-tag=""
- tal:condition="b/available">
- Requires System Reauthentication
- </span>
- <span tal:omit-tag=""
- tal:condition="not: b/available">
- Inaccessible
- </span>
- </td>
- </tr>
- </span>
- </table>
- </dd>
- </dl>
- </div>
-
-
- <div metal:define-macro="error-form">
- <h2>Error Form</h2>
- An error has occurred.
- </div>
-
+<div metal:define-macro="error-form">
+ <h2>Error Form</h2>
+ An error has occurred.
+</div>
<div tal:omit-tag="" metal:define-macro="tree-css">
<style type="text/css">
@@ -181,391 +157,414 @@
</div>
<div tal:omit-tag="" metal:define-macro="li-collapse-handler">
- <a onClick="this.parentNode.className = (this.parentNode.className == 'opened') ? 'closed' : 'opened';">
- <img src="tree_transparent.gif" style="cursor: pointer;"/>
- </a>
+ <a onclick="this.parentNode.className = (this.parentNode.className == 'opened') ? 'closed' : 'opened';"><img src="tree_transparent.gif" style="cursor: pointer;" /></a>
</div>
+<div metal:define-macro="view-mappers-form">
+ <div metal:use-macro="here/form-macros/macros/tree-css" />
+ <div metal:use-macro="here/form-macros/macros/content-scripts" />
+ <div metal:use-macro="here/form-macros/macros/single-visible-span" />
+ <div metal:use-macro="here/form-macros/macros/form-scripts" />
+
+ <tal:block tal:define="
+ mapper_type request/mapper_type;
+ mappers_all python:here.get_mappers_data(storage_report)">
+
+ <tal:block tal:condition="python:mapper_type in mappers_all">
+ <tal:block
+ tal:define="mappers_data python:mappers_all[mapper_type]">
+ <div metal:use-macro="here/form-macros/macros/display-mappers-of-type" />
+ </tal:block>
+ </tal:block>
+
+ <tal:block tal:condition="python:mapper_type not in mappers_all">
+ Please use links to navigate around, don't modify address bar
+ </tal:block>
+ </tal:block>
+</div>
- <div metal:define-macro="view-mappers-form">
- <div metal:use-macro="here/form-macros/macros/tree-css"/>
- <div metal:use-macro="here/form-macros/macros/content-scripts"/>
- <div metal:use-macro="here/form-macros/macros/single-visible-span"/>
- <div metal:use-macro="here/form-macros/macros/form-scripts"/>
- <span tal:omit-tag=""
- tal:define="mapper_type request/mapper_type;
- mappers_all python:here.get_mappers_data(storage_report)">
- <span tal:omit-tag=""
- tal:condition="python:mapper_type in mappers_all">
- <span tal:omit-tag=""
- tal:define="mappers_data python:mappers_all[mapper_type]">
- <div metal:use-macro="here/form-macros/macros/display-mappers-of-type"/>
- </span>
- </span>
- <span tal:omit-tag=""
- tal:condition="python:mapper_type not in mappers_all">
- Please use links to navigate around, don't modify address bar
- </span>
- </span>
- </div>
-
-
- <div metal:define-macro="view-hard-drives-form">
- <div metal:use-macro="here/form-macros/macros/tree-css"/>
- <div metal:use-macro="here/form-macros/macros/content-scripts"/>
- <div metal:use-macro="here/form-macros/macros/single-visible-span"/>
- <div metal:use-macro="here/form-macros/macros/form-scripts"/>
- <span tal:omit-tag=""
- tal:define="mappers_all python:here.get_mappers_data(storage_report)">
- <span tal:omit-tag=""
- tal:repeat="mapper_type python:mappers_all.keys()">
- <span tal:omit-tag=""
- tal:condition="python:mapper_type == 'hard_drives'"
- tal:define="mappers_data python:mappers_all[mapper_type]">
- <div metal:use-macro="here/form-macros/macros/display-hard-drives"/>
- </span>
- </span>
- </span>
- </div>
-
+<div metal:define-macro="view-hard-drives-form">
+ <div metal:use-macro="here/form-macros/macros/tree-css" />
+ <div metal:use-macro="here/form-macros/macros/content-scripts" />
+ <div metal:use-macro="here/form-macros/macros/single-visible-span" />
+ <div metal:use-macro="here/form-macros/macros/form-scripts" />
+
+ <tal:block tal:define="
+ mappers_all python:here.get_mappers_data(storage_report)">
+
+ <tal:block tal:repeat="mapper_type python:mappers_all.keys()">
+ <tal:block tal:condition="python:mapper_type == 'hard_drives'"
+ tal:define="mappers_data python:mappers_all[mapper_type]">
+
+ <div metal:use-macro="here/form-macros/macros/display-hard-drives" />
+ </tal:block>
+ </tal:block>
+ </tal:block>
+</div>
<div metal:define-macro="view-mappers-all-form">
<script type="text/javascript" src="popup_log.js"></script>
+ <div metal:use-macro="here/form-macros/macros/tree-css" />
+ <div metal:use-macro="here/form-macros/macros/content-scripts" />
+ <div metal:use-macro="here/form-macros/macros/single-visible-span" />
+ <div metal:use-macro="here/form-macros/macros/form-scripts" />
+
+ <a onclick="return popup_log(this, 'notes')"
+ tal:define="main_log_URL context/logs/index_html/absolute_url"
+ tal:attributes="href python:main_log_URL + '?nodename=' + storagename">
+ View recent log activity
+ </a>
+ <br/>
+ <br/>
+
+ <tal:block tal:define="
+ mappers_all python:here.get_mappers_data(storage_report)">
+
+ <tal:block tal:repeat="mapper_type python:mappers_all.keys()">
+ <tal:block tal:condition="python:mapper_type == 'hard_drives'"
+ tal:define="mappers_data python:mappers_all[mapper_type]">
+
+ <div metal:use-macro="here/form-macros/macros/display-hard-drives" />
+ </tal:block>
+ </tal:block>
+
+ <tal:block tal:repeat="mapper_type python:mappers_all.keys()">
+ <tal:block tal:condition="python:mapper_type != 'hard_drives'"
+ tal:define="mappers_data python:mappers_all[mapper_type]">
+
+ <div metal:use-macro="here/form-macros/macros/display-mappers-of-type" />
+ </tal:block>
+ </tal:block>
+ </tal:block>
+</div>
- <div metal:use-macro="here/form-macros/macros/tree-css"/>
- <div metal:use-macro="here/form-macros/macros/content-scripts"/>
- <div metal:use-macro="here/form-macros/macros/single-visible-span"/>
- <div metal:use-macro="here/form-macros/macros/form-scripts"/>
-
- <a tal:define="main_log_URL context/logs/index_html/absolute_url"
- tal:attributes="href python:main_log_URL + '?nodename=' + storagename"
- onClick="return popup_log(this, 'notes')">
- View recent log activity
- </a>
- <br/>
- <br/>
-
- <span tal:omit-tag=""
- tal:define="mappers_all python:here.get_mappers_data(storage_report)">
- <span tal:omit-tag=""
- tal:repeat="mapper_type python:mappers_all.keys()">
- <span tal:omit-tag=""
- tal:condition="python:mapper_type == 'hard_drives'"
- tal:define="mappers_data python:mappers_all[mapper_type]">
- <div metal:use-macro="here/form-macros/macros/display-hard-drives"/>
- </span>
- </span>
- <span tal:omit-tag=""
- tal:repeat="mapper_type python:mappers_all.keys()">
- <span tal:omit-tag=""
- tal:condition="python:mapper_type != 'hard_drives'"
- tal:define="mappers_data python:mappers_all[mapper_type]">
- <div metal:use-macro="here/form-macros/macros/display-mappers-of-type"/>
- </span>
- </span>
- </span>
- </div>
-
-
-
- <div metal:define-macro="display-mappers-of-type">
- <h2 tal:content="python:mappers_data['pretty_type'] + 's'"/>
- <span tal:condition="not: mappers_data/mappers">
- No <span tal:replace="mappers_data/pretty_type"/>s exist on <span tal:replace="storagename"/>.
- <br/>
- Use link on the left to create new <span tal:replace="mappers_data/pretty_type"/>.
- </span>
- <ul class="tree"
- tal:condition="mappers_data/mappers">
- <span tal:repeat="mapper mappers_data/mappers">
- <li tal:condition="mapper/pretty_name"
- class="closed"><div metal:use-macro="here/form-macros/macros/li-collapse-handler"/>
- <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=' + mapper['mapper_type'] + '&mapper_id=' + mapper['mapper_id']"
- tal:content="mapper/pretty_name"></a>
- <ul class="tree">
- <li class="closed"><div metal:use-macro="here/form-macros/macros/li-collapse-handler"/>
- <span tal:replace="mapper/pretty_type"/> Properties:
- <ul class="tree">
- <li>
- <span tal:define="properties_span_id mapper/mapper_id"
- tal:attributes="id properties_span_id">
- <div metal:use-macro="here/form-macros/macros/display-mapper"/>
- </span>
- </li>
- </ul>
- </li>
- <li class="closed"><div metal:use-macro="here/form-macros/macros/li-collapse-handler"/>
- <span tal:replace="mapper/pretty_targets_name"/>:
- <ul class="tree">
- <span tal:repeat="target mapper/targets">
- <li class="closed"><div metal:use-macro="here/form-macros/macros/li-collapse-handler"/>
- <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=' + target['mapper_type'] + '&mapper_id=' + target['mapper_id'] + '&bd_path=' + target['path']"
- tal:content="target/pretty_name"/>
- <span tal:content="target/description"/>
- <ul class="tree">
- <li tal:define="bd_data target;
- prefix python:mapper['mapper_id'] + '_target_' + bd_data['path'] + '_';
- properties_span_id python:prefix + 'properties_span_id'">
- <span tal:attributes="id properties_span_id">
- <div metal:use-macro="here/form-macros/macros/display-BD"/>
- </span>
- </li>
- </ul>
- </li>
- </span>
- </ul>
- </li>
- <li class="closed"><div metal:use-macro="here/form-macros/macros/li-collapse-handler"/>
- <span tal:replace="mapper/pretty_sources_name"/>:
- <ul class="tree">
- <span tal:repeat="source mapper/sources">
- <li class="closed"><div metal:use-macro="here/form-macros/macros/li-collapse-handler"/>
- <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=' + source['mapper_type'] + '&mapper_id=' + source['mapper_id'] + '&bd_path=' + source['path']"
- tal:content="source/path"/>
- <span tal:content="source/description"/>
- <ul class="tree">
- <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:define="displaying_source python:True"
- tal:attributes="id properties_span_id">
- <div metal:use-macro="here/form-macros/macros/display-BD"/>
- </span>
- </li>
- </ul>
- </li>
- </span>
- </ul>
- </li>
- </ul>
- </li>
- </span>
- </ul>
- </div>
-
-
- <div metal:define-macro="display-hard-drives">
- <h2 tal:content="mappers_data/pretty_type"/>
- <span tal:condition="not: mappers_data/mappers">
- No <span tal:replace="mappers_data/pretty_type"/>s exist on <span tal:replace="storagename"/>.
- <br/>
- Use link on the left to create new <span tal:replace="mappers_data/pretty_type"/>.
- </span>
- <ul class="tree"
- tal:condition="mappers_data/mappers">
- <span tal:repeat="mapper mappers_data/mappers">
- <span tal:repeat="target mapper/targets">
- <li class="closed"><div metal:use-macro="here/form-macros/macros/li-collapse-handler"/>
- <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=' + target['mapper_type'] + '&mapper_id=' + target['mapper_id'] + '&bd_path=' + target['path']"
- tal:content="target/pretty_name"/>
- <span tal:content="target/description"/>
- <ul class="tree">
- <li tal:define="bd_data target;
- prefix python:mapper['mapper_id'] + '_target_' + bd_data['path'] + '_';
- properties_span_id python:prefix + 'properties_span_id'">
- <span tal:attributes="id properties_span_id">
- <div metal:use-macro="here/form-macros/macros/display-BD"/>
- </span>
- </li>
- </ul>
- </li>
- </span>
- </span>
- </ul>
- </div>
-
-
-
- <div metal:define-macro="view-mapper-form">
- <div metal:use-macro="here/form-macros/macros/content-scripts"/>
- <div metal:use-macro="here/form-macros/macros/form-scripts"/>
- <div metal:use-macro="here/form-macros/macros/single-visible-span"/>
- <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="left">
- <h3>
- <span tal:content="python:mapper['pretty_type'] + ' '"/>
- <span style="cursor: pointer; text-decoration: underline"
- tal:attributes="onclick python:'singleVisibleSpan(\'' + properties_span_id + '\', \'' + mapper['mapper_id'] + '\')'"
- tal:content="mapper/pretty_name">
- mapper name
- </span>
- </h3>
- </div>
-
-
- <input type="checkbox"
- id="graphics_checkbox_id"
- tal:attributes="checked mapper/graphical_view"
- onchange="var s = (this.checked)?'graphical_view':'textual_view'; singleVisibleSpan('mappings_view', s);"/>
- Graphical View <small>(Uncheck if volumes are too small to select)</small>
- <span id="mappings_view"
- tal:define="mappings_view_classnames mapper/mappings-view_css_classnames">
-
- <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">
- <span tal:omit-tag=""
- tal:define="global bd_path python:''"/>
- </span>
- <iframe style="border: none;"
- tal:attributes="src python:'mappings_provider?storagename=' + storagename + '&mapper_id=' + mapper['mapper_id'] + '&selected_path=' + bd_path;
- width string:700px;
- height string:195"></iframe>
- </div>
-
- <div id="textual_view"
- tal:attributes="class mappings_view_classnames/textual_view">
- <br/>
- <div>
- <h3 style="font-size: small;">
- <span tal:omit-tag=""
- tal:define="targets mapper/targets_all">
- <span tal:omit-tag=""
- tal:condition="python:len(targets) > 1"
- tal:content="python:mapper['pretty_targets_name'] + ': '"/>
- <span tal:omit-tag=""
- tal:condition="python:len(targets) == 1"
- tal:content="python:mapper['pretty_target_name'] + ': '"/>
- <span tal:omit-tag=""
- tal:repeat="t targets">
- <span style="cursor: pointer; text-decoration: underline"
- tal:attributes="onclick python:'singleVisibleSpan(\'' + properties_span_id + '\', \'' + t['path'] + '\')'"
- tal:content="t/pretty_name">
- target name
- </span>
- </span>
- </span>
- </h3>
- </div>
- <br/>
- <div>
- <h3 style="font-size: small;">
- <span tal:omit-tag=""
- tal:define="sources mapper/sources">
- <span tal:omit-tag=""
- tal:condition="python: len(sources) > 1"
- tal:content="python:mapper['pretty_sources_name'] + ': '"/>
- <span tal:omit-tag=""
- tal:condition="python: len(sources) == 1"
- tal:content="python:mapper['pretty_source_name'] + ': '"/>
- <span tal:omit-tag=""
- tal:repeat="s sources">
- <span style="cursor: pointer; text-decoration: underline"
- tal:attributes="onclick python:'singleVisibleSpan(\'' + properties_span_id + '\', \'' + s['path'] + '\')'"
- tal:content="s/pretty_name">
- source name
- </span>
- </span>
- </span>
- </h3>
- </div>
- <br/>
- </div>
-
- </span> <!-- display -->
-
-
-
-
-
- <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: left; width: 350px; ">
- </span>
-
- <div tal:attributes="id mapper/mapper_id;
- class string:visible">
- <div metal:use-macro="here/form-macros/macros/display-mapper"/>
- </div>
- <span tal:omit-tag=""
- tal:repeat="bd_data mapper/targets">
- <div tal:attributes="id bd_data/path;
- 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">
- <div metal:use-macro="here/form-macros/macros/display-BD"/>
- </div>
- </span>
- <span tal:omit-tag=""
- tal:repeat="bd_data mapper/sources">
- <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>
- </span>
- </div>
- </span>
- </div>
-
-
-
- <div metal:define-macro="view-BDs-form">
- <h2>BDs Form</h2>
- </div>
+<div metal:define-macro="display-mappers-of-type">
+ <h2 tal:content="python:mappers_data['pretty_type'] + 's'" />
+ <span tal:condition="not: mappers_data/mappers">
+ No <span tal:replace="mappers_data/pretty_type"/>s exist on <span tal:replace="storagename" />.
+ <br/>
+ Use the link on the left to create new <span tal:replace="mappers_data/pretty_type"/>.
+ </span>
+
+ <ul class="tree" tal:condition="mappers_data/mappers">
+ <span tal:repeat="mapper mappers_data/mappers">
+
+ <li tal:condition="mapper/pretty_name" class="closed">
+ <div metal:use-macro="here/form-macros/macros/li-collapse-handler" />
+ <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=' + mapper['mapper_type'] + '&mapper_id=' + mapper['mapper_id']"
+ tal:content="mapper/pretty_name" />
+ <ul class="tree">
+ <li class="closed">
+ <div metal:use-macro="here/form-macros/macros/li-collapse-handler" />
+ <span tal:replace="mapper/pretty_type"/> Properties:
+ <ul class="tree">
+ <li>
+ <span tal:define="
+ properties_span_id mapper/mapper_id"
+ tal:attributes="id properties_span_id">
+
+ <div metal:use-macro="here/form-macros/macros/display-mapper" />
+ </span>
+ </li>
+ </ul>
+ </li>
+
+ <li class="closed">
+ <div metal:use-macro="here/form-macros/macros/li-collapse-handler" />
+ <span tal:replace="mapper/pretty_targets_name" />:
+ <ul class="tree">
+ <span tal:repeat="target mapper/targets">
+ <li class="closed">
+ <div metal:use-macro="here/form-macros/macros/li-collapse-handler" />
+ <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=' + target['mapper_type'] + '&mapper_id=' + target['mapper_id'] + '&bd_path=' + target['path']"
+ tal:content="target/pretty_name" />
+ <span tal:content="target/description" />
+ <ul class="tree">
+ <li tal:define="
+ bd_data target;
+ prefix python:mapper['mapper_id'] + '_target_' + bd_data['path'] + '_';
+ properties_span_id python:prefix + 'properties_span_id'">
+ <span tal:attributes="id properties_span_id">
+ <div metal:use-macro="here/form-macros/macros/display-BD" />
+ </span>
+ </li>
+ </ul>
+ </li>
+ </span>
+ </ul>
+ </li>
+
+ <li class="closed">
+ <div metal:use-macro="here/form-macros/macros/li-collapse-handler" />
+ <span tal:replace="mapper/pretty_sources_name" />:
+ <ul class="tree">
+ <span tal:repeat="source mapper/sources">
+ <li class="closed">
+ <div metal:use-macro="here/form-macros/macros/li-collapse-handler" />
+ <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=' + source['mapper_type'] + '&mapper_id=' + source['mapper_id'] + '&bd_path=' + source['path']"
+ tal:content="source/path" />
+ <span tal:content="source/description" />
+ <ul class="tree">
+ <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:define="
+ displaying_source python:True"
+ tal:attributes="
+ id properties_span_id">
+ <div metal:use-macro="here/form-macros/macros/display-BD" />
+ </span>
+ </li>
+ </ul>
+ </li>
+ </span>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ </span>
+ </ul>
+</div>
+<div metal:define-macro="display-hard-drives">
+ <h2 tal:content="mappers_data/pretty_type"/>
+ <tal:block tal:condition="not: mappers_data/mappers">
+ No <span tal:replace="mappers_data/pretty_type"/>s exist on <span tal:replace="storagename" />.
+ <br/>
+ Use the link on the left to create new <span tal:replace="mappers_data/pretty_type" />.
+ </tal:block>
+
+ <ul class="tree" tal:condition="mappers_data/mappers">
+ <span tal:repeat="mapper mappers_data/mappers">
+ <span tal:repeat="target mapper/targets">
+ <li class="closed">
+ <div metal:use-macro="here/form-macros/macros/li-collapse-handler" />
+ <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=' + target['mapper_type'] + '&mapper_id=' + target['mapper_id'] + '&bd_path=' + target['path']"
+ tal:content="target/pretty_name" />
+ <span tal:content="target/description" />
+ <ul class="tree">
+ <li tal:define="
+ bd_data target;
+ prefix python:mapper['mapper_id'] + '_target_' + bd_data['path'] + '_';
+ properties_span_id python:prefix + 'properties_span_id'">
+ <span tal:attributes="id properties_span_id">
+ <div metal:use-macro="here/form-macros/macros/display-BD" />
+ </span>
+ </li>
+ </ul>
+ </li>
+ </span>
+ </span>
+ </ul>
+</div>
- <div metal:define-macro="view-BD-form">
- <div metal:use-macro="here/form-macros/macros/content-scripts"/>
- <div metal:use-macro="here/form-macros/macros/form-scripts"/>
- <div metal:use-macro="here/form-macros/macros/single-visible-span"/>
- <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:condition="bd_data">
- <div metal:use-macro="here/form-macros/macros/display-BD"/>
- </span>
- </span>
- </div>
+<div metal:define-macro="view-mapper-form">
+ <div metal:use-macro="here/form-macros/macros/content-scripts"/>
+ <div metal:use-macro="here/form-macros/macros/form-scripts"/>
+ <div metal:use-macro="here/form-macros/macros/single-visible-span"/>
+
+ <tal:block 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="left">
+ <h3>
+ <span tal:content="python:mapper['pretty_type'] + ' '" />
+ <span style="cursor: pointer; text-decoration: underline"
+ tal:attributes="
+ onclick python:'singleVisibleSpan(\'' + properties_span_id + '\', \'' + mapper['mapper_id'] + '\')'"
+ tal:content="mapper/pretty_name">
+
+ mapper name
+ </span>
+ </h3>
+ </div>
+
+ <input type="checkbox" id="graphics_checkbox_id"
+ tal:attributes="
+ checked mapper/graphical_view"
+ onchange="var s = (this.checked)?'graphical_view':'textual_view'; singleVisibleSpan('mappings_view', s);" />
+ Graphical View <small>(Uncheck if volumes are too small to select)</small>
+ <span id="mappings_view"
+ tal:define="
+ mappings_view_classnames mapper/mappings-view_css_classnames">
+
+ <div id="graphical_view"
+ tal:attributes="class mappings_view_classnames/graphical_view"
+ tal:define="global bd_path request/bd_path|nothing">
+
+ <tal:block tal:condition="not: bd_path">
+ <tal:block tal:define="global bd_path python:''"/>
+ </tal:block>
+ <iframe style="border: none;"
+ tal:attributes="
+ src python:'mappings_provider?storagename=' + storagename + '&mapper_id=' + mapper['mapper_id'] + '&selected_path=' + bd_path;
+ width string:700px;
+ height string:195">
+ </iframe>
+ </div>
+
+ <div id="textual_view"
+ tal:attributes="class mappings_view_classnames/textual_view">
+ <br/>
+ <div>
+ <h3 style="font-size: small;">
+ <tal:block tal:define="targets mapper/targets_all">
+ <span tal:omit-tag=""
+ tal:condition="python:len(targets) > 1"
+ tal:content="python:mapper['pretty_targets_name'] + ': '" />
+ <span tal:omit-tag=""
+ tal:condition="python:len(targets) == 1"
+ tal:content="python:mapper['pretty_target_name'] + ': '" />
+ <tal:block tal:repeat="t targets">
+ <span style="cursor: pointer; text-decoration: underline"
+ tal:attributes="onclick python:'singleVisibleSpan(\'' + properties_span_id + '\', \'' + t['path'] + '\')'"
+ tal:content="t/pretty_name">
+
+ target name
+ </span>
+ </tal:block>
+ </tal:block>
+ </h3>
+ </div>
+ <br/>
+ <div>
+ <h3 style="font-size: small;">
+ <tal:block tal:define="sources mapper/sources">
+ <span tal:omit-tag=""
+ tal:condition="python: len(sources) > 1"
+ tal:content="python:mapper['pretty_sources_name'] + ': '" />
+ <span tal:omit-tag=""
+ tal:condition="python: len(sources) == 1"
+ tal:content="python:mapper['pretty_source_name'] + ': '" />
+
+ <tal:block tal:repeat="s sources">
+ <span style="cursor: pointer; text-decoration: underline"
+ tal:attributes="onclick python:'singleVisibleSpan(\'' + properties_span_id + '\', \'' + s['path'] + '\')'"
+ tal:content="s/pretty_name">
+
+ source name
+ </span>
+ </tal:block>
+ </tal:block>
+ </h3>
+ </div>
+ <br/>
+ </div>
+ </span>
+
+ <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: left; width: 350px; ">
+ </span>
+
+ <div tal:attributes="
+ id mapper/mapper_id;
+ class string:visible">
+ <div metal:use-macro="here/form-macros/macros/display-mapper" />
+ </div>
+
+ <tal:block tal:repeat="bd_data mapper/targets">
+ <div tal:attributes="
+ id bd_data/path;
+ class string:invisible">
+ <div metal:use-macro="here/form-macros/macros/display-BD" />
+ </div>
+ </tal:block>
+
+ <tal:block tal:repeat="bd_data mapper/new_targets">
+ <div tal:attributes="
+ id bd_data/path;
+ class string:invisible">
+ <div metal:use-macro="here/form-macros/macros/display-BD" />
+ </div>
+ </tal:block>
+
+ <tal:block tal:repeat="bd_data mapper/sources">
+ <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>
+ </tal:block>
+ </div>
+ </tal:block>
+</div>
+<div metal:define-macro="view-BDs-form">
+ <h2>BDs Form</h2>
+</div>
+<div metal:define-macro="view-BD-form">
+ <div metal:use-macro="here/form-macros/macros/content-scripts" />
+ <div metal:use-macro="here/form-macros/macros/form-scripts" />
+ <div metal:use-macro="here/form-macros/macros/single-visible-span" />
+
+ <tal:block 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'])">
+ <tal:block tal:condition="bd_data">
+ <div metal:use-macro="here/form-macros/macros/display-BD" />
+ </tal:block>
+ </tal:block>
+</div>
- <div metal:define-macro="create-mapper-form"
- tal:define="mapper python:here.get_mapper_template_data(storage_report, request['mapper_type']);
- prefix python:'create_mapper_template_' + mapper['mapper_type'] + '_';
- properties_span_id string:;
- mapper_template_form_id python:prefix + 'mapper_template_form_id';
- create_mapper_button_id python:prefix + 'mapper_template_apply_button_id';
- form_submit_button_id create_mapper_button_id">
- <div metal:use-macro="here/form-macros/macros/forms-css"/>
- <div metal:use-macro="here/form-macros/macros/form-scripts"/>
- <form tal:attributes="id mapper_template_form_id;
- method string:get">
- <input tal:attributes="type string:hidden;
- name string:pagetype;
+<div metal:define-macro="create-mapper-form"
+ tal:define="
+ mapper python:here.get_mapper_template_data(storage_report, request['mapper_type']);
+ prefix python:'create_mapper_template_' + mapper['mapper_type'] + '_';
+ properties_span_id string:;
+ mapper_template_form_id python:prefix + 'mapper_template_form_id';
+ create_mapper_button_id python:prefix + 'mapper_template_apply_button_id';
+ form_submit_button_id create_mapper_button_id">
+
+ <div metal:use-macro="here/form-macros/macros/forms-css" />
+ <div metal:use-macro="here/form-macros/macros/form-scripts" />
+
+ <form method="get" tal:attributes="id mapper_template_form_id">
+ <input tal:attributes="type string:hidden;
+ name string:pagetype;
value string:commit_changes"/>
- <input tal:attributes="type string:hidden;
- name string:object_type;
+
+ <input tal:attributes="type string:hidden;
+ name string:object_type;
value string:mapper_template"/>
- <input tal:attributes="type string:hidden;
- name string:mapper_type;
+
+ <input tal:attributes="type string:hidden;
+ name string:mapper_type;
value mapper/mapper_type"/>
- <input tal:attributes="type string:hidden;
- name string:mapper_id;
+
+ <input tal:attributes="type string:hidden;
+ name string:mapper_id;
value python:''"/>
- <input tal:attributes="type string:hidden;
- name string:storagename;
+
+ <input tal:attributes="type string:hidden;
+ name string:storagename;
value storagename"/>
+
<table class="props-form-table">
<tr class="props-form-header">
<th colspan="2"
@@ -619,10 +618,10 @@
<input tal:attributes="type string:checkbox;
name python:'source_bd_' + bd['path']"/>
</td>
- <td tal:define="bytes bd/props/size/value;
- dummy python:here.bytes_to_value_units(bytes);
- size python:dummy[0];
- units python:dummy[1]">
+ <td tal:define="bytes bd/props/size/value;
+ dummy python:here.bytes_to_value_units(bytes);
+ size python:dummy[0];
+ units python:dummy[1]">
<span tal:replace="bd/path"/> (<span tal:replace="size"/> <span tal:replace="units"/> - <span tal:replace="bd/pretty_type"/>)
</td>
</tr>
@@ -657,12 +656,12 @@
value="Reset"
onclick="return reset_form(this.form)"
class="form_button"/>
- <input tal:define="prompt_msg python:'Do you really want to create new ' + mapper['pretty_type'] + '?';
- validate_url context/validate_html/absolute_url"
- tal:attributes="id create_mapper_button_id;
- type string:button;
- name string:action_type;
- value string:Create;
+ <input tal:define="prompt_msg python:'Do you really want to create new ' + mapper['pretty_type'] + '?';
+ validate_url context/validate_html/absolute_url"
+ tal:attributes="id create_mapper_button_id;
+ type string:button;
+ name string:action_type;
+ value string:Create;
onclick python:'return validate_and_submit_form(\'' + validate_url + '\', \'' + mapper_template_form_id + '\', \'' + create_mapper_button_id + '\', \'' + prompt_msg + '\')'"
class="form_button"/>
</td>
@@ -672,49 +671,57 @@
</tr>
</table>
</form>
- </div>
+</div>
+
+<div metal:define-macro="add-sources-form" tal:define="
+ mapper python:here.get_mapper_data(storage_report, request['mapper_id']);
+ prefix python:'add_sources_to_' + mapper['mapper_id'] + '_';
+ properties_span_id string:;
+ add_sources_form_id python:prefix + 'form_id';
+ add_sources_button_id python:prefix + 'button_id';
+ form_submit_button_id add_sources_button_id">
+
+ <div metal:use-macro="here/form-macros/macros/forms-css" />
+ <div metal:use-macro="here/form-macros/macros/form-scripts" />
- <div metal:define-macro="add-sources-form"
- tal:define="mapper python:here.get_mapper_data(storage_report, request['mapper_id']);
- prefix python:'add_sources_to_' + mapper['mapper_id'] + '_';
- properties_span_id string:;
- add_sources_form_id python:prefix + 'form_id';
- add_sources_button_id python:prefix + 'button_id';
- form_submit_button_id add_sources_button_id">
- <div metal:use-macro="here/form-macros/macros/forms-css"/>
- <div metal:use-macro="here/form-macros/macros/form-scripts"/>
<span tal:omit-tag=""
tal:condition="not: mapper/new_sources">
There are no available <span tal:replace="mapper/pretty_sources_name"/> to be added to <span tal:replace="mapper/pretty_type"/> '<span tal:replace="mapper/pretty_name"/>'.
<br/>
<br/>
- <a tal:define="go_to_mapper_url python:'./?pagetype=52&mapper_type=' + mapper['mapper_type'] + '&mapper_id=' + mapper['mapper_id'] + '&storagename=' + storagename"
+ <a tal:define="go_to_mapper_url python:'./?pagetype=52&mapper_type=' + mapper['mapper_type'] + '&mapper_id=' + mapper['mapper_id'] + '&storagename=' + storagename"
tal:attributes="href go_to_mapper_url">
Go Back to <span tal:replace="mapper/pretty_type"/>
</a>
</span>
<form tal:condition="mapper/new_sources"
- tal:attributes="id add_sources_form_id;
- method string:get">
- <input tal:attributes="type string:hidden;
- name string:pagetype;
+ tal:attributes="id add_sources_form_id;
+ method string:get">
+
+ <input tal:attributes="type string:hidden;
+ name string:pagetype;
value string:commit_changes"/>
- <input tal:attributes="type string:hidden;
- name string:object_type;
+
+ <input tal:attributes="type string:hidden;
+ name string:object_type;
value string:add_sources"/>
- <input tal:attributes="type string:hidden;
- name string:mapper_type;
+
+ <input tal:attributes="type string:hidden;
+ name string:mapper_type;
value mapper/mapper_type"/>
- <input tal:attributes="type string:hidden;
- name string:mapper_id;
+
+ <input tal:attributes="type string:hidden;
+ name string:mapper_id;
value mapper/mapper_id"/>
- <input tal:attributes="type string:hidden;
- name string:storagename;
+
+ <input tal:attributes="type string:hidden;
+ name string:storagename;
value storagename"/>
+
<table class="props-form-table">
<tr class="props-form-header">
<th colspan="2"
@@ -756,10 +763,10 @@
<input tal:attributes="type string:checkbox;
name python:'source_bd_' + bd['path']"/>
</td>
- <td tal:define="bytes bd/props/size/value;
- dummy python:here.bytes_to_value_units(bytes);
- size python:dummy[0];
- units python:dummy[1]">
+ <td tal:define="bytes bd/props/size/value;
+ dummy python:here.bytes_to_value_units(bytes);
+ size python:dummy[0];
+ units python:dummy[1]">
<span tal:replace="bd/path"/> (<span tal:replace="size"/> <span tal:replace="units"/> - <span tal:replace="bd/pretty_type"/>)
</td>
</tr>
@@ -784,18 +791,18 @@
</td>
<td align="right">
- <input tal:define="go_to_mapper_url python:'./?pagetype=52&mapper_type=' + mapper['mapper_type'] + '&mapper_id=' + mapper['mapper_id'] + '&storagename=' + storagename"
- tal:attributes="type string:button;
- name string:cancel_button;
- value string:Cancel;
+ <input tal:define="go_to_mapper_url python:'./?pagetype=52&mapper_type=' + mapper['mapper_type'] + '&mapper_id=' + mapper['mapper_id'] + '&storagename=' + storagename"
+ tal:attributes="type string:button;
+ name string:cancel_button;
+ value string:Cancel;
onclick python:'window.location.assign(\'' + go_to_mapper_url + '\')'"
class="form_button"/>
- <input tal:define="prompt_msg python:'Do you really want to add selected ' + mapper['pretty_sources_name'] + ' to \\\'' + mapper['pretty_name'] + '\\\'?';
- validate_url context/validate_html/absolute_url"
- tal:attributes="id add_sources_button_id;
- type string:button;
- name string:action_type;
- value string:Add;
+ <input tal:define="prompt_msg python:'Do you really want to add selected ' + mapper['pretty_sources_name'] + ' to \\\'' + mapper['pretty_name'] + '\\\'?';
+ validate_url context/validate_html/absolute_url"
+ tal:attributes="id add_sources_button_id;
+ type string:button;
+ name string:action_type;
+ value string:Add;
onclick python:'return validate_and_submit_form(\'' + validate_url + '\', \'' + add_sources_form_id + '\', \'' + add_sources_button_id + '\', \'' + prompt_msg + '\')'"
class="form_button"/>
</td>
@@ -805,23 +812,17 @@
</tr>
</table>
</form>
- </div>
-
-
-
-
+</div>
- <div tal:omit-tag="" metal:define-macro="display-props-tableless">
- <span tal:omit-tag=""
- tal:define="predefines_test python:'display-props: ' + str(props) + prefix + properties_span_id"/>
+<div tal:omit-tag="" metal:define-macro="display-props-tableless">
<span tal:omit-tag=""
tal:repeat="prop props">
- <tr tal:define="p prop/name;
+ <tr tal:define="p prop/name;
prop_pr_name prop/pretty_name"
tal:condition="not: prop/hidden">
<td tal:content="prop_pr_name"/>
- <td tal:define="prop_type prop/type;
- prop_units prop/units">
+ <td tal:define="prop_type prop/type;
+ prop_units prop/units">
<table>
<tr>
<td>
@@ -833,8 +834,8 @@
value prop/value"/>
<select tal:define="repls prop/replacements;
select_id python:prefix + '_select_replace_block_' + p"
- tal:attributes="id select_id;
- onfocus python:'replace_properties_block__old_select_value = this.value';
+ tal:attributes="id select_id;
+ onfocus python:'replace_properties_block__old_select_value = this.value';
onchange python:'replace_properties_block(\'' + properties_span_id + '\', \'' + select_id + '\')'">
<span tal:omit-tag=""
tal:repeat="repl_name repls/repl_names">
@@ -857,20 +858,20 @@
<input tal:condition="python:prop_type == 'text'"
- tal:attributes="name p;
- type string:text;
- value prop/value;
- onkeypress python:'return validate_text_keypress(this, event, 2, \'' + prop['validation']['illegal_chars'] + '\', ' + str(prop['validation']['max_length']) + ')';
- onchange python:'validate_text(this, 2, \'' + prop['validation']['illegal_chars'] + '\', \'' + prop['validation']['reserved_words'] + '\', ' + str(prop['validation']['min_length']) + ', ' + str(prop['validation']['max_length']) + ', \'' + form_submit_button_id + '\')'"/>
+ tal:attributes="name p;
+ type string:text;
+ value prop/value;
+ onkeypress python:'return validate_text_keypress(this, event, 2, \'' + prop['validation']['illegal_chars'] + '\', ' + str(prop['validation']['max_length']) + ')';
+ onchange python:'validate_text(this, 2, \'' + prop['validation']['illegal_chars'] + '\', \'' + prop['validation']['reserved_words'] + '\', ' + str(prop['validation']['min_length']) + ', ' + str(prop['validation']['max_length']) + ', \'' + form_submit_button_id + '\')'"/>
<span tal:omit-tag=""
tal:condition="python:prop_type == 'int' and prop_units != 'bytes'">
- <input tal:attributes="name p;
- type string:text;
- size string:15;
- value prop/value;
+ <input tal:attributes="name p;
+ type string:text;
+ size string:15;
+ value prop/value;
onchange python:'validate_int(this, 2, ' + str(prop['validation']['min']) + ', ' + str(prop['validation']['max']) + ', ' + str(prop['validation']['step']) + ', \'' + prop_units + '\', \'' + form_submit_button_id + '\')'"
onkeypress="return validate_int_keypress(this, event, 2)"/>
(<span tal:replace="prop/validation/min"/> - <span tal:replace="prop/validation/max"/>)
@@ -878,17 +879,17 @@
</span>
<span tal:omit-tag=""
tal:condition="python:prop_type == 'int' and prop_units == 'bytes'">
- <span tal:define="bytes prop/value;
- dummy python:here.bytes_to_value_prefunits(bytes);
- value python:dummy[0];
- units python:dummy[1];
- minim python:here.convert_bytes(prop['validation']['min'], units);
- maxim python:here.convert_bytes(prop['validation']['max'], units);
- step python:here.convert_bytes(prop['validation']['step'], units)">
- <input tal:attributes="name p;
- type string:text;
- size string:15;
- value value;
+ <span tal:define="bytes prop/value;
+ dummy python:here.bytes_to_value_prefunits(bytes);
+ value python:dummy[0];
+ units python:dummy[1];
+ minim python:here.convert_bytes(prop['validation']['min'], units);
+ maxim python:here.convert_bytes(prop['validation']['max'], units);
+ step python:here.convert_bytes(prop['validation']['step'], units)">
+ <input tal:attributes="name p;
+ type string:text;
+ size string:15;
+ value value;
onchange python:'validate_float(this, 2, ' + str(minim) + ', ' + str(maxim) + ', ' + str(step) + ', \'' + units + '\', \'' + form_submit_button_id + '\')'"
onkeypress="return validate_float_keypress(this, event, 2)"/>
(<span tal:replace="minim"/> - <span tal:replace="maxim"/>)
@@ -926,42 +927,30 @@
</tr>
</span>
<tr>
- <td colspan="2"
- style="height: 100%;">
+ <td colspan="2" style="height: 100%;">
</td>
</tr>
- </div>
-
- <div tal:omit-tag="" metal:define-macro="display-props">
- <span tal:omit-tag=""
- tal:define="predefines_test python:'display-props: ' + str(props) + prefix + properties_span_id"/>
- <table>
- <div metal:use-macro="here/form-macros/macros/display-props-tableless"/>
- </table>
- </div>
-
-
-
-
- <div tal:omit-tag="" metal:define-macro="display-content">
- <span tal:omit-tag=""
- tal:define="predefines_test python:'display-content: ' + str(cont) + properties_span_id"/>
- <span tal:omit-tag=""
- tal:define="props cont/props_ordered">
- <table class="props-inner-table">
- <div metal:use-macro="here/form-macros/macros/display-props-tableless"/>
- </table>
- </span>
- </div>
+</div>
+<div tal:omit-tag="" metal:define-macro="display-props">
+ <table>
+ <div metal:use-macro="here/form-macros/macros/display-props-tableless" />
+ </table>
+</div>
+<div tal:omit-tag="" metal:define-macro="display-content">
+ <tal:block tal:define="props cont/props_ordered">
+ <table class="props-inner-table">
+ <div metal:use-macro="here/form-macros/macros/display-props-tableless" />
+ </table>
+ </tal:block>
+</div>
<div tal:omit-tag="" metal:define-macro="content-scripts">
- <script type="text/javascript" src="storage_content.js"></script>
+ <script type="text/javascript" src="storage_content.js"></script>
</div>
-
<div tal:omit-tag="" metal:define-macro="form-scripts">
<style type="text/css">
<!-- @import url(storage_validation.css); -->
@@ -977,44 +966,51 @@
</div>
<div metal:define-macro="display-BD">
- <div metal:use-macro="here/form-macros/macros/forms-css"/>
- <span tal:omit-tag=""
- tal:define="predefines_test python:'display-BD: ' + str(bd_data) + storagename + properties_span_id"/>
+ <div metal:use-macro="here/form-macros/macros/forms-css" />
+
<span tal:omit-tag=""
- tal:define="mapper string:;
- conts python:bd_data['contents'];
- prefix prefix|bd_data/path;
- prefix python:prefix + '_';
- bd_form_id python:prefix + 'bd_form';
- select_content_id python:prefix + 'select_content_id';
- apply_button_id python:prefix + 'apply_button_id';
- form_submit_button_id apply_button_id;
- content_span_id python:prefix + 'content_span_id'">
- <form tal:attributes="id bd_form_id;
- method string:get">
- <input tal:attributes="type string:hidden;
- name string:pagetype;
+ tal:define="mapper string:;
+ conts python:bd_data['contents'];
+ prefix prefix|bd_data/path;
+ prefix python:prefix + '_';
+ bd_form_id python:prefix + 'bd_form';
+ select_content_id python:prefix + 'select_content_id';
+ apply_button_id python:prefix + 'apply_button_id';
+ form_submit_button_id apply_button_id;
+ content_span_id python:prefix + 'content_span_id'">
+ <form tal:attributes="id bd_form_id;
+ method string:get">
+
+ <input tal:attributes="type string:hidden;
+ name string:pagetype;
value string:commit_changes"/>
+
<input tal:condition="not: bd_data/new"
- tal:attributes="type string:hidden;
- name string:object_type;
+ tal:attributes="type string:hidden;
+ name string:object_type;
value string:bd"/>
+
<input tal:condition="bd_data/new"
- tal:attributes="type string:hidden;
- name string:object_type;
+ tal:attributes="type string:hidden;
+ name string:object_type;
value string:bd_template"/>
- <input tal:attributes="type string:hidden;
- name string:mapper_id;
+
+ <input tal:attributes="type string:hidden;
+ name string:mapper_id;
value bd_data/mapper_id"/>
- <input tal:attributes="type string:hidden;
- name string:mapper_type;
+
+ <input tal:attributes="type string:hidden;
+ name string:mapper_type;
value bd_data/mapper_type"/>
- <input tal:attributes="type string:hidden;
- name string:bd_path;
+
+ <input tal:attributes="type string:hidden;
+ name string:bd_path;
value bd_data/path"/>
- <input tal:attributes="type string:hidden;
- name string:storagename;
+
+ <input tal:attributes="type string:hidden;
+ name string:storagename;
value storagename"/>
+
<table class="props-form-table">
<tr class="props-form-header">
<th colspan="2"
@@ -1090,8 +1086,8 @@
tal:replace="string::"/>
<select tal:define="funct python:'change_content(\'' + select_content_id + '\', \'' + content_span_id + '\')'"
tal:condition="python:len(conts) > 1"
- tal:attributes="id select_content_id;
- name string:content_id;
+ tal:attributes="id select_content_id;
+ name string:content_id;
onchange funct">
<span tal:omit-tag=""
tal:repeat="cont conts">
@@ -1100,9 +1096,9 @@
</select>
<span tal:define="cont python:conts[0]"
tal:condition="python:len(conts) == 1">
- <input tal:attributes="id select_content_id;
- type string:hidden;
- name string:content_id;
+ <input tal:attributes="id select_content_id;
+ type string:hidden;
+ name string:content_id;
value cont/id"/>
<span tal:replace="cont/name"/>
</span>
@@ -1161,61 +1157,61 @@
<span tal:omit-tag=""
tal:repeat="action actions">
<span tal:omit-tag=""
- tal:define="act_name action/name;
- act_msg action/msg;
- act_link action/link">
+ tal:define="act_name action/name;
+ act_msg action/msg;
+ act_link action/link">
<span tal:condition="act_link">
- <input tal:define="act_link python:act_link + '&storagename=' + storagename;
- funct python:'window.location.assign(\'' + act_link + '\')'"
- tal:attributes="type string:button;
- name string:action_type;
- value act_name;
+ <input tal:define="act_link python:act_link + '&storagename=' + storagename;
+ funct python:'window.location.assign(\'' + act_link + '\')'"
+ tal:attributes="type string:button;
+ name string:action_type;
+ value act_name;
onclick funct"
class="form_button"/>
</span>
<span tal:condition="not: act_link">
<input tal:condition="act_msg"
- tal:attributes="type string:submit;
- name string:action_type;
- value act_name;
+ tal:attributes="type string:submit;
+ name string:action_type;
+ value act_name;
onclick python:'return confirm(\'' + act_msg + '\')'"
class="form_button"/>
<input tal:condition="not: act_msg"
- tal:attributes="type string:submit;
- name string:action_type;
- value act_name"
+ tal:attributes="type string:submit;
+ name string:action_type;
+ value act_name"
class="form_button"/>
</span>
</span>
</span>
</td>
<td align="right"
- tal:define="validate_url context/validate_html/absolute_url">
+ tal:define="validate_url context/validate_html/absolute_url">
<span tal:omit-tag=""
tal:condition="not: bd_data/need_apply_button">
</span>
<span tal:omit-tag=""
tal:condition="bd_data/need_apply_button">
- <input tal:attributes="type string:button;
- name string:action_type;
- value string:Reset;
+ <input tal:attributes="type string:button;
+ name string:action_type;
+ value string:Reset;
onclick python:'return reset_bd_form(this.form, \'' + select_content_id + '\', \'' + content_span_id + '\')'"
class="form_button"/>
<input tal:condition="bd_data/new"
- tal:define="prompt_msg python:'Do you really want to create ' + bd_data['pretty_type'] + '?'"
- tal:attributes="id apply_button_id;
- type string:button;
- name string:action_type;
- value string:Create;
+ tal:define="prompt_msg python:'Do you really want to create ' + bd_data['pretty_type'] + '?'"
+ tal:attributes="id apply_button_id;
+ type string:button;
+ name string:action_type;
+ value string:Create;
onclick python:'return validate_and_submit_form(\'' + validate_url + '\', \'' + bd_form_id + '\', \'' + apply_button_id + '\', \'' + prompt_msg + '\')'"
class="form_button"/>
<input tal:condition="not: bd_data/new"
- tal:define="prompt_msg python:'Do you really want to apply changes to ' + bd_data['pretty_type'] + ' \\\'' + bd_data['pretty_name'] + '\\\'?'"
- tal:attributes="id apply_button_id;
- type string:button;
- name string:action_type;
- value string:Apply;
+ tal:define="prompt_msg python:'Do you really want to apply changes to ' + bd_data['pretty_type'] + ' \\\'' + bd_data['pretty_name'] + '\\\'?'"
+ tal:attributes="id apply_button_id;
+ type string:button;
+ name string:action_type;
+ value string:Apply;
onclick python:'return validate_and_submit_form(\'' + validate_url + '\', \'' + bd_form_id + '\', \'' + apply_button_id + '\', \'' + prompt_msg + '\')'"
class="form_button"/>
</span>
@@ -1227,38 +1223,39 @@
</table>
</form>
</span>
- </div>
-
-
-
+</div>
+<div metal:define-macro="display-mapper">
+ <div metal:use-macro="here/form-macros/macros/forms-css" />
- <div metal:define-macro="display-mapper">
- <div metal:use-macro="here/form-macros/macros/forms-css"/>
- <span tal:omit-tag=""
- tal:define="predefines_test python:'display-mapper: ' + str(mapper) + storagename + properties_span_id"/>
- <form tal:define="prefix prefix|mapper/mapper_id;
- prefix python:prefix + '_';
- mapper_form_id python:prefix + 'mapper_form_id';
- apply_button_id python:prefix + 'apply_button_id';
- form_submit_button_id apply_button_id"
- tal:attributes="id mapper_form_id;
+ <form tal:define="prefix prefix|mapper/mapper_id;
+ prefix python:prefix + '_';
+ mapper_form_id python:prefix + 'mapper_form_id';
+ apply_button_id python:prefix + 'apply_button_id';
+ form_submit_button_id apply_button_id"
+ tal:attributes="id mapper_form_id;
method string:get">
- <input tal:attributes="type string:hidden;
- name string:pagetype;
+
+ <input tal:attributes="type string:hidden;
+ name string:pagetype;
value string:commit_changes"/>
- <input tal:attributes="type string:hidden;
- name string:object_type;
+
+ <input tal:attributes="type string:hidden;
+ name string:object_type;
value string:mapper"/>
- <input tal:attributes="type string:hidden;
- name string:mapper_id;
+
+ <input tal:attributes="type string:hidden;
+ name string:mapper_id;
value mapper/mapper_id"/>
- <input tal:attributes="type string:hidden;
- name string:mapper_type;
+
+ <input tal:attributes="type string:hidden;
+ name string:mapper_type;
value mapper/mapper_type"/>
- <input tal:attributes="type string:hidden;
- name string:storagename;
+
+ <input tal:attributes="type string:hidden;
+ name string:storagename;
value storagename"/>
+
<table class="props-form-table">
<tr class="props-form-header">
<th colspan="2"
@@ -1300,30 +1297,30 @@
<span tal:omit-tag=""
tal:define="actions mapper/actions"
tal:repeat="action actions">
- <span tal:define="act_name action/name;
- act_msg action/msg;
- act_link action/link"
+ <span tal:define="act_name action/name;
+ act_msg action/msg;
+ act_link action/link"
align="left">
<span tal:condition="act_link">
- <input tal:define="act_link python:act_link + '&storagename=' + storagename;
- funct python:'window.location.assign(\'' + act_link + '\')'"
- tal:attributes="type string:button;
- name string:action_type;
- value act_name;
+ <input tal:define="act_link python:act_link + '&storagename=' + storagename;
+ funct python:'window.location.assign(\'' + act_link + '\')'"
+ tal:attributes="type string:button;
+ name string:action_type;
+ value act_name;
onclick funct"
class="form_button"/>
</span>
<span tal:condition="not: act_link">
<input tal:condition="act_msg"
- tal:attributes="type string:submit;
- name string:action_type;
- value act_name;
+ tal:attributes="type string:submit;
+ name string:action_type;
+ value act_name;
onclick python:'return confirm(\'' + act_msg + '\')'"
class="form_button"/>
<input tal:condition="not: act_msg"
- tal:attributes="type string:submit;
- name string:action_type;
- value act_name"
+ tal:attributes="type string:submit;
+ name string:action_type;
+ value act_name"
class="form_button"/>
</span>
</span>
@@ -1341,12 +1338,12 @@
value="Reset"
onclick="return reset_form(this.form)"
class="form_button"/>
- <input tal:define="prompt_msg python:'Do you really want to apply changes to ' + mapper['pretty_type'] + ' \\\'' + mapper['pretty_name'] + '\\\'?';
- validate_url context/validate_html/absolute_url"
- tal:attributes="id apply_button_id;
- type string:button;
- name string:action_type;
- value string:Apply;
+ <input tal:define="prompt_msg python:'Do you really want to apply changes to ' + mapper['pretty_type'] + ' \\\'' + mapper['pretty_name'] + '\\\'?';
+ validate_url context/validate_html/absolute_url"
+ tal:attributes="id apply_button_id;
+ type string:button;
+ name string:action_type;
+ value string:Apply;
onclick python:'return validate_and_submit_form(\'' + validate_url + '\', \'' + mapper_form_id + '\', \'' + apply_button_id + '\', \'' + prompt_msg + '\')'"
class="form_button"/>
</span>
@@ -1357,11 +1354,7 @@
</tr>
</table>
</form>
- </div>
-
-
-
-
+</div>
- </body>
+</body>
</html>
--- conga/luci/storage/mappings_macros 2007/09/25 03:50:27 1.3
+++ conga/luci/storage/mappings_macros 2007/09/25 18:55:13 1.4
@@ -1,3 +1,12 @@
+<tal:comment tal:replace="nothing">
+** Copyright (C) 2006-2007 Red Hat, Inc.
+**
+** This program is free software; you can redistribute
+** it and/or modify it under the terms of version 2 of the
+** GNU General Public License as published by the
+** Free Software Foundation.
+</tal:comment>
+
<html>
<head>
<title tal:content="template/title" />
--- conga/luci/storage/mappings_provider 2007/09/25 03:50:27 1.7
+++ conga/luci/storage/mappings_provider 2007/09/25 18:55:13 1.8
@@ -1,58 +1,61 @@
-<html>
-
-<span tal:omit-tag=""
- tal:define="global pagetype request/pagetype|nothing;
- global storagename request/storagename|nothing"/>
-
-<span tal:omit-tag=""
- tal:condition="not: pagetype">
+<tal:comment tal:replace="nothing">
+** Copyright (C) 2006-2007 Red Hat, Inc.
+**
+** This program is free software; you can redistribute
+** it and/or modify it under the terms of version 2 of the
+** GNU General Public License as published by the
+** Free Software Foundation.
+</tal:comment>
- <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);
- 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)"/>
+<html>
-<span tal:omit-tag=""
- tal:define="global cyl_width python:600;
- global X_offset python:30;
- global Y_offset python:30;
- global curve_width python:10;
- global mapper python:here.get_mapper_data(storage_report, request['mapper_id']);
- global mapp_info python:here.get_mappings_info(mapper, cyl_width)"/>
+<tal:block tal:define="
+ global pagetype request/pagetype|nothing;
+ global storagename request/storagename|nothing" />
+
+<tal:block tal:condition="not: pagetype">
+ <tal:block tal:define="global pagetype python:'0'" />
+</tal:block>
+
+<tal:block tal:define="
+ stosystemss context/systems/storage/objectItems;
+ global allowed_systems python:here.allowed_systems(stosystemss);
+ global access_to_host_allowed python:here.access_to_host_allowed(storagename, allowed_systems)" />
+
+<tal:block tal:define="
+ global ricci python:here.get_ricci_communicator(storagename, allowed_systems);
+ global storage_report python:here.get_storage_report(ricci, request.SESSION)" />
+
+<tal:block tal:define="
+ global cyl_width python:600;
+ global X_offset python:30;
+ global Y_offset python:30;
+ global curve_width python:10;
+ global mapper python:here.get_mapper_data(storage_report, request['mapper_id']);
+ global mapp_info python:here.get_mappings_info(mapper, cyl_width)" />
<head>
- <title tal:content="mapper/pretty_name">The title</title>
- <script type="text/javascript" src="cylinder_select.js"></script>
-
- <style>
-
- div.visible { visibility: visible; }
- div.invisible { visibility: hidden; }
-
- </style>
-
+ <title tal:content="mapper/pretty_name" />
+ <script type="text/javascript" src="cylinder_select.js"></script>
+ <style>
+ div.visible { visibility: visible; display: block; }
+ div.invisible { visibility: hidden; display: none; }
+ </style>
</head>
<span tal:omit-tag=""
- tal:define="default_sel request/selected_path|nothing;
+ tal:define="default_sel request/selected_path|nothing;
global default_selection_c python:''"
tal:condition="default_sel">
<span tal:omit-tag=""
tal:define="global default_selection_c python:'select_subcyl(\'' + default_sel + '\', ' + mapp_info['js'] + ')'"/>
</span>
-<body tal:define="onload_c python:'properties_span_id = \'' + mapper['mapper_id'] + '_properties_span_id\'';
- onload_c python:here.add_commas(onload_c, 'current_selection = \'' + mapp_info['mapper']['mapper_id'] + '\'');
- onload_c python:here.add_commas(onload_c, 'display_props(' + mapp_info['js'] + ')');
- onload_c python:here.add_commas(onload_c, default_selection_c)"
+<body tal:define="onload_c python:'properties_span_id = \'' + mapper['mapper_id'] + '_properties_span_id\'';
+ onload_c python:here.add_commas(onload_c, 'current_selection = \'' + mapp_info['mapper']['mapper_id'] + '\'');
+ onload_c python:here.add_commas(onload_c, 'display_props(' + mapp_info['js'] + ')');
+ onload_c python:here.add_commas(onload_c, default_selection_c)"
tal:attributes="onload onload_c">
@@ -68,30 +71,30 @@
<!-- upper cylinder -->
- <div tal:define="cyl mapp_info/upper_cyl;
- X_offset python:X_offset + cyl['offset']"
+ <div tal:define="cyl mapp_info/upper_cyl;
+ X_offset python:X_offset + cyl['offset']"
tal:condition="cyl/cyls"
- tal:attributes="style python:here.add_commas('position:absolute', here.add_commas('left: ' + str(X_offset), 'top: ' + str(Y_offset)))">
+ tal:attributes="style python:here.add_commas('position:absolute', here.add_commas('left: ' + str(X_offset), 'top: ' + str(Y_offset)))">
<!-- description -->
- <div tal:define="style_1 python:here.add_commas('left: -1em', 'top: -1.5ex');
- style_2 python:here.add_commas(style_1, 'position: absolute');
- style_3 python:here.add_commas(style_2, 'width: ' + str(cyl_width))"
+ <div tal:define="style_1 python:here.add_commas('left: -1em', 'top: -1.5ex');
+ style_2 python:here.add_commas(style_1, 'position: absolute');
+ style_3 python:here.add_commas(style_2, 'width: ' + str(cyl_width))"
tal:attributes="style style_3">
- <div tal:define="style_1 python:here.add_commas('font-size: xx-small', 'text-align: left');
- style_2 python:here.add_commas(style_1, 'white-space: nowrap');
- style_3 python:here.add_commas(style_2, 'color: ' + cyl['color_css'])"
+ <div tal:define="style_1 python:here.add_commas('font-size: xx-small', 'text-align: left');
+ style_2 python:here.add_commas(style_1, 'white-space: nowrap');
+ style_3 python:here.add_commas(style_2, 'color: ' + cyl['color_css'])"
tal:attributes="style style_3">
<span tal:replace="cyl/description"/>:
</div>
</div>
- <div tal:define="one_temp_assignment python:here.add_commas('position:absolute', here.add_commas('left: ' + str(curve_width), 'top: 0'))"
- tal:attributes="onmousedown python:'cyl_click(event.clientX-' + str(curve_width) + '-' + str(X_offset) + ', event.clientY-' + str(Y_offset) + ', ' + cyl['js'] + ', ' + mapp_info['js'] + ')';
- onmousemove python:'cyl_over(document.getElementById(\'upper_msg_board\'), event.clientX-' + str(curve_width) + '-' + str(X_offset) + ', event.clientY-' + str(Y_offset) + ', ' + cyl['js'] + ', ' + mapp_info['js'] + ')';
- onmouseout python:'document.getElementById(\'upper_msg_board\').style.visibility = \'hidden\'';
- style python:here.add_commas('cursor: pointer', one_temp_assignment);
- id string:upper_cylinder">
+ <div tal:define="one_temp_assignment python:here.add_commas('position:absolute', here.add_commas('left: ' + str(curve_width), 'top: 0'))"
+ tal:attributes="onmousedown python:'cyl_click(event.clientX-' + str(curve_width) + '-' + str(X_offset) + ', event.clientY-' + str(Y_offset) + ', ' + cyl['js'] + ', ' + mapp_info['js'] + ')';
+ onmousemove python:'cyl_over(document.getElementById(\'upper_msg_board\'), event.clientX-' + str(curve_width) + '-' + str(X_offset) + ', event.clientY-' + str(Y_offset) + ', ' + cyl['js'] + ', ' + mapp_info['js'] + ')';
+ onmouseout python:'document.getElementById(\'upper_msg_board\').style.visibility = \'hidden\'';
+ style python:here.add_commas('cursor: pointer', one_temp_assignment);
+ id string:upper_cylinder">
<!-- base -->
<div metal:use-macro="here/mappings_macros/macros/draw-base-cyl"/>
@@ -111,38 +114,37 @@
<!-- lower cylinder -->
- <div tal:define="cyl mapp_info/lower_cyl;
- lower_Y_offset python:Y_offset + 80;
- X_offset python:X_offset + cyl['offset']"
+ <div tal:define="cyl mapp_info/lower_cyl;
+ lower_Y_offset python:Y_offset + 80;
+ X_offset python:X_offset + cyl['offset']"
tal:condition="cyl/cyls"
- tal:attributes="style python:here.add_commas('position:absolute', here.add_commas('left: ' + str(X_offset), 'top: ' + str(lower_Y_offset)))">
+ tal:attributes="style python:here.add_commas('position:absolute', here.add_commas('left: ' + str(X_offset), 'top: ' + str(lower_Y_offset)))">
<!-- description -->
- <div tal:define="style_1 python:here.add_commas('left: -1em', 'top: -1.5ex');
- style_2 python:here.add_commas(style_1, 'position: absolute');
- style_3 python:here.add_commas(style_2, 'width: ' + str(cyl_width))"
+ <div tal:define="style_1 python:here.add_commas('left: -1em', 'top: -1.5ex');
+ style_2 python:here.add_commas(style_1, 'position: absolute');
+ style_3 python:here.add_commas(style_2, 'width: ' + str(cyl_width))"
tal:attributes="style style_3">
- <div tal:define="style_1 python:here.add_commas('font-size: xx-small', 'text-align: left');
- style_2 python:here.add_commas(style_1, 'white-space: nowrap');
- style_3 python:here.add_commas(style_2, 'color: ' + cyl['color_css'])"
+ <div tal:define="style_1 python:here.add_commas('font-size: xx-small', 'text-align: left');
+ style_2 python:here.add_commas(style_1, 'white-space: nowrap');
+ style_3 python:here.add_commas(style_2, 'color: ' + cyl['color_css'])"
tal:attributes="style style_3">
<span tal:replace="cyl/description"/>:
</div>
</div>
- <div tal:define="one_temp_assignment python:here.add_commas('position:absolute', here.add_commas('left: ' + str(curve_width), 'top: 0'))"
- tal:attributes="onmousedown python:'cyl_click(event.clientX-' + str(curve_width) + '-' + str(X_offset) + ', event.clientY-' + str(lower_Y_offset) + ', ' + cyl['js'] + ', ' + mapp_info['js'] + ')';
- onmousemove python:'cyl_over(document.getElementById(\'lower_msg_board\'), event.clientX-' + str(curve_width) + '-' + str(X_offset) + ', event.clientY-' + str(lower_Y_offset) + ', ' + cyl['js'] + ', ' + mapp_info['js'] + ')';
- onmouseout python:'document.getElementById(\'lower_msg_board\').style.visibility = \'hidden\'';
- style python:here.add_commas('cursor: pointer', one_temp_assignment);
- id string:lower_cylinder">
+ <div tal:define="one_temp_assignment python:here.add_commas('position:absolute', here.add_commas('left: ' + str(curve_width), 'top: 0'))"
+ tal:attributes="onmousedown python:'cyl_click(event.clientX-' + str(curve_width) + '-' + str(X_offset) + ', event.clientY-' + str(lower_Y_offset) + ', ' + cyl['js'] + ', ' + mapp_info['js'] + ')';
+ onmousemove python:'cyl_over(document.getElementById(\'lower_msg_board\'), event.clientX-' + str(curve_width) + '-' + str(X_offset) + ', event.clientY-' + str(lower_Y_offset) + ', ' + cyl['js'] + ', ' + mapp_info['js'] + ')';
+ onmouseout python:'document.getElementById(\'lower_msg_board\').style.visibility = \'hidden\'';
+ style python:here.add_commas('cursor: pointer', one_temp_assignment);
+ id string:lower_cylinder">
<!-- base -->
<div metal:use-macro="here/mappings_macros/macros/draw-base-cyl"/>
<!-- highlights -->
- <span tal:omit-tag=""
- tal:define="highs cyl/highs">
+ <span tal:omit-tag="" tal:define="highs cyl/highs">
<div metal:use-macro="here/mappings_macros/macros/draw-highlights"/>
</span>
@@ -155,12 +157,12 @@
<!-- select me message -->
- <div tal:define="cyl mapp_info/lower_cyl;
- Y_offset python:Y_offset + 80 + 40 + 10;
- X_offset python:X_offset;
- style_1 python:here.add_commas('left: ' + str(X_offset), 'top: ' + str(Y_offset));
- style_2 python:here.add_commas('position: absolute', style_1);
- style_3 python:here.add_commas(style_2, 'width: ' + str(cyl_width))"
+ <div tal:define="cyl mapp_info/lower_cyl;
+ Y_offset python:Y_offset + 80 + 40 + 10;
+ X_offset python:X_offset;
+ style_1 python:here.add_commas('left: ' + str(X_offset), 'top: ' + str(Y_offset));
+ style_2 python:here.add_commas('position: absolute', style_1);
+ style_3 python:here.add_commas(style_2, 'width: ' + str(cyl_width))"
tal:attributes="style style_3">
<div style="font-size: x-small; text-align: center;">
Click cylinders to view properties, unselect all to view <span tal:replace="mapper/pretty_type"/>'s properties
--- conga/luci/storage/storage_svs.js 2007/09/25 16:49:36 1.1
+++ conga/luci/storage/storage_svs.js 2007/09/25 18:55:13 1.2
@@ -11,7 +11,7 @@
parent = document.getElementById(parent_id);
for (var i = 0; i < parent.childNodes.length ; i++) {
var item = parent.childNodes[i];
- var item_type = item.nodeName().lower();
+ var item_type = item.nodeName.toLowerCase();
if (item_type == 'span' || item_type == 'div') {
if (item.id == child_id) {
item.className = 'visible';
--- conga/luci/storage/validate_html 2007/09/25 03:50:27 1.5
+++ conga/luci/storage/validate_html 2007/09/25 18:55:13 1.6
@@ -1,3 +1,12 @@
+<tal:comment tal:replace="nothing">
+** Copyright (C) 2006-2007 Red Hat, Inc.
+**
+** This program is free software; you can redistribute
+** it and/or modify it under the terms of version 2 of the
+** GNU General Public License as published by the
+** Free Software Foundation.
+</tal:comment>
+
<tal:block tal:define="
global pagetype request/pagetype|nothing;
global storagename request/storagename|nothing "/>
More information about the Cluster-devel
mailing list