def get_security_zone_info(request): index = int(request.GET.get('page_index', '1')) size = int(request.GET.get('page_size', DEFAULT_PAGE_SIZE)) security_zones = securityzones_helper.get_all(request, index, size) contents = render_to_string("clusters/get_security_zone_info.tmpl", { 'security_zones': security_zones, }) return HttpResponse(json.dumps(contents), content_type="application/json")
def get_security_zones(request): index = int(request.GET.get('page_index', '1')) size = int(request.GET.get('page_size', DEFAULT_PAGE_SIZE)) security_zones = securityzones_helper.get_all(request, index, size) provider_list = baseimages_helper.get_all_providers(request) return render(request, 'clusters/security_zones.html', { 'security_zones': security_zones, 'provider_list': provider_list, 'pageIndex': index, 'pageSize': DEFAULT_PAGE_SIZE, 'disablePrevious': index <= 1, 'disableNext': len(security_zones) < DEFAULT_PAGE_SIZE, })
def get_security_zones(request): index = int(request.GET.get("page_index", "1")) size = int(request.GET.get("page_size", DEFAULT_PAGE_SIZE)) security_zones = securityzones_helper.get_all(request, index, size) provider_list = baseimages_helper.get_all_providers(request) return render( request, "clusters/security_zones.html", { "security_zones": security_zones, "provider_list": provider_list, "pageIndex": index, "pageSize": DEFAULT_PAGE_SIZE, "disablePrevious": index <= 1, "disableNext": len(security_zones) < DEFAULT_PAGE_SIZE, }, )
def get_security_zone_info(request): index = int(request.GET.get('page_index', '1')) size = int(request.GET.get('page_size', DEFAULT_PAGE_SIZE)) security_zones = securityzones_helper.get_all(request, index, size) return HttpResponse(json.dumps(security_zones), content_type="application/json")