Revision 03639c6d
b/snf-cyclades-app/synnefo/ui/static/snf/css/ie7.css | ||
---|---|---|
9 | 9 |
} |
10 | 10 |
|
11 | 11 |
|
12 |
span.vm-detail { font-size: 0.9em !important } |
|
13 |
|
|
12 | 14 |
/*vm views fixes*/ |
13 | 15 |
div.vm-details { |
14 | 16 |
width: 135px; |
b/snf-cyclades-app/synnefo/ui/static/snf/js/glance_models.js | ||
---|---|---|
22 | 22 |
}, |
23 | 23 |
|
24 | 24 |
get_readable_size: function() { |
25 |
return this.get('size') > 0 ? util.readablizeBytes(this.get('size')) : "unknown"; |
|
25 |
var unknown_title = snf.config.image_deleted_size_title || "(none)"; |
|
26 |
if (this.is_deleted()) { return unknown_title } |
|
27 |
return this.get('size') > 0 ? util.readablizeBytes(this.get('size')) : unknown_title; |
|
26 | 28 |
}, |
27 | 29 |
|
28 | 30 |
display_size: function() { |
b/snf-cyclades-app/synnefo/ui/static/snf/js/models.js | ||
---|---|---|
240 | 240 |
return owner; |
241 | 241 |
} |
242 | 242 |
}, |
243 |
|
|
243 |
|
|
244 | 244 |
get_readable_size: function() { |
245 |
return this.get_size() > 0 ? util.readablizeBytes(this.get_size() * 1024 * 1024) : "unknown"; |
|
245 |
if (this.is_deleted()) { |
|
246 |
return synnefo.config.image_deleted_size_title || '(none)'; |
|
247 |
} |
|
248 |
return this.get_size() > 0 ? util.readablizeBytes(this.get_size() * 1024 * 1024) : '(none)'; |
|
246 | 249 |
}, |
247 | 250 |
|
248 | 251 |
get_os: function() { |
... | ... | |
267 | 270 |
is_public: function() { |
268 | 271 |
return this.get('is_public') || true; |
269 | 272 |
}, |
273 |
|
|
274 |
is_deleted: function() { |
|
275 |
return this.get('status') == "DELETED" |
|
276 |
}, |
|
270 | 277 |
|
271 | 278 |
ssh_keys_path: function() { |
272 | 279 |
prepend = ''; |
... | ... | |
1584 | 1591 |
callback(this.get(id)); |
1585 | 1592 |
}, this)); |
1586 | 1593 |
} else { |
1594 |
var title = synnefo.config.image_deleted_title || 'Deleted'; |
|
1587 | 1595 |
// else add a dummy DELETED state image entry |
1588 |
this.add({id:id, name:"Unknown image", size:-1,
|
|
1596 |
this.add({id:id, name:title, size:-1,
|
|
1589 | 1597 |
progress:100, status:"DELETED"}); |
1590 | 1598 |
callback(this.get(id)); |
1591 | 1599 |
} |
... | ... | |
1594 | 1602 |
} |
1595 | 1603 |
}, this), _.bind(function(image, msg, xhr) { |
1596 | 1604 |
if (!image) { |
1597 |
this.add({id:id, name:"Unknown image", size:-1, |
|
1605 |
var title = synnefo.config.image_deleted_title || 'Deleted'; |
|
1606 |
this.add({id:id, name:title, size:-1, |
|
1598 | 1607 |
progress:100, status:"DELETED"}); |
1599 | 1608 |
callback(this.get(id)); |
1600 | 1609 |
return; |
b/snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_icon_view.js | ||
---|---|---|
583 | 583 |
if (!this.visible() && this.parent.details_hidden) { return }; |
584 | 584 |
|
585 | 585 |
var image = this.vm.get_image(_.bind(function(image){ |
586 |
this.sel('image_name').text(util.truncate(image.escape('name'), 13)).attr("title", image.escape('name'));
|
|
586 |
this.sel('image_name').text(util.truncate(image.escape('name'), 17)).attr("title", image.escape('name'));
|
|
587 | 587 |
this.sel('image_size').text(image.get_readable_size()).attr('title', image.get_readable_size()); |
588 | 588 |
}, this)); |
589 | 589 |
|
b/snf-cyclades-app/synnefo/ui/templates/home.html | ||
---|---|---|
579 | 579 |
synnefo.config.media_url = '{{ UI_MEDIA_URL }}'; |
580 | 580 |
synnefo.config.js_url = '{{ SYNNEFO_JS_URL }}'; |
581 | 581 |
synnefo.config.images_url = '{{ SYNNEFO_IMAGES_URL }}'; |
582 |
synnefo.config.image_deleted_title = {{ image_deleted_title|safe }}; |
|
583 |
synnefo.config.image_deleted_size_title = {{ image_deleted_size_title|safe }}; |
|
582 | 584 |
synnefo.config.use_glance = {{ use_glance }}; |
583 | 585 |
synnefo.config.indicators_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/indicators/'; |
584 | 586 |
synnefo.config.machines_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/machines/'; |
b/snf-cyclades-app/synnefo/ui/views.py | ||
---|---|---|
74 | 74 |
SUGGESTED_ROLES = getattr(settings, "VM_CREATE_SUGGESTED_ROLES", |
75 | 75 |
SUGGESTED_ROLES_DEFAULT) |
76 | 76 |
IMAGE_ICONS = settings.IMAGE_ICONS |
77 |
IMAGE_DELETED_TITLE = getattr(settings, 'UI_IMAGE_DELETED_TITLE', |
|
78 |
'(deleted image)') |
|
79 |
IMAGE_DELETED_SIZE_TITLE = getattr(settings, 'UI_IMAGE_DELETED_SIZE_TITLE', |
|
80 |
'(none)') |
|
77 | 81 |
|
78 | 82 |
SUPPORT_SSH_OS_LIST = getattr(settings, "UI_SUPPORT_SSH_OS_LIST",) |
79 | 83 |
OS_CREATED_USERS = getattr(settings, "UI_OS_DEFAULT_USER_MAP") |
... | ... | |
163 | 167 |
'userdata_keys_limit': json.dumps(MAX_SSH_KEYS_PER_USER), |
164 | 168 |
'use_glance': json.dumps(ENABLE_GLANCE), |
165 | 169 |
'glance_api_url': json.dumps(GLANCE_API_URL), |
166 |
'system_images_owners': json.dumps(SYSTEM_IMAGES_OWNERS) |
|
170 |
'system_images_owners': json.dumps(SYSTEM_IMAGES_OWNERS), |
|
171 |
'image_deleted_title': json.dumps(IMAGE_DELETED_TITLE), |
|
172 |
'image_deleted_size_title': json.dumps(IMAGE_DELETED_SIZE_TITLE), |
|
167 | 173 |
} |
168 | 174 |
return template('home', request, context) |
169 | 175 |
|
Also available in: Unified diff