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 ...@@ -7,8 +7,6 @@ COPY ./requirements.txt /app/requirements.txt
# switch working directory # switch working directory
WORKDIR /app WORKDIR /app
# RUN apk update && apk add git
# install the dependencies and packages in the requirements file # install the dependencies and packages in the requirements file
RUN pip install -r requirements.txt RUN pip install -r requirements.txt
...@@ -18,10 +16,10 @@ RUN apt-get install -y graphviz ...@@ -18,10 +16,10 @@ RUN apt-get install -y graphviz
# copy every content from the local file to the image # copy every content from the local file to the image
COPY . . COPY . .
# switch working directory
WORKDIR /app/Frontend WORKDIR /app/Frontend
# configure the container to run in an executed manner # configure the container to run in an executed manner
ENTRYPOINT [ "python" ] ENTRYPOINT [ "python" ]
# RUN chmod 644 Frontend/main.py
CMD ["main.py" ] CMD ["main.py" ]
...@@ -35,15 +35,15 @@ app.config['STATIC_FOLDER'] = STATIC_FOLDER ...@@ -35,15 +35,15 @@ app.config['STATIC_FOLDER'] = STATIC_FOLDER
DOWNLOAD_FOLDER = r'export' DOWNLOAD_FOLDER = r'export'
app.config['DOWNLOAD_FOLDER'] = DOWNLOAD_FOLDER app.config['DOWNLOAD_FOLDER'] = DOWNLOAD_FOLDER
IMAGES_FOLDER = r'images' #global variable in which the allowed file types are saved
app.config['IMAGES_FOLDER'] = IMAGES_FOLDER
FILE_TYPES = ['csv','xes'] FILE_TYPES = ['csv','xes']
#route to the index page
@app.route('/') @app.route('/')
def index(): def index():
return render_template('index.html') return render_template('index.html')
#redirect to the next page when the button on the index page is pressed
@app.route('/', methods=['POST']) @app.route('/', methods=['POST'])
def go_to_start(): def go_to_start():
return redirect(url_for('start')) return redirect(url_for('start'))
...@@ -66,6 +66,7 @@ def upload_file(): ...@@ -66,6 +66,7 @@ def upload_file():
#file is saved in the 'upload' directory. #file is saved in the 'upload' directory.
uploaded_file.save(os.path.join(app.config['UPLOAD_FOLDER'],uploaded_file.filename)) uploaded_file.save(os.path.join(app.config['UPLOAD_FOLDER'],uploaded_file.filename))
if not elog.format_check(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!') flash('Event log does not match the expected business process!')
return redirect(url_for('start')) return redirect(url_for('start'))
elif uploaded_file.filename == '': elif uploaded_file.filename == '':
...@@ -76,9 +77,8 @@ def upload_file(): ...@@ -76,9 +77,8 @@ def upload_file():
return redirect(url_for('preview', filename = uploaded_file.filename)) return redirect(url_for('preview', filename = uploaded_file.filename))
""" """
The download usage. Currently just downloads fish.jpg. The download function. Generates an event log based on the user specification -
os.path.join here is setup to point towards static folder and also point at fish.jpg. Start and End Date and Time, as well as format (csv or xes), and downloads it.
Currently it just sends a preexisting file. Meaning the generated file will have to be saved somewhere to import.
""" """
@app.route('/download/<current_time>', methods=['GET']) @app.route('/download/<current_time>', methods=['GET'])
def download(current_time): def download(current_time):
...@@ -91,6 +91,7 @@ def download(current_time): ...@@ -91,6 +91,7 @@ def download(current_time):
start_date_time = request.args.get("startTime") start_date_time = request.args.get("startTime")
end_date_time = request.args.get("endTime") end_date_time = request.args.get("endTime")
#warnings if empty
if not start_date_time: if not start_date_time:
flash('Invalid simulation period! Start Date and Time cannot be empty!') flash('Invalid simulation period! Start Date and Time cannot be empty!')
elif not end_date_time: elif not end_date_time:
...@@ -131,7 +132,9 @@ def download(current_time): ...@@ -131,7 +132,9 @@ def download(current_time):
return render_template('start.html', file_types = file_types, current_time = 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']) @app.route('/preview.html/<filename>', methods=['GET'])
def preview(filename): def preview(filename):
df = elog.convert_to_dataframe(filename) df = elog.convert_to_dataframe(filename)
...@@ -140,6 +143,9 @@ def preview(filename): ...@@ -140,6 +143,9 @@ def preview(filename):
preview_data=preview_df.to_html() preview_data=preview_df.to_html()
return render_template('preview.html', preview_data=preview_data, filename=filename, row_count=row_count) 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']) @app.route('/preview.html/<filename>', methods=['POST'])
def go_to_selection(filename): def go_to_selection(filename):
return redirect(url_for('case_id', filename=filename)) return redirect(url_for('case_id', filename=filename))
...@@ -147,19 +153,13 @@ def go_to_selection(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. 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. 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']) @app.route('/case.html/<filename>', methods=['GET'])
def case_id(filename): 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) selection = elog.get_active_cases(filename)
previewid = request.args.get("selectpreview") previewid = request.args.get("selectpreview")
state = None state = None
# preview = "../static/fish.jpg"
if previewid != None: if previewid != None:
for file in os.listdir('static/'): for file in os.listdir('static/'):
if file.startswith('preview_net'): # not to remove other images if file.startswith('preview_net'): # not to remove other images
...@@ -184,8 +184,6 @@ def send_caseid(filename): ...@@ -184,8 +184,6 @@ def send_caseid(filename):
""" """
The result page. 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']) @app.route('/result.html/<filename>/<result>', methods=['GET'])
def recommendation(result, filename): 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' %} {% extends 'base.html' %}
{% block head %} {% block head %}
...@@ -7,7 +8,7 @@ ...@@ -7,7 +8,7 @@
{% block body %} {% block body %}
<div class="contents" style='text-align:center'> <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> <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> <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: Ahmad Mannoun, Aleksandra Dimitrova, Geno Jayadi, Paula Hermenau </h2> <h2>by: Aleksandra Dimitrova, Paula Hermenau, Geno Jayadi, Ahmad Mannoun </h2>
</div> </div>
{% endblock %} {% 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' %} {% extends 'base.html' %}
...@@ -44,12 +45,13 @@ ...@@ -44,12 +45,13 @@
<div style="text-align: center;"> <div style="text-align: center;">
<!-- The preview image --> <!-- The preview image -->
{% if previewid or previewid == 0 %} {% 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> <table>
{{ state | safe }} {{ state | safe }}
</table> </table>
<!-- The preview image when a case is selected --> <!-- 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 %} {% else %}
<!-- no image --> <!-- no image -->
{% endif %} {% endif %}
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
{% block body %} {% block body %}
<div class="contents"> <div class="contents">
<header style="text-align: center;"> <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> </header>
<div style="text-align: center; padding-top: 40 px;"> <div style="text-align: center; padding-top: 40 px;">
......
<!--Here is the info page. It contains information about the app.-->
{% extends 'base.html' %} {% extends 'base.html' %}
{% block head %} {% block head %}
......
<!--Here is the Preview page. It shows a table containing the first 15 rows of the uploaded event log.-->
{% extends 'base.html' %} {% extends 'base.html' %}
{%block head%} {%block head%}
......
<!-- <!--The result page. It shows a petri-net colored with the recommendation.-->
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.
-->
{% extends 'base.html' %} {% extends 'base.html' %}
{%block head%} {%block head%}
......
...@@ -27,13 +27,6 @@ ...@@ -27,13 +27,6 @@
{% endfor %} {% endfor %}
</select> </select>
<!--
<div>
<h2>Please input the desired simulation length:</h2>
<input type="number" name="elogTime" id="elogTime"></input>
</div>
-->
<div> <div>
<p>Please input the desired simulation period: </p> <p>Please input the desired simulation period: </p>
<label for="startTime">Start Date and Time:</label> <label for="startTime">Start Date and Time:</label>
......
File added
...@@ -32,3 +32,5 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] ...@@ -32,3 +32,5 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
html_theme = 'sphinx_rtd_theme' html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static'] 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