Skip to content

Commit 2b9ee79

Browse files
committed
remove purging template stub
1 parent 7bb51f2 commit 2b9ee79

File tree

3 files changed

+0
-392
lines changed

3 files changed

+0
-392
lines changed

modules/web_viewer/app.py

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,6 @@ def cache():
153153
"""Cache management page"""
154154
return render_template('cache.html')
155155

156-
@self.app.route('/purging')
157-
def purging():
158-
"""Purging log page"""
159-
return render_template('purging.html')
160156

161157
@self.app.route('/stats')
162158
def stats():
@@ -232,15 +228,6 @@ def api_optimize_database():
232228
self.logger.error(f"Error optimizing database: {e}")
233229
return jsonify({'success': False, 'error': str(e)}), 500
234230

235-
@self.app.route('/api/purging')
236-
def api_purging():
237-
"""Get purging log data"""
238-
try:
239-
purging = self._get_purging_data()
240-
return jsonify(purging)
241-
except Exception as e:
242-
self.logger.error(f"Error getting purging: {e}")
243-
return jsonify({'error': str(e)}), 500
244231

245232
@self.app.route('/api/stream_data', methods=['POST'])
246233
def api_stream_data():
@@ -875,7 +862,6 @@ def _get_table_description(self, table_name):
875862
'message_stats': 'Message statistics and analytics',
876863
'command_stats': 'Command execution statistics',
877864
'path_stats': 'Network path statistics',
878-
'purging_log': 'Repeater purging activity log',
879865
'geocoding_cache': 'Geocoding service cache',
880866
'generic_cache': 'General purpose cache storage'
881867
}
@@ -1052,34 +1038,6 @@ def _get_cache_data(self):
10521038
self.logger.error(f"Error getting cache data: {e}")
10531039
return {'error': str(e)}
10541040

1055-
def _get_purging_data(self):
1056-
"""Get purging log data"""
1057-
try:
1058-
conn = self._get_db_connection()
1059-
cursor = conn.cursor()
1060-
1061-
# Get recent purging activity
1062-
cursor.execute("""
1063-
SELECT timestamp, action, details, user_id
1064-
FROM adverts
1065-
WHERE timestamp > datetime('now', '-7 days')
1066-
ORDER BY timestamp DESC
1067-
LIMIT 100
1068-
""")
1069-
1070-
purging = []
1071-
for row in cursor.fetchall():
1072-
purging.append({
1073-
'timestamp': row['timestamp'],
1074-
'action': row.get('action', 'unknown'),
1075-
'details': row.get('details', ''),
1076-
'user_id': row['user_id']
1077-
})
1078-
1079-
return {'purging': purging}
1080-
except Exception as e:
1081-
self.logger.error(f"Error getting purging data: {e}")
1082-
return {'error': str(e)}
10831041

10841042
def _get_bot_uptime(self):
10851043
"""Get bot uptime in seconds from database"""

modules/web_viewer/templates/base.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,6 @@
146146
<i class="fas fa-database"></i> Cache
147147
</a>
148148
</li>
149-
<li class="nav-item">
150-
<a class="nav-link" href="/purging">
151-
<i class="fas fa-trash"></i> Purging
152-
</a>
153-
</li>
154149
</ul>
155150

156151
<!-- Connection Status -->

0 commit comments

Comments
 (0)