perf: reformat code

pull/13852/head
Eric 2024-07-31 10:55:00 +08:00 committed by 老广
parent ad5e88f1e3
commit 7c6e83d124
1 changed files with 5 additions and 2 deletions

View File

@ -2,12 +2,15 @@ from terminal.utils.loki_client import get_loki_client
__all__ = ['LokiMixin', ]
class LokiMixin:
def get_loki_client(self):
@staticmethod
def get_loki_client():
return get_loki_client()
def create_loki_query(self, components, search):
@staticmethod
def create_loki_query(components, search):
stream_selector = '{component!=""}'
if components:
stream_selector = '{component=~"%s"}' % components