# Path: toughnms/console/forms/service_form.py
# def service_add_form():
# def service_update_form():
# 
# Path: toughnms/console/handlers/base.py
# class BaseHandler(cyclone.web.RequestHandler):
#     def __init__(self, *argc, **argkw):
#     def initialize(self):
#     def on_finish(self):
#     def get_error_html(self, status_code=500, **kwargs):
#     def render(self, template_name, **template_vars):
#     def render_error(self, **template_vars):
#     def _write(self, resp):
#     def render_json(self, **template_vars):
#     def render_string(self, template_name, **template_vars):
#     def render_from_string(self, template_string, **template_vars):
#     def make_sign(self, secret, params=[]):
#     def check_sign(self, secret, msg):
#     def get_page_data(self, query):
#     def get_mdb_page_data(self, query):
#     def get_page_url(self, page, form_id=None):
#     def get_current_user(self):
#     def get_params(self):
#     def get_params_obj(self, obj):
#     def get_param_value(self, name, defval=None):
#     def export_file(self, filename, data):
# 
# Path: toughnms/common/cmdhelp.py



import base
from toughnms.console.forms import service_form
from toughnms.console.handlers.base import MenuSys
from toughlib.permit import permit
from toughnms.common.cmdhelp import help_dict
from cyclone.web import authenticated
#!/usr/bin/env python
#coding=utf-8

@permit.route('/service', u"服务管理", MenuSys, order=4.0001)
class ServiceHandler(base.BaseHandler):

    @authenticated
    def get(self, template_variables={}):
        host_name = self.get_argument("host_name",None)
        services = self.nagapi.list_service(host_name) or []
        self.render('services.html',host_name=host_name,services=services)

@permit.route('/service/add', u"服务新增", MenuSys, order=4.0002)
class serviceAddHandler(base.BaseHandler):

    @authenticated
    def get(self, template_variables={}):
        host_name = self.get_argument("host_name",None)

# Path: toughnms/console/forms/service_form.py
# def service_add_form():
# def service_update_form():
# 
# Path: toughnms/console/handlers/base.py
# class BaseHandler(cyclone.web.RequestHandler):
#     def __init__(self, *argc, **argkw):
#     def initialize(self):
#     def on_finish(self):
#     def get_error_html(self, status_code=500, **kwargs):
#     def render(self, template_name, **template_vars):
#     def render_error(self, **template_vars):
#     def _write(self, resp):
#     def render_json(self, **template_vars):
#     def render_string(self, template_name, **template_vars):
#     def render_from_string(self, template_string, **template_vars):
#     def make_sign(self, secret, params=[]):
#     def check_sign(self, secret, msg):
#     def get_page_data(self, query):
#     def get_mdb_page_data(self, query):
#     def get_page_url(self, page, form_id=None):
#     def get_current_user(self):
#     def get_params(self):
#     def get_params_obj(self, obj):
#     def get_param_value(self, name, defval=None):
#     def export_file(self, filename, data):
# 
# Path: toughnms/common/cmdhelp.py



# Path: toughnms/console/handlers/service.py
import base
from toughnms.console.forms import service_form
from toughnms.console.handlers.base import MenuSys
from toughlib.permit import permit
from toughnms.common.cmdhelp import help_dict
from cyclone.web import authenticated

#!/usr/bin/env python
#coding=utf-8

@permit.route('/service', u"服务管理", MenuSys, order=4.0001)
class ServiceHandler(base.BaseHandler):

    @authenticated
    def get(self, template_variables={}):
        host_name = self.get_argument("host_name",None)
        services = self.nagapi.list_service(host_name) or []
        self.render('services.html',host_name=host_name,services=services)

@permit.route('/service/add', u"服务新增", MenuSys, order=4.0002)
class serviceAddHandler(base.BaseHandler):

    @authenticated
    def get(self, template_variables={}):
        host_name = self.get_argument("host_name",None)

        form = service_form.service_add_form()