|
|
@@ -143,7 +143,7 @@ function ANALIZA_WIDOKOW_RAPORT_DAILY() {
|
|
|
// DEBUG_S(-3,'new_table',$new_table);
|
|
|
|
|
|
//$install->__add_req_option('table');
|
|
|
- $installer->__install();
|
|
|
+ $installer->__install(); //@2016-08-05 TODO bindera - dla czego to sie nie wykonalo???
|
|
|
|
|
|
//$table->get_options_status();
|
|
|
|
|
|
@@ -151,7 +151,7 @@ function ANALIZA_WIDOKOW_RAPORT_DAILY() {
|
|
|
|
|
|
//InstallerHelper::__install();
|
|
|
|
|
|
- die('umarlem');
|
|
|
+// die('umarlem');
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -185,22 +185,70 @@ ANALIZA_WIDOKOW_RAPORT_DAILY <form action='' METHOD='GET'>
|
|
|
<?php
|
|
|
|
|
|
$RAPORT['IGNORE_TABLES'][] = "AUTOSHAPE";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "crm_proces_idx_group_to_init_view";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "crm_proces_idx_table_to_proces_grouped_view";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "crm_proces_idx_table_to_proces_perms_view";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "crm_proces_idx_table_to_proces_view";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "crm_proces_idx_table_to_user_view";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "crm_proces_idx_tables_info_view";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "crm_proces_idx_url_to_proces_view";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "crm_proces_idx_user_to_init_view";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "_TASKS_INFO_trigger";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "budget_project_to_realization_view";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "crm_proces_idx_user_to_proces_view";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "CRM_PROCES_idx_GROUP_to_PROCES";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "CRM_AUTH_PROFILE";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "CRM_CONFIG";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "CRM_CZYNNOSCI";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "CRM_IMPORT_TRANSLATE";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "CRM_PROCES_idx_GROUP_to_PROCES";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "CRM_PROCES_idx_GROUP_to_PROCES_PERM";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "CRM_PROCES_idx_TEMP";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "CRM_PRZYPADEK";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "CRM_UI_MSGS__EXEC_LOG";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "CRM_UI_MSGS";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "DEVICES_GROUP";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "GRAFIK_PRACY_view";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "ITEM_LINKS";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "KONTAKTY_view";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "ITEM_LINK_TYPES";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "LDAP_GROUPS";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "NETWORKS_SERVERS";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "_CRM_PROCES_GOTO_CACHE";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "_CRM_PROCES_STATS_proc_wiev";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "_SYNC_FILE_PERMS";
|
|
|
+ $RAPORT['IGNORE_TABLES'][] = "_project_path_idx";
|
|
|
+
|
|
|
+
|
|
|
|
|
|
//echo statystyka pracy historyczna w systemie
|
|
|
$dbTbls = array();
|
|
|
- $ZAP_SQL = " SHOW FULL TABLES WHERE TABLE_TYPE LIKE 'VIEW' ";
|
|
|
+ $ZAP_SQL = " SHOW FULL TABLES "; //-- WHERE TABLE_TYPE LIKE 'VIEW'
|
|
|
if (!empty($_GET['TABLES_LIKE'])) {
|
|
|
$ZAP_SQL .= " like '{$_GET['TABLES_LIKE']}' ";
|
|
|
}
|
|
|
+
|
|
|
+ echo "<br>Jade zapytanie ".$ZAP_SQL;
|
|
|
+
|
|
|
$res = $db->query($ZAP_SQL);
|
|
|
while($R = $db->fetch_array($res)) {
|
|
|
$dbTbls[] = $R;
|
|
|
}
|
|
|
+
|
|
|
+ echo "<br> Widoki : ".print_r($dbTbls);
|
|
|
+
|
|
|
+ DEBUG_S(-1,'widoki ',$dbTbls,__FILE__,__FUNCTION__,__LINE__);
|
|
|
foreach ($dbTbls as $R) {
|
|
|
if (!in_array($R[0], $RAPORT['IGNORE_TABLES'])) {
|
|
|
+ if(!strstr($R[0], '_HIST'))
|
|
|
+
|
|
|
$RAPORT['TABLES_ALL'][] = $R[0];
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ echo "<br> TABLES_ALL : ".print_r($RAPORT['TABLES_ALL']);
|
|
|
+
|
|
|
unset($dbTbls);
|
|
|
|
|
|
$ZAP_SQL = array();
|
|
|
@@ -208,20 +256,19 @@ ANALIZA_WIDOKOW_RAPORT_DAILY <form action='' METHOD='GET'>
|
|
|
|
|
|
|
|
|
foreach ($RAPORT['TABLES_ALL'] as $RTH_I=>$RTH_A) {
|
|
|
- $res = $db->query("select DISTINCT(A_STATUS) as VALUE, count(ID) as COUNT from ".$RTH_A['TABLE']." ");
|
|
|
- $r2 = $db->fetch_array($res);
|
|
|
+ $sql="select DISTINCT(A_STATUS) as VALUE, count(ID) as COUNT from ".$RTH_A." ";
|
|
|
+ $res = $db->query($sql);
|
|
|
+ //$r2 = $db->fetch_array($res);
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- if (isset($r2['A_STATUS']) && isset($r2['ID'])) {
|
|
|
-
|
|
|
- //dobudowanie tabeli _ANALIZA_HISTORII_ALL
|
|
|
- $sql="insert ignore into _ANALIZA_WIDOKOW_RAPORT_DAILY( TABLE_NAME, COUNT,FIELD,VALUE,A_RECORD_CREATE_DATE ) values (
|
|
|
- '{$RTH_A['TABLE']}','{$h->COUNT}','A_STATUS','{$h->VALUE}',now())";
|
|
|
- //echo "<br>".$sql;
|
|
|
- DB::query($sql) or die($sql);
|
|
|
-
|
|
|
-
|
|
|
+ echo "<br> jade raport dla tabeli ".$RTH_A." sql:".$sql." print_r r2".print_r($r2) ;
|
|
|
+ while($h=$db->fetch($res)) {
|
|
|
+ if (isset($h->VALUE)) {
|
|
|
+ //dobudowanie tabeli _ANALIZA_HISTORII_ALL
|
|
|
+ $sql="insert ignore into _ANALIZA_WIDOKOW_RAPORT_DAILY( TABLE_NAME, COUNT,FIELD,VALUE,A_RECORD_CREATE_DATE ) values (
|
|
|
+ '{$RTH_A}','{$h->COUNT}','A_STATUS','{$h->VALUE}',now())";
|
|
|
+ echo "<br>".$sql;
|
|
|
+ DB::query($sql) or die($sql);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|