Commit e45f6d6c authored by tbrehm's avatar tbrehm
Browse files

Enabled status field in sys datalog processing scripts.

parent 6e0b9613
...@@ -46,6 +46,7 @@ $app->auth->check_module_permissions('admin'); ...@@ -46,6 +46,7 @@ $app->auth->check_module_permissions('admin');
$app->uses('listform_actions'); $app->uses('listform_actions');
//$app->listform_actions->SQLExtWhere = "wb = 'W'"; //$app->listform_actions->SQLExtWhere = "wb = 'W'";
$app->listform_actions->SQLOrderBy = "ORDER BY tstamp DESC, datalog_id DESC";
$app->listform_actions->onLoad(); $app->listform_actions->onLoad();
......
...@@ -39,9 +39,6 @@ $liste['paging_tpl'] = 'templates/paging.tpl.htm'; ...@@ -39,9 +39,6 @@ $liste['paging_tpl'] = 'templates/paging.tpl.htm';
//* Enable auth //* Enable auth
$liste['auth'] = 'no'; $liste['auth'] = 'no';
$liste['sort_field'] = 'tstamp';
$liste['sort_direction'] = 'ASC';
/***************************************************** /*****************************************************
* Suchfelder * Suchfelder
*****************************************************/ *****************************************************/
......
...@@ -47,6 +47,8 @@ $app->auth->check_module_permissions('admin'); ...@@ -47,6 +47,8 @@ $app->auth->check_module_permissions('admin');
$app->uses('listform_actions'); $app->uses('listform_actions');
//$app->listform_actions->SQLExtWhere = "wb = 'W'"; //$app->listform_actions->SQLExtWhere = "wb = 'W'";
$app->listform_actions->SQLOrderBy = "ORDER BY tstamp DESC, syslog_id DESC";
$app->listform_actions->onLoad(); $app->listform_actions->onLoad();
......
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
</tr> </tr>
<tr> <tr>
<td class="tbl_col_tstamp">&nbsp;</td> <td class="tbl_col_tstamp">&nbsp;</td>
<td class="tbl_col_server_id"><select name="search_server_id" onChange="submitForm('pageForm','admin/syslog_list.php');">{tmpl_var name='search_server_id'}</select></td> <td class="tbl_col_server_id"><select name="search_server_id" onChange="submitForm('pageForm','admin/log_list.php');">{tmpl_var name='search_server_id'}</select></td>
<td class="tbl_col_loglevel"><select name="search_loglevel" onChange="submitForm('pageForm','admin/syslog_list.php');">{tmpl_var name='search_loglevel'}</select></td> <td class="tbl_col_loglevel"><select name="search_loglevel" onChange="submitForm('pageForm','admin/log_list.php');">{tmpl_var name='search_loglevel'}</select></td>
<td class="tbl_col_message"><input type="text" name="search_message" value="{tmpl_var name='search_message'}" /></td> <td class="tbl_col_message"><input type="text" name="search_message" value="{tmpl_var name='search_message'}" /></td>
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','admin/syslog_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td> <td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','admin/log_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
......
...@@ -144,8 +144,10 @@ class modules { ...@@ -144,8 +144,10 @@ class modules {
$this->raiseTableHook($d["dbtable"],$d["action"],$data); $this->raiseTableHook($d["dbtable"],$d["action"],$data);
$app->dbmaster->query("DELETE FROM sys_datalog WHERE datalog_id = ".$d["datalog_id"]); $app->dbmaster->query("DELETE FROM sys_datalog WHERE datalog_id = ".$d["datalog_id"]);
$app->log("Deleting sys_datalog ID ".$d["datalog_id"],LOGLEVEL_DEBUG); $app->log("Deleting sys_datalog ID ".$d["datalog_id"],LOGLEVEL_DEBUG);
$app->db->query("UPDATE sys_datalog SET status = 'ok' WHERE datalog_id = ".$d["datalog_id"]);
} else { } else {
$app->log("Error in Repliction, changes were not processed.",LOGLEVEL_ERROR); $app->log("Error in Repliction, changes were not processed.",LOGLEVEL_ERROR);
$app->db->query("UPDATE sys_datalog SET status = 'error' WHERE datalog_id = ".$d["datalog_id"]);
} }
} }
...@@ -158,6 +160,7 @@ class modules { ...@@ -158,6 +160,7 @@ class modules {
$this->raiseTableHook($rec["dbtable"],$rec["action"],$data); $this->raiseTableHook($rec["dbtable"],$rec["action"],$data);
$app->db->query("DELETE FROM sys_datalog WHERE datalog_id = ".$rec["datalog_id"]); $app->db->query("DELETE FROM sys_datalog WHERE datalog_id = ".$rec["datalog_id"]);
$app->log("Deleting sys_datalog ID ".$rec["datalog_id"],LOGLEVEL_DEBUG); $app->log("Deleting sys_datalog ID ".$rec["datalog_id"],LOGLEVEL_DEBUG);
$app->db->query("UPDATE sys_datalog SET status = 'ok' WHERE datalog_id = ".$rec["datalog_id"]);
} }
} }
......
...@@ -67,7 +67,7 @@ $app->log("Set Lock: ".$conf["temppath"].$conf["fs_div"].".ispconfig_lock", LOGL ...@@ -67,7 +67,7 @@ $app->log("Set Lock: ".$conf["temppath"].$conf["fs_div"].".ispconfig_lock", LOGL
*/ */
// Check if there is anything to update // Check if there is anything to update
$tmp_rec = $app->dbmaster->queryOneRecord("SELECT count(server_id) as number from sys_datalog WHERE server_id = ".$conf["server_id"]); $tmp_rec = $app->dbmaster->queryOneRecord("SELECT count(server_id) as number from sys_datalog WHERE server_id = ".$conf["server_id"]." AND status = 'pending'");
$tmp_num_records = $tmp_rec["number"]; $tmp_num_records = $tmp_rec["number"];
unset($tmp_rec); unset($tmp_rec);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment