dashboard/modules/log/log_head.py
async def handle_list_logs(self, req):
        """
        Returns a JSON file containing, for each node in the cluster,
        a dict mapping a category of log component to a list of filenames.
        """
        try:
            node_id = req.query.get("node_id", None)
            if node_id is None:
                ip = req.query.get("node_ip", None)
                if ip is not None:
                    if ip not in self._ip_to_node_id:
                        return aiohttp.web.HTTPNotFound(
                            reason=f"node_ip: {ip} not found"
                        )
                    node_id = self._ip_to_node_id[ip]
            filters = req.query.get("filters", "").split(",")
            err = await self._wait_until_initialized()
            if err is not None:
                return err
            response = await self._list_logs(node_id, filters)
            return aiohttp.web.json_response(response)

        except Exception as e:
            logger.exception(e)
            return aiohttp.web.HTTPInternalServerError(reason=e)

        Returns a JSON file containing, for each node in the cluster,
        a dict mapping a category of log component to a list of filenames.
        
Returns a JSON file containing, for each node in the cluster,
a dict mapping a category of log component to a list of filenames.
Returns a JSON file containing for each node in the cluster a dict mapping a category of log component to a list of filenames .
async def handle_list_logs(self, req):
        try:
            node_id = req.query.get("node_id", None)
            if node_id is None:
                ip = req.query.get("node_ip", None)
                if ip is not None:
                    if ip not in self._ip_to_node_id:
                        return aiohttp.web.HTTPNotFound(
                            reason=f"node_ip: {ip} not found"
                        )
                    node_id = self._ip_to_node_id[ip]
            filters = req.query.get("filters", "").split(",")
            err = await self._wait_until_initialized()
            if err is not None:
                return err
            response = await self._list_logs(node_id, filters)
            return aiohttp.web.json_response(response)
        except Exception as e:
            logger.exception(e)
            return aiohttp.web.HTTPInternalServerError(reason=e)
async def handle_list_logs ( self , req ) : try : node_id = req . query . get ( "node_id" , None ) if node_id is None : ip = req . query . get ( "node_ip" , None ) if ip is not None : if ip not in self . _ip_to_node_id : return aiohttp . web . HTTPNotFound ( reason = f"node_ip: {ip} not found" ) node_id = self . _ip_to_node_id [ ip ] filters = req . query . get ( "filters" , "" ) . split ( "," ) err = await self . _wait_until_initialized ( ) if err is not None : return err response = await self . _list_logs ( node_id , filters ) return aiohttp . web . json_response ( response ) except Exception as e : logger . exception ( e ) return aiohttp . web . HTTPInternalServerError ( reason = e )
Returns a JSON file containing, for each node in the cluster,
a dict mapping a category of log component to a list of filenames.
Returns a JSON file containing for each node in the cluster a dict mapping a category of log component to a list of filenames .
"""
        Returns a JSON file containing, for each node in the cluster,
        a dict mapping a category of log component to a list of filenames.
        """
self
req