mirror of
https://github.com/donl/gPanel.git
synced 2026-05-25 22:06:55 -06:00
refactoring listing bundles on server
This commit is contained in:
parent
32d0876aae
commit
5aba3b60dd
3 changed files with 4 additions and 7 deletions
|
|
@ -17,7 +17,6 @@ func List(res http.ResponseWriter, req *http.Request, logger *log.Logger, bundle
|
|||
}
|
||||
|
||||
if len(bundles) <= 0 {
|
||||
logger.Println("no bundles :: http response returns no content")
|
||||
res.WriteHeader(http.StatusNoContent)
|
||||
return true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,10 +19,9 @@ jQuery('._js_bundles-manage').on('click', function(e){
|
|||
else {
|
||||
manageBundlesModal.find('.modal-body').html("An error has occurred. Please try again. If problem persists contact server administrator.")
|
||||
}
|
||||
manageBundlesModal.modal('show');
|
||||
}
|
||||
else if(xhr.status == 204) {
|
||||
manageBundlesModal.modal('show');
|
||||
manageBundlesModal.find('.modal-body').html("<p>No bundles current exist on the server.</p>")
|
||||
}
|
||||
else {
|
||||
if(xhr.response != undefined && xhr.response.length != 0) {
|
||||
|
|
@ -31,7 +30,8 @@ jQuery('._js_bundles-manage').on('click', function(e){
|
|||
else {
|
||||
manageBundlesModal.find('.modal-body').html(xhr.status + " Error!")
|
||||
}
|
||||
manageBundlesModal.modal('show');
|
||||
}
|
||||
}
|
||||
|
||||
manageBundlesModal.modal('show');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -74,9 +74,7 @@
|
|||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>No bundles current exist on the server.</p>
|
||||
</div>
|
||||
<div class="modal-body"></div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue