Esempio n. 1
0
    def post(self, doc_id, op_id):
        param = get_request_param(self)
        param['doc_id'] = doc_id
        param['op_id'] = op_id
        if len(param.get('maximum')) == 0:
            param['maximum'] = None
        if len(param.get('minimum')) == 0:
            param['minimum'] = None

        param_service.save_bind_param(param)
        manager__format = '/doc/operation/{0}/manager'.format(op_id)
        self.redirect(manager__format)
Esempio n. 2
0
    def post(self, doc_id):
        param = get_request_param(self)
        param_service.save_param(param)
        self.redirect('/doc/%s/param/manager'.format(doc_id))


# @application.RequestMapping("/doc/([0-9]+)/param/([0-9]+)")
# class ParamAddBindHandler(application.RequestHandler):
#     def get(self, doc_id, op_id):
#         self.render('param_add_bind.html', doc_id=doc_id, op_id=op_id)
#
#     def post(self, doc_id, op_id):
#         param = get_request_param(self)
#         param_service.save_bind_param(param)
#         self.redirect('/doc/%s/param/manager'.format(doc_id))
Esempio n. 3
0
    def post(self, op_id, param_id, *args, **kwargs):
        param = get_request_param(self)
        param['id'] = param_id
        param['operation_id'] = op_id
        param_type = param['type']
        isNotNum = not ('integer' == param_type or 'number' == param_type)
        maximum = param.get('maximum')
        if isNotNum or len(maximum) == 0 or 'None' == maximum:
            param['maximum'] = None
        minimum = param.get('minimum')
        if isNotNum or len(minimum) == 0 or 'None' == minimum:
            param['minimum'] = None

        param_service.update_param(param)
        manager__format = '/doc/operation/{0}/manager'.format(op_id)
        self.redirect(manager__format)
Esempio n. 4
0
 def post(self, doc_id):
     param = get_request_param(self)
     param_service.save_param(param)
     self.redirect('/doc/%s/param/manager'.format(doc_id))
Esempio n. 5
0
 def post(self, doc_id, op_id, resp_id, *args, **kwargs):
     param = get_request_param(self)
     param['id'] = resp_id
     resp_service.update_resp(param)
     self.redirect('/doc/operation/{0}/manager'.format(op_id))
Esempio n. 6
0
 def post(self, doc_id, op_id, *args, **kwargs):
     param = get_request_param(self)
     param['operation_id'] = op_id
     resp_service.save_resp(param)
     self.redirect("/doc/operation/{0}/manager".format(op_id))
Esempio n. 7
0
 def post(self, doc_id, *args, **kwargs):
     param = get_request_param(self)
     op_service.save_op(param)
     self.redirect('/doc/{0}/path/manager'.format(doc_id))
Esempio n. 8
0
 def post(self, doc_id, *args, **kwargs):
     param = get_request_param(self)
     doc_service.save_doc(param)
     self.redirect('/doc/manager')