def radio(successfully_saved=False): if not helpers.player.is_installed(): return template("radio-instructions") radios = sorted(storage.read('radio').items()) helpers.current_tab("radio") return template("radio", radios=radios, successfully_saved=successfully_saved)
def services(): filter_favorites = request.params.get('filter_favorites') == "true" helpers.current_tab("services") if config.SERVICE_EXECUTION: services = helpers._execute("ls /etc/init.d/") services = filter(bool, services.split('\n')) favorite_services = config.SERVICES_FAVORITES if filter_favorites: services = favorite_services else: services, favorite_services = [], [] return template('services', services=services, favorite_services=favorite_services, filter_favorites=filter_favorites)
def config_edit(config_saved=False, err_msg=""): helpers.current_tab("config") return template('config', config=config, config_saved=config_saved, err_msg=err_msg)
def commands(): helpers.current_tab("commands") rows = map(helpers.Dummy, storage.read('commands')) return template('commands', rows=rows)
def index(): helpers.current_tab("index") return template("index")
def alarm(): helpers.current_tab('alarm') return template("alarms")
def about(): helpers.current_tab("about") return template('about')
def webcam(): helpers.current_tab("webcam") fswebcam_is_installed = helpers.check_program_is_installed("fswebcam") return template('webcam', fswebcam_is_installed=fswebcam_is_installed)