# Ask for make the changes also to the linked services if (!empty($vererben1) and !empty($vererben2) and $vererben1 !== $vererben2) { # get preview of possible attributes for inheritance from host to its services # user can choose which attributes should inherit (apply) or not $preview[$name] = inheritance_HostToService($id, "preview"); # print in info box if (!empty($preview)) { echo '<form name="vererben" action="' . $_SERVER["PHP_SELF"] . '" method="post">'; $update_button = '<input name="HIDDEN_config_class" type="hidden" value="' . $config_class . '">'; $update_button .= '<input name="HIDDEN_modify_id" type="hidden" value="' . $_POST["HIDDEN_modify_id"] . '">'; $update_button .= '<br><div id=buttons>'; $update_button .= '<input type="Submit" value="yes" name="vererben" align="middle">'; $update_button .= ' <input type=button name="no" onClick="window.location.href=\'' . $_SESSION["go_back_page_ok"] . '\'" value="no">'; $update_button .= '</div>'; //message ($info, TXT_UPDATE_SERVICES.'<br>'.$update_button); echo NConf_HTML::limit_space(NConf_HTML::show_highlight('Attention', TXT_UPDATE_SERVICES . '<br>' . $update_button), 'width="310"'); echo "<br>"; # show inheritance table and help box echo '<div style="float: left; margin-right: 5px;">'; echo NConf_HTML::title('Show detailed inheritance information'); //$title .= NConf_HTML::title('Detailed host / service diff for '.escape_string($_POST[$id_naming_attr]) ); echo '</div>'; echo '<div name="help_inheritance"></div>'; echo '<div style="clear: both"></div>'; // place for help box (only to get distance from top) echo '<div id="page_content"></div>'; $inheritance_details = ''; foreach ($preview as $server_name => $service_table) { $title = '<span class="ui-icon ui-icon-triangle-1-e"></span><a href="#">' . $server_name . '</a>'; $inheritance_details .= NConf_HTML::title($title, 3, 'class="accordion_title ui-accordion-header ui-helper-reset ui-state-default"'); $inheritance_details .= '<div class="accordion_content">' . $service_table . '</div>';
<br>any asscociated data will be lost! <br><br>Are you <b>ABSOLUTELY SURE</b> you want to proceed? <br><br>List of attributes defined for this class:<br>(items using these attributes are not listed here explicitly) <br> '; $content .= '<ul>'; foreach ($attr as $item) { $content .= '<li>' . $item["attr_name"] . '</li>'; } $content .= '</ul>'; } else { $content = 'No attributes defined for this class.<br>You may safely delete the "<b>' . $class_name . '</b>" class.'; } // Buttons $content_button = ' <form name="delete_class" action="delete_class.php" method="post"> <input type="hidden" name="id" value="' . $_GET["id"] . '"> <input type="hidden" name="class_name" value="' . $class_name . '"> <input type="hidden" name="delete" value="yes"> '; if (!empty($_GET["from"])) { $content_button .= '<input type="hidden" name="from" value="' . $_GET["from"] . '">'; } $content_button .= '<br><div id=buttons>'; $content_button .= '<input type="Submit" value="Delete" name="submit" align="middle"> '; $content_button .= '<input type=button onClick="window.location.href=\'' . $_SESSION["go_back_page"] . '\'" value="Back">'; $content_button .= '</form>'; echo NConf_HTML::limit_space(NConf_HTML::show_highlight('WARNING', $content . $content_button)); } mysql_close($dbh); require_once 'include/foot.php';
if (constant("VERSION_NOT_FINAL_WARNING") !== '') { echo "<br>"; echo NConf_HTML::limit_space(NConf_HTML::show_error('Attention', VERSION_NOT_FINAL_WARNING)); } # new nconf version info if (defined('CHECK_UPDATE') and CHECK_UPDATE == 1 and $_SESSION["group"] == "admin") { echo '<script src="include/js/jquery_plugins/jquery.nconf_check_update.js" type="text/javascript"></script>'; echo js_prepare(' $(document).ready(function(){ $.nconf_check_update("' . VERSION_NUMBER . '"); }); '); # html container echo "<br>"; echo '<div id="check_update" style="display:none">'; echo NConf_HTML::limit_space(NConf_HTML::show_highlight('<span id="check_update_title"></span>', '<div id="check_update_content"></div>')); echo '</div>'; } echo "<br>" . DISCLAIMER_STRING . "<br><br>"; echo POWERED_BY_LOGOS; } else { # This will be displayed on the login screen echo "<br><br>" . POWERED_BY_LOGOS; } ?> </td> </tr> </table> </td> </tr> </table>
$name = db_templates("naming_attr", $item_ID); if ($item_class == "service") { # get host name of service $hostID = db_templates("hostID_of_service", $item_ID); $hostname = db_templates("naming_attr", $hostID); $name = $hostname . ":" . $name; } if (!empty($name) or $name === "0") { $content .= "<li>{$name}</li>"; } } $content .= '</ul>'; echo '<br>'; echo '<div id="info_box">'; $title = 'Old value will be overwritten for the following item(s):'; echo NConf_HTML::limit_space(NConf_HTML::show_highlight($title, $content)); echo '</div>'; } echo '</form>'; } if (NConf_DEBUG::status('ERROR')) { echo NConf_HTML::show_error(); } // Run the Autocomplete function if (isset($prepare_status) and $prepare_status == 1) { # only run if prepare was ok js_Autocomplete_run('email', 'emaillist'); js_Autocomplete_run('pager', 'pagerlist'); } # close content box echo '</div>';
$deployment_info = FALSE; if (!file_exists($deployment_config)) { $deployment_info = TRUE; } elseif (is_readable($deployment_config)) { $ini_array = parse_ini_file($deployment_config, TRUE); if (empty($ini_array)) { $deployment_info = TRUE; } } if ($deployment_info) { $content = 'The generated configuration has been written to the "nconf/output/" directory.<br> To set up more sophisticated deployment functionality, please edit your "config/deployment.ini" file accordingly.<br> For a complete list of available deployment options, refer to the online documentation on <a href="http://www.nconf.org" target="_blank">www.nconf.org</a>.'; system("bash /var/www/nconf/ADD-ONS/deploy_local.sh"); echo NConf_HTML::limit_space(NConf_HTML::show_highlight('Note', $content)); } else { // Show deployment button echo "<form method=\"POST\" action=\"call_file.php?module_file=deployment/main.php\" id=buttons>"; echo '<input type=hidden name=status value="' . $status . '">'; echo '<br><input type="submit" name="submit" value="Deploy" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">'; echo "</form><br>"; } } else { // Simply show success message echo "<b>Changes updated successfully.</b><br><br>"; } } else { history_add("general", "config", "generate failed with syntax errors"); // Remove generated config - syntax check has failed if (DEBUG_MODE == 1) {
$class = $_GET["class"]; }elseif ( !empty($_POST["class"]) ) { $class = $_POST["class"]; }else{ $class = $classes[0]; } } */ ### # Info/Warning in the top right corner ### echo '<h2 style="margin-right:4px">Show host parent / child relationships</h2>'; echo ' <div class="editor_info">'; $content = 'This view allows you to graphically browse your host\'s parent / child relationships.'; echo NConf_HTML::show_highlight('Info', $content); echo '</div>'; echo '<form name="editor" action="dependency.php" method="post"> <fieldset class="inline ui-widget-content"> <legend>choose a host</legend> <table>'; ### # List class and items ### /* echo '<tr>'; echo '<td>Class</td>'; echo '</tr>'; echo '<tr><td><select name="class" style="width:192px" onchange="document.editor.id.value=\'\'; document.editor.submit()">'; //echo '<option value="">'.SELECT_EMPTY_FIELD.'</option>'; foreach($classes as $class_item){
### echo '<h2>Edit static config files</h2>'; echo '<div class="editor_info">'; if (NConf_DEBUG::status('ERROR')) { $title = 'WARNING'; $content = NConf_DEBUG::show_debug('ERROR', TRUE); $content .= '<br>The webserver user must have write permissions for your config directory, <br>otherwise NConf cannot save your changes.'; echo NConf_HTML::show_error($title, $content); } elseif (NConf_DEBUG::status('INFO') and !empty($saved)) { $title = 'Successfully saved file'; $content = ICON_TRUE . NConf_DEBUG::show_debug('INFO', TRUE); echo NConf_HTML::show_highlight($title, $content); } else { $title = 'Info'; $content = 'This mask allows administrators to modify static Nagios configuration files.'; echo NConf_HTML::show_highlight($title, $content); } echo '</div>'; echo '<form name="editor" action="' . $request_url . '" method="post"> <fieldset class="inline"> <legend>choose a file</legend> <table> <colgroup> <col width="70"> <col> </colgroup> '; ### # List directories and files for editing ###