Revision fc6f43c3
b/snf-cyclades-app/synnefo/ui/static/snf/css/main.css | ||
---|---|---|
6032 | 6032 |
height: 250px; |
6033 | 6033 |
} |
6034 | 6034 |
|
6035 |
.create-vm .image-warning { |
|
6036 |
display: none; |
|
6037 |
background-color: #987249; |
|
6038 |
color: #fff; |
|
6039 |
padding: 10px 15px; |
|
6040 |
font-size: 0.9em; |
|
6041 |
border-bottom: 1px solid #AAA; |
|
6042 |
} |
|
6043 |
|
|
6035 | 6044 |
.create-vm .create-step-cont .rename input.rename-field { |
6036 | 6045 |
font-size: 1.4em; |
6037 | 6046 |
padding: 5px; |
b/snf-cyclades-app/synnefo/ui/static/snf/js/models.js | ||
---|---|---|
261 | 261 |
return this.get('owner') || _.keys(synnefo.config.system_images_owners)[0]; |
262 | 262 |
}, |
263 | 263 |
|
264 |
is_system_image: function() { |
|
265 |
var owner = this.get_owner(); |
|
266 |
return _.include(_.keys(synnefo.config.system_images_owners), owner) |
|
267 |
}, |
|
268 |
|
|
269 |
owned_by: function(user) { |
|
270 |
if (!user) { user = synnefo.user } |
|
271 |
return user.username == this.get_owner(); |
|
272 |
}, |
|
273 |
|
|
264 | 274 |
display_owner: function() { |
265 | 275 |
var owner = this.get_owner(); |
266 | 276 |
if (_.include(_.keys(synnefo.config.system_images_owners), owner)) { |
b/snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_create_view.js | ||
---|---|---|
314 | 314 |
hide_list_loading: function() { |
315 | 315 |
this.$(".images-list-cont").removeClass("loading"); |
316 | 316 |
}, |
317 |
|
|
318 |
display_warning_for_image: function(image) { |
|
319 |
if (!image.is_system_image() && !image.owned_by(synnefo.user)) { |
|
320 |
$(".create-vm .image-warning").show(); |
|
321 |
} else { |
|
322 |
$(".create-vm .image-warning").hide(); |
|
323 |
} |
|
324 |
}, |
|
317 | 325 |
|
318 | 326 |
select_image: function(image) { |
319 | 327 |
if (image && image.get('id') && !_.include(this.images_ids, image.get('id'))) { |
... | ... | |
332 | 340 |
|
333 | 341 |
if ((!this.selected_image && image) || (this.selected_image != image)) |
334 | 342 |
this.trigger("change", image); |
343 |
this.display_warning_for_image(image); |
|
335 | 344 |
|
336 | 345 |
this.selected_image = image; |
337 | 346 |
|
b/snf-cyclades-app/synnefo/ui/templates/partials/create_vm.html | ||
---|---|---|
1 | 1 |
{% load i18n %} |
2 | 2 |
<div id="createvm-overlay-content" class="hidden create-vm"> |
3 |
|
|
4 | 3 |
<div class="steps-history clearfix"> |
5 | 4 |
<div class="steps-history-cont step1h completed step-header" |
6 | 5 |
id="vm-create-step-history-1"> |
... | ... | |
79 | 78 |
</div> |
80 | 79 |
</div> |
81 | 80 |
</div> |
81 |
<div class="image-warning"> |
|
82 |
<p> |
|
83 |
{% blocktrans %}You have selected a user-provided Image, which is not |
|
84 |
officially endorsed by ~okeanos. Please make sure it is from a |
|
85 |
trustworthy source.{% endblocktrans %} |
|
86 |
</p> |
|
87 |
</div> |
|
82 | 88 |
<div class="steps-container clearfix"> |
83 | 89 |
<div class="step-1 select-image wide create-step-cont clearfix"> |
84 | 90 |
<div class="clearfix step-header"> |
Also available in: Unified diff