Exemplo n.º 1
0
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)
Exemplo n.º 2
0
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)
Exemplo n.º 3
0
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)
Exemplo n.º 4
0
def commands():
    helpers.current_tab("commands")
    rows = map(helpers.Dummy, storage.read('commands'))
    return template('commands', rows=rows)
Exemplo n.º 5
0
def index():
    helpers.current_tab("index")
    return template("index")
Exemplo n.º 6
0
def alarm():
    helpers.current_tab('alarm')
    return template("alarms")
Exemplo n.º 7
0
def about():
    helpers.current_tab("about")
    return template('about')
Exemplo n.º 8
0
def webcam():
    helpers.current_tab("webcam")
    fswebcam_is_installed = helpers.check_program_is_installed("fswebcam")
    return template('webcam', fswebcam_is_installed=fswebcam_is_installed)