Exemplo n.º 1
0
def show_devices():
    if not session.get('logged_in'):
        flash('Need to login')
        return render_template('login.html')
    else:
        get_device = get_devices()
        for result in get_device.itervalues():
            if "error" in str(result):
                error = get_devices()
            else:
                error = None
        templateData = {'error': error, 'devices': get_devices()}
        return render_template('devices.html', **templateData)
Exemplo n.º 2
0
def show_devices():
	if not session.get('logged_in'):
		flash('Need to login')
		return render_template('login.html')
	else:
		get_device = get_devices()
		for result in get_device.itervalues():
			if "error" in str(result):
				error = get_devices()
			else:
				error = None
        	templateData={ 
		'error' : error,
		'devices' : get_devices()
		}
        	return render_template('devices.html', **templateData)
Exemplo n.º 3
0
def settings():
    # Pass the template data into the template dashboard.html and return it to the user
    if not session.get('logged_in'):
        flash('Need to login')
        return render_template('login.html')
    else:
        templateData = {
            'nodes': list_devices(),
            'kodi': kodi.list(),
            'zoneminder': zoneminder.list(),
            'devices': get_devices(),
            'schedule': schedule.list(),
            'schedules': schedule.lists()
        }
        return render_template('settings.html', **templateData)
Exemplo n.º 4
0
def settings():
   # Pass the template data into the template dashboard.html and return it to the user
	if not session.get('logged_in'):
                flash('Need to login')
                return render_template('login.html')
        else:
		templateData = {
		'nodes' : list_devices(),
		'kodi' : kodi.list(),
		'zoneminder' : zoneminder.list(),
		'devices' : get_devices(),
		'schedule' : schedule.list(),
		'schedules' : schedule.lists()
		}
		return render_template('settings.html', **templateData)