Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #2926] (not) setting send_notification or sticky_ack as GET param has no effect on cmd.cgi acks #1056

Closed
icinga-migration opened this issue Aug 1, 2012 · 9 comments
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/2926

Created by mfriedrich on 2012-08-01 16:38:09 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2012-08-31 11:14:43 +00:00)
Target Version: 1.8
Last Update: 2014-12-08 09:27:26 +00:00 (in Redmine)

Icinga Version: 1.7.1
OS Version: any

since these checkboxes are hardcoded checked by default.

the cgivars reading does not check the value, but only the argument, then setting those vals to TRUE - but those are ignored either way.

this is probably true for many other arguments with values ignored!!

int sticky_ack = FALSE;
int send_notification = FALSE;

                /* we got the notification option for an acknowledgement */
                else if (!strcmp(variables[x], "send_notification"))
                        send_notification = TRUE;

                /* we got the acknowledgement type */
                else if (!strcmp(variables[x], "sticky_ack"))
                        sticky_ack = TRUE;

        case PRINT_STICKY_ACK:

                strcpy(help_text, "If you want acknowledgement to disable notifications until the host/service recovers, check this option.");

                printf("Sticky Acknowledgement:");
                print_help_box(help_text);
                printf("");
                printf("\n");
                break;

        case PRINT_SEND_NOTFICATION:

                strcpy(help_text, "If you do not want an acknowledgement notification sent out to the appropriate contacts, uncheck this option.");

                printf("Send Notification:");
                print_help_box(help_text);
                printf("");
                printf("\n");
                break;

my suggestion:

allow values for those parameters, leave them enabled by default (at least with CHECKED now) - persistent comment is disabled by default.

int sticky_ack = TRUE;
int send_notification = TRUE;

then if someone puts send_notification=0 into the GET params, this will automatically disable the checkbox.

so basically all cmd.cgi GET params require a review - if their checkboxes are hardcoded and might need a revamped detection.

Attachments

Changesets

2012-08-01 17:27:05 +00:00 by mfriedrich 0634dd7

classic ui: fix setting send_notification or sticky_ack as GET param has no effect on cmd.cgi acks #2926

now these GET params require 0 or 1 to be passed via url call,
previously one had to just set that option. this is due to keeping
them enabled as we know before, in order not to need to change the
urls everywhere.

this makes it basically possible, to disable send_notification and
sticky_ack via GET params.

refs #2926

2015-02-14 23:03:48 +00:00 by mfriedrich f8c8892

cmd.cgi: Restore 'send_notification=0|1' behaviour

refs #2926
fixes #7004

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-08-01 17:14:01 +00:00

  • Status changed from New to Assigned
  • Assigned to set to mfriedrich

from a short peek, this is only true for those values.

such a change requires docs updates as well then.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-08-01 17:22:08 +00:00

  • File added classicui_1.8_2926_send_notification_sticky_ack_get_params_changed.png
  • File added classicui_1.8_2927_send_notification_sticky_ack_default_no_get_params.png

changed
classicui_1.8_2926_send_notification_sticky_ack_get_params_changed.png

default
classicui_1.8_2927_send_notification_sticky_ack_default_no_get_params.png

notifications explicitely disabled
classicui_1.8_2928_send_notification_sticky_ack_get_send_notifications_disabled.png

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-08-01 17:22:34 +00:00

  • File added classicui_1.8_2928_send_notification_sticky_ack_get_send_notifications_disabled.png

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-08-01 17:31:15 +00:00

there might still be the option that passing such args not via the commandform, but via cmd_type directly. which is pretty bad, because those variables are now enabled by default.

but for what it's worth, i would keep up with the change, making this the default values being consinstent between "cli" and "gui". others might need to adapt their cmd.cgi calls then.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-08-01 17:31:24 +00:00

  • Status changed from Assigned to Feedback
  • Done % changed from 0 to 80

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-08-11 18:47:07 +00:00

  • Status changed from Feedback to 7
  • Done % changed from 80 to 100
  • Icinga Version set to 1
  • OS Version set to Debian

we talked about that, with a given docs update this will be fine, and makes gui view and internal defaults the same. everyone else needing different defaults, may use a different GET param then.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-08-31 11:14:43 +00:00

  • Status changed from 7 to Resolved
  • (unknown custom field) set to chromium

docs are uptodate as well.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-12-08 09:27:26 +00:00

  • Project changed from 19 to Core, Classic UI, IDOUtils
  • Category changed from 53 to Classic UI
  • OS Version set to any

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-02-14 23:04:28 +00:00

  • Relates set to 7004

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant