예제 #1
0
 def versions(self, limit=10, offset=0):
     log.debug('version')
     version    = Version()
     c.user     = getUser()
     c.limit    = int(limit)
     c.offset   = int(offset)
     c.versions = version.getSetUser(c.limit, c.offset)
     c.total    = version.getTotalUser()
     c.length   = len(c.versions)
     self._prev_next()
     return render("admin-versions.html")
예제 #2
0
 def healthcheck(self, country="US", name=None):
     log.debug('healthcheck')
     log.debug("Getting Health Checks for country: %s %s"%(country,name))
     if name:
         c.site  = Site().getByCountryName(country, name)
         c.hosts = c.site.hosts
         prefs   = Preference().getBySiteId(c.site.id)
         if prefs:
             c.prefs = prefs.getData()
     c.info_messages = flash.pop_messages()
     return render('health-check.html')
예제 #3
0
 def keynote(self, country="US", name=None):
     log.debug('keynote')
     log.debug("Getting Keynote Data for country: %s %s"%(country,name))
     if name:
         c.site  = Site().getByCountryName(country, name)
         c.hosts = c.site.hosts
         prefs   = Preference().getBySiteId(c.site.id)
         if prefs:
             c.prefs = prefs.getData()
     c.info_messages = flash.pop_messages()
     return render('keynote.html')
예제 #4
0
 def index(self, country="US", name=None):
     log.debug('index')
     c.user  = getUser()
     c.sites = Site().getAll()
     if name:
         c.site = Site().getByCountryName(country, name)
         prefs  = Preference().getBySiteId(c.site.id)
         if prefs:
             c.prefs = prefs.getData()
     c.info_messages = flash.pop_messages()
     return render('index.html')
예제 #5
0
 def index(self, limitText='limit', limit=10, offsetText='offset', offset=0):
     log.debug('index')
     log.debug("fetching Service data")
     siteObject = Site()
     c.limit    = int(limit)
     c.offset   = int(offset)
     c.user     = getUser()
     c.sites    = siteObject.getSet(c.limit, c.offset)
     c.total    = siteObject.getTotal()
     c.monitors = Monitor().getAll()
     c.vips     = Host().getVipNames()
     c.length   = len(c.sites)
     self._prev_next()
     return render('admin.html')