def listManagement(self, vendor=None, product=None): try: if product is None: # no product selected yet, so same function as /browse can be used if vendor: vendor = urllib.parse.quote_plus(vendor).lower() browseList = query.getBrowseList(vendor) vendor = browseList["vendor"] product = browseList["product"] version = None else: # product selected, product versions required version = query.getVersionsOfProduct( urllib.parse.quote_plus(product).lower()) return render_template('listmanagement.html', vendor=vendor, product=product, version=version) except redisExceptions.ConnectionError: return render_template('error.html', status={ 'except': 'redis-connection', 'info': { 'host': Configuration.getRedisHost(), 'port': Configuration.getRedisPort() } })
def api_browse(self, vendor=None): if vendor: vendor = urllib.parse.quote_plus(vendor).lower() browseList = query.getBrowseList(vendor) if isinstance(browseList, dict): return browseList else: return {}
def api_browse(self, vendor=None): if vendor: vendor = urllib.parse.quote_plus(vendor).lower() browseList = query.getBrowseList(vendor) if isinstance(browseList, dict): return browseList else: return {}
def api_browse(self, vendor=None): if vendor: vendor = urllib.parse.quote_plus(vendor).lower() try: browseList = query.getBrowseList(vendor) except redisExceptions.ConnectionError: raise(APIError("Server could not connect to the browsing repository", 503)) if isinstance(browseList, dict): return browseList else: return {}
def api_browse(self, vendor=None): if vendor: vendor = urllib.parse.quote_plus(vendor).lower() try: browseList = query.getBrowseList(vendor) except redisExceptions.ConnectionError: raise(APIError("Server could not connect to the browsing repository", 503)) if isinstance(browseList, dict): return browseList else: return {}
def browse(self, vendor=None): try: if vendor is not None: vendor = urllib.parse.quote_plus(vendor).lower() browseList = query.getBrowseList(vendor) vendor = browseList["vendor"] product = browseList["product"] return render_template('browse.html', product=product, vendor=vendor, minimal=self.minimal) except redisExceptions.ConnectionError: return render_template('error.html', minimal=self.minimal, status={'except':'redis-connection', 'info':{'host':Configuration.getRedisHost(),'port':Configuration.getRedisPort()}})
def listManagement(self, vendor=None, product=None): try: if product is None: # no product selected yet, so same function as /browse can be used if vendor: vendor = urllib.parse.quote_plus(vendor).lower() browseList = query.getBrowseList(vendor) vendor = browseList["vendor"] product = browseList["product"] version = None else: # product selected, product versions required version = query.getVersionsOfProduct(urllib.parse.quote_plus(product).lower()) return render_template('listmanagement.html', vendor=vendor, product=product, version=version) except redisExceptions.ConnectionError: return render_template('error.html', status={'except':'redis-connection', 'info':{'host':Configuration.getRedisHost(),'port':Configuration.getRedisPort()}})
def browse(self, vendor=None): try: if vendor is not None: vendor = urllib.parse.quote_plus(vendor).lower() browseList = query.getBrowseList(vendor) vendor = browseList["vendor"] product = browseList["product"] return render_template('browse.html', product=product, vendor=vendor, minimal=self.minimal) except redisExceptions.ConnectionError: return render_template('error.html', minimal=self.minimal, status={ 'except': 'redis-connection', 'info': { 'host': Configuration.getRedisHost(), 'port': Configuration.getRedisPort() } })