aboutsummaryrefslogtreecommitdiffstats
path: root/lib/toaster/toastergui/templates
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-09-26 13:59:31 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-28 10:45:10 +0100
commite1cca28826dfa66d905dd4daf9964564c355207e (patch)
tree44bd2794a2b1a0ea0dddd652292176eb5e0490a5 /lib/toaster/toastergui/templates
parentc8db313e907918b0df122006046b157d510ecc1d (diff)
downloadbitbake-e1cca28826dfa66d905dd4daf9964564c355207e.tar.gz
toaster: project page Implement front end feature to delete project
Add confirm modal and api calls to delete a project from the project dashboard. [YOCTO #6238] Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster/toastergui/templates')
-rw-r--r--lib/toaster/toastergui/templates/baseprojectpage.html6
-rw-r--r--lib/toaster/toastergui/templates/project.html35
-rw-r--r--lib/toaster/toastergui/templates/projecttopbar.html2
3 files changed, 28 insertions, 15 deletions
diff --git a/lib/toaster/toastergui/templates/baseprojectpage.html b/lib/toaster/toastergui/templates/baseprojectpage.html
index b3b6f1caf..8427d2521 100644
--- a/lib/toaster/toastergui/templates/baseprojectpage.html
+++ b/lib/toaster/toastergui/templates/baseprojectpage.html
@@ -34,6 +34,12 @@ $(document).ready(function(){
<li><a href="{% url 'projectlayers' project.id %}">Layers</a></li>
<li class="nav-header">Extra configuration</li>
<li><a href="{% url 'projectconf' project.id %}">BitBake variables</a></li>
+
+ <li class="nav-header">Actions</li>
+ <li>
+ <a href="#delete-project-modal" role="button" class="text-danger" data-toggle="modal" data-target="#delete-project-modal">
+ <i class="icon-trash text-danger"></i> Delete project</a>
+ </li>
</ul>
</div>
<div class="col-md-10">
diff --git a/lib/toaster/toastergui/templates/project.html b/lib/toaster/toastergui/templates/project.html
index 30ee93a76..7644dad2f 100644
--- a/lib/toaster/toastergui/templates/project.html
+++ b/lib/toaster/toastergui/templates/project.html
@@ -24,30 +24,37 @@
});
</script>
-{% comment %}
-<!-- Comment out the ability to change the project release, until we decide what to do this functionality -->
-<div id="change-release-modal" class="modal hide fade in" tabindex="-1" role="dialog" aria-labelledby="change-release-modal" aria-hidden="false">
+<div id="delete-project-modal" class="modal fade" tabindex="-1" role="dialog" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog">
<div class="modal-content">
-
<div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
- <h3>Changing Yocto Project release to <span class="proposed-release-change-name"></span></h3>
+ <h4>Are you sure you want to delete this project?</h4>
</div>
<div class="modal-body">
- <p>The following added layers do not exist for <span class="proposed-release-change-name"></span>: </p>
- <ul id="layers-to-remove-list">
- </ul>
- <p>If you change the Yocto Project release to <span class="proposed-release-change-name"></span>, the above layers will be deleted from your added layers.</p>
+ <p>Deleting the <strong class="project-name"></strong> project will remove forever:</p>
+ <ul>
+ <li>Its configuration information</li>
+ <li>Its imported layers</li>
+ <li>Its custom images</li>
+ <li>All its build information</li>
+ </ul>
</div>
<div class="modal-footer">
- <button id="change-release-and-rm-layers" data-dismiss="modal" type="submit" class="btn btn-primary">Change release and delete layers</button>
- <button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
+ <button type="button" class="btn btn-primary" id="delete-project-confirmed">
+ <span data-role="submit-state">Delete project</span>
+ <span data-role="loading-state" style="display:none">
+ <span class="fa-pulse">
+ <i class="fa-pulse icon-spinner"></i>
+ </span>
+ &nbsp;Deleting project...
+ </span>
+ </button>
+ <button type="button" class="btn btn-link" data-dismiss="modal">Cancel</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
-</div><!-- /.modal -->
-{% endcomment %}
+</div>
+
<div class="row" id="project-page" style="display:none">
<div class="col-md-6">
diff --git a/lib/toaster/toastergui/templates/projecttopbar.html b/lib/toaster/toastergui/templates/projecttopbar.html
index 2734af0c9..768ca9455 100644
--- a/lib/toaster/toastergui/templates/projecttopbar.html
+++ b/lib/toaster/toastergui/templates/projecttopbar.html
@@ -24,7 +24,7 @@
<!-- project name -->
<div class="page-header">
<h1 id="project-name-container">
- <span id="project-name">{{project.name}}</span>
+ <span class="project-name">{{project.name}}</span>
<span class="glyphicon glyphicon-edit" id="project-change-form-toggle"></i>