Revision 1efe6159
b/snf-cyclades-app/synnefo/ui/static/snf/js/models.js | ||
---|---|---|
1941 | 1941 |
var m = new models.PublicKey(); |
1942 | 1942 |
|
1943 | 1943 |
// guess a name |
1944 |
var name_tpl = "public key"; |
|
1944 |
var name_tpl = "my generated public key";
|
|
1945 | 1945 |
var name = name_tpl; |
1946 | 1946 |
var name_count = 1; |
1947 | 1947 |
|
b/snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_public_keys_view.js | ||
---|---|---|
208 | 208 |
|
209 | 209 |
show_download_private: function(name, private) { |
210 | 210 |
var download_cont = this.$(".private-cont"); |
211 |
var private_download_filename = "id_rsa"; |
|
212 |
|
|
211 | 213 |
download_cont.show(); |
212 | 214 |
download_cont.find(".key-contents textarea").val(""); |
213 | 215 |
download_cont.find(".private-msg, .down-button").show(); |
... | ... | |
216 | 218 |
download_cont.find("textarea").hide(); |
217 | 219 |
download_cont.find("form").attr({action: snf.config.userdata_keys_url + '/download'}) |
218 | 220 |
download_cont.find('[name=data]').val(private); |
219 |
download_cont.find('[name=name]').val(name); |
|
221 |
download_cont.find('[name=name]').val(private_download_filename);
|
|
220 | 222 |
}, |
221 | 223 |
|
222 | 224 |
update_list_item: function(el, model) { |
b/snf-cyclades-app/synnefo/ui/userdata/views.py | ||
---|---|---|
105 | 105 |
name = request.POST.get("name", "key") |
106 | 106 |
|
107 | 107 |
response = http.HttpResponse(mimetype='application/x-pem-key') |
108 |
response['Content-Disposition'] = 'attachment; filename=%s.pem' % name
|
|
108 |
response['Content-Disposition'] = 'attachment; filename=%s' % name |
|
109 | 109 |
response.write(data) |
110 | 110 |
return response |
111 | 111 |
|
Also available in: Unified diff