From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci cluster/form-macros cluster/resourc ...
Date: 6 Dec 2006 22:44:18 -0000 [thread overview]
Message-ID: <20061206224418.10834.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2006-12-06 22:44:18
Modified files:
luci/cluster : form-macros resource_form_handlers.js
luci/site/luci/Extensions: cluster_adapters.py
Log message:
more svc autostart fixes
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.124&r2=1.125
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource_form_handlers.js.diff?cvsroot=cluster&r1=1.24&r2=1.25
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.175&r2=1.176
--- conga/luci/cluster/form-macros 2006/12/06 22:11:20 1.124
+++ conga/luci/cluster/form-macros 2006/12/06 22:44:18 1.125
@@ -2918,7 +2918,7 @@
<input type="hidden" name="parent_uuid" value="_toplevel" />
<input type="hidden" name="tree_level" value="-1" />
<input type="hidden" name="svc_name" value="" />
- <input type="hidden" name="autostart" value="" />
+ <input type="hidden" name="autostart" value="-1" />
<input type="hidden" name="form_xml" />
<input type="hidden" name="action" value="add" />
</form>
@@ -3135,7 +3135,8 @@
<tr><td>
Automatically start this service
</td>
- <td><input type="checkbox" name="autostart" tal:attributes="checked sinfo/autostart | nothing" /></td></tr>
+ <td><input type="checkbox" name="autostart"
+ tal:attributes="checked python: ('autostart' in sinfo and sinfo['autostart'].lower() != 'false') and 'checked'" /></td></tr>
</table>
<input type="hidden" name="service_name"
tal:attributes="value sinfo/name | string:1" />
@@ -3157,7 +3158,7 @@
<input type="hidden" name="parent_uuid" value="_toplevel" />
<input type="hidden" name="tree_level" value="-1" />
<input type="hidden" name="svc_name" value="" />
- <input type="hidden" name="autostart" value="" />
+ <input type="hidden" name="autostart" value="-1" />
<input type="hidden" name="form_xml" />
<input type="hidden" name="action" value="edit" />
</form>
--- conga/luci/cluster/resource_form_handlers.js 2006/12/05 23:32:34 1.24
+++ conga/luci/cluster/resource_form_handlers.js 2006/12/06 22:44:18 1.25
@@ -444,7 +444,7 @@
/* sort this out in the backend */
master_form.form_xml.value = '<formlist>' + form_xml + '</formlist>';
master_form.svc_name.value = svc_name;
- master_form.autostart = autostart;
+ master_form.autostart.value = autostart;
var confirm_msg = null;
if (master_form.action.value == 'add')
--- conga/luci/site/luci/Extensions/cluster_adapters.py 2006/12/06 22:11:20 1.175
+++ conga/luci/site/luci/Extensions/cluster_adapters.py 2006/12/06 22:44:18 1.176
@@ -500,18 +500,19 @@
autostart = "1"
try:
- if request.form['autostart'] == "0":
+ if not request.form.has_key('autostart') or request.form['autostart'] == "0":
autostart = "0"
- except:
- pass
+ except Exception, e:
+ autostart = None
+ luci_log.debug_verbose('vSA5a: error getting autostart: %s' % str(e))
try:
cur_service = model.retrieveServiceByName(service_name)
except GeneralError, e:
- luci_log.debug_verbose('vSA5a: no service named %s found' % service_name)
+ luci_log.debug_verbose('vSA5b: no service named %s found' % service_name)
cur_service = None
except Exception, e:
- luci_log.debug_verbose('vSA5a: no service named %s found: %s' % (service_name, str(e)))
+ luci_log.debug_verbose('vSA5c: no service named %s found: %s' % (service_name, str(e)))
cur_service = None
try:
@@ -543,7 +544,8 @@
new_service = Service()
new_service.addAttribute('name', service_name)
- new_service.attr_hash['autostart'] = autostart
+ if autostart is not None:
+ new_service.attr_hash['autostart'] = autostart
buildSvcTree(new_service, form_hash['toplevel']['kids'])
model.resourcemanager_ptr.addChild(new_service)
next reply other threads:[~2006-12-06 22:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-06 22:44 rmccabe [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-05-30 5:54 [Cluster-devel] conga/luci cluster/form-macros cluster/resourc rmccabe
2007-02-16 2:12 rmccabe
2007-02-16 2:06 rmccabe
2007-02-08 16:00 rmccabe
2007-02-08 15:59 rmccabe
2007-02-08 5:05 rmccabe
2007-01-26 17:56 rmccabe
2007-01-20 4:50 rmccabe
2006-12-05 23:32 rmccabe
2006-12-05 6:44 rmccabe
2006-09-23 4:04 rmccabe
2006-09-14 21:24 rmccabe
2006-09-13 17:50 rmccabe
2006-09-11 22:22 rmccabe
2006-09-05 21:25 rmccabe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061206224418.10834.qmail@sourceware.org \
--to=rmccabe@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.