def edit_project(name): project = models.Project.get(name=name) return flask.render_template("project_edit.html.tpl", link="projects", sub_link="edit", project=project, errors={})
def new_project(): return flask.render_template( "project_new.html.tpl", link = "new_project", project = {}, errors = {} )
def files_build(name, id, path = ""): project = models.Project.get(name = name) build = models.Build.get(project = name, id = id) file_path = build.get_file_path(path) is_directory = os.path.isdir(file_path) if not is_directory: return flask.send_file(file_path) if path and not path.endswith("/"): return flask.redirect( flask.url_for( "files_build", name = name, id = id, path = path + "/" ) ) files = build.get_files(path) return flask.render_template( "build_files.html.tpl", link = "projects", sub_link = "files", project = project, build = build, path = path, files = files )
def show_project(name): project = models.Project.get(name = name) return flask.render_template( "project_show.html.tpl", link = "projects", sub_link = "info", project = project )
def list_builds(name): project = models.Project.get(name = name) return flask.render_template( "build_list.html.tpl", link = "projects", sub_link = "builds", project = project )
def show_build(name, id): project = models.Project.get(name=name) build = models.Build.get(project=name, id=id) return flask.render_template("build_show.html.tpl", link="projects", sub_link="info", project=project, build=build)
def edit_project(name): project = models.Project.get(name = name) return flask.render_template( "project_edit.html.tpl", link = "projects", sub_link = "edit", project = project, errors = {} )
def show_build(name, id): project = models.Project.get(name = name) build = models.Build.get(project = name, id = id) return flask.render_template( "build_show.html.tpl", link = "projects", sub_link = "info", project = project, build = build )
def log_build(name, id): project = models.Project.get(name=name) build = models.Build.get(project=name, id=id) log = build.get_log() log = log.decode("utf-8") return flask.render_template("build_log.html.tpl", link="projects", sub_link="log", project=project, build=build, log=log)
def create_project(): # creates the new project, using the provided arguments and # then saves it into the data source, all the validations # should be ran upon the save operation project = models.Project.new() try: project.save() except quorum.ValidationError, error: return flask.render_template("project_new.html.tpl", link="new project", project=error.model, errors=error.errors)
def create_project(): # creates the new project, using the provided arguments and # then saves it into the data source, all the validations # should be ran upon the save operation project = models.Project try: project.save() except quorum.ValidationError, error: return flask.render_template( "project_new.html.tpl", link = "new project", project = error.model, errors = error.errors )
def log_build(name, id): project = models.Project.get(name = name) build = models.Build.get(project = name, id = id) log = build.get_log() log = log.decode("utf-8") return flask.render_template( "build_log.html.tpl", link = "projects", sub_link = "log", project = project, build = build, log = log )
def update_project(name): # finds the current project and applies the provided # arguments and then saves it into the data source, # all the validations should be ran upon the save operation project = models.Project.get(name=name) project.apply() try: project.save() except quorum.ValidationError, error: return flask.render_template("project_edit.html.tpl", link="projects", sub_link="edit", project=error.model, errors=error.errors)
def update_project(name): # finds the current project and applies the provided # arguments and then saves it into the data source, # all the validations should be ran upon the save operation project = models.Project project.apply() try: project.save() except quorum.ValidationError, error: return flask.render_template( "project_edit.html.tpl", link = "projects", sub_link = "edit", project = error.model, errors = error.errors )
def files_build(name, id, path=""): project = models.Project.get(name=name) build = models.Build.get(project=name, id=id) file_path = build.get_file_path(path) is_directory = os.path.isdir(file_path) if not is_directory: return flask.send_file(file_path) if path and not path.endswith("/"): return flask.redirect( flask.url_for("files_build", name=name, id=id, path=path + "/")) files = build.get_files(path) return flask.render_template("build_files.html.tpl", link="projects", sub_link="files", project=project, build=build, path=path, files=files)
def list_projects(): return flask.render_template( "project_list.html.tpl", link = "projects" )
def list_builds(name): project = models.Project.get(name=name) return flask.render_template("build_list.html.tpl", link="projects", sub_link="builds", project=project)
def show_project(name): project = models.Project.get(name=name) return flask.render_template("project_show.html.tpl", link="projects", sub_link="info", project=project)
def new_project(): return flask.render_template("project_new.html.tpl", link="new_project", project={}, errors={})
def list_projects(): return flask.render_template("project_list.html.tpl", link="projects")