def render_GET(self, request): template = 'fragments/showPlaylists_fragment.html' myRenderedCams = render(template, { 'playLists': GenericLocations(self.NodeControl).getPlayListsItems() }) return self.respondWithJSON(request, {'rendered': myRenderedCams})
def render_GET(self, request): template = 'fragments/showcams_fragment.html' # data here myLocations = FeratelLocations(self.NodeControl) allCams = myLocations.getAllAvailCameras() myRenderedCams = render(template, {'myCams': allCams}) return self.respondWithJSON(request, {'rendered': myRenderedCams})
def render_GET(self, request): users = getUserDatabase().getAllUsers() context = { 'users': users, 'capabilities': CAPABILITIES, } return render('users.html', context, request=request)
def render_GET(self, request): logger.info('Received GetCastDevices command') castDevices = self.NodeControl.getCastDevices.getCastDevices() myLocations = GenericLocations(self.NodeControl) playLists = myLocations.getPlayLists() template = 'fragments/showCastDevices_fragment.html' myRenderedCastDevices = render(template, { 'myCastDevices': castDevices, 'playLists': playLists }) return self.respondWithJSON(request, {'rendered': myRenderedCastDevices})
def render_POST(self, request): login_name = request.args['login_name'][0] password = request.args['password'][0] ps = getPortalSession(request) if not ps.login(login_name, password): error = 'login_failed' return render('login.html', {'error': error}, request=request) else: nextUrl = self.redirect or '/' if 'next' in request.args: nextUrl = request.args['next'][0] return self.redirectRelative(request, nextUrl)
def render_GET(self, request): logger.info('Received GetSecCameraNames') try: myCamVideos = SecCameraVideos(self.NodeControl) CamNames = myCamVideos.getCamNames() template = 'fragments/showCamNames_fragment.html' myRenderedCamNames = render(template, {'myCamNames': CamNames}) return self.respondWithJSON(request, {'rendered': myRenderedCamNames}) except: exception = str(traceback.format_exc()) data = {'message': 'Error during GetSecCameraNames: ' + exception} return self.respondWithJSON(request, data)
def render_GET(self, request): logger.info('Received GetSecCameraVideoIndex') try: SelectedCam = None if 'selcam' in request.args: SelectedCam = request.args.get('selcam')[0] myCamVideos = SecCameraVideos(self.NodeControl) videos = myCamVideos.getVideos(SelectedCam) template = 'fragments/showCamVideos_fragment.html' myRenderedCamVideos = render(template, {'myCamVideos': videos}) return self.respondWithJSON(request, {'rendered': myRenderedCamVideos}) except: exception = str(traceback.format_exc()) data = { 'message': 'Error during GetSecCameraVideoIndex: ' + exception } return self.respondWithJSON(request, data)
def render_GET(self, request): logger.info('Received DoRefreshCastDevices') try: self.NodeControl.getCastDevices.doDiscoverCastDevices() castDevices = self.NodeControl.getCastDevices.getCastDevices() myLocations = GenericLocations(self.NodeControl) playLists = myLocations.getPlayLists() template = 'fragments/showCastDevices_fragment.html' myRenderedCastDevices = render(template, { 'myCastDevices': castDevices, 'playLists': playLists }) return self.respondWithJSON(request, {'rendered': myRenderedCastDevices}) except: exception = str(traceback.format_exc()) data = { 'message': 'Error during DoRefreshCastDevices: ' + exception } return self.respondWithJSON(request, data)
def render_GET(self, request): template = 'fragments/showFeratelHistory_fragment.html' myLocations = FeratelLocations(self.NodeControl) myRenderedCams = render( template, {'myHist': myLocations.getFeratelIndexHistory()}) return self.respondWithJSON(request, {'rendered': myRenderedCams})
def render_GET(self, request): nextUrl = None if 'next' in request.args: nextUrl = request.args['next'][0] return render('login.html', {'next': nextUrl}, request=request)
def render_GET(self, request): return render('operational.html', request=request)
def render_GET(self, request): return render('securityCamVideos.html', request=request)
def render_GET(self, request): return render('manageplaylists.html', request=request)
def render_GET(self, request): return render('feratelHistory.html', request=request)
def render_GET(self, request): return render('config.html', request=request)
def render_GET(self, request): ps = getPortalSession(request) return render('welcome.html', {'user': ps.user}, request=request)