This tool is used for storing large collect files when reporting bugs via Launchpad. Simply use the tool to upload a file and then add its URL location into the Launchpad bug. You no longer need to split up large collect files and attach multiple files to your bugs. This tool is designed using Flask Web Framework, meanwhile docker is used for easy deployment. The directory /app holds the Flask application, /db contains the script for database initialization. Bash file start.sh includes the commands used for the first time docker deployment. The file update.sh let developers push their changes to the docker repository. Change the repository's name and tag accordingly, in this case it is nchen1windriver/collect and demo. A config file was added for security purpose in this commit. Change-Id: I192c3fca541f99773e0395418a9f11e01c27a5a7 Signed-off-by: Nathan Chen <nathan.chen@windriver.com>
51 lines
2.3 KiB
HTML
51 lines
2.3 KiB
HTML
{% extends "layout.html" %}
|
|
{% block title %}Sign in{% endblock %}
|
|
{% block body %}
|
|
<h2>Upload</h2>
|
|
|
|
<form action = "" method = "POST" enctype = "multipart/form-data">
|
|
<div class="form-group mb-3">
|
|
<div class="custom-file">
|
|
<input type="file" class="custom-file-input" name="file_input" id="file_input" oninput="input_filename();">
|
|
<label id="file_input_label" class="custom-file-label">Select file</label>
|
|
<div>Launchpad ID:</div>
|
|
<div><input type=text name=launchpad_id size=30 value=""></div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- <div class="form-group mb-3">-->
|
|
<!-- <div class="custom-file">-->
|
|
<!--<!– <input type = "file" name = "file" />–>-->
|
|
<!-- <input type="file" class="custom-file-input" name="file_input" id="file_input" oninput="input_filename();">-->
|
|
<!-- <label id="file_input_label" class="custom-file-label">Select file</label>-->
|
|
<!-- <div>Launchpad ID:</div>-->
|
|
<!-- <div><input type=text name=launchpad_id size=30 value=""></div>-->
|
|
<!-- </div>-->
|
|
<!-- </div>-->
|
|
|
|
<button onclick="upload('{{ request.url }}');" id="upload_btn" class="btn btn-primary">Upload</button>
|
|
<!-- <input type = "submit"/>-->
|
|
|
|
<button class="btn btn-primary d-none" id="loading_btn" type="button" disabled>
|
|
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
|
|
Uploading...
|
|
</button>
|
|
|
|
<button type="button" id="cancel_btn" class="btn btn-secondary d-none">Cancel upload</button>
|
|
</form>
|
|
|
|
<div class="modal fade" id="overwriteModal" tabindex="-1" role="dialog" aria-labelledby="overwriteModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header" style="text-align:center;">
|
|
<h4 class="modal-title" style="color:red;" id="overwriteModalLabel">Are you sure you want to overwrite this file?</h4>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
<button type="button" class="btn btn-primary" onclick="Overwrite()">Overwrite</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |