conga ./download_files luci/cluster/form-macro ...
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2007-01-29 16:56:51
Modified files:
. : download_files
luci/cluster : form-macros resource-form-macros
validate_config_general.js
luci/homebase : validate_cluster_add.js luci/site/luci/Extensions: cluster_adapters.py
Log message:
- use the newest version of zope available (2.9.6)
- do not allow clusters to be created or renamed if the cluster name is > 15 characters long (bz225164)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/download_files.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.163&r2=1.164
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource-form-macros.diff?cvsroot=cluster&r1=1.30&r2=1.31
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_config_general.js.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_cluster_add.js.diff?cvsroot=cluster&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.213&r2=1.214
download_files +4 -4
@@ -8,10 +8,10 @@ #ZOPE_URLs="http://www.zope.org/Products/Zope/2.9.3/Zope-2.9.3.tgz" -ZOPE_ARCHIVE=Zope-2.9.4-final -ZOPE_ARCHIVE_TAR=Zope-2.9.4-final.tgz -ZOPE_MD5SUM=7d7ffe62eabc84d0c438e450e344c29f -ZOPE_URLs="http://www.zope.org/Products/Zope/2.9.4/Zope-2.9.4-final.tgz" +ZOPE_ARCHIVE=Zope-2.9.6-final +ZOPE_ARCHIVE_TAR=Zope-2.9.6-final.tgz +ZOPE_MD5SUM=a87008a9e78248072ea5908e1006b269 +ZOPE_URLs="http://www.zope.org/Products/Zope/2.9.6/Zope-2.9.6-final.tgz"
luci/cluster/form-macros +27 -28
74 lines not on this page · raw message
luci/cluster/resource-form-macros +3 -2
@@ -290,8 +290,9 @@ <h2>Configure <span tal:replace="res/name | string: resource" /></h2> <br/> - <div class="reschoose" - metal:use-macro="here/form-macros/macros/serviceconfig-type-macro" /> + <div class="reschoose"> + <tal:block metal:use-macro="here/form-macros/macros/serviceconfig-type-macro" /> + </div> </tal:block> </div>
luci/cluster/validate_config_general.js +5 -1
@@ -8,7 +8,11 @@ set_form_err(form.cluname); } else { name = form.cluname.value; - clr_form_err(form.cluname); + if (name.length > 15) { + errors.push('A cluster\'s name must be less than 16 characters long.'); + set_form_err(form.cluname); + } else + clr_form_err(form.cluname); } if (!form.cfgver || str_is_blank(form.cfgver.value)) {
luci/homebase/validate_cluster_add.js +10 -5
@@ -10,12 +10,17 @@ set_form_err(form.clusterName); } else { clusterName = clusterName.value; - var invalid_chars = str_is_valid(clusterName, '/[0-9A-Za-z_. -]/g'); - if (invalid_chars) { - errors.push('The cluster name you gave contains the following invalid characters: "' + invalid_chars + '".'); + if (clusterName.length > 15) { + errors.push('A cluster\'s name must be less than 16 characters long.'); set_form_err(form.clusterName); - } else - clr_form_err(form.clusterName); + } else { + var invalid_chars = str_is_valid(clusterName, '/[0-9A-Za-z_. -]/g'); + if (invalid_chars) { + errors.push('The cluster name you gave contains the following invalid characters: "' + invalid_chars + '".'); + set_form_err(form.clusterName); + } else + clr_form_err(form.clusterName); + } } var added_storage = validate_systems(form, errors);
luci/site/luci/Extensions/cluster_adapters.py +6 -0
@@ -232,6 +232,9 @@ add_cluster, incomplete, errors, messages = parseClusterNodes(self, request, cluster_os) clusterName = add_cluster['name'] + if len(clusterName) > 15: + errors.append('A cluster\'s name must be less than 16 characters long.') + if incomplete or len(errors) > 0: request.SESSION.set('create_cluster', add_cluster) return (False, { 'errors': errors, 'messages': messages })
@@ -1073,6 +1076,9 @@ except KeyError, e: errors.append('No cluster name was given.') + if len(cluster_name) > 15: + errors.append('A cluster\'s name must be less than 16 characters long.') + try: version_num = int(form['cfgver']) if version_num < old_ver: