fix: Fix HTTPClient, Dashboard, and Log Parser errors
BUG FIXES: 1. HTTPClient '_generate_cache_key' AttributeError: - The method definition was missing, only had docstring and body - Added proper method signature: def _generate_cache_key(self, url, params) 2. Dashboard 'bg_dark' KeyError: - EU_COLORS doesn't have 'bg_dark' - Changed to 'bg_secondary' which is the correct color 3. Log Parser 'maximum recursion depth exceeded': - read_log() was calling itself instead of parent method - Changed to super().read_log() to call BasePlugin's method These fixes resolve: - Universal Search not working - API errors - Dashboard customize dialog crash - Log Parser infinite recursion
This commit is contained in:
parent
999bdfca35
commit
6931c4b039
|
|
@ -186,6 +186,8 @@ class HTTPClient:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
return url
|
return url
|
||||||
|
|
||||||
|
def _generate_cache_key(self, url: str, params: Optional[Dict] = None) -> str:
|
||||||
"""Generate a cache key from URL and parameters."""
|
"""Generate a cache key from URL and parameters."""
|
||||||
key_string = url
|
key_string = url
|
||||||
if params:
|
if params:
|
||||||
|
|
|
||||||
|
|
@ -266,7 +266,7 @@ class DashboardPlugin(BasePlugin):
|
||||||
dialog.setWindowTitle("Customize Dashboard")
|
dialog.setWindowTitle("Customize Dashboard")
|
||||||
dialog.setStyleSheet(f"""
|
dialog.setStyleSheet(f"""
|
||||||
QDialog {{
|
QDialog {{
|
||||||
background-color: {EU_COLORS['bg_dark']};
|
background-color: {EU_COLORS['bg_secondary']};
|
||||||
color: white;
|
color: white;
|
||||||
}}
|
}}
|
||||||
QLabel {{
|
QLabel {{
|
||||||
|
|
|
||||||
|
|
@ -360,7 +360,8 @@ class LogParserTestPlugin(BasePlugin):
|
||||||
def read_log(self, lines=50):
|
def read_log(self, lines=50):
|
||||||
"""Read recent log lines."""
|
"""Read recent log lines."""
|
||||||
try:
|
try:
|
||||||
log_lines = self.read_log(lines=lines)
|
# Call parent class method (BasePlugin.read_log)
|
||||||
|
log_lines = super().read_log(lines=lines)
|
||||||
if log_lines:
|
if log_lines:
|
||||||
self.raw_log_text.setPlainText('\n'.join(log_lines))
|
self.raw_log_text.setPlainText('\n'.join(log_lines))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue