aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates')
-rw-r--r--src/templates/base/base.html6
-rw-r--r--src/templates/base/booking/booking_detail.html65
-rw-r--r--src/templates/base/booking/quick_deploy.html33
-rw-r--r--src/templates/laas/base.html77
-rw-r--r--src/templates/lfedge/booking/quick_deploy.html8
5 files changed, 177 insertions, 12 deletions
diff --git a/src/templates/base/base.html b/src/templates/base/base.html
index 704bc3b..a5b79af 100644
--- a/src/templates/base/base.html
+++ b/src/templates/base/base.html
@@ -156,6 +156,12 @@
<a href="{% url 'account:my-bookings' %}" class="list-group-item list-group-item-action list-group-item-secondary dropDown-bg">
My Bookings
</a>
+ <a href="{% url 'account:my-configurations' %}" class="list-group-item list-group-item-action list-group-item-secondary dropDown-bg">
+ My Configurations
+ </a>
+ <a href="{% url 'account:my-images' %}" class="list-group-item list-group-item-action list-group-item-secondary dropDown-bg">
+ My Snapshots
+ </a>
</div>
<a href="{% url 'dashboard:all_labs' %}" class="list-group-item list-group-item-action nav-bg">
Lab Info
diff --git a/src/templates/base/booking/booking_detail.html b/src/templates/base/booking/booking_detail.html
index a014fea..4a8f35a 100644
--- a/src/templates/base/booking/booking_detail.html
+++ b/src/templates/base/booking/booking_detail.html
@@ -7,6 +7,12 @@
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js?lang=yaml"></script>
{% endblock %}
+<style>
+code {
+ overflow: scroll;
+}
+</style>
+
{% block content %}
<div class="row">
<div class="col-12 col-lg-5">
@@ -154,6 +160,65 @@
</div>
</div>
</div>
+ <div class="card my-3">
+ <div class="card-header d-flex">
+ <h4 class="d-inline">Diagnostic Information</h4>
+ <button data-toggle="collapse" data-target="#diagnostics_panel" class="btn btn-outline-secondary ml-auto">Expand</button>
+ </div>
+ <div class="collapse" id="diagnostics_panel">
+ <div class="card-body">
+ <table class="table m-0">
+ <tr>
+ <th>Job ID: </th>
+ <td>{{booking.job.id}}</td>
+ </tr>
+ <tr>
+ <th>CI Files</th>
+ </tr>
+ {% for host in booking.resource.get_resources %}
+ <tr>
+ <td>
+ <table class="table m-0">
+ <tr>
+ <th>Host:</th>
+ <td>{{host.name}}</td>
+ </tr>
+ <tr>
+ <th>Configs:</th>
+ </tr>
+ {% for ci_file in host.config.cloud_init_files.all %}
+ <tr>
+ <td>{{ci_file.id}}</td>
+ <td>
+ <div class="modal fade" id="ci_file_modal_{{ci_file.id}}" tabindex="-1" role="dialog" aria-hidden="true">
+ <div class="modal-dialog modal-xl" role="document">
+ <div class="modal-content">
+ <div class="modal-header">
+ <h4 class="modal-title d-inline float-left">Cloud Config Content</h4>
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+ <span aria-hidden="true">&times;</span>
+ </button>
+ </div>
+ <div class="card-body">
+ <pre class="prettyprint lang-yaml m-0 border-0 text-break pre-wrap">
+{{ci_file.text}}
+ </pre>
+ </div>
+ </div>
+ </div>
+ </div>
+ <button class="btn btn-primary" data-toggle="modal" data-target="#ci_file_modal_{{ci_file.id}}">Show File Content</button>
+ </td>
+ </tr>
+ {% endfor %}
+ </table>
+ </td>
+ </tr>
+ {% endfor %}
+ </table>
+ </div>
+ </div>
+ </div>
</div>
<div class="col">
<div class="card mb-3">
diff --git a/src/templates/base/booking/quick_deploy.html b/src/templates/base/booking/quick_deploy.html
index 5dc41e2..c51e234 100644
--- a/src/templates/base/booking/quick_deploy.html
+++ b/src/templates/base/booking/quick_deploy.html
@@ -3,6 +3,13 @@
{% load bootstrap4 %}
{% block content %}
+<style>
+/* hides images not in use. Not applied globally since doesn't make sense in all cases */
+select option:disabled {
+ display:none;
+}
+</style>
+
{% bootstrap_form_errors form type='non_fields' %}
<form id="quick_booking_form" action="/booking/quick/" method="POST" class="form class="Anuket-Text"">
{% csrf_token %}
@@ -18,7 +25,7 @@
</div>
</div>
<div class="row justify-content-center">
- <div class="col-12 col-lg-4 my-2">
+ <div class="col-12 col-lg-6 my-2">
<div class="col border rounded py-2 h-100">
{% bootstrap_field form.purpose %}
{% bootstrap_field form.project %}
@@ -31,19 +38,26 @@
</div>
</div>
{% block collab %}
- <div class="col-12 col-lg-4 my-2">
+ <div class="col-12 col-lg-6 my-2">
<div class="col border rounded py-2 h-100">
<label>Collaborators</label>
{{ form.users }}
</div>
</div>
{% endblock collab %}
- <div class="col-12 col-lg-4 my-2">
+ </div>
+ <div class="row justify-content-center">
+ <div class="col-12 col-lg-6 my-2">
<div class="col border rounded py-2 h-100">
{% bootstrap_field form.hostname %}
{% bootstrap_field form.image %}
</div>
</div>
+ <div class="col-12 col-lg-6 my-2">
+ <div class="col border rounded py-2 h-100">
+ {% bootstrap_field form.global_cloud_config %}
+ </div>
+ </div>
<div class="col-12 d-flex mt-2 justify-content-end">
<button id="quick_booking_confirm" onclick="submit_form();" type="button" class="btn btn-success">Confirm</button>
</div>
@@ -88,15 +102,22 @@
function imageFilter() {
var drop = document.getElementById("id_image");
var lab_pk = get_selected_value("lab");
- var host_pk = get_selected_value("resource");
+ var profile_pk = get_selected_value("resource");
for (const childNode of drop.childNodes) {
var image_object = sup_image_dict[childNode.value];
if (image_object) //weed out empty option
{
+ console.log("image object:");
+ console.log(image_object);
const img_at_lab = image_object.lab == lab_pk;
- const profiles = resource_profile_map[host_pk];
- const img_in_template = profiles && profiles.indexOf(image_object.host_profile) > -1
+ const profiles = resource_profile_map[profile_pk];
+ console.log("profiles are:");
+ console.log(profiles);
+ console.log("profile map is:");
+ console.log(resource_profile_map);
+ console.log("host profile is" + image_object.architecture);
+ const img_in_template = profiles && profiles.indexOf(image_object.architecture) > -1
childNode.disabled = !img_at_lab || !img_in_template;
}
}
diff --git a/src/templates/laas/base.html b/src/templates/laas/base.html
index 69e4976..f980268 100644
--- a/src/templates/laas/base.html
+++ b/src/templates/laas/base.html
@@ -2,11 +2,84 @@
{% load staticfiles %}
{% block logo %}
-<link rel="stylesheet" href="{% static "css/anuket.css" %}">
+<style>
+ nav ,body{
+ background-color:#fff !important;
+ color:#343a40 !important;
+ }
+
+ header{
+ background-color:#f8f9fa !important;
+ color:#343a40 !important;
+ }
+
+ .nav-bg{
+ background-color:#fff !important;
+ color:#343a40 !important;
+ }
+
+ .nav-bg:hover{
+ background-color:#f8f9fa !important;
+ transition-duration:0.2s;
+ }
+
+ .dropDown-bg{
+ background-color:#d6d8db !important;
+ color:#343a40 !important;
+ }
+
+ .btnAnuket {
+ color: #343a40;
+ background-color: #6BDAD5;
+ transition-duration:0.2s;
+ border:0px
+ }
+ .btnAnuket:hover{
+ color: #f8f9fa;
+ background-color: #007473;
+ border:0px
+ }
+
+ .btnAnuket:focus{
+ color: #f8f9fa !important;
+ background-color: #007473 !important;
+ border:0px
+ }
+
+ .alertAnuket{
+ background-color: #e6b3c1;
+ color:#820c2c;
+ border:0px;
+ }
+ .inTextLink{
+ text-decoration: underline;
+ }
+
+ .Anuket-Text{
+ color:#343a40 !important;
+ }
+
+ h1, h2{
+ color:#343a40 !important;
+ }
+
+ p, h3, h4, h5{
+ color:#343a40 !important;
+ }
+
+ ::selection {
+ background: #BCE194;
+ color:#343a40;
+ }
+ ::-moz-selection {
+ background: #BCE194;
+ color:#343a40;
+ }
+ </style>
<div class="col-12 col-sm order-1 order-sm-2 text-center text-lg-left">
<a href="https://anuket.io/" class="navbar-brand">
- <img src="{% static "img/Anuket-logo.svg" %}" alt="Anuket logo" width="134.2" height="50" style="vertical-align:middle; margin:12px 12px 12px -20px;">
+ <img src="{% static "img/Anuket-logo.svg" %}" width="134.2" height="50" style="vertical-align:middle; margin:12px 12px 12px -20px;">
</a>
<a class="navbar-brand d-none d-lg-inline Anuket-Text" href={% url 'dashboard:index' %} style="margin-left:10px; font-size:26px; vertical-align:middle;">
LaaS Dashboard
diff --git a/src/templates/lfedge/booking/quick_deploy.html b/src/templates/lfedge/booking/quick_deploy.html
index dac3815..ccafd90 100644
--- a/src/templates/lfedge/booking/quick_deploy.html
+++ b/src/templates/lfedge/booking/quick_deploy.html
@@ -11,7 +11,7 @@
</p>
{% endblock form-text %}
{% block collab %}
-<div class="col-12 col-lg-4 my-2">
+<div class="col-12 col-lg-6 my-2">
<div class="col border rounded py-2 h-100">
<label>Collaborators</label>
{{ form.users }}
@@ -21,8 +21,8 @@
{% block image_script %}
<script type="text/javascript">
- document.getElementById("id_image").disabled = true;
- document.getElementById("id_image").style.display = 'none';
- document.getElementById("id_image").previousElementSibling.style.display = 'none';
+// document.getElementById("id_image").disabled = true;
+// document.getElementById("id_image").style.display = 'none';
+// document.getElementById("id_image").previousElementSibling.style.display = 'none';
</script>
{% endblock image_script %}