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")
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')
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')
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')
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')