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"), )
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 )
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'))
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')))
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 account(): """Show the user information about their account""" return angular.template("account.html", url_for('.static', filename='account.js'))
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))
def root(): return angular.template('tooltool.html', url_for('.static', filename='tooltool.js'), url_for('.static', filename='tooltool.css'))
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))
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))