Exemplo n.º 1
0
    def get(self):
        try:
            name = self.get_query_argument("name")
        except tornado.web.MissingArgumentError:
            respond_error(self, 400, "Script name is not specified")
            return

        config = load_config(name)

        if not config:
            respond_error(self, 400, "Couldn't find a script by name")
            return

        self.write(external_model.config_to_json(config))
Exemplo n.º 2
0
    def get(self):
        try:
            name = self.get_query_argument("name")
        except tornado.web.MissingArgumentError:
            respond_error(self, 400, "Script name is not specified")
            return

        config = self.application.config_service.load_config(name)

        if not config:
            respond_error(self, 400, "Couldn't find a script by name")
            return

        if not can_access_script(config, self):
            raise tornado.web.HTTPError(403, reason='Access to the script is denied')

        self.write(external_model.config_to_json(config))
Exemplo n.º 3
0
    def get(self, execution_id):
        validate_execution_id(execution_id, self)

        config = self.application.execution_service.get_config(execution_id)

        self.write(external_model.config_to_json(config))