Skip to content

Commit e0f619c

Browse files
author
florian030
committed
Revert "add domain and username to db-size-monitoring"
This reverts commit b125fab.
1 parent 083cdf0 commit e0f619c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

interface/lib/classes/tools_monitor.inc.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ function showDatabaseSize () {
124124
$record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'database_size' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
125125
if(isset($record['data'])) {
126126
$data = unserialize($record['data']);
127-
//* format the data
127+
/*
128+
Format the data
129+
*/
128130
$html =
129131
'<div class="systemmonitor-state state-'.$record['state'].'">
130132
<div class="systemmonitor-content icons32 ico-'.$record['state'].'">
@@ -134,15 +136,13 @@ function showDatabaseSize () {
134136
<td>'.$app->lng("monitor_database_name_txt").'</td>
135137
<td>'.$app->lng("monitor_database_size_txt").'</td>
136138
<td>'.$app->lng("monitor_database_client_txt").'</td>
137-
<td>'.$app->lng("monitor_database_domain_txt").'</td>
138139
</tr>';
139140
foreach($data as $line) {
140141
$html .= '<tr>';
141142
if ($line['size'] > 0) $line['size'] = $app->functions->formatBytes($line['size']);
142-
//* get the username
143-
$line['sys_groupid']=$app->db->queryOneRecord("SELECT client.username FROM web_database, sys_group, client WHERE web_database.sys_groupid = sys_group.groupid AND sys_group.client_id = client.client_id AND web_database.database_name='".$line['name']."'")['username'];
144-
//* get the domain
145-
$line['domain']=$app->db->queryOneRecord("SELECT domain FROM web_domain WHERE domain_id=(SELECT parent_domain_id FROM web_database WHERE database_name='".$line['name']."')")['domain'];
143+
$t=$app->db->queryOneRecord("SELECT username FROM client WHERE sys_groupid = ".$line['client_id']);
144+
$line['client_id']=$t['username'];
145+
unset($t);
146146
foreach ($line as $item) {
147147
$html .= '<td>' . $item . '</td>';
148148
}

server/lib/classes/cron.d/100-monitor_database_size.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function onRunJob() {
8484
for ($i = 0; $i < sizeof($records); $i++) {
8585
$data[$i]['name'] = $records[$i]['database_name'];
8686
$data[$i]['size'] = $app->db->getDatabaseSize($data[$i]['name']);
87-
$data[$i]['sys_groupid'] = $records[$i]['sys_groupid'];
87+
$data[$i]['client_id'] = $records[$i]['sys_groupid'];
8888
}
8989
}
9090

0 commit comments

Comments
 (0)