feature #2889: Add custom logos for templates.
The logo for a template can be selected in the template creation wizard These logos will be shown in the create vm form of the cloud provisioning view
13
install.sh
@ -338,6 +338,7 @@ SUNSTONE_DIRS="$SUNSTONE_LOCATION/routes \
|
||||
$SUNSTONE_LOCATION/public/vendor/4.0/jdpicker_1.1 \
|
||||
$SUNSTONE_LOCATION/public/vendor/4.0/jdpicker_1.1/images \
|
||||
$SUNSTONE_LOCATION/public/images \
|
||||
$SUNSTONE_LOCATION/public/images/logos \
|
||||
$SUNSTONE_LOCATION/views"
|
||||
|
||||
ONEFLOW_DIRS="$ONEFLOW_LOCATION/lib \
|
||||
@ -520,6 +521,7 @@ INSTALL_SUNSTONE_FILES=(
|
||||
SUNSTONE_PUBLIC_NEW_VENDOR_JDPICKER:$SUNSTONE_LOCATION/public/vendor/4.0/jdpicker_1.1
|
||||
SUNSTONE_PUBLIC_NEW_VENDOR_JDPICKER_IMAGES:$SUNSTONE_LOCATION/public/vendor/4.0/jdpicker_1.1/images
|
||||
SUNSTONE_PUBLIC_IMAGES_FILES:$SUNSTONE_LOCATION/public/images
|
||||
SUNSTONE_PUBLIC_LOGOS_FILES:$SUNSTONE_LOCATION/public/images/logos
|
||||
SUNSTONE_PUBLIC_LOCALE_CA:$SUNSTONE_LOCATION/public/locale/ca
|
||||
SUNSTONE_PUBLIC_LOCALE_CS_CZ:$SUNSTONE_LOCATION/public/locale/cs_CZ
|
||||
SUNSTONE_PUBLIC_LOCALE_DE:$SUNSTONE_LOCATION/public/locale/de
|
||||
@ -1628,6 +1630,17 @@ SUNSTONE_PUBLIC_IMAGES_FILES="src/sunstone/public/images/ajax-loader.gif \
|
||||
src/sunstone/public/images/sort_desc_disabled.png\
|
||||
"
|
||||
|
||||
SUNSTONE_PUBLIC_LOGOS_FILES="src/sunstone/public/images/logos/arch.png \
|
||||
src/sunstone/public/images/logos/centos.png \
|
||||
src/sunstone/public/images/logos/debian.png \
|
||||
src/sunstone/public/images/logos/fedora.png \
|
||||
src/sunstone/public/images/logos/linux.png \
|
||||
src/sunstone/public/images/logos/redhat.png \
|
||||
src/sunstone/public/images/logos/ubuntu.png \
|
||||
src/sunstone/public/images/logos/windowsxp.png \
|
||||
src/sunstone/public/images/logos/windows8.png \
|
||||
"
|
||||
|
||||
SUNSTONE_PUBLIC_LOCALE_CA="\
|
||||
src/sunstone/locale/languages/ca.js \
|
||||
src/sunstone/locale/languages/ca_datatable.txt"
|
||||
|
BIN
src/sunstone/public/images/centos-5.5.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/sunstone/public/images/debian.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
BIN
src/sunstone/public/images/logos/arch.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/sunstone/public/images/logos/centos.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/sunstone/public/images/logos/debian.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/sunstone/public/images/logos/fedora.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/sunstone/public/images/logos/linux.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/sunstone/public/images/logos/redhat.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
src/sunstone/public/images/logos/ubuntu.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/sunstone/public/images/logos/windows8.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/sunstone/public/images/logos/windowsxp.png
Normal file
After Width: | Height: | Size: 17 KiB |
@ -2238,11 +2238,11 @@ $(document).ready(function(){
|
||||
var logo;
|
||||
|
||||
if (data.TEMPLATE.LOGO) {
|
||||
logo = '<a class="th radius" href="#">'+
|
||||
'<img src="'+data.TEMPLATE.LOGO+'">'+
|
||||
'</a>';
|
||||
logo = '<span class="provision-logo" href="#">'+
|
||||
'<img src="'+data.TEMPLATE.LOGO+'">'+
|
||||
'</span>';
|
||||
} else {
|
||||
logo = '<span style="font-size: 40px">'+
|
||||
logo = '<span style="color: #bfbfbf; font-size: 87px;">'+
|
||||
'<i class="fa fa-fw fa-file-text-o"/>'+
|
||||
'</span>';
|
||||
}
|
||||
@ -2252,7 +2252,7 @@ $(document).ready(function(){
|
||||
'<li class="provision-title" title="'+data.NAME+'">'+
|
||||
data.NAME+
|
||||
'</li>'+
|
||||
'<li class="provision-bullet-item">'+
|
||||
'<li style="height: 120px" class="provision-bullet-item">'+
|
||||
logo +
|
||||
'</li>'+
|
||||
'<li class="provision-bullet-item">'+
|
||||
@ -2314,11 +2314,11 @@ $(document).ready(function(){
|
||||
var logo;
|
||||
|
||||
if (data.TEMPLATE.LOGO) {
|
||||
logo = '<a class="th radius" href="#">'+
|
||||
'<img src="'+data.TEMPLATE.LOGO+'">'+
|
||||
'</a>';
|
||||
logo = '<span class="provision-logo" href="#">'+
|
||||
'<img src="'+data.TEMPLATE.LOGO+'">'+
|
||||
'</span>';
|
||||
} else {
|
||||
logo = '<span style="font-size: 40px">'+
|
||||
logo = '<span style="color: #bfbfbf; font-size: 87px;">'+
|
||||
'<i class="fa fa-fw fa-file-text-o"/>'+
|
||||
'</span>';
|
||||
}
|
||||
@ -2328,7 +2328,7 @@ $(document).ready(function(){
|
||||
'<li class="provision-title" title="'+data.NAME+'">'+
|
||||
data.NAME+
|
||||
'</li>'+
|
||||
'<li class="provision-bullet-item">'+
|
||||
'<li style="height: 120px" class="provision-bullet-item">'+
|
||||
logo +
|
||||
'</li>'+
|
||||
'<li class="provision-bullet-item">'+
|
||||
@ -2397,11 +2397,11 @@ $(document).ready(function(){
|
||||
var logo;
|
||||
|
||||
if (data.TEMPLATE.LOGO) {
|
||||
logo = '<a class="th radius" href="#">'+
|
||||
'<img src="'+data.TEMPLATE.LOGO+'">'+
|
||||
'</a>';
|
||||
logo = '<span class="provision-logo" href="#">'+
|
||||
'<img src="'+data.TEMPLATE.LOGO+'">'+
|
||||
'</span>';
|
||||
} else {
|
||||
logo = '<span style="font-size: 40px">'+
|
||||
logo = '<span style="color: #bfbfbf; font-size: 87px;">'+
|
||||
'<i class="fa fa-fw fa-file-text-o"/>'+
|
||||
'</span>';
|
||||
}
|
||||
@ -2411,7 +2411,7 @@ $(document).ready(function(){
|
||||
'<li class="provision-title" title="'+data.NAME+'">'+
|
||||
data.NAME+
|
||||
'</li>'+
|
||||
'<li class="provision-bullet-item">'+
|
||||
'<li style="height: 120px" class="provision-bullet-item">'+
|
||||
logo +
|
||||
'</li>'+
|
||||
'<li class="provision-bullet-item">'+
|
||||
|
@ -593,19 +593,45 @@ function updateTemplatesView(request, templates_list){
|
||||
|
||||
function generate_capacity_tab_content() {
|
||||
var html = '<div class="row vm_param">'+
|
||||
'<div id="template_name_form" class="large-12 columns">'+
|
||||
'<label for="NAME">'+tr("Name")+'\
|
||||
<span class="tip">'+tr("Name that the VM will get for description purposes.")+'</span>\
|
||||
</label>'+
|
||||
'<input type="text" id="NAME" name="name"/>'+
|
||||
'<div class="large-8 columns">'+
|
||||
'<div class="row collapse">'+
|
||||
'<div id="template_name_form" class="large-12 columns">'+
|
||||
'<label for="NAME">'+tr("Name")+'\
|
||||
<span class="tip">'+tr("Name that the VM will get for description purposes.")+'</span>\
|
||||
</label>'+
|
||||
'<input type="text" id="NAME" name="name"/>'+
|
||||
'</div>'+
|
||||
'<div class="large-12 columns">'+
|
||||
'<label for="DESCRIPTION">'+tr("Description")+'\
|
||||
<span class="tip">'+tr("Description of the template")+'</span>\
|
||||
</label>'+
|
||||
'<textarea type="text" id="DESCRIPTION" name="DESCRIPTION" style="height: 100px;"/>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div class="row">'+
|
||||
'<div class="large-12 columns">'+
|
||||
'<label for="DESCRIPTION">'+tr("Description")+'\
|
||||
<span class="tip">'+tr("Description of the template")+'</span>\
|
||||
</label>'+
|
||||
'<textarea type="text" id="DESCRIPTION" name="DESCRIPTION"/>'+
|
||||
'<div class="large-4 columns">'+
|
||||
'<div class="row collapse">'+
|
||||
'<div class="large-12 columns">'+
|
||||
'<label for="LOGO">'+tr("Logo")+'\
|
||||
<span class="tip">'+tr("Logo for the template.")+'</span>\
|
||||
</label>'+
|
||||
'<select id="LOGO" name="LOGO">'+
|
||||
'<option value="">'+tr("")+'</option>'+
|
||||
'<option value="images/logos/arch.png">'+tr("Arch Linux")+'</option>'+
|
||||
'<option value="images/logos/centos.png">'+tr("CentOS")+'</option>'+
|
||||
'<option value="images/logos/debian.png">'+tr("Debian")+'</option>'+
|
||||
'<option value="images/logos/fedora.png">'+tr("Fedora")+'</option>'+
|
||||
'<option value="images/logos/linux.png">'+tr("Linux")+'</option>'+
|
||||
'<option value="images/logos/redhat.png">'+tr("Redhat")+'</option>'+
|
||||
'<option value="images/logos/ubuntu.png">'+tr("Ubuntu")+'</option>'+
|
||||
'<option value="images/logos/windowsxp.png">'+tr("Windows XP/2003")+'</option>'+
|
||||
'<option value="images/logos/windows8.png">'+tr("Windows 8")+'</option>'+
|
||||
'</select>'+
|
||||
'</div>'+
|
||||
'<div id="template_create_logo" class="large-12 columns" style="margin-bottom: 15px">'+
|
||||
'</div>'+
|
||||
'<br>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div class="vm_param">'+
|
||||
@ -688,6 +714,13 @@ function setup_capacity_tab_content(capacity_section) {
|
||||
return false;
|
||||
});
|
||||
|
||||
capacity_section.on("change", "#LOGO", function(){
|
||||
$("#template_create_logo",capacity_section).show();
|
||||
$("#template_create_logo",capacity_section).html('<a class="th radius" href="#">'+
|
||||
'<img src="' + $(this).val() + '">'+
|
||||
'</a>');
|
||||
});
|
||||
|
||||
// Define the cpu slider
|
||||
|
||||
var cpu_input = $( "#CPU", capacity_section);
|
||||
@ -3640,6 +3673,7 @@ function initialize_create_template_dialog(dialog) {
|
||||
|
||||
addSectionJSON(vm_json,$('#capacityTab',dialog));
|
||||
vm_json["DESCRIPTION"] = $('#DESCRIPTION',$('#capacityTab',dialog)).val();
|
||||
vm_json["LOGO"] = $('#LOGO',$('#capacityTab',dialog)).val();
|
||||
|
||||
//
|
||||
// OS
|
||||
@ -3924,7 +3958,6 @@ function fillTemplatePopUp(template, dialog){
|
||||
$("#DESCRIPTION", capacity_section).val(template["DESCRIPTION"]);
|
||||
delete template["DESCRIPTION"];
|
||||
|
||||
|
||||
//
|
||||
// DISKS
|
||||
//
|
||||
|
@ -847,3 +847,8 @@ hr {
|
||||
}
|
||||
|
||||
|
||||
.provision-logo img {
|
||||
padding: 10px;
|
||||
background: #f7f7f7;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|