Merge branch '2042-HA_cluster-dev' into 'develop'
2042 ha cluster dev See merge request artica/pandorafms!1524
This commit is contained in:
commit
822fc05258
|
@ -0,0 +1,15 @@
|
|||
START TRANSACTION;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `tdatabase` (
|
||||
`id` int(10) unsigned NOT NULL auto_increment,
|
||||
`host` varchar(100) default '',
|
||||
`os_port` int(4) unsigned default '22',
|
||||
`os_user` varchar(100) default '',
|
||||
`db_port` int(4) unsigned default '3306',
|
||||
`status` tinyint(1) unsigned default '0',
|
||||
`action` tinyint(1) unsigned default '0',
|
||||
`last_error` varchar(255) default '',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ;
|
||||
|
||||
COMMIT;
|
|
@ -208,6 +208,21 @@ CREATE TABLE IF NOT EXISTS `tdashboard` (
|
|||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tdatabase`
|
||||
-- ---------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tdatabase` (
|
||||
`id` int(10) unsigned NOT NULL auto_increment,
|
||||
`host` varchar(100) default '',
|
||||
`os_port` int(4) unsigned default '22',
|
||||
`os_user` varchar(100) default '',
|
||||
`db_port` int(4) unsigned default '3306',
|
||||
`status` tinyint(1) unsigned default '0',
|
||||
`action` tinyint(1) unsigned default '0',
|
||||
`last_error` varchar(255) default '',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `twidget`
|
||||
-- -----------------------------------------------------
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
<?php
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2018 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; version 2
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
if (! check_acl ($config['id_user'], 0, "PM")) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
"Trying to access HA cluster");
|
||||
require ("general/noaccess.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
ui_require_css_file ('firts_task');
|
||||
?>
|
||||
<?php
|
||||
|
||||
ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no HA clusters defined yet.') ) );
|
||||
?>
|
||||
|
||||
<div class="new_task_cluster">
|
||||
<div class="image_task_cluster">
|
||||
<?php echo html_print_image('images/firts_task/slave-mode.png', true, array("title" => __('Clusters')));?>
|
||||
</div>
|
||||
<div class="text_task_cluster">
|
||||
<h3> <?php echo __('PANDORA FMS DB CLUSTER'); ?></h3>
|
||||
<p id="description_task"> <?php
|
||||
|
||||
echo __('With Pandora FMS Enterprise you can add high availability to your Pandora FMS installation by adding redundant MySQL servers').'<br><br>';
|
||||
|
||||
echo __('Click on "add new node" to start transforming your Pandora FMS DB Cluster into a Pandora FMS DB Cluster.').'<br><br>';
|
||||
|
||||
?></p>
|
||||
|
||||
<?php
|
||||
if(check_acl ($config['id_user'], 0, "AW")) {
|
||||
echo "<div id='create_master_window'></div>";
|
||||
?>
|
||||
<input style="margin-bottom:20px;" onclick="show_create_ha_cluster();" type="submit" class="button_task" value="<?php echo __('Add new node'); ?>" />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function show_create_ha_cluster() {
|
||||
var params = {};
|
||||
params["dialog_master"] = 1;
|
||||
params["page"] = "enterprise/include/ajax/HA_cluster.ajax";
|
||||
jQuery.ajax ({
|
||||
data: params,
|
||||
dataType: "html",
|
||||
type: "POST",
|
||||
url: "ajax.php",
|
||||
success: function (data) {
|
||||
$("#create_master_window").dialog ({
|
||||
title: '<?php echo __("Add master node");?>',
|
||||
resizable: true,
|
||||
draggable: true,
|
||||
modal: true,
|
||||
close: function() {
|
||||
|
||||
},
|
||||
overlay: {
|
||||
opacity: 0.5,
|
||||
background: "black"
|
||||
},
|
||||
width: 800,
|
||||
height: 600
|
||||
}).empty()
|
||||
.html(data)
|
||||
.show ();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
|
@ -209,6 +209,9 @@ if (check_acl ($config['id_user'], 0, "AW") || check_acl ($config['id_user'], 0,
|
|||
}
|
||||
//This subtabs are only for Pandora Admin
|
||||
if (check_acl ($config['id_user'], 0, "PM")) {
|
||||
|
||||
enterprise_hook('ha_cluster');
|
||||
|
||||
$sub["godmode/servers/manage_recontask"]["text"] = __('Recon task');
|
||||
$sub["godmode/servers/manage_recontask"]["id"] = 'Recon task';
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 411 B |
Binary file not shown.
After Width: | Height: | Size: 573 B |
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
|
@ -2235,6 +2235,21 @@ CREATE TABLE IF NOT EXISTS `tdashboard` (
|
|||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tdatabase`
|
||||
-- ---------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tdatabase` (
|
||||
`id` int(10) unsigned NOT NULL auto_increment,
|
||||
`host` varchar(100) default '',
|
||||
`os_port` int(4) unsigned default '22',
|
||||
`os_user` varchar(100) default '',
|
||||
`db_port` int(4) unsigned default '3306',
|
||||
`status` tinyint(1) unsigned default '0',
|
||||
`action` tinyint(1) unsigned default '0',
|
||||
`last_error` varchar(255) default '',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `twidget`
|
||||
-- -----------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue