Skip to content

Commit 1e74ea5

Browse files
committed
Added lists for datalog and ispconfig log in the interface.
1 parent 179c91c commit 1e74ea5

File tree

13 files changed

+695
-1
lines changed

13 files changed

+695
-1
lines changed

install/sql/ispconfig3.sql

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,9 @@ CREATE TABLE `sys_datalog` (
911911
`tstamp` bigint(20) NOT NULL default '0',
912912
`user` varchar(255) NOT NULL default '',
913913
`data` text NOT NULL,
914-
PRIMARY KEY (`datalog_id`)
914+
`status` set('pending','ok','warning','error') NOT NULL default 'pending',
915+
PRIMARY KEY (`datalog_id`),
916+
KEY `server_id` (`server_id`,`status`)
915917
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
916918

917919
--
@@ -995,6 +997,25 @@ INSERT INTO `sys_group` (`groupid`, `name`, `description`, `client_id`) VALUES (
995997

996998
-- --------------------------------------------------------
997999

1000+
--
1001+
-- Tabellenstruktur für Tabelle `sys_log`
1002+
--
1003+
1004+
CREATE TABLE `sys_log` (
1005+
`syslog_id` int(10) unsigned NOT NULL auto_increment,
1006+
`server_id` int(10) unsigned NOT NULL default '0',
1007+
`loglevel` tinyint(4) NOT NULL default '0',
1008+
`tstamp` int(10) unsigned NOT NULL,
1009+
`message` text,
1010+
PRIMARY KEY (`syslog_id`)
1011+
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
1012+
1013+
--
1014+
-- Daten für Tabelle `sys_log`
1015+
--
1016+
1017+
-- --------------------------------------------------------
1018+
9981019
--
9991020
-- Tabellenstruktur für Tabelle `sys_user`
10001021
--

interface/lib/config.inc.php

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
<?php
2+
3+
/*
4+
Copyright (c) 2007, Till Brehm, projektfarm Gmbh
5+
All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice,
11+
this list of conditions and the following disclaimer.
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
* Neither the name of ISPConfig nor the names of its contributors
16+
may be used to endorse or promote products derived from this software without
17+
specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22+
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
*/
30+
31+
//** Web-only
32+
if( !empty($_SERVER['DOCUMENT_ROOT']) ) {
33+
34+
Header("Pragma: no-cache");
35+
Header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");
36+
Header("Content-Type: text/html; charset=utf-8");
37+
38+
ini_set('register_globals',0);
39+
}
40+
41+
//** SVN Revision
42+
$svn_revision = '$Revision: 658 $';
43+
$revision = str_replace(array('Revision:','$',' '), '', $svn_revision);
44+
45+
//** Application
46+
define('ISPC_APP_TITLE', 'ISPConfig');
47+
define('ISPC_APP_VERSION', '3.0.0.8');
48+
49+
50+
//** Database
51+
$conf["db_type"] = 'mysql';
52+
$conf["db_host"] = 'localhost';
53+
$conf["db_database"] = 'ispconfig3';
54+
$conf["db_user"] = 'root';
55+
$conf["db_password"] = '';
56+
$conf["db_charset"] = 'utf8'; // same charset as html-charset - (HTML --> MYSQL: "utf-8" --> "utf8", "iso-8859-1" --> "latin1")
57+
58+
define("DB_TYPE",$conf["db_type"]);
59+
define("DB_HOST",$conf["db_host"]);
60+
define("DB_DATABASE",$conf["db_database"]);
61+
define("DB_USER",$conf["db_user"]);
62+
define("DB_PASSWORD",$conf["db_password"]);
63+
define("DB_CHARSET",$conf["db_charset"]);
64+
65+
66+
//** Database settings for the master DB. This setting is only used in multiserver setups
67+
$conf["dbmaster_type"] = 'mysql';
68+
$conf["dbmaster_host"] = '{mysql_master_server_host}';
69+
$conf["dbmaster_database"] = '{mysql_master_server_database}';
70+
$conf["dbmaster_user"] = '{mysql_master_server_ispconfig_user}';
71+
$conf["dbmaster_password"] = '{mysql_master_server_ispconfig_password}';
72+
73+
74+
//** Paths
75+
define('ISPC_ROOT_PATH', realpath(dirname(__FILE__).'/../')); // The main ROOT is the parent directory to this file, ie Interface/. NO trailing slashes.
76+
define('ISPC_LIB_PATH', ISPC_ROOT_PATH.'/lib');
77+
define('ISPC_CLASS_PATH', ISPC_ROOT_PATH.'/lib/classes');
78+
define('ISPC_WEB_PATH', ISPC_ROOT_PATH.'/web');
79+
define('ISPC_THEMES_PATH', ISPC_ROOT_PATH.'/web/themes');
80+
define('ISPC_WEB_TEMP_PATH', ISPC_WEB_PATH.'/temp'); // Path for downloads, accessible via browser
81+
define('ISPC_CACHE_PATH', ISPC_ROOT_PATH.'/cache');
82+
83+
//** Paths (Do not change!)
84+
$conf["rootpath"] = substr(dirname(__FILE__),0,-4);
85+
$conf["fs_div"] = "/"; // File system divider, "\\" on windows and "/"" on linux and unix
86+
$conf["classpath"] = $conf["rootpath"].$conf["fs_div"]."lib".$conf["fs_div"]."classes";
87+
$conf["temppath"] = $conf["rootpath"].$conf["fs_div"]."temp";
88+
89+
define("FS_DIV",$conf["fs_div"]);
90+
define("SERVER_ROOT",$conf["rootpath"]);
91+
define("INCLUDE_ROOT",SERVER_ROOT.FS_DIV."lib");
92+
define("CLASSES_ROOT",INCLUDE_ROOT.FS_DIV."classes");
93+
94+
95+
//** Server
96+
$conf['app_title'] = ISPC_APP_TITLE;
97+
$conf['app_version'] = ISPC_APP_VERSION;
98+
$conf['app_link'] = 'http://www.howtoforge.com/forums/showthread.php?t=26988';
99+
$conf['modules_available'] = 'admin,mail,sites,monitor,client,dns,help';
100+
$conf["server_id"] = "{server_id}";
101+
102+
103+
//** Interface
104+
define('ISPC_INTERFACE_MODULES_ENABLED', 'mail,sites,dns,tools');
105+
106+
107+
//** Logging
108+
$conf["log_file"] = '/var/log/ispconfig/ispconfig.log';
109+
$conf["log_priority"] = 0; // 0 = Debug, 1 = Warning, 2 = Error
110+
111+
112+
//** Allow software package installations
113+
$conf['software_updates_enabled'] = false;
114+
115+
116+
//** Themes
117+
$conf["theme"] = 'default';
118+
$conf["html_content_encoding"] = 'utf-8'; // example: utf-8, iso-8859-1, ...
119+
$conf["logo"] = 'themes/default/images/ispc_logo.png';
120+
121+
122+
//** Default Language
123+
$conf["language"] = 'en';
124+
125+
126+
//** Misc.
127+
$conf["interface_logout_url"] = ""; // example: http://www.domain.tld/
128+
129+
130+
//** Auto Load Modules
131+
$conf["start_db"] = true;
132+
$conf["start_session"] = true;
133+
134+
135+
//** Constants
136+
define("LOGLEVEL_DEBUG",0);
137+
define("LOGLEVEL_WARN",1);
138+
define("LOGLEVEL_ERROR",2);
139+
140+
?>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
3+
/*
4+
Copyright (c) 2008, Till Brehm, projektfarm Gmbh
5+
All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice,
11+
this list of conditions and the following disclaimer.
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
* Neither the name of ISPConfig nor the names of its contributors
16+
may be used to endorse or promote products derived from this software without
17+
specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22+
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
*/
30+
31+
/******************************************
32+
* Begin Form configuration
33+
******************************************/
34+
35+
$list_def_file = "list/datalog.list.php";
36+
$tform_def_file = "form/datalog.tform.php";
37+
38+
/******************************************
39+
* End Form configuration
40+
******************************************/
41+
42+
require_once('../../lib/config.inc.php');
43+
require_once('../../lib/app.inc.php');
44+
45+
//* Check permissions for module
46+
$app->auth->check_module_permissions('admin');
47+
48+
$app->uses("tform_actions");
49+
$app->tform_actions->onDelete();
50+
51+
?>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?php
2+
3+
/*
4+
Copyright (c) 2008, Till Brehm, projektfarm Gmbh
5+
All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice,
11+
this list of conditions and the following disclaimer.
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
* Neither the name of ISPConfig nor the names of its contributors
16+
may be used to endorse or promote products derived from this software without
17+
specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22+
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
*/
30+
31+
require_once('../../lib/config.inc.php');
32+
require_once('../../lib/app.inc.php');
33+
34+
/******************************************
35+
* Begin Form configuration
36+
******************************************/
37+
38+
$list_def_file = "list/datalog.list.php";
39+
40+
/******************************************
41+
* End Form configuration
42+
******************************************/
43+
44+
//* Check permissions for module
45+
$app->auth->check_module_permissions('admin');
46+
47+
$app->uses('listform_actions');
48+
//$app->listform_actions->SQLExtWhere = "wb = 'W'";
49+
50+
$app->listform_actions->onLoad();
51+
52+
53+
?>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
$wb["list_head_txt"] = 'Jobqueue';
3+
$wb["tstamp_txt"] = 'Date';
4+
$wb["server_id_txt"] = 'Server';
5+
$wb["dbtable_txt"] = 'DB Table';
6+
$wb["action_txt"] = 'Action';
7+
$wb["status_txt"] = 'Status';
8+
$wb["page_txt"] = 'Page';
9+
$wb["page_of_txt"] = 'of';
10+
$wb["page_next_txt"] = 'Next';
11+
$wb["page_back_txt"] = 'Back';
12+
$wb["delete_txt"] = 'Delete';
13+
$wb["filter_txt"] = 'Filter';
14+
$wb["add_new_record_txt"] = 'Add new record';
15+
?>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
$wb["list_head_txt"] = 'ISPConfig Log';
3+
$wb["tstamp_txt"] = 'Date';
4+
$wb["server_id_txt"] = 'Server';
5+
$wb["loglevel_txt"] = 'Loglevel';
6+
$wb["message_txt"] = 'Message';
7+
$wb["page_txt"] = 'Page';
8+
$wb["page_of_txt"] = 'of';
9+
$wb["page_next_txt"] = 'Next';
10+
$wb["page_back_txt"] = 'Back';
11+
$wb["delete_txt"] = 'Delete';
12+
$wb["filter_txt"] = 'Filter';
13+
$wb["add_new_record_txt"] = 'Add new record';
14+
?>

interface/web/admin/lib/module.conf.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@
6464
'target' => 'content',
6565
'link' => 'admin/server_ip_list.php');
6666

67+
$items[] = array( 'title' => 'Jobqueue',
68+
'target' => 'content',
69+
'link' => 'admin/datalog_list.php');
70+
71+
$items[] = array( 'title' => 'Log',
72+
'target' => 'content',
73+
'link' => 'admin/log_list.php');
6774

6875
$module['nav'][] = array( 'title' => 'Servers',
6976
'open' => 1,

0 commit comments

Comments
 (0)