Browse files

Better Error feedback when there's a problem importing an LC.

Also, be more liberal with acceptable LC names.
  • Loading branch information...
1 parent 7ffde41 commit 81f8d2570420e2806e315d5b59426e3ce032465e @oldpatricka oldpatricka committed Sep 26, 2013
View
5 phantomweb/static/js/phantom_public_lc.js
@@ -104,8 +104,11 @@ function import_lc(lc_id_to_import, new_name) {
window.location.href = "/phantom/launchconfig#" + imported_lc.name;
}
- var import_lc_failure = function(error) {
+ var import_lc_failure = function(url, error) {
phantom_alert("Problem importing launch config! " + error);
+ $('a').removeClass('disabled');
+ $import_lc_name.parent().parent().show()
+ $("#importing").hide();
console.log(error);
}
View
4 phantomweb/templates/publiclaunchconfigurations.html
@@ -22,6 +22,8 @@
<h3>Import a Launch Configuration</h3>
</div>
<div class="modal-body">
+ <div id="alert-container">
+ </div>
<form class="form" id="add-lc-form">
<fieldset>
<div class="control-group" >
@@ -61,8 +63,6 @@
<div class="bar" style="width: 100%"></div>
</div>
</div>
- <div class="span10" id="alert-container">
- </div>
</div>
</div>
View
2 phantomweb/urls.py
@@ -8,7 +8,7 @@
admin.autodiscover()
DEV_VERSION = "dev"
-ACCEPTED_RESOURCE_PATTERN = "[-_.0-9A-Za-z]"
+ACCEPTED_RESOURCE_PATTERN = "[-_.0-9A-Za-z ]"
urlpatterns = patterns('',

0 comments on commit 81f8d25

Please sign in to comment.