Пример #1
0
def root():
    return angular.template(
        'slaveloan_root.html',
        url_for('.static', filename='slaveloan_root.js'),
        machine_types=api.get_data(get_machine_classes),
        loan_request_url=url_for("slaveloan.new_loan_request"),
    )
Пример #2
0
def root():
    return angular.template(
        'slaveloan_root.html',
        url_for('.static', filename='slaveloan_root.js'),
        machine_types=api.get_data(get_machine_classes),
        loan_request_url=url_for("slaveloan.new_loan_request"),
    )
Пример #3
0
def root(branch=None):
    return angular.template(
        'clobberer.html',
        url_for('.static', filename='clobberer.js'),
        url_for('.static', filename='clobberer.css'),
        branches=api.get_data(branches),
        selected_branch=branch
    )
Пример #4
0
def root():
    return angular.template('badpenny.html',
                            url_for('.static', filename='badpenny.js'),
                            url_for('.static', filename='badpenny.css'),
                            tasks=api.get_data(list_tasks))
Пример #5
0
def test_template_no_static_folder(app):
    # fake not having a static folder
    with app.test_request_context('/'):
        app.static_folder = None
        assert_raises(RuntimeError, lambda:
                      angular.template('testtpl.html'))
Пример #6
0
def test_template_bad_dep_url(app):
    with app.test_request_context('/'):
        assert_raises(
            RuntimeError, lambda: angular.template(
                'testtpl.html', url_for('static', filename='background.jpg')))
Пример #7
0
def test_template_success(app):
    with app.test_request_context('/'):
        res = angular.template('testtpl.html',
                               url_for('static', filename='js/relengapi.js'))
        assert 'Test template' in res, res
Пример #8
0
def test_template_bad_dep_url(app):
    with app.test_request_context('/'):
        assert_raises(RuntimeError, lambda:
                      angular.template('testtpl.html',
                                       url_for('static', filename='background.jpg')))
Пример #9
0
def test_template_success(app):
    with app.test_request_context('/'):
        res = angular.template('testtpl.html',
                               url_for('static', filename='js/relengapi.js'))
        assert 'Test template' in res, res
Пример #10
0
 def angular_template():
     return angular.template('test_angular.html',
                             url_for('static', filename='test_angular.js'),
                             url_for('static', filename='test_angular.css'),
                             data=['some', 'data'])
Пример #11
0
def account():
    """Show the user information about their account"""
    return angular.template("account.html",
                            url_for('.static', filename='account.js'))
Пример #12
0
def root():
    return angular.template('tokens.html',
                            url_for('.static', filename='tokens.js'),
                            url_for('.static', filename='tokens.css'),
                            tokens=api.get_data(list_tokens))
Пример #13
0
 def angular_template():
     return angular.template('test_angular.html',
                             url_for('static', filename='test_angular.js'),
                             url_for('static', filename='test_angular.css'),
                             data=['some', 'data'])
def root():
    return angular.template('badpenny.html',
                            url_for('.static', filename='badpenny.js'),
                            url_for('.static', filename='badpenny.css'),
                            tasks=api.get_data(list_tasks))
Пример #15
0
def root():
    return angular.template('tooltool.html',
                            url_for('.static', filename='tooltool.js'),
                            url_for('.static', filename='tooltool.css'))
Пример #16
0
def account():
    """Show the user information about their account"""
    return angular.template("account.html",
                            url_for('.static', filename='account.js'))
Пример #17
0
def test_template_no_static_folder(app):
    # fake not having a static folder
    with app.test_request_context('/'):
        app.static_folder = None
        assert_raises(RuntimeError, lambda: angular.template('testtpl.html'))
Пример #18
0
def index():
    return angular.template('index.html',
                            url_for('.static', filename='treestatus.js'),
                            url_for('.static', filename='treestatus.css'),
                            stack=api.get_data(get_stack),
                            trees=api.get_data(get_trees))
Пример #19
0
def show_tree_details(tree):
    return angular.template('tree.html',
                            url_for('.static', filename='treestatus.js'),
                            url_for('.static', filename='treestatus.css'),
                            tree=api.get_data(get_tree, tree),
                            logs=api.get_data(get_logs, tree))
Пример #20
0
def root():
    return angular.template('tokens.html',
                            url_for('.static', filename='tokens.js'),
                            url_for('.static', filename='tokens.css'),
                            tokens=api.get_data(list_tokens))
Пример #21
0
def root():
    return angular.template('tooltool.html',
                            url_for('.static', filename='tooltool.js'),
                            url_for('.static', filename='tooltool.css'))