# Path: toughnms/console/forms/contact_form.py
# def contact_add_form(groups=[]):
# def contact_update_form(groups=[]):
# 
# 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):


import base
from toughnms.console.forms import contact_form
from toughnms.console.handlers.base import MenuSys
from toughnms.console.settings import *
from toughlib.permit import permit
from cyclone.web import authenticated
#!/usr/bin/env python
#coding=utf-8

class GroupHandler(base.BaseHandler):

    def get_groups(self):
        groups = self.nagapi.list_contactgroup()
        groups = [(g.contactgroup_name, g.alias) for g in groups]
        return groups



# Path: toughnms/console/forms/contact_form.py
# def contact_add_form(groups=[]):
# def contact_update_form(groups=[]):
# 
# 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/console/handlers/contact.py
import base
from toughnms.console.forms import contact_form
from toughnms.console.handlers.base import MenuSys
from toughnms.console.settings import *
from toughlib.permit import permit
from cyclone.web import authenticated

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

class GroupHandler(base.BaseHandler):

    def get_groups(self):
        groups = self.nagapi.list_contactgroup()
        groups = [(g.contactgroup_name, g.alias) for g in groups]
        return groups



@permit.route('/contact', u"联系人管理", MenuSys, is_menu=True, order=2.0001)