Skip to content
Snippets Groups Projects
Commit 6b872992 authored by Aleksandra Dimitrova's avatar Aleksandra Dimitrova
Browse files

user manual and team picture uploaded

parent 4fdde49a
No related branches found
No related tags found
No related merge requests found
......@@ -7,8 +7,6 @@ COPY ./requirements.txt /app/requirements.txt
# switch working directory
WORKDIR /app
# RUN apk update && apk add git
# install the dependencies and packages in the requirements file
RUN pip install -r requirements.txt
......@@ -18,10 +16,10 @@ RUN apt-get install -y graphviz
# copy every content from the local file to the image
COPY . .
# switch working directory
WORKDIR /app/Frontend
# configure the container to run in an executed manner
ENTRYPOINT [ "python" ]
# RUN chmod 644 Frontend/main.py
CMD ["main.py" ]
......@@ -35,15 +35,15 @@ app.config['STATIC_FOLDER'] = STATIC_FOLDER
DOWNLOAD_FOLDER = r'export'
app.config['DOWNLOAD_FOLDER'] = DOWNLOAD_FOLDER
IMAGES_FOLDER = r'images'
app.config['IMAGES_FOLDER'] = IMAGES_FOLDER
#global variable in which the allowed file types are saved
FILE_TYPES = ['csv','xes']
#route to the index page
@app.route('/')
def index():
return render_template('index.html')
#redirect to the next page when the button on the index page is pressed
@app.route('/', methods=['POST'])
def go_to_start():
return redirect(url_for('start'))
......@@ -66,6 +66,7 @@ def upload_file():
#file is saved in the 'upload' directory.
uploaded_file.save(os.path.join(app.config['UPLOAD_FOLDER'],uploaded_file.filename))
if not elog.format_check(uploaded_file.filename):
#if the event log is not of the right format flashes a warning
flash('Event log does not match the expected business process!')
return redirect(url_for('start'))
elif uploaded_file.filename == '':
......@@ -76,9 +77,8 @@ def upload_file():
return redirect(url_for('preview', filename = uploaded_file.filename))
"""
The download usage. Currently just downloads fish.jpg.
os.path.join here is setup to point towards static folder and also point at fish.jpg.
Currently it just sends a preexisting file. Meaning the generated file will have to be saved somewhere to import.
The download function. Generates an event log based on the user specification -
Start and End Date and Time, as well as format (csv or xes), and downloads it.
"""
@app.route('/download/<current_time>', methods=['GET'])
def download(current_time):
......@@ -91,6 +91,7 @@ def download(current_time):
start_date_time = request.args.get("startTime")
end_date_time = request.args.get("endTime")
#warnings if empty
if not start_date_time:
flash('Invalid simulation period! Start Date and Time cannot be empty!')
elif not end_date_time:
......@@ -131,7 +132,9 @@ def download(current_time):
return render_template('start.html', file_types = file_types, current_time = current_time)
"""
The preview page. Gets the first 15 rows of the uploaded file and passes them to the template in html format.
"""
@app.route('/preview.html/<filename>', methods=['GET'])
def preview(filename):
df = elog.convert_to_dataframe(filename)
......@@ -140,6 +143,9 @@ def preview(filename):
preview_data=preview_df.to_html()
return render_template('preview.html', preview_data=preview_data, filename=filename, row_count=row_count)
"""
Redirects from the preview page to the case selection page.
"""
@app.route('/preview.html/<filename>', methods=['POST'])
def go_to_selection(filename):
return redirect(url_for('case_id', filename=filename))
......@@ -147,19 +153,13 @@ def go_to_selection(filename):
"""
Route for displaying possible case IDs. It is a dropdown menu that displays the list from the python script in the dropdown menu.
There is a preview functionality, when clicked will show a preview of a generated image. It is linked to the 'preview' button in the case id page.
The generated image currently displays static images and not instantly generated ones from the backend.
Currently it displays moyai.jpg by default and fish.jpg on case 1 and 2. Will change this later.
"""
@app.route('/case.html/<filename>', methods=['GET'])
def case_id(filename):
#temporary choice of cases until I figure out where the actual function from backend is.
#give the list here in selection using functions from
selection = elog.get_active_cases(filename)
previewid = request.args.get("selectpreview")
state = None
# preview = "../static/fish.jpg"
if previewid != None:
for file in os.listdir('static/'):
if file.startswith('preview_net'): # not to remove other images
......@@ -184,8 +184,6 @@ def send_caseid(filename):
"""
The result page.
It processes "id" (for now it uses the "foo" function from input.py) using backend functions
and prints out the result immediately in the page.
"""
@app.route('/result.html/<filename>/<result>', methods=['GET'])
def recommendation(result, filename):
......
Frontend/static/OPTIS_team.jpg

