(project_name)
| 66 | |
| 67 | @html.route("/<project_name>/embed", methods=['GET']) |
| 68 | def plotembed(project_name): |
| 69 | current_app.logger.info('Plotting patch embedding:') |
| 70 | project = Project.query.filter_by(name=project_name).first() |
| 71 | if not project: |
| 72 | current_app.logger.error('No project found.') |
| 73 | return render_template("error.html") |
| 74 | |
| 75 | latest_modelid = get_latest_modelid(project_name) |
| 76 | selected_modelid = request.args.get('modelid', default=latest_modelid, type=int) |
| 77 | if selected_modelid > latest_modelid or selected_modelid < 0: |
| 78 | error_message = f"Your selected View Embed Model ID is {selected_modelid}. A valid Model ID ranges from 0 to {latest_modelid}." |
| 79 | current_app.logger.error(error_message) |
| 80 | return render_template("embed.html", project_name=project_name, data="None", |
| 81 | project_iteration=project.iteration, current_modelId=selected_modelid, |
| 82 | error_message=error_message) |
| 83 | |
| 84 | return render_template("embed.html", project_name=project_name, project_iteration=project.iteration, |
| 85 | current_modelId=selected_modelid) |
| 86 | |
| 87 | |
| 88 | @html.route("/<project_name>/embed/embed-main.js", methods=['GET']) # --- should not need this function |
nothing calls this directly
no test coverage detected