Question about editing of services

Support requests, bug reports, questions etc.

Question about editing of services

Postby brom » Fri Jan 06, 2012 14:00

Hello,
for some reason "check command" for the services became unchangeable now. Is this new behaviour? I'm talking about "directly linked" services.
brom
NConf rookie
NConf rookie
 
Posts: 24
Joined: Tue Aug 23, 2011 14:52

Re: Question about editing of services

Postby Bennyvision » Fri Jan 06, 2012 15:55

Oooooooof. I just noticed this. That's going to be a problem for me.

This appears to be caused by the code at line 732 in handle_item.php:

Code: Select all
                }elseif($handle_action == "modify" AND ($item_class == "service" OR $item_class == "advanced-service") AND ($entry["id_attr"] == $check_command_attr_id OR $entry["id_attr"] == $host_name_attr_id) ){
                    # modify service should have disabled check_command and hostname
                    echo '<td><select name="'.$entry["id_attr"].'[]" disabled=disabled>';
                }else{


I modified services in v1.2.6 to modify the check_command a LOT, and occasionally to modify the host (usually because of my fat fingers).
User avatar
Bennyvision
NConf expert
NConf expert
 
Posts: 87
Joined: Mon Jul 19, 2010 21:01
Location: Kansas City, MO, USA

Re: Question about editing of services

Postby agargiulo » Tue Jan 10, 2012 15:23

HI.

We blocked this, because there were issues with the check parameters not being updated when you change the command. In some occasions, the command was even changed accidentally when using the scroll wheel.
However, you can still change the check_command of an existing service using multi-modify. Simply multi-modify a single service. That's meant for users who actually *know* what they're doing.

Regards, Angelo
User avatar
agargiulo
NConf developer
NConf developer
 
Posts: 725
Joined: Fri Mar 06, 2009 17:50
Location: Zurich, Switzerland

Re: Question about editing of services

Postby Bennyvision » Tue Jan 10, 2012 20:22

The issues that you mention regarding command arguments - are you referring to the command's arguments changing according to the new check command, and not handling the existing arguments correctly?

Ie, if you change the check command, NConf can't possibly know what to do with the existing arguments?

That's no big deal for me - I just re-edit the service and straighten them out manually. I don't know there *is* a solution to that. I've always felt that if I'm editing the command, I already know other things will need to be changed and I just do that automatically as part of the process.

I understand why you changed the behavior, but it does cause inconvenience here, albeit minor. Would a patch to add a configuration option to enable/disable this functionality be considered? If not, no big deal, you won't hurt my feelings. :D

Benny
User avatar
Bennyvision
NConf expert
NConf expert
 
Posts: 87
Joined: Mon Jul 19, 2010 21:01
Location: Kansas City, MO, USA

Re: Question about editing of services

Postby agargiulo » Wed Jan 11, 2012 00:05

I'll think a bout it ;)
User avatar
agargiulo
NConf developer
NConf developer
 
Posts: 725
Joined: Fri Mar 06, 2009 17:50
Location: Zurich, Switzerland


Return to Support (NConf 1.3.0)

Who is online

Users browsing this forum: No registered users and 2 guests

cron