Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

91 submittieren pop up unterstützt return taste falsch #104

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion quafelweb/simulation_controller/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class SimulationRequest(models.Model):

requested_runs = models.ForeignKey(
SimulationRun, on_delete=models.CASCADE, max_length=1000
) # yeah idk
)

user = models.CharField(max_length=40)
33 changes: 8 additions & 25 deletions quafelweb/simulation_controller/static/simulation.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,29 +64,8 @@

/* Confirmation page */

#confirmation_page {
position: absolute;
top: -1em;
left: 0;
width: 100%;
height: 100%;
}

#confirmation_veil {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
backdrop-filter: blur(5px);
}

#confirmation_content {
position: relative;
left: 15%;
width: 70%;
height: 90%;
border: 1px black solid;
background-color: white;
padding: 2em;
box-sizing: border-box;
Expand Down Expand Up @@ -120,7 +99,7 @@
flex-direction: column;
overflow: auto;
width: 40em;
height: 100%;
height: 20em;
}

.env_conf_entry {
Expand All @@ -146,19 +125,23 @@
#conf_hardware_container {
display: flex;
flex-direction: column;
max-height: 100%;
height: 30em;
overflow: auto;
}

.hardware_entry {
display: flex;
flex-direction: column;
margin: 0 2em 1em 2em;
margin-bottom: 1em;
}

.hardware_entry > div {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
text-align: left;
gap: 1em;
}
}

#confirmation_button {
width: 15em;
}
106 changes: 106 additions & 0 deletions quafelweb/simulation_controller/templates/confirmation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{% extends "core.html" %}


{% block head %}
{% load static %}
<link rel="stylesheet" href="{% static 'simulation.css' %}">
{% endblock%}

{% block content %}
<form id="form_content" method="post">

{% for key, value in request.POST.items %}
<input type="hidden" name="{{key}}" value="{{value}}">
{% endfor %}
<div class="page_panel">
<div id="confirmation_content">
<h2>Overview</h2>
<div id="conf_content">

<div id="conf_overview">
<div id="conf_upper_part">
<div>
<div></div>
<div><b>Start</b></div>
<div><b>End</b></div>
<div><b>Increment</b></div>
<div><b>Type</b></div>
<div><b>Total</b></div>
</div>
<div>
<div><b>Qubits</b></div>
<div>{{qubits_min}}</div>
<div>{{qubits_max}}</div>
<div>{{qubits_increment}}</div>
<div>{{qubits_increment_type}}</div>

<div>{{qubits_values|length}}</div>
</div>
<div>
<div><b>Depth</b></div>
<div>{{depth_min}}</div>
<div>{{depth_max}}</div>
<div>{{depth_increment}}</div>
<div>{{depth_increment_type}}</div>

<div>{{depth_values|length}}</div>
</div>
<div>
<div><b>Shots</b></div>
<div>{{shots_min}}</div>
<div>{{shots_max}}</div>
<div>{{shots_increment}}</div>
<div>{{shots_increment_type}}</div>

<div>{{shots_values|length}}</div>
</div>
<h3>Runs per environment: {{max_amount}}</h3>
</div>
<div id="conf_environments_container">
{% for env in selected_envs %}
<div class="env_conf_entry">
<p>{{env.0.name}}</p>
<p>{{env.1.name}}</p>
<p >{{env.2}}/{{max_amount}}</p>
</div>
{% endfor %}
</div>
<button formaction="{% url "simulation_configuration" %}">Back</button>
</div>
</div>
</div>
</div>
<div class="page_panel">
<div id="hardware_info">
<h3>Hardware authentication</h3>
<div id="conf_hardware_container">
{% for hardware in selected_hardware %}
<div class="hardware_entry">
<div>
<p><b>{{hardware.name}}</b> {{hardware.ip_addr}}</p>
</div>
<div>
<div>
<input name="NAME::{{hardware.name}}">
<span>Username</span>
</div>
<div>
<input type="password" name="PASSWORD::{{hardware.name}}">
<span>Password</span>
</div>
{% if hardware.needs_totp %}
<div>
<input name="TOTP::{{hardware.uuid}}">
<span>TOTP</span>
</div>
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
<button id="confirmation_button" formaction="{% url "submit" %}">Submit</button>
</div>
</div>
</form>
{% endblock %}
Loading
Loading