aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/dashboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates/dashboard')
-rw-r--r--src/templates/dashboard/lab_detail.html85
-rw-r--r--src/templates/dashboard/lab_list.html31
-rw-r--r--src/templates/dashboard/landing.html114
-rw-r--r--src/templates/dashboard/multiple_select_filter_widget.html4
-rw-r--r--src/templates/dashboard/searchable_select_multiple.html8
5 files changed, 110 insertions, 132 deletions
diff --git a/src/templates/dashboard/lab_detail.html b/src/templates/dashboard/lab_detail.html
index 3c41caf..a12c5da 100644
--- a/src/templates/dashboard/lab_detail.html
+++ b/src/templates/dashboard/lab_detail.html
@@ -9,14 +9,14 @@
{% block content %}
<div class="row">
<div class="col-lg-4">
- <div class="card my-2">
+ <div class="card mb-3">
<div class="card-header d-flex">
<h4>Lab Profile</h4>
<button class="btn btn-outline-secondary ml-auto" data-toggle="collapse" data-target="#panel_overview">Expand</button>
</div>
<div class="collapse show" id="panel_overview">
- <div class="card-body">
- <table class="table">
+ <div class="overflow-auto">
+ <table class="table m-0">
<tr>
<td>Lab Name: </td>
<td>{{lab.name}}</td>
@@ -58,14 +58,14 @@
</div>
</div>
</div>
- <div class="card my-2">
+ <div class="card my-3">
<div class="card-header d-flex">
<h4 class="d-inline-block">Host Profiles</h4>
<button data-toggle="collapse" data-target="#profile_panel" class="btn btn-outline-secondary ml-auto">Expand</button>
</div>
<div class="collapse show" id="profile_panel">
- <div class="card-body">
- <table class="table">
+ <div class="overflow-auto">
+ <table class="table m-0">
{% for profile in hostprofiles %}
<tr>
<td>{{profile.name}}</td>
@@ -78,35 +78,32 @@
</div>
</div>
-
- <div class="card my-2">
+ <div class="card my-3">
<div class="card-header d-flex">
<h4 class="d-inline">Networking Capabilities</h4>
<button data-toggle="collapse" data-target="#network_panel" class="btn btn-outline-secondary ml-auto">Expand</button>
</div>
<div class="collapse show" id="network_panel">
- <div class="card-body">
- <table class="table">
- <tr>
- <td>Block Size: (number of VLANs allowed per deployment)</td><td>{{lab.vlan_manager.block_size}}</td>
- </tr>
- <tr>
- <td>Overlapping Vlans Allowed (user can pick which VLANs they wish to use): </td>
- <td>{{lab.vlan_manager.allow_overlapping}}</td>
- </tr>
- </table>
- </div>
+ <table class="table m-0">
+ <tr>
+ <td>Block Size: (number of VLANs allowed per deployment)</td><td>{{lab.vlan_manager.block_size}}</td>
+ </tr>
+ <tr>
+ <td>Overlapping Vlans Allowed (user can pick which VLANs they wish to use): </td>
+ <td>{{lab.vlan_manager.allow_overlapping|yesno:"Yes,No"}}</td>
+ </tr>
+ </table>
</div>
</div>
- <div class="card my-2">
+ <div class="card my-3">
<div class="card-header d-flex">
<h4>Images</h4>
<button data-toggle="collapse" data-target="#image_panel" class="btn btn-outline-secondary ml-auto">Expand</button>
</div>
<div class="collapse show" id="image_panel">
- <div class="card-body">
- <table class="table">
+ <div class="overflow-auto">
+ <table class="table m-0">
<tr>
<th>Name</th>
<th>Owner</th>
@@ -128,37 +125,35 @@
</div>
<div class="col-lg-8">
- <div class="card my-2">
+ <div class="card mb-3">
<div class="card-header d-flex">
<h4>Lab Hosts</h4>
<button data-toggle="collapse" data-target="#lab_hosts_panel" class="btn btn-outline-secondary ml-auto">Expand</button>
</div>
<div class="collapse show" id="lab_hosts_panel">
- <div class="card-body">
- <table class="table">
+ <table class="table m-0">
+ <tr>
+ <th>Name</th>
+ <th>Profile</th>
+ <th>Booked</th>
+ <th>Working</th>
+ <th>Vendor</th>
+ </tr>
+ {% for host in lab.host_set.all %}
<tr>
- <th>Name</th>
- <th>Profile</th>
- <th>Booked</th>
- <th>Working</th>
- <th>Vendor</th>
+ <td>{{host.labid}}</td>
+ <td>{{host.profile}}</td>
+ <td>{{host.booked|yesno:"Yes,No"}}</td>
+ {% if host.working %}
+ <td class="bg-success text-white">Yes</td>
+ {% else %}
+ <td class="bg-danger text-white">No</td>
+ {% endif %}
+ <td>{{host.vendor}}</td>
</tr>
- {% for host in lab.host_set.all %}
- <tr>
- <td>{{host.labid}}</td>
- <td>{{host.profile}}</td>
- <td>{{host.booked}}</td>
- {% if host.working %}
- <td class="bg-success text-white">{{host.working}}</td>
- {% else %}
- <td>{{host.working}}</td>
- {% endif %}
- <td>{{host.vendor}}</td>
- </tr>
- {% endfor %}
- </table>
- </div>
+ {% endfor %}
+ </table>
</div>
</div>
</div>
diff --git a/src/templates/dashboard/lab_list.html b/src/templates/dashboard/lab_list.html
index 2efebfc..ba627bc 100644
--- a/src/templates/dashboard/lab_list.html
+++ b/src/templates/dashboard/lab_list.html
@@ -1,27 +1,26 @@
{% extends "base.html" %}
{% block content %}
-<h2>Labs</h2>
<div class="row">
{% for lab in labs %}
- <div class="p-2 col-12 col-md-6 col-lg-4 col-xl-3">
+ <div class="col-12 col-md-6 col-lg-4 col-xl-3 mb-3">
<div class="card h-100">
<div class="card-header">
<h3 class="mt-2">{{lab.name}}</h3>
</div>
- <div class="p-4">
- <ul class="list-group">
- <li class="list-group-item">name: {{lab.name}}</li>
- <li class="list-group-item">description: {{lab.description}}</li>
- <li class="list-group-item">location: {{lab.location}}</li>
- {% if lab.status == 0 %}
- <li class="list-group-item">status: Up</li>
- {% elif lab.status == 100 %}
- <li class="list-group-item">status: Down for Maintenance</li>
- {% elif lab.status == 200 %}
- <li class="list-group-item">status: Down</li>
- {% endif %}
- </ul>
- <a class="btn btn-primary mt-4 w-100" href="/lab/{{lab.name}}/">Details</a>
+ <ul class="list-group list-group-flush h-100">
+ <li class="list-group-item">name: {{lab.name}}</li>
+ <li class="list-group-item">description: {{lab.description}}</li>
+ <li class="list-group-item">location: {{lab.location}}</li>
+ {% if lab.status == 0 %}
+ <li class="list-group-item">status: Up</li>
+ {% elif lab.status == 100 %}
+ <li class="list-group-item">status: Down for Maintenance</li>
+ {% elif lab.status == 200 %}
+ <li class="list-group-item">status: Down</li>
+ {% endif %}
+ </ul>
+ <div class="card-footer">
+ <a class="btn btn-primary w-100" href="/lab/{{lab.name}}/">Details</a>
</div>
</div>
</div>
diff --git a/src/templates/dashboard/landing.html b/src/templates/dashboard/landing.html
index 72f9e6e..f0fa954 100644
--- a/src/templates/dashboard/landing.html
+++ b/src/templates/dashboard/landing.html
@@ -15,74 +15,62 @@
</div>
{% csrf_token %}
-<div class="container-fluid">
- <div class="row">
- <!-- About us -->
- <div class="col-12 col-lg-6 mb-4">
- <h2 class="border-bottom">About Us:</h2>
- <p>The Lab as a Service (LaaS) project aims to help in the development and testing of LFN projects such as
- OPNFV
- by hosting hardware and providing access to the community. Currently, the only participating lab is the
- University of New Hampshire Interoperability Lab (UNH-IOL).</p>
- <p>To get started, you can request access to a server at the right. PTL's have the ability to design and
- book a
- whole block of servers with customized layer2 networks (e.g. a Pharos Pod). Read more here: <a
- href="https://wiki.opnfv.org/display/INF/Lab+as+a+Service+2.0">LaaS Wiki</a></p>
+<div class="row">
+ <!-- About us -->
+ <div class="col-12 col-lg-6 mb-4">
+ <h2 class="border-bottom">About Us</h2>
+ <p>The Lab as a Service (LaaS) project aims to help in the development and testing of LFN projects such as
+ OPNFV
+ by hosting hardware and providing access to the community. Currently, the only participating lab is the
+ University of New Hampshire Interoperability Lab (UNH-IOL).</p>
+ <p>To get started, you can request access to a server at the right. PTL's have the ability to design and
+ book a
+ whole block of servers with customized layer2 networks (e.g. a Pharos Pod). Read more here: <a
+ href="https://wiki.opnfv.org/display/INF/Lab+as+a+Service+2.0">LaaS Wiki</a></p>
+ </div>
+
+ <!-- Get started -->
+ <div class="col-12 col-lg-6 mb-4">
+ <h2 class="border-bottom">Get Started</h2>
+ {% if request.user.is_anonymous %}
+ <h4 class="text-center">
+ To get started, please log in with your <a href="/accounts/login">Linux Foundation Jira account</a>
+ </h4>
+ {% else %}
+ <p>To get started, book a server below:</p>
+ <a class="btn btn-primary btn-lg d-flex flex-column justify-content-center align-content-center border text-white p-4"
+ href="/booking/quick/">
+ Book a Server
+ </a>
+ <p class="mt-4">PTLs can use our advanced options to book multi-node pods. If you are a PTL, you may use the options
+ below:
+ </p>
+ <div class="btn-group-vertical w-100">
+ <button class="btn btn-primary" onclick="create_workflow(0)">Book a Pod</button>
+ <button class="btn btn-primary" onclick="create_workflow(1)">Design a Pod</button>
+ <button class="btn btn-primary" onclick="create_workflow(2)">Configure a Pod</button>
</div>
- <!-- Get started -->
- <div class="col-12 col-lg-6 mb-4">
- <h2 class="border-bottom">Get Started:</h2>
- {% if request.user.is_anonymous %}
- <h4 class="text-center">
- To get started, please log in with your <a href="/accounts/login">Linux Foundation Jira account</a>
- </h4>
- {% else %}
- <p>To get started, book a server below:</p>
- <a class="btn btn-primary d-flex flex-column justify-content-center align-content-center border text-white p-4"
- href="/booking/quick/">
- <h4>Book a Server</h4>
+ {% endif %}
+ </div>
+
+ <!-- Returning users -->
+ {% if not request.user.is_anonymous %}
+ <div class="col-12 col-lg-6 offset-lg-6 mb-4 mt-lg-4">
+ <h2 class="ht-4 border-bottom">Returning Users</h2>
+ <p>If you're a returning user, some of the following options may be of interest:</p>
+ <div class="btn-group-vertical w-100">
+ <button class="btn btn-primary" onclick="create_workflow(3)">Snapshot a Host</button>
+ <a class="btn btn-primary" href="{% url 'account:my-bookings' %}">
+ My Bookings
</a>
- <p class="mt-4">PTLs can use our advanced options to book multi-node pods. If you are a PTL, you may use the options
- below:
- </p>
- <div class="row">
- <div class="col-12 col-xl-4">
- <button class="btn btn-primary w-100" onclick="create_workflow(0)">Book a Pod</button>
- </div>
- <div class="col-12 col-xl-4">
- <button class="btn btn-primary w-100" onclick="create_workflow(1)">Design a Pod</button>
- </div>
- <div class="col-12 col-xl-4">
- <button class="btn btn-primary w-100" onclick="create_workflow(2)">Configure a Pod</button>
- </div>
- </div>
+ {% if manager == True %}
+ <button class="btn btn-primary" onclick="continue_workflow()">
+ Resume Workflow
+ </button>
{% endif %}
</div>
- <!-- Returning users -->
- {% if not request.user.is_anonymous %}
- <div class="col-12 col-lg-6 offset-lg-6 mb-4 mt-lg-4">
- <h2 class="ht-4 border-bottom">Returning Users:</h2>
- <p>If you're a returning user, some of the following options may be of interest:</p>
- <div class="row">
- <div class="col-12 col-xl-4">
- <button class="btn btn-primary w-100" onclick="create_workflow(3)">Snapshot a Host</button>
- </div>
- <div class="col-12 col-xl-4">
- <a class="btn btn-primary w-100" href="{% url 'account:my-bookings' %}">
- My Bookings
- </a>
- </div>
- {% if manager == True %}
- <div class="col-12 col-xl-4">
- <button class="btn btn-primary w-100" onclick="continue_workflow()">
- Resume Workflow
- </button>
- </div>
- {% endif %}
- </div>
- </div>
- {% endif %}
</div>
+ {% endif %}
</div>
<div class="hidden_form d-none" id="form_div">
diff --git a/src/templates/dashboard/multiple_select_filter_widget.html b/src/templates/dashboard/multiple_select_filter_widget.html
index aee5f23..92aa1ba 100644
--- a/src/templates/dashboard/multiple_select_filter_widget.html
+++ b/src/templates/dashboard/multiple_select_filter_widget.html
@@ -1,7 +1,7 @@
<input name="filter_field" id="filter_field" type="hidden"/>
<div class="row">
{% for object_class, object_list in display_objects %}
- <div class="col-12 col-lg-6 d-flex flex-column pt-2 mx-0 px-1">
+ <div class="col-12 col-lg-6 d-flex flex-column pt-2 mx-0">
<div class="col mx-0 border rounded py-2 flex-grow-1 d-flex flex-column">
<div class="w-100">
<h4 class="text-capitalize">{{object_class}}</h4>
@@ -36,7 +36,7 @@
</div>
<div id="dropdown_row" class="row">
- <div id="dropdown_wrapper" class="col-12 col-lg-6 d-flex flex-column pt-2 mx-0 px-1">
+ <div id="dropdown_wrapper" class="col-12 col-lg-6 d-flex flex-column pt-2 mx-0">
</div>
</div>
<script>
diff --git a/src/templates/dashboard/searchable_select_multiple.html b/src/templates/dashboard/searchable_select_multiple.html
index be51989..f7fd189 100644
--- a/src/templates/dashboard/searchable_select_multiple.html
+++ b/src/templates/dashboard/searchable_select_multiple.html
@@ -15,14 +15,10 @@
</div>
<input id="user_field" name="ignore_this" class="form-control" autocomplete="off" type="text" placeholder="{{placeholder}}" value="" oninput="searchable_select_multiple_widget.search(this.value)"
- {% if disabled %} disabled {% endif %}
- >
- </input>
+ {% if disabled %} disabled {% endif %}>
<input type="hidden" id="selector" name="{{ name }}" class="form-control d-none"
- {% if disabled %} disabled {% endif %}
- >
- </input>
+ {% if disabled %} disabled {% endif %}>
<div id="scroll_restrictor" class="d-flex pb-4 position-relative">
<div id="drop_results" class="list-group w-100 z-2 overflow-auto position-absolute mh-30vh"></div>