Ejemplo n.º 1
0
    async def get_monitored_series(cls, request):
        """Returns a list of monitored series

        Args:
            request (Request): aiohttp request

        Returns:
            _type_: _description_

        Query args:
            filter (String): regex filter
        """
        regex_filter = urllib.parse.unquote(
            request.rel_url.query['filter']) \
            if 'filter' in request.rel_url.query else None
        # TODO implement filter

        return web.json_response(
            data=BaseHandler.resp_get_monitored_series(regex_filter),
            dumps=safe_json_dumps)
Ejemplo n.º 2
0
 async def _get_all_series(cls, regex_filter):
     regex_filter = regex_filter if regex_filter else None
     resp = BaseHandler.resp_get_monitored_series(regex_filter)
     return safe_json_dumps(resp)