Example #1
0
    def show_tag(self, iiss, itag):
        uqp, qp = unquote_quote(iiss, itag)
        logger.info('Show info on iss="{}", tag="{}"'.format(*uqp))

        if find_test_instance(*uqp):
            active = '<div class="active"> Running </div>'
        else:
            active = '<div class="inactive"> Inactive </div>'

        info = open(os.path.join(self.entpath, *qp), 'r').read()

        _msg = self.prehtml['action.html'].format(path=qp[-1], active=active,
                                                  display_info=info)
        return as_bytes(_msg)
Example #2
0
    def show_tag(self, iiss, itag):
        uqp, qp = unquote_quote(iiss, itag)
        logger.info('Show info on iss="{}", tag="{}"'.format(*uqp))

        if find_test_instance(*uqp):
            active = '<div class="active"> Running </div>'
        else:
            active = '<div class="inactive"> Inactive </div>'

        info = open(os.path.join(self.entpath, *qp), 'r').read()

        _msg = self.prehtml['action.html'].format(path=qp[-1], active=active,
                                                  display_info=info)
        return as_bytes(_msg)
Example #3
0
    def show_tag(self, part):
        resp = Response(mako_template="action.mako",
                        template_lookup=self.lookup,
                        headers=[])

        lp = [unquote_plus(p) for p in part[1:]]

        if find_test_instance(*lp):
            active = True
        else:
            active = False

        qp = [quote_plus(p) for p in lp]
        info = open(os.path.join(self.entpath, *qp), 'r').read()
        args = {'base': self.baseurl, 'info': json.loads(info),
                "qargs": qp, "largs": lp, 'active': active}
        return resp(self.environ, self.start_response, **args)
Example #4
0
    def show_tag(self, part):
        resp = Response(mako_template="action.mako",
                        template_lookup=self.lookup,
                        headers=[])

        lp = [unquote_plus(p) for p in part[1:]]

        if find_test_instance(*lp):
            active = True
        else:
            active = False

        qp = [quote_plus(p) for p in lp]
        info = open(os.path.join(self.entpath, *qp), 'r').read()
        args = {
            'base': self.baseurl,
            'info': json.loads(info),
            "qargs": qp,
            "largs": lp,
            'active': active
        }
        return resp(self.environ, self.start_response, **args)