2012-05-08 Sancho Lerena <slerena@artica.es>
* operation/agentes/datos_agente.php: Fixed search, was not working due html encoding in the SQL. Alter some layout issues (centering data in columns) * extensions/ssh_gateway*: New extension to connect SSH/Telnet servers from the console, using external anytermd daemon running in the pandora server. * pandora.css: Fix title height. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6271 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
4b6f778b16
commit
a27d2305cd
|
@ -1,3 +1,15 @@
|
|||
2012-05-08 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* operation/agentes/datos_agente.php: Fixed search, was
|
||||
not working due html encoding in the SQL. Alter some layout
|
||||
issues (centering data in columns)
|
||||
|
||||
* extensions/ssh_gateway*: New extension to connect SSH/Telnet
|
||||
servers from the console, using external anytermd daemon running
|
||||
in the pandora server.
|
||||
|
||||
* pandora.css: Fix title height.
|
||||
|
||||
2012-05-08 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* images/header_f2b.png: Changed image size to 3000px width.
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
<?php
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 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.
|
||||
|
||||
extensions_add_opemode_tab_agent ('ssh_gateway','SSH Gateway','extensions/ssh_gateway/secure_console.png',"ssh_gateway");
|
||||
|
||||
function ssh_gateway () {
|
||||
|
||||
$SERVER_ADDR = $_SERVER['SERVER_ADDR'];
|
||||
|
||||
$HOST = get_parameter ("host", "");
|
||||
$USER = get_parameter ("user", "");
|
||||
|
||||
// TODO: Put aditional filtering for ";" and "&" characters in user & host for security
|
||||
// because these params are passed to server exec() call :)
|
||||
|
||||
$COMMIT = get_parameter ("commit", 0);
|
||||
$MODE = get_parameter ("mode", "ssh");
|
||||
|
||||
if ($MODE == "telnet")
|
||||
$USER = "<auto>";
|
||||
|
||||
$id_agente = get_parameter ("id_agente");
|
||||
$ip = db_get_sql ("SELECT direccion FROM tagente WHERE id_agente = $id_agente");
|
||||
|
||||
if ($HOST == "")
|
||||
$HOST = $ip;
|
||||
|
||||
if (($HOST == "") OR ($USER == "")){
|
||||
|
||||
if ($COMMIT == 1){
|
||||
echo "<h3 class=error>".__("You need to specify a user and a host address")."</h3>";
|
||||
|
||||
}
|
||||
|
||||
echo "<form method=post>";
|
||||
echo "<table class=databox cellspacing=4 cellpadding=4>";
|
||||
echo "<td>".__("Host address")."<td><input type=text size=25 value='$HOST' name=host>";
|
||||
echo "<tr>";
|
||||
echo "<td>".__("User")."<td><input type=text size=25 value='$USER' name=user>";
|
||||
echo "<tr><td>";
|
||||
echo __("Connect mode")."<td><select name=mode>";
|
||||
if ($MODE == "telnet"){
|
||||
echo "<option>telnet";
|
||||
echo "<option>ssh";
|
||||
} else {
|
||||
echo "<option>ssh";
|
||||
echo "<option>telnet";
|
||||
}
|
||||
echo "</select>";
|
||||
|
||||
echo " <input type=submit name=connect class='sub upd' value=".__("Connect").">";
|
||||
echo "<td><input type=hidden name=commit value=1>";
|
||||
echo "</form></table>";
|
||||
}
|
||||
|
||||
else {
|
||||
if ($MODE == "ssh")
|
||||
echo "<iframe style='border: 0px' src='http://".$SERVER_ADDR.":8022/anyterm.html?param=$USER@$HOST' width='100%' height=550>";
|
||||
else
|
||||
echo "<iframe style='border: 0px' src='http://".$SERVER_ADDR.":8023/anyterm.html?param=$HOST' width='100%' height=550>";
|
||||
|
||||
echo "</iframe>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
Binary file not shown.
After Width: | Height: | Size: 818 B |
|
@ -576,7 +576,7 @@ tr.rowOdd:hover {
|
|||
font-style: italic;
|
||||
}
|
||||
.tit {
|
||||
padding: 5px 1px;
|
||||
padding: 3px 1px;
|
||||
}
|
||||
.tit, .titb {
|
||||
font-weight: bold;
|
||||
|
@ -1611,7 +1611,7 @@ td.datos_greyf9, td.datos_bluef9, td.datos_greenf9, td.datos_redf9, td.datos_yel
|
|||
}
|
||||
|
||||
.menu li.selected {
|
||||
background-color: #B1B1B1 !important;
|
||||
background-color: #B1B1B1 !important;
|
||||
}
|
||||
|
||||
.menu li {
|
||||
|
@ -1619,7 +1619,7 @@ td.datos_greyf9, td.datos_bluef9, td.datos_greenf9, td.datos_redf9, td.datos_yel
|
|||
}
|
||||
|
||||
.submenu li a{
|
||||
background-color: #E4E4E4 !important;
|
||||
background-color: #E4E4E4 !important;
|
||||
}
|
||||
|
||||
.menu li a:hover,
|
||||
|
@ -1632,7 +1632,7 @@ td.datos_greyf9, td.datos_bluef9, td.datos_greenf9, td.datos_redf9, td.datos_yel
|
|||
}
|
||||
|
||||
.is_submenu2 {
|
||||
background-color: #222222 !important;
|
||||
background-color: #222222 !important;
|
||||
}
|
||||
|
||||
.menu li.submenu_selected a {
|
||||
|
|
|
@ -27,6 +27,7 @@ $period = get_parameter ("period", 86400);
|
|||
$group = agents_get_agentmodule_group ($module_id);
|
||||
$agentId = get_parameter("id_agente");
|
||||
$freestring = get_parameter ("freestring");
|
||||
|
||||
$selection_mode = get_parameter('selection_mode', 'fromnow');
|
||||
$date_from = (string) get_parameter ('date_from', date ('Y-m-j'));
|
||||
$time_from = (string) get_parameter ('time_from', date ('h:iA'));
|
||||
|
@ -97,8 +98,8 @@ if ($moduletype_name == "log4x") {
|
|||
}
|
||||
|
||||
$columns = array(
|
||||
"Timestamp" => array("utimestamp", "modules_format_timestamp", "align" => "center"),
|
||||
"Data" => array("datos", "modules_format_data", "align" => "center"),
|
||||
"Timestamp" => array("utimestamp", "modules_format_timestamp", "align" => "left"),
|
||||
"Data" => array("datos", "modules_format_data", "align" => "left"),
|
||||
"Time" => array("utimestamp", "modules_format_time", "align" => "center")
|
||||
);
|
||||
} else {
|
||||
|
@ -109,12 +110,15 @@ if ($moduletype_name == "log4x") {
|
|||
}
|
||||
|
||||
$columns = array(
|
||||
"Timestamp" => array("utimestamp", "modules_format_timestamp", "align" => "center"),
|
||||
"Data" => array("datos", "modules_format_data", "align" => "center"),
|
||||
"Timestamp" => array("utimestamp", "modules_format_timestamp", "align" => "left"),
|
||||
"Data" => array("datos", "modules_format_data", "align" => "left"),
|
||||
"Time" => array("utimestamp", "modules_format_time", "align" => "center")
|
||||
);
|
||||
}
|
||||
|
||||
$sql_body = io_safe_output($sql_body);
|
||||
// Clean all codification characters
|
||||
|
||||
$sql = "SELECT * " . $sql_body;
|
||||
$sql_count = "SELECT count(*) " . $sql_body;
|
||||
|
||||
|
@ -231,11 +235,12 @@ ui_require_jquery_file ('timeentry');
|
|||
<script language="javascript" type="text/javascript">
|
||||
|
||||
$(document).ready (function () {
|
||||
$("#text-time_from").timeEntry ({spinnerImage: 'images/time-entry.png', spinnerSize: [20, 20, 0]});
|
||||
$("#text-time_to").timeEntry ({spinnerImage: 'images/time-entry.png', spinnerSize: [20, 20, 0]});
|
||||
$.datepicker.setDefaults($.datepicker.regional[ "<?php echo $config['language']; ?>"]);
|
||||
$("#text-date_from").datepicker ({changeMonth: true, changeYear: true, showAnim: "slideDown"});
|
||||
$("#text-date_to").datepicker ({changeMonth: true, changeYear: true, showAnim: "slideDown"});
|
||||
$("#text-time_from, #text-time_to").timeEntry ({
|
||||
spinnerImage: 'images/time-entry.png',
|
||||
spinnerSize: [20, 20, 0]
|
||||
});
|
||||
$("#text-date_from, #text-date_to").datepicker ();
|
||||
$.datepicker.regional["<?php echo $config['language']; ?>"];
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue