Ejemplo n.º 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}])
Ejemplo n.º 2
0
 def index(self, id_system=None):
     u"Отрисовует список всех систем-метрик"
     BasePage.index(self)
     return self.drawTemplate(templ=metrics_main,
                              data=[{
                                  'systems': self.get_systems(self)
                              }])
Ejemplo n.º 3
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()
Ejemplo n.º 4
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}])
Ejemplo n.º 5
0
 def index(self, id_system=None):
     BasePage.index(self, id_system)
     return self.drawTemplate(templ=updatenews_tmpl,
                              data=[{
                                  'searchbar': {
                                      'visible': 1,
                                      'type': 'h'
                                  }
                              }])
Ejemplo n.º 6
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
                                     }
                                 ])
Ejemplo n.º 7
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
                                 }])
Ejemplo n.º 8
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
                                     }
                                 ])
Ejemplo n.º 9
0
 def index(self, id_system=None):
     BasePage.index(self, id_system)
     self.setIfaceVar('manid',self.GetKEmployeeID())
     return self.drawTemplate(templ=index, data=[])
Ejemplo n.º 10
0
 def index(self, id_system=None):
     BasePage.index(self, id_system)
     id_system = self.getIfaceVar('id_system')
     return self.drawSubsystemList(id_system)
Ejemplo n.º 11
0
 def index(self, id_system=None):
     BasePage.index(self, id_system)
     return self.drawTemplate(templ=main, data=[])
Ejemplo n.º 12
0
 def index(self):
     BasePage.index(self)
     return self.drawTemplate(templ='equipment_main', data=[])
Ejemplo n.º 13
0
 def index(self, tid=None, tasktypeid=None, id_system=None):
     BasePage.index(self, id_system)
     self.CheckSession()
     return self.main()
Ejemplo n.º 14
0
 def index(self, id_system=None):
     BasePage.index(self, id_system)
     return self.drawTemplate(templ=webserver_tmpl,
                              data=[{
                                  'useLayers': layers.layersIsUse()
                              }])
Ejemplo n.º 15
0
 def index(self, id_system=None):
     BasePage.index(self, id_system)
     return self.drawTemplate(templ=WmConfigTmpl, data=[])