conga/luci cluster/form-macros cluster/index_h ...
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2006-12-21 05:08:49
Modified files:
luci/cluster : form-macros index_html validate_config_qdisk.js
luci/homebase : form-macros homebase_common.js index_html
luci_homebase.css validate_sys_remove.js
luci/site/luci/Extensions: cluster_adapters.py
homebase_adapters.py ricci_bridge.py ricci_communicator.py
Log message:
most of the rest of fixes for bz201394. minor cleanup/polish still forthcoming.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.135&r2=1.136
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/index_html.diff?cvsroot=cluster&r1=1.29&r2=1.30
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_config_qdisk.js.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/form-macros.diff?cvsroot=cluster&r1=1.49&r2=1.50
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/homebase_common.js.diff?cvsroot=cluster&r1=1.14&r2=1.15
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/index_html.diff?cvsroot=cluster&r1=1.20&r2=1.21
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/luci_homebase.css.diff?cvsroot=cluster&r1=1.30&r2=1.31
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_sys_remove.js.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.190&r2=1.191
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/homebase_adapters.py.diff?cvsroot=cluster&r1=1.41&r2=1.42
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_bridge.py.diff?cvsroot=cluster&r1=1.51&r2=1.52
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_communicator.py.diff?cvsroot=cluster&r1=1.22&r2=1.23
luci/cluster/form-macros +319 -151
@@ -208,173 +208,226 @@ <tal:block tal:omit-tag="" tal:define="global sessionObj python: request.SESSION.get('checkRet')" /> - <form name="adminform" action="" method="post"> - <input name="pagetype" id="pagetype" type="hidden" value="6" /> + <h1>Add a cluster</h1> - <h1>Add a cluster</h1> + <form name="create_cluster" action="" method="post" + tal:define=" + global add_cluster request/SESSION/create_cluster | nothing"> + + <input name="pagetype" type="hidden" + tal:attributes="value request/form/pagetype | request/pagetype |string:6" /> + + <input name="cluster_os" type="hidden" + tal:attributes="value add_cluster/cluster_os | nothing" /> - <tal:block tal:condition="python: not sessionObj or not 'requestResults' in sessionObj or not 'nodeList' in sessionObj['requestResults']"> - <input name="numStorage" type="hidden" value="3" /> <table id="systemsTable" class="systemsTable" border="0" cellspacing="0"> <thead class="systemsTable"> - <tr class="systemsTable"><td class="systemsTable" colspan="2"> - <div class="systemsTableTop"> - <strong>Cluster Name</strong> - <input class="hbInputSys" type="text" id="clusterName" name="clusterName" /> - </div> - </td></tr> + <tr class="systemsTable"><td class="systemsTable" colspan="2"> + <div class="systemsTableTop"> + <strong>Cluster Name</strong> + <input class="hbInputSys" type="text" + id="clusterName" name="clusterName" + tal:attributes="value add_cluster/name | nothing" /> + </div> + </td></tr> <tr class="systemsTable"> - <th class="systemsTable">System Hostname</th> - <th class="systemsTable">Password</th> + <th class="systemsTable">Node Hostname</th> + <th class="systemsTable">Root Password</th> + <tal:block tal:condition="add_cluster"> + <th class="systemsTable">Key ID</th> + <th class="systemsTable">Trust</th> + </tal:block> + <th></th> </tr> </thead> <tfoot class="systemsTable"> <tr class="systemsTable"><td colspan="2" class="systemsTable"> <ul class="vanilla deploy"> - <li class="vanilla"><input type="radio" name="rhn_dl" value="1" checked="checked" />Download packages</li> - <li class="vanilla"><input type="radio" name="rhn_dl" value="0" />Use locally installed packages.</li> + <li class="vanilla"> + <input type="radio" name="download_pkgs" + value="1" checked="checked" /> + Download packages + </li> + <li class="vanilla"> + <input type="radio" name="download_pkgs" + value="0" /> + Use locally installed packages. + </li> </ul> </td></tr> <tr class="systemsTable"><td colspan="2" class="systemsTable"> - <input type="checkbox" value="1" name="enable_storage" />Enable Shared Storage Support + <input type="checkbox" name="enable_storage" /> + Enable Shared Storage Support </td></tr> <tr class="systemsTable"><td colspan="2" class="systemsTable"> - <div> - <input type="checkbox" name="allSameCheckBox" id="allSameCheckBox" onClick="allPasswdsSame(adminform);"/> Check if cluster node passwords are identical. - </div> + <ul class="vanilla"> + <li class="vanilla"> + <input name="check_certs" type="checkbox" + tal:attributes="checked python: (add_cluster and add_cluster['check_certs']) and 'checked'" /> + View system certificates before sending any passwords. + </li> + <li class="vanilla"> + <input type="checkbox" + name="allSameCheckBox" id="allSameCheckBox" + onClick="allPasswdsSame(this.form)" + tal:attributes="checked python: (add_cluster and add_cluster['identical_passwds']) and 'checked'" + /> + + Check if node passwords are identical. + </li> + </ul> </td></tr> - <tr class="systemsTable"><td class="systemsTable" colspan="2"> <div class="systemsTableEnd"> - <input type="button" value="Add Another Row" onClick="addSystem(adminform);" /> + <input type="button" value="Add another entry" + onClick="addSystem(this.form)" /> </div> </td></tr> </tfoot> + <tal:block tal:define="global cur_sysnum python:0" /> + <tbody class="systemsTable"> - <tr class="systemsTable"> + <tal:block + tal:condition="exists: add_cluster/nodes" + tal:repeat="cur_sys add_cluster/nodes"> + <tr class="systemsTable" + tal:attributes="id python: '__SYSTEM_ROW_%d' % cur_sysnum" + tal:define="sys python: add_cluster['nodes'][cur_sys]"> + <td class="systemsTable"> + <input type="text" + tal:attributes=" + value sys/host | nothing; + id python: '__SYSTEM%d:Addr' % cur_sysnum; + name python: '__SYSTEM%d:Addr' % cur_sysnum; + class python: 'hbInputSys' + ('errors' in sys and ' error' or ''); + disabled python: ('auth' in sys and sys['host'].count('.') > 0) and 1 or 0" + /> + </td> + <td class="systemsTable"> + <tal:block tal:condition="not: exists: sys/auth"> + <input type="password" + onChange="pwd0Change(this.form)" + autocomplete="off" + tal:attributes=" + value sys/passwd | nothing; + class python: 'hbInputPass' + ('errors' in sys and ' error' or ''); + id python: '__SYSTEM%d:Passwd' % cur_sysnum; + name python: '__SYSTEM%d:Passwd' % cur_sysnum" /> + </tal:block> + + <tal:block tal:condition="exists: sys/auth"> + <input type="text" onChange="pwd0Change(this.form)" + disabled="disabled" value="[authenticated]" + tal:attributes=" + class python: 'hbInputPass' + ('errors' in sys and ' error' or ''); + id python: '__SYSTEM%d:Passwd' % cur_sysnum; + name python: '__SYSTEM%d:Passwd' % cur_sysnum" /> + </tal:block> + </td> + <td tal:condition="add_cluster" class="systemsTable"> + <img + tal:attributes=" + src python: 'trusted' in sys and '/luci/lock-ok.png' or ('fp' in sys and '/luci/lock-closed.png' or '/luci/lock-open.png'); + title sys/fp | string:no key fingerprint available" /> + <input type="hidden" + tal:attributes=" + id python: '__SYSTEM%dFingerprint' % cur_sysnum; + name python: '__SYSTEM%dFingerprint' % cur_sysnum; + value sys/fp | nothing" /> + </td> + <td tal:condition="add_cluster" class="systemsTable"> + <input type="checkbox" tal:attributes=" + checked exists: sys/fp; + id python: '__SYSTEM%dTrusted' % cur_sysnum; + name python: '__SYSTEM%dTrusted' % cur_sysnum; + disabled python: 'trusted' in sys" + /> + </td> + <td class="systemsTable"> + <img src="/luci/delete-row.png" class="deleteRow" + title="delete this row" + tal:attributes=" + onclick python: 'delete_element_id(\'__SYSTEM_ROW_%d\')' % cur_sysnum" /> + </td> + </tr> + <tal:block + tal:define="global cur_sysnum python: cur_sysnum + 1" /> + </tal:block> + + <tr class="systemsTable" id="__SYSTEM_ROW_0" + tal:condition="not: add_cluster"> <td class="systemsTable"> <input class="hbInputSys" type="text" id="__SYSTEM0:Addr" name="__SYSTEM0:Addr" /> </td> <td class="systemsTable"> <input type="password" - id="__SYSTEM0:Passwd" name="__SYSTEM0:Passwd" + onChange="pwd0Change(this.form)" class="hbInputPass" autocomplete="off" - onChange="pwd0Change(adminform);" /> + onChange="pwd0Change(this.form)" + id="__SYSTEM0:Passwd" name="__SYSTEM0:Passwd" /> + </td> + <td class="systemsTable"> + <img src="/luci/delete-row.png" class="deleteRow" + title="delete this row" + onclick="delete_element_id('__SYSTEM_ROW_0')" /> </td> </tr> - - <tr class="systemsTable"> + <tr class="systemsTable" id="__SYSTEM_ROW_1" + tal:condition="not: add_cluster"> <td class="systemsTable"> <input class="hbInputSys" type="text" id="__SYSTEM1:Addr" name="__SYSTEM1:Addr" /> </td> <td class="systemsTable"> <input type="password" - id="__SYSTEM1:Passwd" name="__SYSTEM1:Passwd" + onChange="pwd0Change(this.form)" class="hbInputPass" autocomplete="off" - onChange="pwd0Change(adminform);" /> + id="__SYSTEM1:Passwd" name="__SYSTEM1:Passwd" /> + </td> + <td class="systemsTable"> + <img src="/luci/delete-row.png" class="deleteRow" + title="delete this row" + onclick="delete_element_id('__SYSTEM_ROW_1')" /> </td> </tr> - - <tr class="systemsTable"> + <tr class="systemsTable" id="__SYSTEM_ROW_2" + tal:condition="not: add_cluster"> <td class="systemsTable"> <input class="hbInputSys" type="text" id="__SYSTEM2:Addr" name="__SYSTEM2:Addr" /> </td> <td class="systemsTable"> <input type="password" - id="__SYSTEM2:Passwd" name="__SYSTEM2:Passwd" + onChange="pwd0Change(this.form)" class="hbInputPass" autocomplete="off" - onChange="pwd0Change(adminform);" /> + id="__SYSTEM2:Passwd" name="__SYSTEM2:Passwd" /> </td> - </tr> - </tbody> - </table> - </tal:block> - - <tal:block tal:condition="python: sessionObj and 'requestResults' in sessionObj and 'nodeList' in sessionObj['requestResults']"> - - <table id="systemsTable" class="systemsTable" border="0" cellspacing="0"> - <thead class="systemsTable"> - <tr class="systemsTable"><td class="systemsTable" colspan="2"> - <div class="systemsTableTop"> - <strong>Cluster Name:</strong> - <input type="text" id="clusterName" name="clusterName" - tal:attributes="value python: sessionObj['requestResults']['clusterName']" /> - </div> - </td></tr> - <tr class="systemsTable"> - <th class="systemsTable">Node Hostname</th> - <th class="systemsTable">Root Password</th> - </tr> - </thead> - - <tfoot class="systemsTable"> - <tr class="systemsTable"><td class="systemsTable" colspan="2"> - <ul class="vanilla deploy"> - <li class="vanilla"><input type="radio" name="rhn_dl" value="1" checked="checked" />Download packages</li> - <li class="vanilla"><input type="radio" name="rhn_dl" value="0" />Use locally installed packages.</li> - </ul> - </td></tr> - <tr class="systemsTable"><td class="systemsTable" colspan="2"> - <input type="checkbox" value="1" name="enable_storage" />Enable Shared Storage Support - </td></tr> - <tr class="systemsTable"><td class="systemsTable" colspan="2"> - <div> - <input type="checkbox" name="allSameCheckBox" id="allSameCheckBox" onClick="allPasswdsSame(adminform);"/> Check if cluster node passwords are identical. - </div> - </td></tr> - <tr class="systemsTable"><td class="systemsTable" colspan="2"> - <div class="systemsTableEnd"> - <input type="button" value="Add Another Row" onClick="addSystem(adminform);" /> - </div> - </td></tr> - </tfoot> - - <span tal:omit-tag="" tal:define="global sysNum python: 0" /> - - <tbody class="systemsTable"> - <tal:block tal:repeat="node python: sessionObj['requestResults']['nodeList']"> - <span tal:omit-tag="" - tal:define="global nodeAuth python: node['cur_auth']" /> - - <tr class="systemsTable"> <td class="systemsTable"> - <input type="text" - tal:attributes=" - id python: '__SYSTEM' + str(sysNum) + ':Addr'; - name python: '__SYSTEM' + str(sysNum) + ':Addr'; - value python: node['ricci_host']; - class python: 'hbInputSys' + ('errors' in node and ' error' or '')" - /> - </td> - <td class="systemsTable"> - <input - onChange="pwd0Change(adminform);" - tal:attributes=" - type python: nodeAuth and 'text' or 'password'; - value python: nodeAuth and '[authenticated]' or ''; - class python: 'hbInputPass' + ('errors' in node and ' error' or ''); - id python: '__SYSTEM' + str(sysNum) + ':Passwd'; - name python: '__SYSTEM' + str(sysNum) + ':Passwd'" - /> + <img src="/luci/delete-row.png" class="deleteRow" + title="delete this row" + onclick="delete_element_id('__SYSTEM_ROW_2')" /> </td> + <tal:block tal:define="global cur_sysnum python:3" /> </tr> - <span tal:omit-tag="" tal:define="global sysNum python: sysNum + 1" /> - </tal:block> </tbody> </table> - <input type="hidden" name="numStorage" tal:attributes="value python: sysNum" /> - </tal:block> + <input name="numStorage" id="numStorage" type="hidden" + tal:attributes="value cur_sysnum" /> <div class="hbSubmit" id="hbSubmit"> - <input type="button" name="Submit" value="Submit" onClick="validateForm(document.adminform);" /> + <input type="button" name="Submit" value="Submit" + onClick="validateForm(this.form)" /> </div> </form> + + <div tal:condition="add_cluster"> + <tal:block + tal:define="x python: request.SESSION.delete('create_cluster')" /> + </div> </div> <div metal:define-macro="clusterconfig-form">
@@ -1018,9 +1071,10 @@ <input class="qdscore qdisk" type="text" name="heuristic0:hscore" id="heuristic0:hscore" value=""> </td> <td class="systemsTable"> - <img class="qdscore qdisk qdel_img" + <img class="qdisk deleteRow" id="heuristic0:hdel" name="heuristic0:hdel" - src="/luci/homebase/x.png" + src="/luci/delete-row.png" + title="delete this heuristic" onClick="delete_qdisk_heur(this, document.quorum_partition);"> </td> </tr>
@@ -1067,8 +1121,9 @@ name python: 'heuristic' + str(curHeur) + ':hscore';"/> </td> <td class="systemsTable"> - <img class="qdscore qdisk qdel_img" - src="/luci/homebase/x.png" + <img class="qdisk deleteRow" + src="/luci/homebase/delete-row.png" + title="delete this heuristic" onClick="delete_qdisk_heur(this, document.quorum_partition);" tal:attributes=" id python: 'heuristic' + str(curHeur) + ':hdel';
@@ -2804,6 +2859,7 @@ <script type="text/javascript"> set_page_title('Luci ??? cluster ??? Add a new cluster node'); </script> + <script type="text/javascript" src="/luci/homebase/homebase_common.js"> </script>
@@ -2812,79 +2868,191 @@ src="/luci/homebase/validate_cluster_add.js"> </script> - <input type="hidden" name="clusterName" - tal:attributes="value request/form/clusterName | request/clustername | none" - /> - <form name="adminform" action="" method="post"> - <input name="numStorage" type="hidden" value="1" /> - <input name="pagetype" type="hidden" value="15" /> - <input name="addnode" type="hidden" value="1" /> + <form name="add_node" action="" method="post" + tal:define=" + global add_cluster request/SESSION/add_node | nothing; + global cur_cluster_name add_cluster/name | request/clustername | request/form/clusterName | nothing"> + + <h2>Add a node to <span tal:replace="cur_cluster_name | string:this cluster" /></h2> <input type="hidden" name="clusterName" - tal:attributes=" - value request/form/clusterName | request/clustername | nothing" - /> + tal:attributes="value cur_cluster_name | string:[unknown]" /> - <h2>Add a node to <span tal:replace="request/form/clusterName | request/clustername | string:the cluster" /></h2> + <input name="pagetype" type="hidden" + tal:attributes="value request/form/pagetype | request/pagetype | string:15" /> - <table id="systemsTable" class="systemsTable" border="0" cellspacing="0"> + <input name="cluster_os" type="hidden" + tal:attributes="value add_cluster/cluster_os | nothing" /> + + <table id="systemsTable" class="systemsTable" cellspacing="0"> <thead class="systemsTable"> - <tr class="systemsTable"><td class="systemsTable" colspan="2"> - <div class="systemsTableTop"> - <strong>Cluster Name</strong> <span tal:content="request/form/clusterName | request/clustername | none" /> - </div> - </td></tr> <tr class="systemsTable"> - <th class="systemsTable">System Hostname</th> - <th class="systemsTable">Password</th> + <th class="systemsTable">Node Hostname</th> + <th class="systemsTable">Root Password</th> + <tal:block tal:condition="add_cluster"> + <th class="systemsTable">Key ID</th> + <th class="systemsTable">Trust</th> + </tal:block> + <th></th> </tr> </thead> <tfoot class="systemsTable"> <tr class="systemsTable"><td colspan="2" class="systemsTable"> <ul class="vanilla deploy"> - <li class="vanilla"><input type="radio" name="rhn_dl" value="1" checked="checked" />Download packages</li> - <li class="vanilla"><input type="radio" name="rhn_dl" value="0" />Use locally installed packages.</li> + <li class="vanilla"> + <input type="radio" name="download_pkgs" value="1" + tal:attributes=" + checked add_system/download_pkgs | string:checked" /> + Download packages + </li> + <li class="vanilla"> + <input type="radio" name="download_pkgs" value="0" + tal:attributes=" + checked not: add_system/download_pkgs | nothing" /> + + Use locally installed packages. + </li> </ul> </td></tr> <tr class="systemsTable"><td colspan="2" class="systemsTable"> - <input type="checkbox" value="1" name="enable_storage" />Enable Shared Storage Support + <input type="checkbox" name="enable_storage" + tal:attributes=" + checked add_system/shared_storage | nothing" /> + Enable Shared Storage Support </td></tr> <tr class="systemsTable"><td colspan="2" class="systemsTable"> - <div id="allSameDiv"> - <input type="checkbox" class="allSameCheckBox" - name="allSameCheckBox" id="allSameCheckBox" onClick="allPasswdsSame(adminform);"/> - Check if cluster node passwords are identical. - </div> + <ul class="vanilla"> + <li class="vanilla"> + <input name="check_certs" type="checkbox" + tal:attributes="checked python: (add_cluster and add_cluster['check_certs']) and 'checked'" /> + View system certificates before sending any passwords. + </li> + <li class="vanilla" + tal:attributes="id python: (not add_cluster or ('nodes' in add_cluster and len(add_cluster['nodes']) < 2)) and 'allSameDiv'"> + <input type="checkbox" + name="allSameCheckBox" id="allSameCheckBox" + onClick="allPasswdsSame(this.form)" + tal:attributes="checked python: (add_cluster and add_cluster['identical_passwds']) and 'checked'" + /> + Check if node passwords are identical. + </li> + </ul> </td></tr> - <tr class="systemsTable"><td class="systemsTable" colspan="2"> <div class="systemsTableEnd"> - <input type="button" value="Add Another Row" onClick="addSystem(adminform);" /> + <input type="button" value="Add another entry" + onClick="addSystem(this.form)" /> </div> </td></tr> </tfoot> + <tal:block tal:define="global cur_sysnum python:0" /> + <tbody class="systemsTable"> - <tr class="systemsTable"> + <tal:block + tal:condition="exists: add_cluster/nodes" + tal:repeat="cur_sys add_cluster/nodes"> + <tr class="systemsTable" + tal:attributes="id python: '__SYSTEM_ROW_%d' % cur_sysnum" + tal:define="sys python: add_cluster['nodes'][cur_sys]"> + <td class="systemsTable"> + <input type="text" + tal:attributes=" + value sys/host | nothing; + id python: '__SYSTEM%d:Addr' % cur_sysnum; + name python: '__SYSTEM%d:Addr' % cur_sysnum; + class python: 'hbInputSys' + ('errors' in sys and ' error' or ''); + disabled python: ('auth' in sys and sys['host'].count('.') > 0) and 1 or 0" + /> + </td> + <td class="systemsTable"> + <tal:block tal:condition="not: exists: sys/auth"> + <input type="password" + autocomplete="off" + onChange="pwd0Change(this.form)" + tal:attributes=" + value sys/passwd | nothing; + class python: 'hbInputPass' + ('errors' in sys and ' error' or ''); + id python: '__SYSTEM%d:Passwd' % cur_sysnum; + name python: '__SYSTEM%d:Passwd' % cur_sysnum" /> + </tal:block> + + <tal:block tal:condition="exists: sys/auth"> + <input type="text" onChange="pwd0Change(this.form)" + disabled="disabled" value="[authenticated]" + tal:attributes=" + class python: 'hbInputPass' + ('errors' in sys and ' error' or ''); + id python: '__SYSTEM%d:Passwd' % cur_sysnum; + name python: '__SYSTEM%d:Passwd' % cur_sysnum" /> + </tal:block> + </td> + <td tal:condition="add_cluster" class="systemsTable"> + <img + tal:attributes=" + src python: 'trusted' in sys and '/luci/lock-ok.png' or ('fp' in sys and '/luci/lock-closed.png' or '/luci/lock-open.png'); + title sys/fp | string:no key fingerprint available" /> + <input type="hidden" + tal:attributes=" + id python: '__SYSTEM%dFingerprint' % cur_sysnum; + name python: '__SYSTEM%dFingerprint' % cur_sysnum; + value sys/fp | nothing" /> + </td> + <td tal:condition="add_cluster" class="systemsTable"> + <input type="checkbox" tal:attributes=" + checked exists: sys/fp; + id python: '__SYSTEM%dTrusted' % cur_sysnum; + name python: '__SYSTEM%dTrusted' % cur_sysnum; + disabled python: 'trusted' in sys" + /> + </td> + <td class="systemsTable"> + <img src="/luci/delete-row.png" class="deleteRow" + title="delete this row" + tal:attributes=" + onclick python: 'delete_element_id(\'__SYSTEM_ROW_%d\')' % cur_sysnum" /> + </td> + </tr> + <tal:block + tal:define="global cur_sysnum python: cur_sysnum + 1" /> + </tal:block> + + <tr class="systemsTable" id="__SYSTEM_ROW_0" + tal:condition="not: add_cluster"> <td class="systemsTable"> <input class="hbInputSys" type="text" id="__SYSTEM0:Addr" name="__SYSTEM0:Addr" /> </td> <td class="systemsTable"> <input type="password" - id="__SYSTEM0:Passwd" name="__SYSTEM0:Passwd" + onChange="pwd0Change(this.form)" class="hbInputPass" autocomplete="off" - onChange="pwd0Change(adminform);" /> + onChange="pwd0Change(this.form)" + id="__SYSTEM0:Passwd" name="__SYSTEM0:Passwd" /> + </td> + <td class="systemsTable"> + <img src="/luci/delete-row.png" class="deleteRow" + title="delete this row" + onclick="delete_element_id('__SYSTEM_ROW_0')" /> </td> + <tal:block tal:define="global cur_sysnum python:1" /> </tr> </tbody> </table> + <input name="numStorage" id="numStorage" type="hidden" + tal:attributes="value cur_sysnum" /> + <div class="hbSubmit" id="hbSubmit"> - <input type="button" name="Submit" value="Submit" onClick="validateForm(document.adminform);" /> + <input type="button" name="Submit" value="Submit" + onClick="validateForm(this.form)" /> </div> </form> + + <div tal:condition="add_cluster"> + <tal:block + tal:define="x python: request.SESSION.delete('add_node')" /> + </div> </div> <div metal:define-macro="nodeprocess-form">
@@ -2893,14 +3061,14 @@ <div id="errmsgsdiv" class="errmsgs" tal:condition="python: result and len(result) > 1 and 'errors' in result[1]"> - <p class="errmsgs">The following errors occurred:</p> + <p class="errmsgs">The following errors occurred:</p> - <ul class="errmsgs"> - <tal:block tal:repeat="e python: result[1]['errors']"> - <li class="errmsgs" tal:content="python:e" /> - </tal:block> - </ul> - </div> + <ul class="statusmsg"> + <tal:block tal:repeat="e python: result[1]['errors']"> + <li class="statusmsg" tal:content="python:e" /> + </tal:block> + </ul> + </div> </tal:block> </div>
luci/cluster/index_html +7 -6
@@ -207,23 +207,24 @@ <tal:block tal:define="ret python: request.SESSION.get('checkRet')"> <div class="retmsgs" id="retmsgsdiv" tal:condition="python:(ret and 'messages' in ret and len(ret['messages']))"> <div class="hbclosebox"> - <a href="javascript:hide_element('retmsgsdiv');"><img src="../homebase/x.png"></a> + <a href="javascript:hide_element('retmsgsdiv')"><img src="/luci/homebase/x.png" class="closeBox" title="dismiss"></a> </div> - <ul class="retmsgs"> + <p class="retmsgs">Status messages:</p> + <ul class="statusmsg"> <tal:block tal:repeat="e python:ret['messages']"> - <li class="retmsgs" tal:content="python:e" /> + <li class="statusmsg" tal:content="python:e" /> </tal:block> </ul> </div> <div id="errmsgsdiv" class="errmsgs" tal:condition="python:(ret and 'errors' in ret and len(ret['errors']))"> <div class="hbclosebox"> - <a class="hbclosebox" href="javascript:hide_element('errmsgsdiv');"><img src="../homebase/x.png"></a> + <a class="hbclosebox" href="javascript:hide_element('errmsgsdiv')"><img src="/luci/homebase/x.png" class="closeBox" title="dismiss"></a> </div> <p class="errmsgs">The following errors occurred:</p> - <ul class="errmsgs"> + <ul class="statusmsg"> <tal:block tal:repeat="e python:ret['errors']"> - <li class="errmsgs" tal:content="python:e" /> + <li class="statusmsg" tal:content="python:e" /> </tal:block> </ul> </div>
luci/cluster/validate_config_qdisk.js +3 -2
@@ -314,10 +314,11 @@ var del_td = document.createElement('td'); del_td.className = 'systemsTable'; var del_img = document.createElement('img'); - del_img.className = 'qdscore qdisk qdel_img'; + del_img.className = 'qdisk deleteRow'; del_img.setAttribute('name', hstr + ':hdel'); del_img.setAttribute('id', hstr + ':hdel'); - del_img.setAttribute('src', '/luci/homebase/x.png'); + del_img.setAttribute('src', '/luci/delete-row.png'); + del_img.setAttribute('title', 'delete this row'); del_img.setAttribute('onClick', 'delete_qdisk_heur(this, document.quorum_partition)'); del_td.appendChild(del_img);
luci/homebase/form-macros +418 -145
749 lines not on this page · raw message
luci/homebase/homebase_common.js +46 -8
91 lines not on this page · raw message
luci/homebase/index_html +7 -6
@@ -134,23 +134,24 @@ <div class="retmsgs" id="retmsgsdiv" tal:condition="python:(ret and 'messages' in ret and len(ret['messages']))"> <div class="hbclosebox"> - <a href="javascript:hide_element('retmsgsdiv');"><img src="x.png"></a> + <a href="javascript:hide_element('retmsgsdiv');"><img src="x.png" class="closeBox" title="dismiss"></a> </div> - <ul class="retmsgs"> + <p class="retmsgs">Status messages:</p> + <ul class="statusmsg"> <tal:block tal:repeat="e python:ret['messages']"> - <li class="retmsgs" tal:content="python:e" /> + <li class="statusmsg" tal:content="python:e" /> </tal:block> </ul> </div> <div id="errmsgsdiv" class="errmsgs" tal:condition="python:(ret and 'errors' in ret and len(ret['errors']))"> <div class="hbclosebox"> - <a class="hbclosebox" href="javascript:hide_element('errmsgsdiv');"><img src="x.png"></a> + <a class="hbclosebox" href="javascript:hide_element('errmsgsdiv');"><img src="x.png" class="closeBox" title="dismiss"></a> </div> <p class="errmsgs">The following errors occurred:</p> - <ul class="errmsgs"> + <ul class="statusmsg"> <tal:block tal:repeat="e python:ret['errors']"> - <li class="errmsgs" tal:content="python:e" /> + <li class="statusmsg" tal:content="python:e" /> </tal:block> </ul> </div>
luci/homebase/luci_homebase.css +14 -5
@@ -48,6 +48,8 @@ } input.qdisk { + font-family: "Bitstream Vera Sans Mono", "DejaVu Sans Mono", monospace ! important; + font-size: 12px ! important; padding: .2em; }
@@ -81,6 +83,10 @@ margin-left: 0 ! important; } +ul.statusmsg, li.statusmsg { + color: black ! important; +} + ul.deploy { margin-bottom: +.5em; }
@@ -153,7 +159,7 @@ color: green !important; } -p.errmsgs { +p.errmsgs, p.retmsgs { font-weight: 800; }
@@ -163,7 +169,7 @@ border-width: 2px; border-color: red; margin-top: 2em; - max-width: 700px; + max-width: 600px ! important; } div.retmsgs {
@@ -172,7 +178,7 @@ border-style: dotted; border-width: 2px; border-color: green; - max-width: 700px; + max-width: 600px ! important; } div.hbCSystems {
@@ -208,6 +214,7 @@ table.systemsTable { padding-left: +.5em; background: #dee7ec; + max-width: 700px; } td.systemsTable {
@@ -250,8 +257,6 @@ } img.qdel_img { - height: 7px; - width: 7px; background: #dee7ec; border: none; }
@@ -415,6 +420,10 @@ color: blue ! important; } +img.deleteRow, img.closeBox { + cursor: pointer; +} + *.running, *.node_active { color: green ! important;
luci/homebase/validate_sys_remove.js +2 -2
@@ -6,7 +6,7 @@ if (!form) return (-1); - var num_clusters = document.getElementById('numClusters').value; + var num_clusters = document.getElementById('num_clusters').value; for (var i = 0 ; i < num_clusters ; i++) { var element = document.getElementById('__CLUSTER' + i); if (!element || !element.value || !element.checked)
@@ -14,7 +14,7 @@ selected_clusters.push(element.value); } - var num_storage = document.getElementById('numStorage').value; + var num_storage = document.getElementById('num_storage').value; for (var i = 0 ; i < num_storage ; i++) { var element = document.getElementById('__SYSTEM' + i); if (!element || !element.value || !element.checked)
luci/site/luci/Extensions/cluster_adapters.py +574 -416
1,396 lines not on this page · raw message
luci/site/luci/Extensions/homebase_adapters.py +574 -435
1,009 lines not on this page · raw message
luci/site/luci/Extensions/ricci_bridge.py +2 -0
Lines of this file are not shown. View the raw message.
luci/site/luci/Extensions/ricci_communicator.py +17 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.