216 KiB

Frontend/static/process_net.png

48.1 KiB | W: | H:

Frontend/static/process_net.png

52.8 KiB | W: | H:

Frontend/static/process_net.png
Frontend/static/process_net.png
Frontend/static/process_net.png
Frontend/static/process_net.png
  • 2-up
  • Swipe
  • Onion skin
No preview for this file type
<!--Here is the About Us page. It contains information about the project's creators.-->
{% extends 'base.html' %}
{% block head %}
......@@ -7,7 +8,7 @@
{% block body %}
<div class="contents" style='text-align:center'>
<h1>This is a project from the Chair of Process and Data Science from RWTH Aachen University</h1>
<img src="{{url_for('static',filename='moyai.jpg')}}" alt="Placeholder"> <br>
<h2>by: Ahmad Mannoun, Aleksandra Dimitrova, Geno Jayadi, Paula Hermenau </h2>
<img src="{{url_for('static',filename='OPTIS_team.jpg')}}" alt="The team" style="max-width: 50%; border: solid 20px rgb(230,241,250);"> <br>
<h2>by: Aleksandra Dimitrova, Paula Hermenau, Geno Jayadi, Ahmad Mannoun </h2>
</div>
{% endblock %}
\ No newline at end of file
<!--
Here is the case ID input page. Really straightforward as it is just one form and one input.
Here is the case ID input page. Contains the case-selection form and the case-preview form.
If a case is chosen to be previewed, shows a table and a petr-net.
-->
{% extends 'base.html' %}
......@@ -44,12 +45,13 @@
<div style="text-align: center;">
<!-- The preview image -->
{% if previewid or previewid == 0 %}
<p>Previewing case ID: {{ previewid }}</p>
<p>Previewing Case-ID: {{ previewid }}</p>
<!-- The preview table when a case is selected -->
<table>
{{ state | safe }}
</table>
<!-- The preview image when a case is selected -->
<img src="../static/preview_net.png" alt="Placeholder" style="max-width: 80%; border: solid 20px rgb(230,241,250)">
<img src="../static/preview_net.png" alt="Preview Petri-Net" style="max-width: 80%; border: solid 20px rgb(230,241,250)">
{% else %}
<!-- no image -->
{% endif %}
......
......@@ -8,7 +8,7 @@
{% block body %}
<div class="contents">
<header style="text-align: center;">
<img src="/static/OPTIS_logo3.png" alt="Placeholder" style="max-width: 50%; padding: 40px;">
<img src="/static/OPTIS_logo3.png" alt="Logo" style="max-width: 50%; padding: 40px;">
</header>
<div style="text-align: center; padding-top: 40 px;">
......
<!--Here is the info page. It contains information about the app.-->
{% extends 'base.html' %}
{% block head %}
......
<!--Here is the Preview page. It shows a table containing the first 15 rows of the uploaded event log.-->
{% extends 'base.html' %}
{%block head%}
......
<!--
The result. For now it outputs a placeholder image moyai.jpg.
"res" is the result specified by the Flask app. Use that to print out the result in the bracket.
-->
<!--The result page. It shows a petri-net colored with the recommendation.-->
{% extends 'base.html' %}
{%block head%}
......
......@@ -27,13 +27,6 @@
{% endfor %}
</select>
<!--
<div>
<h2>Please input the desired simulation length:</h2>
<input type="number" name="elogTime" id="elogTime"></input>
</div>
-->
<div>
<p>Please input the desired simulation period: </p>
<label for="startTime">Start Date and Time:</label>
......
File added
......@@ -32,3 +32,5 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment