Example #1
0
    def index(self, id_system=None):
        BasePage.index(self, id_system)
        #Строка поиска
        searchbar={'visible':1}

        #Сохранённый develId
        # if develId is not None:
            # self.getIfaceVar('develId', develId)
        # dic = {}
        # dic['develId']=self.getIfaceVar('develId')
        #return self.drawTemplate(templ=tickets_main, data=[devel_list, dic, {'searchbar':searchbar}])

        #Одмины
        admins = {}

        dic = self.dbExec(sql="select ID_SYSTEM from ENGINE_FIND_SYSTEM_BY_FULL_REF('/ENGINE/ADMINPANEL')", fetch='one')
        if dic is not None:
            id_admin_system = dic['ID_SYSTEM']

            lst = self.dbExec(sql="select ID_USER, FIO from ENGINE_GET_SYSTEM_USERS(?)", params=[id_admin_system], fetch='all')
            admins['admins'] = lst['datalist']
        else:
            admins['admins'] = []

        return self.drawTemplate(templ=tickets_main, data=[self.get_devel_list(), self.get_base_list(), admins, {'searchbar':searchbar}])
Example #2
0
 def index(self, id_system=None):
     u"Отрисовует список всех систем-метрик"
     BasePage.index(self)
     return self.drawTemplate(templ=metrics_main,
                              data=[{
                                  'systems': self.get_systems(self)
                              }])
Example #3
0
 def __init__(self):
     BasePage.__init__(self, "act20160308", U"娘娘节美食展1-9折优惠券领取")
     self.activity_number = '20160308'
     self.capacity = web.Storage({
         '1': 20,
         '6': 50,
         '8': 2147483647,
     })
Example #4
0
 def index(self, id_system=None):
     BasePage.index(self, id_system)
     return self.drawTemplate(templ=updatenews_tmpl,
                              data=[{
                                  'searchbar': {
                                      'visible': 1,
                                      'type': 'h'
                                  }
                              }])
Example #5
0
 def index(self, id_system=None):
     BasePage.index(self, id_system)
     subtype = self.dbExec(sql='select *\
                                  from docsubtype dst\
                                       left join doctype dt on dst.doctid = dt.doctid\
                                 where dt.code = ?',
                           params=['SALE'],
                           fetch='all')['datalist']
     return self.drawTemplate(templ=index, data=[{'subtype': subtype}])
Example #6
0
 def index(self, id_system=None):
     BasePage.index(self, id_system)
     options = self.loaded_sys_options()   
     '''sesid = self.GetKSessionID()
     if not sesid:
         raise 'Попытка войти под незарегестрированным пользователем. Обратитесь к администратору!'
     self.setIfaceVar('wm_sessionid', sesid)'''
     self.setIfaceVar('pathsave', 'orderreport')
     return self.main()
Example #7
0
    def index(self, id_system=None):
        BasePage.index(self, id_system)
        #Строка поиска
        searchbar = {'visible': 1}

        return self.drawTemplate(templ=conlog_main,
                                 data=[
                                     self.get_devel_list(),
                                     self.get_base_list(), {
                                         'searchbar': searchbar
                                     }
                                 ])
Example #8
0
    def index(self, id_system=None):
        u"Отрисовует сведения о классе метрик и его методах"

        from app import mappings

        BasePage.index(self)
        root = mappings.find_map_obj(cherrypy.request.path_info)
        system = self.get_system(root)
        methods = get_methods(system)

        return self.drawTemplate(templ=metrics_metric,
                                 data=[{
                                     'system': system,
                                     'methods': methods
                                 }])
