示例#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))
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')))
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
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'))