Example #9
0
    def index(self, id_system=None):
        BasePage.index(self, id_system)
        #raise cherrypy.HTTPRedirect('users')
        #return self.users() - если так, то при F5 чистится сессия, т.к. вызывается self.index
        bases = db.dbExec(
            sql=
            'select B.ID_BASE, B.DBALIAS, B.SHOW_NAME, S.IP from UPD_BASES B '
            '  left join SERVERS S on S.ID_SERVER=B.ID_SERVER '
            'order by B.ORDERBY ',
            params=(),
            fetch='all',
            id_system=-1)
        bases['datalist_bases'] = bases['datalist']
        del bases['datalist']

        modules = db.dbExec(
            sql=
            'select M.ID_MODULES, M.MALIAS, M.SHOW_NAME, S.IP from UPD_MODULES M '
            '  left join SERVERS S on S.ID_SERVER=M.ID_SERVER '
            'order by M.ORDERBY ',
            params=(),
            fetch='all',
            id_system=-1)
        modules['datalist_modules'] = modules['datalist']
        del modules['datalist']

        bond = db.dbExec(
            sql='select BO.ID_BASE, BO.ID_MODULES from UPD_BOND BO ',
            params=(),
            fetch='all',
            id_system=-1)
        bond['datalist_bond'] = bond['datalist']
        del bond['datalist']
        userfio = self.getUserVar('userfio')
        userid = self.getUserVar('uid')
        curtime = str(time.time())
        return self.drawTemplate(templ=updater_tmpl,
                                 data=[
                                     bases, modules, bond, userfio, {
                                         "userid": userid
                                     }, {
                                         "curtime": curtime
                                     }
                                 ])
Example #10
0
 def index(self, id_system=None):
     BasePage.index(self, id_system)
     self.setIfaceVar('manid',self.GetKEmployeeID())
     return self.drawTemplate(templ=index, data=[])
Example #11
0
 def index(self, id_system=None):
     BasePage.index(self, id_system)
     id_system = self.getIfaceVar('id_system')
     return self.drawSubsystemList(id_system)
Example #12
0
 def __init__(self):
     BasePage.__init__(self, "act20151111", U"学苑一楼自助早餐6.99元限时抢购")
     self.activity_number = '20151111'
     self.capacity = 600
     self.start_number = 4000
Example #13
0
 def drawTemplate(self, templ, data):
     if hasattr(self,'ifaceCode'):
         conf = self.dbExec(sql='select * from RBS_CONFIG_IFACE where iface_code = ?',params=[self.ifaceCode],fetch='all')['datalist']
         data.append({'ifaceVariables':conf})
     return BasePage.drawTemplate(self, templ, data)
Example #14
0
 def __init__(self):
     BasePage.__init__(self, "canteen", U"餐厅特色 - 哈工大饮食中心")
Example #15
0
 def __init__(self):
     BasePage.__init__(self, "generalhelp", U"常见问题 - 哈工大饮食中心")
Example #16
0
 def __init__(self):
     BasePage.__init__(self, "about", U"关于我们 - 哈工大饮食中心")
Example #17
0
 def index(self, id_system=None):
     BasePage.index(self, id_system)
     return self.drawTemplate(templ=webserver_tmpl,
                              data=[{
                                  'useLayers': layers.layersIsUse()
                              }])
Example #18
0
 def __init___(self):
     BasePage.__init__(self, "test", U"测试页面")
Example #19
0
 def __init__(self, testsetup, author):
     BasePage.__init__(self, testsetup)
     self._page_title = self._page_title % author
     self.author = author
Example #20
0
 def index(self, id_system=None):
     BasePage.index(self, id_system)
     return self.drawTemplate(templ=main, data=[])
Example #21
0
 def index(self):
     BasePage.index(self)
     return self.drawTemplate(templ='equipment_main', data=[])
Example #22
0
 def index(self, tid=None, tasktypeid=None, id_system=None):
     BasePage.index(self, id_system)
     self.CheckSession()
     return self.main()
Example #23
0
 def __init__(self):
     BasePage.__init__(self, "contactus", U"联系我们 - 哈工大饮食中心")
Example #24
0
 def __init__(self):
     BasePage.__init__(self, "feedback", U"意见反馈 - 哈工大饮食中心")
Example #25
0
 def __init__(self):
     BasePage.__init__(self, "act20151219", U"笑傲四六级, 能量加油早餐限时抢购")
     self.activity_number = '20151219'
     self.capacity = 189
     self.start_number = 80000
Example #26
0
 def __init__(self):
     BasePage.__init__(self, "home", U"哈工大饮食中心")
Example #27
0
 def index(self, id_system=None):
     BasePage.index(self, id_system)
     return self.drawTemplate(templ=WmConfigTmpl, data=[])