mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-20 10:50:08 +03:00
Merge branch 'feature-1004'
Conflicts: src/sunstone/public/js/plugins/images-tab.js
This commit is contained in:
commit
64ddd8f4c2
26
install.sh
26
install.sh
@ -253,6 +253,9 @@ SUNSTONE_DIRS="$SUNSTONE_LOCATION/models \
|
||||
$SUNSTONE_LOCATION/public/js/plugins \
|
||||
$SUNSTONE_LOCATION/public/js/user-plugins \
|
||||
$SUNSTONE_LOCATION/public/css \
|
||||
$SUNSTONE_LOCATION/public/locale \
|
||||
$SUNSTONE_LOCATION/public/locale/en_US \
|
||||
$SUNSTONE_LOCATION/public/locale/ru \
|
||||
$SUNSTONE_LOCATION/public/vendor \
|
||||
$SUNSTONE_LOCATION/public/vendor/jQueryLayout \
|
||||
$SUNSTONE_LOCATION/public/vendor/dataTables \
|
||||
@ -426,6 +429,8 @@ INSTALL_SUNSTONE_FILES=(
|
||||
SUNSTONE_PUBLIC_VENDOR_JQUERYLAYOUT:$SUNSTONE_LOCATION/public/vendor/jQueryLayout
|
||||
SUNSTONE_PUBLIC_VENDOR_FLOT:$SUNSTONE_LOCATION/public/vendor/flot
|
||||
SUNSTONE_PUBLIC_IMAGES_FILES:$SUNSTONE_LOCATION/public/images
|
||||
SUNSTONE_PUBLIC_LOCALE_EN_US:$SUNSTONE_LOCATION/public/locale/en_US
|
||||
SUNSTONE_PUBLIC_LOCALE_RU:$SUNSTONE_LOCATION/public/locale/ru
|
||||
)
|
||||
|
||||
INSTALL_SUNSTONE_ETC_FILES=(
|
||||
@ -1046,7 +1051,8 @@ SUNSTONE_PUBLIC_JS_FILES="src/sunstone/public/js/layout.js \
|
||||
src/sunstone/public/js/login.js \
|
||||
src/sunstone/public/js/sunstone.js \
|
||||
src/sunstone/public/js/sunstone-util.js \
|
||||
src/sunstone/public/js/opennebula.js"
|
||||
src/sunstone/public/js/opennebula.js \
|
||||
src/sunstone/public/js/locale.js"
|
||||
|
||||
SUNSTONE_PUBLIC_JS_PLUGINS_FILES="\
|
||||
src/sunstone/public/js/plugins/dashboard-tab.js \
|
||||
@ -1058,7 +1064,8 @@ SUNSTONE_PUBLIC_JS_PLUGINS_FILES="\
|
||||
src/sunstone/public/js/plugins/users-tab.js \
|
||||
src/sunstone/public/js/plugins/vms-tab.js \
|
||||
src/sunstone/public/js/plugins/acls-tab.js \
|
||||
src/sunstone/public/js/plugins/vnets-tab.js"
|
||||
src/sunstone/public/js/plugins/vnets-tab.js \
|
||||
src/sunstone/public/js/plugins/config-tab.js"
|
||||
|
||||
SUNSTONE_PUBLIC_CSS_FILES="src/sunstone/public/css/application.css \
|
||||
src/sunstone/public/css/layout.css \
|
||||
@ -1129,6 +1136,16 @@ SUNSTONE_PUBLIC_IMAGES_FILES="src/sunstone/public/images/ajax-loader.gif \
|
||||
src/sunstone/public/images/green_bullet.png \
|
||||
src/sunstone/public/images/vnc_off.png \
|
||||
src/sunstone/public/images/vnc_on.png"
|
||||
|
||||
SUNSTONE_PUBLIC_LOCALE_EN_US="\
|
||||
src/sunstone/public/locale/en_US/en_US.js \
|
||||
"
|
||||
|
||||
SUNSTONE_PUBLIC_LOCALE_RU="
|
||||
src/sunstone/public/locale/ru/ru.js \
|
||||
src/sunstone/public/locale/ru/ru_datatable.txt"
|
||||
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Ozones files
|
||||
@ -1189,8 +1206,9 @@ OZONES_PUBLIC_JS_FILES="src/ozones/Server/public/js/ozones.js \
|
||||
src/ozones/Server/public/js/ozones-util.js \
|
||||
src/sunstone/public/js/layout.js \
|
||||
src/sunstone/public/js/sunstone.js \
|
||||
src/sunstone/public/js/sunstone-util.js"
|
||||
|
||||
src/sunstone/public/js/sunstone-util.js \
|
||||
src/sunstone/public/js/locale.js"
|
||||
|
||||
OZONES_PUBLIC_CSS_FILES="src/ozones/Server/public/css/application.css \
|
||||
src/ozones/Server/public/css/layout.css \
|
||||
src/ozones/Server/public/css/login.css"
|
||||
|
@ -45,3 +45,7 @@
|
||||
:user:
|
||||
:group:
|
||||
oneadmin: true
|
||||
- plugins/config-tab.js:
|
||||
:ALL: true
|
||||
:user:
|
||||
:group:
|
||||
|
@ -17,4 +17,7 @@
|
||||
|
||||
# VNC Configuration
|
||||
:vnc_proxy_base_port: 29876
|
||||
:novnc_path:
|
||||
:novnc_path:
|
||||
|
||||
# Default language setting
|
||||
:lang: en_US
|
||||
|
@ -64,7 +64,7 @@ module OpenNebulaJSON
|
||||
end
|
||||
|
||||
def update(params=Hash.new)
|
||||
super(params['raw_template'])
|
||||
super(params['template_raw'])
|
||||
end
|
||||
|
||||
def addgroup(params=Hash.new)
|
||||
|
88
src/sunstone/public/js/locale.js
Normal file
88
src/sunstone/public/js/locale.js
Normal file
@ -0,0 +1,88 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org) */
|
||||
/* */
|
||||
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
|
||||
/* not use this file except in compliance with the License. You may obtain */
|
||||
/* a copy of the License at */
|
||||
/* */
|
||||
/* http://www.apache.org/licenses/LICENSE-2.0 */
|
||||
/* */
|
||||
/* Unless required by applicable law or agreed to in writing, software */
|
||||
/* distributed under the License is distributed on an "AS IS" BASIS, */
|
||||
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
|
||||
/* See the License for the specific language governing permissions and */
|
||||
/* limitations under the License. */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
var lang=""
|
||||
var locale = {};
|
||||
var datatable_lang = "";
|
||||
|
||||
function tr(str){
|
||||
var tmp = locale[str];
|
||||
if ( tmp == null || tmp == "" ) {
|
||||
//console.debug("Missing translation: "+str);
|
||||
tmp = str;
|
||||
}
|
||||
return tmp;
|
||||
};
|
||||
|
||||
//Pops up loading new language dialog. Retrieves the user template, updates the LANG variable.
|
||||
//Updates template and session configuration and reloads the view.
|
||||
function setLang(lang_str){
|
||||
var lang_tmp="";
|
||||
var dialog = $('<div title="'+tr("Changing language")+'">'+tr("Loading new language... please wait")+' '+spinner+'</div>').dialog({
|
||||
draggable:false,
|
||||
modal:true,
|
||||
resizable:false,
|
||||
buttons:{},
|
||||
width: 460,
|
||||
minHeight: 50
|
||||
|
||||
});
|
||||
|
||||
var updateUserTemplate = function(request,user_json){
|
||||
var template = user_json.USER.TEMPLATE;
|
||||
var template_str="";
|
||||
template["LANG"] = lang_tmp;
|
||||
|
||||
//convert json to ONE template format - simple conversion
|
||||
$.each(template,function(key,value){
|
||||
template_str += (key + '=' + '"' + value + '"\n');
|
||||
});
|
||||
|
||||
var obj = {
|
||||
data: {
|
||||
id: uid,
|
||||
extra_param: template_str
|
||||
},
|
||||
error: onError
|
||||
};
|
||||
OpenNebula.User.update(obj);
|
||||
$.post('config',JSON.stringify({lang:lang_tmp}),function(){window.location.href = "."});
|
||||
|
||||
};
|
||||
|
||||
lang_tmp = lang_str;
|
||||
|
||||
if (whichUI() == "sunstone"){
|
||||
var obj = {
|
||||
data : {
|
||||
id: uid,
|
||||
},
|
||||
success: updateUserTemplate
|
||||
};
|
||||
OpenNebula.User.show(obj);
|
||||
} else {
|
||||
dialog.dialog('close');
|
||||
};
|
||||
};
|
||||
|
||||
$(document).ready(function(){
|
||||
//Update static translations
|
||||
$('#doc_link').text(tr("Documentation"));
|
||||
$('#support_link').text(tr("Support"));
|
||||
$('#community_link').text(tr("Community"));
|
||||
$('#welcome').text(tr("Welcome"));
|
||||
$('#logout').text(tr("Sign out"));
|
||||
});
|
@ -25,12 +25,12 @@ var acls_tab_content =
|
||||
<table id="datatable_acls" class="display">\
|
||||
<thead>\
|
||||
<tr>\
|
||||
<th class="check"><input type="checkbox" class="check_all" value="">All</input></th>\
|
||||
<th>ID</th>\
|
||||
<th>Applies to</th>\
|
||||
<th>Affected resources</th>\
|
||||
<th>Resource ID / Owned by</th>\
|
||||
<th>Allowed operations</th>\
|
||||
<th class="check"><input type="checkbox" class="check_all" value="">'+tr("All")+'</input></th>\
|
||||
<th>'+tr("ID")+'</th>\
|
||||
<th>'+tr("Applies to")+'</th>\
|
||||
<th>'+tr("Affected resources")+'</th>\
|
||||
<th>'+tr("Resource ID / Owned by")+'</th>\
|
||||
<th>'+tr("Allowed operations")+'</th>\
|
||||
</tr>\
|
||||
</thead>\
|
||||
<tbody id="tbodyaclss">\
|
||||
@ -42,48 +42,48 @@ var create_acl_tmpl =
|
||||
'<form id="create_acl_form" action="">\
|
||||
<fieldset>\
|
||||
<div>\
|
||||
<label for="applies">This rule applies to:</label>\
|
||||
<label for="applies">'+tr("This rule applies to")+':</label>\
|
||||
<select name="applies" id="applies"></select>\
|
||||
<div class="clear"></div>\
|
||||
<label style="height:9em">Affected resources:</label>\
|
||||
<input type="checkbox" name="res_host" class="resource_cb" value="HOST">Hosts</input><br />\
|
||||
<input type="checkbox" name="res_vm" class="resource_cb" value="VM">Virtual Machines</input><br />\
|
||||
<input type="checkbox" name="res_net" class="resource_cb" value="NET">Virtual Networks</input><br />\
|
||||
<input type="checkbox" name="res_image" class="resource_cb" value="IMAGE">Images</input><br />\
|
||||
<input type="checkbox" name="res_template" class="resource_cb" value="TEMPLATE">Templates</input><br />\
|
||||
<input type="checkbox" name="res_user" class="resource_cb" value="USER">Users</input><br />\
|
||||
<input type="checkbox" name="res_group" class="resource_cb" value="GROUP">Groups</input><br />\
|
||||
<label style="height:9em">'+tr("Affected resources")+':</label>\
|
||||
<input type="checkbox" name="res_host" class="resource_cb" value="HOST">'+tr("Hosts")+'</input><br />\
|
||||
<input type="checkbox" name="res_vm" class="resource_cb" value="VM">'+tr("Virtual Machines")+'</input><br />\
|
||||
<input type="checkbox" name="res_net" class="resource_cb" value="NET">'+tr("Virtual Networks")+'</input><br />\
|
||||
<input type="checkbox" name="res_image" class="resource_cb" value="IMAGE">'+tr("Images")+'</input><br />\
|
||||
<input type="checkbox" name="res_template" class="resource_cb" value="TEMPLATE">'+tr("Templates")+'</input><br />\
|
||||
<input type="checkbox" name="res_user" class="resource_cb" value="USER">'+tr("Users")+'</input><br />\
|
||||
<input type="checkbox" name="res_group" class="resource_cb" value="GROUP">'+tr("Groups")+'</input><br />\
|
||||
<div class="clear"></div>\
|
||||
<label for="mode_select" style="height:3em;">Resource subset:</label>\
|
||||
<input type="radio" class="res_subgroup" name="mode_select" value="*" id="res_subgroup_all">All</input><br />\
|
||||
<input type="radio" class="res_subgroup" name="mode_select" value="res_id" id="res_subgroup_id">Specific ID</input><br />\
|
||||
<input type="radio" class="res_subgroup" name="mode_select" value="belonging_to" id="res_subgroup_group">Owned by group</input><br />\
|
||||
<label for="mode_select" style="height:3em;">'+tr("Resource subset")+':</label>\
|
||||
<input type="radio" class="res_subgroup" name="mode_select" value="*" id="res_subgroup_all">'+tr("All")+'</input><br />\
|
||||
<input type="radio" class="res_subgroup" name="mode_select" value="res_id" id="res_subgroup_id">'+tr("Specific ID")+'</input><br />\
|
||||
<input type="radio" class="res_subgroup" name="mode_select" value="belonging_to" id="res_subgroup_group">'+tr("Owned by group")+'</input><br />\
|
||||
<div class="clear"></div>\
|
||||
<label for="res_id">Resource ID:</label>\
|
||||
<label for="res_id">'+tr("Resource ID")+':</label>\
|
||||
<input type="text" name="res_id" id="res_id"></input>\
|
||||
<div class="clear"></div>\
|
||||
<label for="belonging_to">Group:</label>\
|
||||
<label for="belonging_to">'+tr("Group")+':</label>\
|
||||
<select name="belonging_to" id="belonging_to"></select>\
|
||||
<div class="clear"></div>\
|
||||
<label style="height:12em;">Allowed operations:</label>\
|
||||
<input type="checkbox" name="right_create" class="right_cb" value="CREATE">Create</input><br />\
|
||||
<input type="checkbox" name="right_delete" class="right_cb" value="DELETE">Delete</input><br />\
|
||||
<input type="checkbox" name="right_use" class="right_cb" value="USE">Use</input><br />\
|
||||
<input type="checkbox" name="right_manage" class="right_cb" value="MANAGE">Manage</input><br />\
|
||||
<input type="checkbox" name="right_info" class="right_cb" value="INFO">Get Information</input><br />\
|
||||
<input type="checkbox" name="right_info_pool" class="right_cb" value="INFO_POOL">Get Pool of resources</input><br />\
|
||||
<input type="checkbox" name="right_info_pool_mine" class="right_cb" value="INFO_POOL_MINE">Get Pool of my/group\'s resources</input><br />\
|
||||
<input type="checkbox" name="right_chown" class="right_cb" value="CHOWN">Change owner</input><br />\
|
||||
<input type="checkbox" name="right_deploy" class="right_cb" value="DEPLOY">Deploy</input><br />\
|
||||
<label style="height:12em;">'+tr("Allowed operations")+':</label>\
|
||||
<input type="checkbox" name="right_create" class="right_cb" value="CREATE">'+tr("Create")+'</input><br />\
|
||||
<input type="checkbox" name="right_delete" class="right_cb" value="DELETE">'+tr("Delete")+'</input><br />\
|
||||
<input type="checkbox" name="right_use" class="right_cb" value="USE">'+tr("Use")+'</input><br />\
|
||||
<input type="checkbox" name="right_manage" class="right_cb" value="MANAGE">'+tr("Manage")+'</input><br />\
|
||||
<input type="checkbox" name="right_info" class="right_cb" value="INFO">'+tr("Get Information")+'</input><br />\
|
||||
<input type="checkbox" name="right_info_pool" class="right_cb" value="INFO_POOL">'+tr("Get Pool of resources")+'</input><br />\
|
||||
<input type="checkbox" name="right_info_pool_mine" class="right_cb" value="INFO_POOL_MINE">'+tr("Get Pool of my/group\'s resources")+'</input><br />\
|
||||
<input type="checkbox" name="right_chown" class="right_cb" value="CHOWN">'+tr("Change owner")+'</input><br />\
|
||||
<input type="checkbox" name="right_deploy" class="right_cb" value="DEPLOY">'+tr("Deploy")+'</input><br />\
|
||||
<div class="clear"></div>\
|
||||
<label for="acl_preview">ACL String preview:</label>\
|
||||
<label for="acl_preview">'+tr("ACL String preview")+':</label>\
|
||||
<input type="text" name="acl_preview" id="acl_preview" style="width:400px;"></input>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
<fieldset>\
|
||||
<div class="form_buttons">\
|
||||
<button class="button" id="create_acl_submit" value="Acl.create">Create</button>\
|
||||
<button class="button" type="reset" value="reset">Reset</button>\
|
||||
<button class="button" id="create_acl_submit" value="Acl.create">'+tr("Create")+'</button>\
|
||||
<button class="button" type="reset" value="reset">'+tr("Reset")+'</button>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
</form>';
|
||||
@ -143,21 +143,21 @@ var acl_actions = {
|
||||
var acl_buttons = {
|
||||
"Acl.refresh" : {
|
||||
type: "image",
|
||||
text: "Refresh list",
|
||||
text: tr("Refresh list"),
|
||||
img: "images/Refresh-icon.png"
|
||||
},
|
||||
"Acl.create_dialog" : {
|
||||
type: "create_dialog",
|
||||
text: "+ New"
|
||||
text: tr("+ New")
|
||||
},
|
||||
"Acl.delete" : {
|
||||
type: "action",
|
||||
text: "Delete"
|
||||
text: tr("Delete")
|
||||
}
|
||||
}
|
||||
|
||||
var acls_tab = {
|
||||
title: "ACLs",
|
||||
title: tr("ACLs"),
|
||||
content: acls_tab_content,
|
||||
buttons: acl_buttons
|
||||
}
|
||||
@ -179,14 +179,14 @@ function aclElements(){
|
||||
function parseUserAcl(user){
|
||||
var user_str="";
|
||||
if (user[0] == '*'){
|
||||
user_str = "All";
|
||||
user_str = tr("All");
|
||||
} else {
|
||||
if (user[0] == '#'){
|
||||
user_str="User ";
|
||||
user_str=tr("User")+" ";
|
||||
user_str+= getUserName(user.substring(1));
|
||||
}
|
||||
else if (user[0] == '@'){
|
||||
user_str="Group ";
|
||||
user_str=tr("Group ");
|
||||
user_str+= getGroupName(user.substring(1));
|
||||
};
|
||||
};
|
||||
@ -197,14 +197,14 @@ function parseUserAcl(user){
|
||||
function parseResourceAcl(user){
|
||||
var user_str="";
|
||||
if (user[0] == '*'){
|
||||
user_str = "All";
|
||||
user_str = tr("All");
|
||||
} else {
|
||||
if (user[0] == '#'){
|
||||
user_str="ID ";
|
||||
user_str=tr("ID")+" ";
|
||||
user_str+= user.substring(1);
|
||||
}
|
||||
else if (user[0] == '@'){
|
||||
user_str="Group ";
|
||||
user_str=tr("Group")+" ";
|
||||
user_str+= getGroupName(user.substring(1));
|
||||
};
|
||||
};
|
||||
@ -232,25 +232,25 @@ function parseAclString(string) {
|
||||
for (var i=0; i<resources_array.length;i++){
|
||||
switch (resources_array[i]){
|
||||
case "HOST":
|
||||
resources_str+="Hosts, ";
|
||||
resources_str+=tr("Hosts")+", ";
|
||||
break;
|
||||
case "VM":
|
||||
resources_str+="Virtual Machines, ";
|
||||
resources_str+=tr("Virtual Machines")+", ";
|
||||
break;
|
||||
case "NET":
|
||||
resources_str+="Virtual Networks, ";
|
||||
resources_str+=tr("Virtual Networks")+", ";
|
||||
break;
|
||||
case "IMAGE":
|
||||
resources_str+="Images, ";
|
||||
resources_str+=(tr("Images")+", ");
|
||||
break;
|
||||
case "TEMPLATE":
|
||||
resources_str+="VM Templates, ";
|
||||
resources_str+=tr("VM Templates")+", ";
|
||||
break;
|
||||
case "USER":
|
||||
resources_str+="Users, ";
|
||||
resources_str+=tr("Users")+", ";
|
||||
break;
|
||||
case "GROUP":
|
||||
resources_str+="Groups, ";
|
||||
resources_str+=tr("Groups")+", ";
|
||||
break;
|
||||
};
|
||||
};
|
||||
@ -303,7 +303,7 @@ function updateAclsView(request,list){
|
||||
}
|
||||
|
||||
function setupCreateAclDialog(){
|
||||
dialogs_context.append('<div title="Create ACL" id="create_acl_dialog"></div>');
|
||||
dialogs_context.append('<div title=\"'+tr("Create ACL")+'\" id="create_acl_dialog"></div>');
|
||||
$create_acl_dialog = $('#create_acl_dialog',dialogs_context);
|
||||
var dialog = $create_acl_dialog;
|
||||
dialog.html(create_acl_tmpl);
|
||||
@ -316,9 +316,9 @@ function setupCreateAclDialog(){
|
||||
height: height
|
||||
});
|
||||
|
||||
$('#res_subgroup_all',dialog).attr("checked","checked");
|
||||
$('#res_id',dialog).attr("disabled","disabled");
|
||||
$('#belonging_to',dialog).attr("disabled","disabled");
|
||||
$('#res_subgroup_all',dialog).attr('checked','checked');
|
||||
$('#res_id',dialog).attr('disabled','disabled');
|
||||
$('#belonging_to',dialog).attr('disabled','disabled');
|
||||
|
||||
$('button',dialog).button();
|
||||
|
||||
@ -327,16 +327,16 @@ function setupCreateAclDialog(){
|
||||
var context = $(this).parent();
|
||||
switch (value) {
|
||||
case "*":
|
||||
$('#res_id',context).attr("disabled","disabled");
|
||||
$('#belonging_to',context).attr("disabled","disabled");
|
||||
$('#res_id',context).attr('disabled','disabled');
|
||||
$('#belonging_to',context).attr('disabled','disabled');
|
||||
break;
|
||||
case "res_id":
|
||||
$('#res_id',context).removeAttr("disabled");
|
||||
$('#belonging_to').attr("disabled","disabled");
|
||||
$('#res_id',context).removeAttr('disabled');
|
||||
$('#belonging_to').attr('disabled','disabled');
|
||||
break;
|
||||
case "belonging_to":
|
||||
$('#res_id',context).attr("disabled","disabled");
|
||||
$('#belonging_to',context).removeAttr("disabled");
|
||||
$('#res_id',context).attr('disabled','disabled');
|
||||
$('#belonging_to',context).removeAttr('disabled');
|
||||
break;
|
||||
};
|
||||
});
|
||||
@ -391,13 +391,13 @@ function setupCreateAclDialog(){
|
||||
$('#create_acl_form',dialog).submit(function(){
|
||||
var user = $('#applies',this).val();
|
||||
if (!user.length) {
|
||||
notifyError("Please specify to who this ACL applies");
|
||||
notifyError(tr("Please specify to who this ACL applies"));
|
||||
return false;
|
||||
};
|
||||
|
||||
var resources = $('.resource_cb:checked',this).length;
|
||||
if (!resources) {
|
||||
notifyError("Please select at least one resource");
|
||||
notifyError(tr("Please select at least one resource"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -406,7 +406,7 @@ function setupCreateAclDialog(){
|
||||
case "res_id":
|
||||
var l=$('#res_id',this).val().length;
|
||||
if (!l){
|
||||
notifyError("Please provide a resource ID for the resource(s) in this rule");
|
||||
notifyError(tr("Please provide a resource ID for the resource(s) in this rule"));
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@ -441,15 +441,15 @@ function popUpCreateAclDialog(){
|
||||
var users = $('<select>'+users_select+'</select>');
|
||||
$('.empty_value',users).remove();
|
||||
$('option',users).addClass("user");
|
||||
users.prepend('<option value="">---Users---</option>');
|
||||
users.prepend('<option value="">---'+tr("Users")+'---</option>');
|
||||
|
||||
var groups = $('<select>'+groups_select+'</select>');
|
||||
$('.empty_value',groups).remove();
|
||||
$('option',groups).addClass("group");
|
||||
groups.prepend('<option value="">---Groups---</option>');
|
||||
groups.prepend('<option value="">---'+tr("Groups")+'---</option>');
|
||||
|
||||
var dialog = $create_acl_dialog;
|
||||
$('#applies',dialog).html('<option value="*">All</option>'+
|
||||
$('#applies',dialog).html('<option value="*">'+tr("All")+'</option>'+
|
||||
users.html()+groups.html());
|
||||
$('#belonging_to',dialog).html(groups_select);
|
||||
|
||||
@ -461,7 +461,7 @@ function popUpCreateAclDialog(){
|
||||
function setAclAutorefresh(){
|
||||
setInterval(function(){
|
||||
var checked = $('input.check_item:checked',dataTable_acls);
|
||||
var filter = $("#datatable_acls_filter input",dataTable_acls.parents("#datatable_acls_wrapper")).attr("value");
|
||||
var filter = $("#datatable_acls_filter input",dataTable_acls.parents("#datatable_acls_wrapper")).attr('value');
|
||||
if (!checked.length && !filter.length){
|
||||
Sunstone.runAction("Acl.autorefresh");
|
||||
}
|
||||
@ -480,7 +480,11 @@ $(document).ready(function(){
|
||||
{ "bSortable": false, "aTargets": ["check"] },
|
||||
{ "sWidth": "60px", "aTargets": [0] },
|
||||
{ "sWidth": "35px", "aTargets": [1] }
|
||||
]
|
||||
],
|
||||
"oLanguage": (datatable_lang != "") ?
|
||||
{
|
||||
sUrl: "locale/"+lang+"/"+datatable_lang
|
||||
} : ""
|
||||
});
|
||||
dataTable_acls.fnClearTable();
|
||||
addElement([
|
||||
|
58
src/sunstone/public/js/plugins/config-tab.js
Normal file
58
src/sunstone/public/js/plugins/config-tab.js
Normal file
@ -0,0 +1,58 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org) */
|
||||
/* */
|
||||
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
|
||||
/* not use this file except in compliance with the License. You may obtain */
|
||||
/* a copy of the License at */
|
||||
/* */
|
||||
/* http://www.apache.org/licenses/LICENSE-2.0 */
|
||||
/* */
|
||||
/* Unless required by applicable law or agreed to in writing, software */
|
||||
/* distributed under the License is distributed on an "AS IS" BASIS, */
|
||||
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
|
||||
/* See the License for the specific language governing permissions and */
|
||||
/* limitations under the License. */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
var config_tab_content =
|
||||
'<form>\
|
||||
<table id="config_table" style="width:100%">\
|
||||
<tr>\
|
||||
<td>\
|
||||
<div class="panel">\
|
||||
<h3>' + tr("Sunstone UI Configuration") + '</h3>\
|
||||
<div class="panel_info">\
|
||||
\
|
||||
<table class="info_table">\
|
||||
<tr>\
|
||||
<td class="key_td">' + tr("Language") + '</td>\
|
||||
<td class="value_td">\
|
||||
<select id="lang_sel" style="width:20em;">\
|
||||
<option value="en_US">'+tr("English")+'</option>\
|
||||
<option value="ru">'+tr("Russian")+'</option>\
|
||||
</select>\
|
||||
</td>\
|
||||
</tr>\
|
||||
</table>\
|
||||
\
|
||||
</div>\
|
||||
</div>\
|
||||
</td>\
|
||||
</tr>\
|
||||
</table></form>';
|
||||
|
||||
var config_tab = {
|
||||
title: tr("Configuration"),
|
||||
content: config_tab_content
|
||||
}
|
||||
|
||||
Sunstone.addMainTab('config_tab',config_tab);
|
||||
|
||||
$(document).ready(function(){
|
||||
if (lang)
|
||||
$('table#config_table #lang_sel option[value="'+lang+'"]').attr('selected','selected');
|
||||
$('table#config_table #lang_sel').change(function(){
|
||||
setLang($(this).val());
|
||||
});
|
||||
|
||||
});
|
@ -50,40 +50,44 @@ var dashboard_tab_content =
|
||||
<tr>\
|
||||
<td>\
|
||||
<div class="panel">\
|
||||
<h3>Summary of resources</h3>\
|
||||
<h3>' + tr("Summary of resources") + '</h3>\
|
||||
<div class="panel_info">\
|
||||
\
|
||||
<table class="info_table">\
|
||||
<tr>\
|
||||
<td class="key_td">Hosts (total/active)</td>\
|
||||
<td class="key_td">' + tr("Hosts (total/active)") + '</td>\
|
||||
<td class="value_td"><span id="total_hosts"></span><span id="active_hosts" class="green"></span></td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Groups</td>\
|
||||
<td class="key_td">' + tr("Groups") + '</td>\
|
||||
<td class="value_td"><span id="total_groups"></span></td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">VM Templates (total/public)</td>\
|
||||
<td class="key_td">' + tr("VM Templates (total/public)") + '</td>\
|
||||
<td class="value_td"><span id="total_templates"></span><span id="public_templates"></span></td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">VM Instances (total/<span class="green">running</span>/<span class="red">failed</span>)</td>\
|
||||
<td class="key_td">' +
|
||||
tr("VM Instances")+ ' (' +
|
||||
tr("total") + '/<span class="green">' +
|
||||
tr("running") + '</span>/<span class="red">' +
|
||||
tr("failed") + '</span>)</td>\
|
||||
<td class="value_td"><span id="total_vms"></span><span id="running_vms" class="green"></span><span id="failed_vms" class="red"></span></td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Virtual Networks (total/public)</td>\
|
||||
<td class="key_td">' + tr("Virtual Networks (total/public)") + '</td>\
|
||||
<td class="value_td"><span id="total_vnets"></span><span id="public_vnets"></span></td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Images (total/public)</td>\
|
||||
<td class="key_td">' + tr("Images (total/public)") + '</td>\
|
||||
<td class="value_td"><span id="total_images"></span><span id="public_images"></span></td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Users</td>\
|
||||
<td class="key_td">' + tr("Users")+'</td>\
|
||||
<td class="value_td"><span id="total_users"></span></td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">ACL Rules</td>\
|
||||
<td class="key_td">' + tr("ACL Rules") + '</td>\
|
||||
<td class="value_td"><span id="total_acls"></span></td>\
|
||||
</tr>\
|
||||
</table>\
|
||||
@ -95,18 +99,18 @@ var dashboard_tab_content =
|
||||
<tr>\
|
||||
<td>\
|
||||
<div class="panel">\
|
||||
<h3>Quickstart</h3>\
|
||||
<h3>' + tr("Quickstart") + '</h3>\
|
||||
<form id="quickstart_form"><fieldset>\
|
||||
<table style="width:100%;"><tr style="vertical-align:middle;"><td style="width:70%">\
|
||||
<label style="font-weight:bold;width:40px;height:10em;">New:</label>\
|
||||
<input type="radio" name="quickstart" value="Host.create_dialog">Host</input><br />\
|
||||
<input type="radio" name="quickstart" value="VM.create_dialog">VM Instance</input><br />\
|
||||
<input type="radio" name="quickstart" value="Template.create_dialog">VM Template</input><br />\
|
||||
<input type="radio" name="quickstart" value="Network.create_dialog">Virtual Network</input><br />\
|
||||
<input type="radio" name="quickstart" value="Image.create_dialog">Image</input><br />\
|
||||
<input type="radio" name="quickstart" value="User.create_dialog">User</input><br />\
|
||||
<input type="radio" name="quickstart" value="Group.create_dialog">Group</input><br />\
|
||||
<input type="radio" name="quickstart" value="Acl.create_dialog">Acl</input><br />\
|
||||
<label style="font-weight:bold;width:40px;height:10em;">' + tr("New")+': </label>\
|
||||
<input type="radio" name="quickstart" value="Host.create_dialog">' + tr("Host") + '</input><br />\
|
||||
<input type="radio" name="quickstart" value="VM.create_dialog">' + tr("VM Instance") + '</input><br />\
|
||||
<input type="radio" name="quickstart" value="Template.create_dialog">' + tr("VM Template") + '</input><br />\
|
||||
<input type="radio" name="quickstart" value="Network.create_dialog">' + tr("Virtual Network") + '</input><br />\
|
||||
<input type="radio" name="quickstart" value="Image.create_dialog">' + tr("Image") + '</input><br />\
|
||||
<input type="radio" name="quickstart" value="User.create_dialog">' + tr("User") + '</input><br />\
|
||||
<input type="radio" name="quickstart" value="Group.create_dialog">' + tr("Group") + '</input><br />\
|
||||
<input type="radio" name="quickstart" value="Acl.create_dialog">' + tr("Acl") + '</input><br />\
|
||||
</td></tr></table>\
|
||||
</div>\
|
||||
</td>\
|
||||
@ -118,19 +122,19 @@ var dashboard_tab_content =
|
||||
<tr>\
|
||||
<td>\
|
||||
<div class="panel">\
|
||||
<h3>Historical monitoring information</h3>\
|
||||
<h3>' + tr("Historical monitoring information") + '</h3>\
|
||||
<div class="panel_info">\
|
||||
<table class="info_table">\
|
||||
<tr><td class="key_td graph_td">Hosts CPU</td>\
|
||||
<tr><td class="key_td graph_td">' + tr("Hosts CPU") + '</td>\
|
||||
<td class="graph_td" id="graph1_legend"></td></tr>\
|
||||
<tr><td id="graph1" colspan="2">'+spinner+'</td></tr>\
|
||||
<tr><td class="key_td graph_td">Hosts memory</td>\
|
||||
<tr><td class="key_td graph_td">' + tr("Hosts memory") + '</td>\
|
||||
<td class="graph_td" id="graph2_legend"></td></tr>\
|
||||
<tr><td id="graph2" colspan="2">'+spinner+'</td></tr>\
|
||||
<tr><td class="key_td graph_td">Total VM count</td>\
|
||||
<tr><td class="key_td graph_td">' + tr("Total VM count") + '</td>\
|
||||
<td class="graph_td" id="graph3_legend"></td></tr>\
|
||||
<tr><td id="graph3" colspan="2">'+spinner+'</td></tr>\
|
||||
<tr><td class="key_td graph_td">VM Network stats</td>\
|
||||
<tr><td class="key_td graph_td">' + tr("VM Network stats") + '</td>\
|
||||
<td class="graph_td" id="graph4_legend"></td></tr>\
|
||||
<tr><td id="graph4" colspan="2">'+spinner+'</td></tr>\
|
||||
</table>\
|
||||
@ -143,7 +147,7 @@ var dashboard_tab_content =
|
||||
</tr></table>';
|
||||
|
||||
var dashboard_tab = {
|
||||
title: 'Dashboard',
|
||||
title: tr("Dashboard"),
|
||||
content: dashboard_tab_content
|
||||
}
|
||||
|
||||
@ -163,7 +167,7 @@ function plot_global_graph(data,info){
|
||||
|
||||
for (var i=0; i<labels_array.length; i++) {
|
||||
serie = {
|
||||
label: labels_array[i],
|
||||
label: tr(labels_array[i]),
|
||||
data: monitoring[labels_array[i]]
|
||||
};
|
||||
series.push(serie);
|
||||
|
@ -50,24 +50,27 @@ var dashboard_tab_content =
|
||||
<tr>\
|
||||
<td>\
|
||||
<div class="panel">\
|
||||
<h3>Summary of resources</h3>\
|
||||
<h3>'+tr("Summary of resources")+'</h3>\
|
||||
<div class="panel_info">\
|
||||
\
|
||||
<table class="info_table">\
|
||||
<tr>\
|
||||
<td class="key_td">VM Templates (total/public)</td>\
|
||||
<td class="key_td">'+tr("VM Templates (total/public)")+'</td>\
|
||||
<td class="value_td"><span id="total_templates"></span><span id="public_templates"></span></td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">VM Instances (total/<span class="green">running</span>/<span class="red">failed</span>)</td>\
|
||||
<td class="key_td">'+tr("VM Instances")+' ('+
|
||||
tr("total")+'/<span class="green">'+
|
||||
tr("running")+'</span>/<span class="red">'+
|
||||
tr("failed")+'</span>)</td>\
|
||||
<td class="value_td"><span id="total_vms"></span><span id="running_vms" class="green"></span><span id="failed_vms" class="red"></span></td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Virtual Networks (total/public)</td>\
|
||||
<td class="key_td">'+tr("Virtual Networks (total/public)")+'</td>\
|
||||
<td class="value_td"><span id="total_vnets"></span><span id="public_vnets"></span></td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Images (total/public)</td>\
|
||||
<td class="key_td">'+tr("Images (total/public)")+'</td>\
|
||||
<td class="value_td"><span id="total_images"></span><span id="public_images"></span></td>\
|
||||
</tr>\
|
||||
</table>\
|
||||
@ -79,14 +82,14 @@ var dashboard_tab_content =
|
||||
<tr>\
|
||||
<td>\
|
||||
<div class="panel">\
|
||||
<h3>Quickstart</h3>\
|
||||
<h3>'+tr("Quickstart")+'</h3>\
|
||||
<form id="quickstart_form"><fieldset>\
|
||||
<table style="width:100%;"><tr style="vertical-align:middle;"><td style="width:70%">\
|
||||
<label style="font-weight:bold;width:40px;height:4em;">New:</label>\
|
||||
<input type="radio" name="quickstart" value="Template.create_dialog">VM Template</input><br />\
|
||||
<input type="radio" name="quickstart" value="VM.create_dialog">VM Instance</input><br />\
|
||||
<input type="radio" name="quickstart" value="Network.create_dialog">Virtual Network</input><br />\
|
||||
<input type="radio" name="quickstart" value="Image.create_dialog">Image</input><br />\
|
||||
<input type="radio" name="quickstart" value="Template.create_dialog">'+tr("VM Template")+'</input><br />\
|
||||
<input type="radio" name="quickstart" value="VM.create_dialog">'+tr("VM Instance")+'</input><br />\
|
||||
<input type="radio" name="quickstart" value="Network.create_dialog">'+tr("Virtual Network")+'</input><br />\
|
||||
<input type="radio" name="quickstart" value="Image.create_dialog">'+tr("Image")+'</input><br />\
|
||||
</td></tr></table>\
|
||||
</div>\
|
||||
</td>\
|
||||
@ -98,19 +101,19 @@ var dashboard_tab_content =
|
||||
<tr>\
|
||||
<td>\
|
||||
<div class="panel">\
|
||||
<h3>Historical monitoring information</h3>\
|
||||
<h3>'+tr("Historical monitoring information")+'</h3>\
|
||||
<div class="panel_info">\
|
||||
<table class="info_table">\
|
||||
<tr><td class="key_td graph_td">Total VM count</td>\
|
||||
<tr><td class="key_td graph_td">'+tr("Total VM count")+'</td>\
|
||||
<td class="graph_td" id="graph1_legend"></td></tr>\
|
||||
<tr><td id="graph1" colspan="2">'+spinner+'</td></tr>\
|
||||
<tr><td class="key_td graph_td">Total VM CPU</td>\
|
||||
<tr><td class="key_td graph_td">'+tr("Total VM CPU")+'</td>\
|
||||
<td class="graph_td" id="graph2_legend"></td></tr>\
|
||||
<tr><td id="graph2" colspan="2">'+spinner+'</td></tr>\
|
||||
<tr><td class="key_td graph_td">Total VM Memory</td>\
|
||||
<tr><td class="key_td graph_td">'+tr("Total VM Memory")+'</td>\
|
||||
<td class="graph_td" id="graph3_legend"></td></tr>\
|
||||
<tr><td id="graph3" colspan="2">'+spinner+'</td></tr>\
|
||||
<tr><td class="key_td graph_td">VM Network stats</td>\
|
||||
<tr><td class="key_td graph_td">'+tr("VM Network stats")+'</td>\
|
||||
<td class="graph_td" id="graph4_legend"></td></tr>\
|
||||
<tr><td id="graph4" colspan="2">'+spinner+'</td></tr>\
|
||||
</table>\
|
||||
@ -123,7 +126,7 @@ var dashboard_tab_content =
|
||||
</tr></table>';
|
||||
|
||||
var dashboard_tab = {
|
||||
title: 'Dashboard',
|
||||
title: tr("Dashboard"),
|
||||
content: dashboard_tab_content
|
||||
}
|
||||
|
||||
|
@ -25,10 +25,10 @@ var groups_tab_content =
|
||||
<table id="datatable_groups" class="display">\
|
||||
<thead>\
|
||||
<tr>\
|
||||
<th class="check"><input type="checkbox" class="check_all" value="">All</input></th>\
|
||||
<th>ID</th>\
|
||||
<th>Name</th>\
|
||||
<th>Users</th>\
|
||||
<th class="check"><input type="checkbox" class="check_all" value="">'+tr("All")+'</input></th>\
|
||||
<th>'+tr("ID")+'</th>\
|
||||
<th>'+tr("Name")+'</th>\
|
||||
<th>'+tr("Users")+'</th>\
|
||||
</tr>\
|
||||
</thead>\
|
||||
<tbody id="tbodygroups">\
|
||||
@ -40,14 +40,14 @@ var create_group_tmpl =
|
||||
'<form id="create_group_form" action="">\
|
||||
<fieldset style="border:none;">\
|
||||
<div>\
|
||||
<label for="name">Group name:</label>\
|
||||
<label for="name">'+tr("Group name")+':</label>\
|
||||
<input type="text" name="name" id="name" /><br />\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
<fieldset>\
|
||||
<div class="form_buttons">\
|
||||
<button class="button" id="create_group_submit" value="Group.create">Create</button>\
|
||||
<button class="button" type="reset" value="reset">Reset</button>\
|
||||
<button class="button" id="create_group_submit" value="Group.create">'+tr("Create")+'</button>\
|
||||
<button class="button" type="reset" value="reset">'+tr("Reset")+'</button>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
</form>';
|
||||
@ -118,12 +118,12 @@ var group_actions = {
|
||||
var group_buttons = {
|
||||
"Group.refresh" : {
|
||||
type: "image",
|
||||
text: "Refresh list",
|
||||
text: tr("Refresh list"),
|
||||
img: "images/Refresh-icon.png"
|
||||
},
|
||||
"Group.create_dialog" : {
|
||||
type: "create_dialog",
|
||||
text: "+ New Group"
|
||||
text: tr("+ New Group")
|
||||
},
|
||||
// "Group.chown" : {
|
||||
// type: "confirm_with_select",
|
||||
@ -135,12 +135,12 @@ var group_buttons = {
|
||||
|
||||
"Group.delete" : {
|
||||
type: "action",
|
||||
text: "Delete"
|
||||
text: tr("Delete")
|
||||
}
|
||||
};
|
||||
|
||||
var groups_tab = {
|
||||
title: 'Groups',
|
||||
title: tr("Groups"),
|
||||
content: groups_tab_content,
|
||||
buttons: group_buttons
|
||||
}
|
||||
@ -228,7 +228,7 @@ function updateGroupsView(request, group_list){
|
||||
|
||||
//Prepares the dialog to create
|
||||
function setupCreateGroupDialog(){
|
||||
dialogs_context.append('<div title="Create group" id="create_group_dialog"></div>');
|
||||
dialogs_context.append('<div title=\"'+tr("Create group")+'\" id="create_group_dialog"></div>');
|
||||
$create_group_dialog = $('#create_group_dialog',dialogs_context);
|
||||
var dialog = $create_group_dialog;
|
||||
|
||||
@ -259,7 +259,7 @@ function popUpCreateGroupDialog(){
|
||||
function setGroupAutorefresh(){
|
||||
setInterval(function(){
|
||||
var checked = $('input.check_item:checked',dataTable_groups);
|
||||
var filter = $("#datatable_groups_filter input",dataTable_groups.parents("#datatable_groups_wrapper")).attr("value");
|
||||
var filter = $("#datatable_groups_filter input",dataTable_groups.parents("#datatable_groups_wrapper")).attr('value');
|
||||
if (!checked.length && !filter.length){
|
||||
Sunstone.runAction("Group.autorefresh");
|
||||
}
|
||||
@ -276,7 +276,11 @@ $(document).ready(function(){
|
||||
{ "bSortable": false, "aTargets": ["check"] },
|
||||
{ "sWidth": "60px", "aTargets": [0] },
|
||||
{ "sWidth": "35px", "aTargets": [1] }
|
||||
]
|
||||
],
|
||||
"oLanguage": (datatable_lang != "") ?
|
||||
{
|
||||
sUrl: "locale/"+lang+"/"+datatable_lang
|
||||
} : ""
|
||||
});
|
||||
|
||||
dataTable_groups.fnClearTable();
|
||||
|
@ -19,13 +19,13 @@
|
||||
var HOST_HISTORY_LENGTH = 40;
|
||||
var host_graphs = [
|
||||
{
|
||||
title : "CPU Monitoring information",
|
||||
title : tr("CPU Monitoring information"),
|
||||
monitor_resources : "cpu_usage,used_cpu,max_cpu",
|
||||
humanize_figures : false,
|
||||
history_length : HOST_HISTORY_LENGTH
|
||||
},
|
||||
{
|
||||
title: "Memory monitoring information",
|
||||
title: tr("Memory monitoring information"),
|
||||
monitor_resources : "mem_usage,used_mem,max_mem",
|
||||
humanize_figures : true,
|
||||
history_length : HOST_HISTORY_LENGTH
|
||||
@ -40,13 +40,13 @@ var hosts_tab_content =
|
||||
<table id="datatable_hosts" class="display">\
|
||||
<thead>\
|
||||
<tr>\
|
||||
<th class="check"><input type="checkbox" class="check_all" value="">All</input></th>\
|
||||
<th>ID</th>\
|
||||
<th>Name</th>\
|
||||
<th>Running VMs</th>\
|
||||
<th>CPU Use</th>\
|
||||
<th>Memory use</th>\
|
||||
<th>Status</th>\
|
||||
<th class="check"><input type="checkbox" class="check_all" value="">' + tr("All") + '</input></th>\
|
||||
<th>' + tr("id") + '</th>\
|
||||
<th>' + tr("Name") + '</th>\
|
||||
<th>' + tr("Running VMs") + '</th>\
|
||||
<th>' + tr("CPU Use") + '</th>\
|
||||
<th>' + tr("Memory use") + '</th>\
|
||||
<th>' + tr("Status") + '</th>\
|
||||
</tr>\
|
||||
</thead>\
|
||||
<tbody id="tbodyhosts">\
|
||||
@ -57,27 +57,27 @@ var hosts_tab_content =
|
||||
var create_host_tmpl =
|
||||
'<div class="create_form"><form id="create_host_form" action="">\
|
||||
<fieldset>\
|
||||
<legend style="display:none;">Host parameters</legend>\
|
||||
<label for="name">Name: </label><input type="text" name="name" id="name" />\
|
||||
<legend style="display:none;">' + tr("Host parameters") + '</legend>\
|
||||
<label for="name">' + tr("Name") + ':</label><input type="text" name="name" id="name" />\
|
||||
</fieldset>\
|
||||
<h3>Drivers</h3>\
|
||||
<h3>' + tr("Drivers") + '</h3>\
|
||||
<fieldset>\
|
||||
<div class="manager clear" id="vmm_mads">\
|
||||
<label>Virtualization Manager:</label>\
|
||||
<label>' + tr("Virtualization Manager") + ':</label>\
|
||||
<select id="vmm_mad" name="vmm">\
|
||||
<option value="vmm_kvm">KVM</option>\
|
||||
<option value="vmm_xen">XEN</option>\
|
||||
<option value="vmm_ec2">EC2</option>\
|
||||
<option value="vmm_dummy">Dummy</option>\
|
||||
<option value="vmm_kvm">' + tr("KVM") + '</option>\
|
||||
<option value="vmm_xen">' + tr("XEN") + '</option>\
|
||||
<option value="vmm_ec2">' + tr("EC2") + '</option>\
|
||||
<option value="vmm_dummy">' + tr("Dummy") + '</option>\
|
||||
</select>\
|
||||
</div>\
|
||||
<div class="manager clear" id="im_mads">\
|
||||
<label>Information Manager:</label>\
|
||||
<label>' + tr("Information Manager") + ':</label>\
|
||||
<select id="im_mad" name="im">\
|
||||
<option value="im_kvm">KVM</option>\
|
||||
<option value="im_xen">XEN</option>\
|
||||
<option value="im_ec2">EC2</option>\
|
||||
<option value="im_dummy">Dummy</option>\
|
||||
<option value="im_kvm">' + tr("KVM") + '</option>\
|
||||
<option value="im_xen">' + tr("XEN") + '</option>\
|
||||
<option value="im_ec2">' + tr("EC2") + '</option>\
|
||||
<option value="im_dummy">' + tr("Dummy") + '</option>\
|
||||
</select>\
|
||||
</div>\
|
||||
<div class="manager clear" id="vnm_mads">\
|
||||
@ -91,18 +91,18 @@ var create_host_tmpl =
|
||||
</select>\
|
||||
</div>\
|
||||
<div class="manager clear" id="tm_mads">\
|
||||
<label>Transfer Manager:</label>\
|
||||
<label>' + tr("Transfer Manager") + ':</label>\
|
||||
<select id="tm_mad" name="tm">\
|
||||
<option value="tm_shared">Shared</option>\
|
||||
<option value="tm_ssh">SSH</option>\
|
||||
<option value="tm_dummy">Dummy</option>\
|
||||
<option value="tm_shared">' + tr("Shared") + '</option>\
|
||||
<option value="tm_ssh">' + tr("SSH") + '</option>\
|
||||
<option value="tm_dummy">' + tr("Dummy") + '</option>\
|
||||
</select>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
<fieldset>\
|
||||
<div class="form_buttons">\
|
||||
<div><button class="button" id="create_host_submit" value="OpenNebula.Host.create">Create</button>\
|
||||
<button class="button" type="reset" value="reset">Reset</button></div>\
|
||||
<div><button class="button" id="create_host_submit" value="OpenNebula.Host.create">' + tr("Create") + '</button>\
|
||||
<button class="button" type="reset" value="reset">' + tr("Reset") + '</button></div>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
</form></div>';
|
||||
@ -243,7 +243,7 @@ var host_actions = {
|
||||
type: "single",
|
||||
call: OpenNebula.Host.update,
|
||||
callback: function() {
|
||||
notifyMessage("Template updated correctly");
|
||||
notifyMessage(tr("Template updated correctly"));
|
||||
},
|
||||
error: onError
|
||||
}
|
||||
@ -252,51 +252,51 @@ var host_actions = {
|
||||
var host_buttons = {
|
||||
"Host.refresh" : {
|
||||
type: "image",
|
||||
text: "Refresh list",
|
||||
text: tr("Refresh list"),
|
||||
img: "images/Refresh-icon.png"
|
||||
},
|
||||
"Host.create_dialog" : {
|
||||
type: "create_dialog",
|
||||
text: "+ New"
|
||||
text: tr("+ New")
|
||||
},
|
||||
"Host.update_dialog" : {
|
||||
type: "action",
|
||||
text: "Update a template",
|
||||
text: tr("Update a template"),
|
||||
alwaysActive: true
|
||||
},
|
||||
"Host.enable" : {
|
||||
type: "action",
|
||||
text: "Enable"
|
||||
text: tr("Enable")
|
||||
},
|
||||
"Host.disable" : {
|
||||
type: "action",
|
||||
text: "Disable"
|
||||
text: tr("Disable")
|
||||
},
|
||||
"Host.delete" : {
|
||||
type: "action",
|
||||
text: "Delete host"
|
||||
text: tr("Delete host")
|
||||
}
|
||||
};
|
||||
|
||||
var host_info_panel = {
|
||||
"host_info_tab" : {
|
||||
title: "Host information",
|
||||
title: tr("Host information"),
|
||||
content:""
|
||||
},
|
||||
|
||||
"host_template_tab" : {
|
||||
title: "Host template",
|
||||
title: tr("Host template"),
|
||||
content: ""
|
||||
},
|
||||
"host_monitoring_tab": {
|
||||
title: "Monitoring information",
|
||||
title: tr("Monitoring information"),
|
||||
content: ""
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var hosts_tab = {
|
||||
title: 'Hosts',
|
||||
title: tr("Hosts"),
|
||||
content: hosts_tab_content,
|
||||
buttons: host_buttons
|
||||
}
|
||||
@ -430,66 +430,66 @@ function updateHostInfo(request,host){
|
||||
|
||||
//Information tab
|
||||
var info_tab = {
|
||||
title : "Host information",
|
||||
title : tr("Host information"),
|
||||
content :
|
||||
'<table id="info_host_table" class="info_table">\
|
||||
<thead>\
|
||||
<tr><th colspan="2">Host information - '+host_info.NAME+'</th></tr>\
|
||||
<tr><th colspan="2">' + tr("Host information") + ' - '+host_info.NAME+'</th></tr>\
|
||||
</thead>\
|
||||
<tbody>\
|
||||
<tr>\
|
||||
<td class="key_td">ID</td>\
|
||||
<td class="key_td">' + tr("id") + '</td>\
|
||||
<td class="value_td">'+host_info.ID+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">State</td>\
|
||||
<td class="value_td">'+OpenNebula.Helper.resource_state("host",host_info.STATE)+'</td>\
|
||||
<td class="key_td">' + tr("State") + '</td>\
|
||||
<td class="value_td">'+tr(OpenNebula.Helper.resource_state("host",host_info.STATE))+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">IM MAD</td>\
|
||||
<td class="key_td">' + tr("IM MAD") + '</td>\
|
||||
<td class="value_td">'+host_info.IM_MAD+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">VM MAD</td>\
|
||||
<td class="key_td">' + tr("VM MAD") + '</td>\
|
||||
<td class="value_td">'+host_info.VM_MAD+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">VN MAD</td>\
|
||||
<td class="key_td">'+ tr("VN MAD") +'</td>\
|
||||
<td class="value_td">'+host_info.VN_MAD+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">TM MAD</td>\
|
||||
<td class="key_td">'+ tr("TM MAD") +'</td>\
|
||||
<td class="value_td">'+host_info.TM_MAD+'</td>\
|
||||
</tr>\
|
||||
</tbody>\
|
||||
</table>\
|
||||
<table id="host_shares_table" class="info_table">\
|
||||
<thead>\
|
||||
<tr><th colspan="2">Host shares</th></tr>\
|
||||
<tr><th colspan="2">' + tr("Host shares") + '</th></tr>\
|
||||
</thead>\
|
||||
<tbody>\
|
||||
<tr>\
|
||||
<td class="key_td">Max Mem</td>\
|
||||
<td class="key_td">' + tr("Max Mem") + '</td>\
|
||||
<td class="value_td">'+humanize_size(host_info.HOST_SHARE.MAX_MEM)+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Used Mem (real)</td>\
|
||||
<td class="key_td">' + tr("Used Mem (real)") + '</td>\
|
||||
<td class="value_td">'+humanize_size(host_info.HOST_SHARE.USED_MEM)+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Used Mem (allocated)</td>\
|
||||
<td class="key_td">' + tr("Used Mem (allocated)") + '</td>\
|
||||
<td class="value_td">'+humanize_size(host_info.HOST_SHARE.MAX_USAGE)+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Used CPU (real)</td>\
|
||||
<td class="key_td">' + tr("Used CPU (real)") + '</td>\
|
||||
<td class="value_td">'+host_info.HOST_SHARE.USED_CPU+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Used CPU (allocated)</td>\
|
||||
<td class="key_td">' + tr("Used CPU (allocated)") + '</td>\
|
||||
<td class="value_td">'+host_info.HOST_SHARE.CPU_USAGE+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Running VMs</td>\
|
||||
<td class="key_td">' + tr("Running VMs") + '</td>\
|
||||
<td class="value_td">'+host_info.HOST_SHARE.RUNNING_VMS+'</td>\
|
||||
</tr>\
|
||||
</tbody>\
|
||||
@ -498,16 +498,16 @@ function updateHostInfo(request,host){
|
||||
|
||||
//Template tab
|
||||
var template_tab = {
|
||||
title : "Host template",
|
||||
title : tr("Host template"),
|
||||
content :
|
||||
'<table id="host_template_table" class="info_table" style="width:80%">\
|
||||
<thead><tr><th colspan="2">Host template</th></tr></thead>'+
|
||||
<thead><tr><th colspan="2">' + tr("Host template") + '</th></tr></thead>'+
|
||||
prettyPrintJSON(host_info.TEMPLATE)+
|
||||
'</table>'
|
||||
}
|
||||
|
||||
var monitor_tab = {
|
||||
title: "Monitoring information",
|
||||
title: tr("Monitoring information"),
|
||||
content : generateMonitoringDivs(host_graphs,"host_monitor_")
|
||||
}
|
||||
|
||||
@ -527,7 +527,7 @@ function updateHostInfo(request,host){
|
||||
|
||||
//Prepares the host creation dialog
|
||||
function setupCreateHostDialog(){
|
||||
dialogs_context.append('<div title="Create host" id="create_host_dialog"></div>');
|
||||
dialogs_context.append('<div title=\"'+tr("Create host")+'\" id="create_host_dialog"></div>');
|
||||
$create_host_dialog = $('div#create_host_dialog');
|
||||
var dialog = $create_host_dialog;
|
||||
|
||||
@ -543,7 +543,7 @@ function setupCreateHostDialog(){
|
||||
//Handle the form submission
|
||||
$('#create_host_form',dialog).submit(function(){
|
||||
if (!($('#name',this).val().length)){
|
||||
notifyError("Host name missing!");
|
||||
notifyError(tr("Host name missing!"));
|
||||
return false;
|
||||
}
|
||||
var host_json = {
|
||||
@ -574,7 +574,7 @@ function popUpCreateHostDialog(){
|
||||
function setHostAutorefresh() {
|
||||
setInterval(function(){
|
||||
var checked = $('input.check_item:checked',dataTable_hosts);
|
||||
var filter = $("#datatable_hosts_filter input",dataTable_hosts.parents('#datatable_hosts_wrapper')).attr("value");
|
||||
var filter = $("#datatable_hosts_filter input",dataTable_hosts.parents('#datatable_hosts_wrapper')).attr('value');
|
||||
if (!checked.length && !filter.length){
|
||||
Sunstone.runAction("Host.autorefresh");
|
||||
}
|
||||
@ -611,7 +611,11 @@ $(document).ready(function(){
|
||||
{ "sWidth": "35px", "aTargets": [1] },
|
||||
{ "sWidth": "100px", "aTargets": [6] },
|
||||
{ "sWidth": "200px", "aTargets": [4,5] }
|
||||
]
|
||||
],
|
||||
"oLanguage": (datatable_lang != "") ?
|
||||
{
|
||||
sUrl: "locale/"+lang+"/"+datatable_lang
|
||||
} : ""
|
||||
});
|
||||
|
||||
//preload it
|
||||
|
@ -23,18 +23,18 @@ var images_tab_content =
|
||||
<table id="datatable_images" class="display">\
|
||||
<thead>\
|
||||
<tr>\
|
||||
<th class="check"><input type="checkbox" class="check_all" value="">All</input></th>\
|
||||
<th>ID</th>\
|
||||
<th>Owner</th>\
|
||||
<th>Group</th>\
|
||||
<th>Name</th>\
|
||||
<th>Size</th>\
|
||||
<th>Type</th>\
|
||||
<th>Registration time</th>\
|
||||
<th>Public</th>\
|
||||
<th>Persistent</th>\
|
||||
<th>Status</th>\
|
||||
<th>#VMS</th>\
|
||||
<th class="check"><input type="checkbox" class="check_all" value="">'+tr("All")+'</input></th>\
|
||||
<th>'+tr("ID")+'</th>\
|
||||
<th>'+tr("Owner")+'</th>\
|
||||
<th>'+tr("Group")+'</th>\
|
||||
<th>'+tr("Name")+'</th>\
|
||||
<th>'+tr("Size")+'</th>\
|
||||
<th>'+tr("Type")+'</th>\
|
||||
<th>'+tr("Registration time")+'</th>\
|
||||
<th>'+tr("Public")+'</th>\
|
||||
<th>'+tr("Persistent")+'</th>\
|
||||
<th>'+tr("Status")+'</th>\
|
||||
<th>'+tr("#VMS")+'</th>\
|
||||
</tr>\
|
||||
</thead>\
|
||||
<tbody id="tbodyimages">\
|
||||
@ -44,114 +44,116 @@ var images_tab_content =
|
||||
|
||||
var create_image_tmpl =
|
||||
'<div id="img_tabs">\
|
||||
<ul><li><a href="#img_easy">Wizard</a></li>\
|
||||
<li><a href="#img_manual">Advanced mode</a></li>\
|
||||
<ul><li><a href="#img_easy">'+tr("Wizard")+'</a></li>\
|
||||
<li><a href="#img_manual">'+tr("Advanced mode")+'</a></li>\
|
||||
</ul>\
|
||||
<div id="img_easy">\
|
||||
<form id="create_image_form_easy" action="">\
|
||||
<p style="font-size:0.8em;text-align:right;"><i>Fields marked with <span style="display:inline-block;" class="ui-icon ui-icon-alert" /> are mandatory</i><br />\
|
||||
<p style="font-size:0.8em;text-align:right;"><i>'+
|
||||
tr("Fields marked with")+' <span style="display:inline-block;" class="ui-icon ui-icon-alert" /> '+
|
||||
tr("are mandatory")+'</i><br />\
|
||||
<fieldset>\
|
||||
<div class="img_param img_man">\
|
||||
<label for="img_name">Name:</label>\
|
||||
<label for="img_name">'+tr("Name")+':</label>\
|
||||
<input type="text" name="img_name" id="img_name" />\
|
||||
<div class="tip">Name that the Image will get. Every image must have a unique name.</div>\
|
||||
<div class="tip">'+tr("Name that the Image will get. Every image must have a unique name.")+'</div>\
|
||||
</div>\
|
||||
<div class="img_param">\
|
||||
<label for="img_desc">Description:</label>\
|
||||
<label for="img_desc">'+tr("Description")+':</label>\
|
||||
<textarea name="img_desc" id="img_desc" style="height:4em"></textarea>\
|
||||
<div class="tip">Human readable description of the image for other users.</div>\
|
||||
<div class="tip">'+tr("Human readable description of the image for other users.")+'</div>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
<fieldset>\
|
||||
<div class="img_param">\
|
||||
<label for="img_type">Type:</label>\
|
||||
<label for="img_type">'+tr("Type")+':</label>\
|
||||
<select name="img_type" id="img_type">\
|
||||
<option value="OS">OS</option>\
|
||||
<option value="CDROM">CD-ROM</option>\
|
||||
<option value="DATABLOCK">Datablock</option>\
|
||||
<option value="OS">'+tr("OS")+'</option>\
|
||||
<option value="CDROM">'+tr("CD-ROM")+'</option>\
|
||||
<option value="DATABLOCK">'+tr("Datablock")+'</option>\
|
||||
</select>\
|
||||
<div class="tip">Type of the image, explained in detail in the following section. If omitted, the default value is the one defined in oned.conf (install default is OS).</div>\
|
||||
<div class="tip">'+tr("Type of the image, explained in detail in the following section. If omitted, the default value is the one defined in oned.conf (install default is OS).")+'</div>\
|
||||
</div>\
|
||||
<div class="img_param">\
|
||||
<label for="img_public">Public:</label>\
|
||||
<label for="img_public">'+tr("Public")+':</label>\
|
||||
<input type="checkbox" id="img_public" name="img_public" value="YES" />\
|
||||
<div class="tip">Public scope of the image</div>\
|
||||
<div class="tip">'+tr("Public scope of the image")+'</div>\
|
||||
</div>\
|
||||
<div class="img_param">\
|
||||
<label for="img_persistent">Persistent:</label>\
|
||||
<label for="img_persistent">'+tr("Persistent")+':</label>\
|
||||
<input type="checkbox" id="img_persistent" name="img_persistent" value="YES" />\
|
||||
<div class="tip">Persistence of the image</div>\
|
||||
<div class="tip">'+tr("Persistence of the image")+'</div>\
|
||||
</div>\
|
||||
<div class="img_param">\
|
||||
<label for="img_dev_prefix">Device prefix:</label>\
|
||||
<label for="img_dev_prefix">'+tr("Device prefix")+':</label>\
|
||||
<input type="text" name="img_dev_prefix" id="img_dev_prefix" />\
|
||||
<div class="tip">Prefix for the emulated device this image will be mounted at. For instance, “hd”, “sd”. If omitted, the default value is the one defined in oned.conf (installation default is “hd”).</div>\
|
||||
<div class="tip">'+tr("Prefix for the emulated device this image will be mounted at. For instance, “hd”, “sd”. If omitted, the default value is the one defined in oned.conf (installation default is “hd”).")+'</div>\
|
||||
</div>\
|
||||
<div class="img_param">\
|
||||
<label for="img_bus">Bus:</label>\
|
||||
<label for="img_bus">'+tr("Bus")+':</label>\
|
||||
<select name="img_bus" id="img_bus">\
|
||||
<option value="ide">IDE</option>\
|
||||
<option value="scsi">SCSI</option>\
|
||||
<option value="virtio">Virtio (KVM)</option>\
|
||||
<option value="ide">'+tr("IDE")+'</option>\
|
||||
<option value="scsi">'+tr("SCSI")+'</option>\
|
||||
<option value="virtio">'+tr("Virtio (KVM)")+'</option>\
|
||||
</select>\
|
||||
<div class="tip">Type of disk device to emulate.</div>\
|
||||
<div class="tip">'+tr("Type of disk device to emulate.")+'</div>\
|
||||
</div>\
|
||||
<div class="img_param">\
|
||||
<label for="img_driver">Driver:</label>\
|
||||
<label for="img_driver">'+tr("Driver")+':</label>\
|
||||
<input type="text" name="img_driver" id="img_driver" />\
|
||||
<div class="tip">Specific image mapping driver. KVM: raw, qcow2 and Xen:tap:aio:, file:</div>\
|
||||
<div class="tip">'+tr("Specific image mapping driver. KVM: raw, qcow2. XEN: tap:aio, file:")+'</div>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
<fieldset>\
|
||||
<div class="" id="src_path_select">\
|
||||
<label style="height:3em;">Path vs. source:</label>\
|
||||
<label style="height:3em;">'+tr("Path vs. source")+':</label>\
|
||||
<input type="radio" name="src_path" id="path_img" value="path" />\
|
||||
<label style="float:none">Provide a path</label><br />\
|
||||
<label style="float:none">'+tr("Provide a path")+'</label><br />\
|
||||
<input type="radio" name="src_path" id="source_img" value="source" />\
|
||||
<label style="float:none">Provide a source</label><br />\
|
||||
<label style="float:none">'+tr("Provide a source")+'</label><br />\
|
||||
<input type="radio" name="src_path" id="datablock_img" value="datablock" />\
|
||||
<label style="float:none;vertical-align:top">Create an empty datablock</label>\
|
||||
<div class="tip">Please choose path if you have a file-based image. Choose source otherwise or create an empty datablock disk.</div><br />\
|
||||
<label style="float:none;vertical-align:top">'+tr("Create an empty datablock")+'</label>\
|
||||
<div class="tip">'+tr("Please choose path if you have a file-based image. Choose source otherwise or create an empty datablock disk.")+'</div><br />\
|
||||
</div>\
|
||||
<div class="img_param">\
|
||||
<label for="img_path">Path:</label>\
|
||||
<label for="img_path">'+tr("Path")+':</label>\
|
||||
<input type="text" name="img_path" id="img_path" />\
|
||||
<div class="tip">Path to the original file that will be copied to the image repository. If not specified for a DATABLOCK type image, an empty image will be created.</div>\
|
||||
<div class="tip">'+tr("Path to the original file that will be copied to the image repository. If not specified for a DATABLOCK type image, an empty image will be created.")+'</div>\
|
||||
</div>\
|
||||
<div class="img_param">\
|
||||
<label for="img_source">Source:</label>\
|
||||
<label for="img_source">'+tr("Source")+':</label>\
|
||||
<input type="text" name="img_source" id="img_source" />\
|
||||
<div class="tip">Source to be used in the DISK attribute. Useful for not file-based images.</div>\
|
||||
<div class="tip">'+tr("Source to be used in the DISK attribute. Useful for not file-based images.")+'</div>\
|
||||
</div>\
|
||||
<div class="img_size">\
|
||||
<label for="img_size">Size:</label>\
|
||||
<label for="img_size">'+tr("Size")+':</label>\
|
||||
<input type="text" name="img_size" id="img_size" />\
|
||||
<div class="tip">Size of the datablock in MB.</div>\
|
||||
<div class="tip">'+tr("Size of the datablock in MB.")+'</div>\
|
||||
</div>\
|
||||
<div class="img_param">\
|
||||
<label for="img_fstype">FS type:</label>\
|
||||
<label for="img_fstype">'+tr("FS type")+':</label>\
|
||||
<input type="text" name="img_fstype" id="img_fstype" />\
|
||||
<div class="tip">Type of file system to be built. This can be any value understood by mkfs unix command.</div>\
|
||||
<div class="tip">'+tr("Type of file system to be built. This can be any value understood by mkfs unix command.")+'</div>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
<fieldset>\
|
||||
<div class="">\
|
||||
<label for="custom_var_image_name">Name:</label>\
|
||||
<label for="custom_var_image_name">'+tr("Name")+':</label>\
|
||||
<input type="text" id="custom_var_image_name" name="custom_var_image_name" />\
|
||||
<label for="custom_var_image_value">Value:</label>\
|
||||
<label for="custom_var_image_value">'+tr("Value")+':</label>\
|
||||
<input type="text" id="custom_var_image_value" name="custom_var_image_value" />\
|
||||
<button class="add_remove_button add_button" id="add_custom_var_image_button" value="add_custom_image_var">Add</button>\
|
||||
<button class="add_remove_button" id="remove_custom_var_image_button" value="remove_custom_image_var">Remove selected</button>\
|
||||
<button class="add_remove_button add_button" id="add_custom_var_image_button" value="add_custom_image_var">'+tr("Add")+'</button>\
|
||||
<button class="add_remove_button" id="remove_custom_var_image_button" value="remove_custom_image_var">'+tr("Remove selected")+'</button>\
|
||||
<div class="clear"></div>\
|
||||
<label for="custom_var_image_box">Custom attributes:</label>\
|
||||
<label for="custom_var_image_box">'+tr("Custom attributes")+':</label>\
|
||||
<select id="custom_var_image_box" name="custom_var_image_box" style="height:100px;" multiple>\
|
||||
</select>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
<fieldset>\
|
||||
<div class="form_buttons">\
|
||||
<button class="button" id="create_image_submit" value="user/create">Create</button>\
|
||||
<button class="button" type="reset" value="reset">Reset</button>\
|
||||
<button class="button" id="create_image_submit" value="user/create">'+tr("Create")+'</button>\
|
||||
<button class="button" type="reset" value="reset">'+tr("Reset")+'</button>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
</form>\
|
||||
@ -159,16 +161,16 @@ var create_image_tmpl =
|
||||
<div id="img_manual">\
|
||||
<form id="create_image_form_manual" action="">\
|
||||
<fieldset style="border-top:none;">\
|
||||
<h3 style="margin-bottom:10px;">Write the image template here</h3>\
|
||||
<h3 style="margin-bottom:10px;">'+tr("Write the image template here")+'</h3>\
|
||||
<textarea id="template" rows="15" style="width:100%;">\
|
||||
</textarea>\
|
||||
</fieldset>\
|
||||
<fieldset>\
|
||||
<div class="form_buttons">\
|
||||
<button class="button" id="create_vn_submit_manual" value="vn/create">\
|
||||
Create\
|
||||
'+tr("Create")+'\
|
||||
</button>\
|
||||
<button class="button" type="reset" value="reset">Reset</button>\
|
||||
<button class="button" type="reset" value="reset">'+tr("Reset")+'</button>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
</form>\
|
||||
@ -177,27 +179,26 @@ var create_image_tmpl =
|
||||
|
||||
var update_image_tmpl =
|
||||
'<form action="javascript:alert(\'js error!\');">\
|
||||
<h3 style="margin-bottom:10px;">Please, choose and modify the image you want to update:</h3>\
|
||||
<h3 style="margin-bottom:10px;">'+tr("Please, choose and modify the image you want to update")+':</h3>\
|
||||
<fieldset style="border-top:none;">\
|
||||
<label for="image_template_update_select">Select an image:</label>\
|
||||
<label for="image_template_update_select">'+tr("Select an image")+':</label>\
|
||||
<select id="image_template_update_select" name="image_template_update_select"></select>\
|
||||
<div class="clear"></div>\
|
||||
<div>\
|
||||
<label for="image_template_update_public">Public:</label>\
|
||||
<label for="image_template_update_public">'+tr("Public")+':</label>\
|
||||
<input type="checkbox" name="image_template_update_public" id="image_template_update_public" />\
|
||||
</div>\
|
||||
<div>\
|
||||
<label for="image_template_update_public">Persistent:</label>\
|
||||
<label for="image_template_update_public">'+tr("Persistent")+':</label>\
|
||||
<input type="checkbox" name="image_template_update_persistent" id="image_template_update_persistent" />\
|
||||
</div>\
|
||||
<label for="image_template_update_textarea">Template:</label>\
|
||||
<label for="image_template_update_textarea">'+tr("Template")+':</label>\
|
||||
<div class="clear"></div>\
|
||||
<textarea id="image_template_update_textarea" style="width:100%; height:14em;"></textarea>\
|
||||
</fieldset>\
|
||||
<fieldset>\
|
||||
<div class="form_buttons">\
|
||||
<button class="button" id="image_template_update_button" value="Image.update_template">\
|
||||
Update\
|
||||
<button class="button" id="image_template_update_button" value="Image.update_template">'+tr("Update")+'\
|
||||
</button>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
@ -277,7 +278,7 @@ var image_actions = {
|
||||
type: "single",
|
||||
call: OpenNebula.Image.update,
|
||||
callback: function() {
|
||||
notifyMessage("Template updated correctly");
|
||||
notifyMessage(tr("Template updated correctly"));
|
||||
},
|
||||
error: onError
|
||||
},
|
||||
@ -396,30 +397,30 @@ var image_actions = {
|
||||
var image_buttons = {
|
||||
"Image.refresh" : {
|
||||
type: "image",
|
||||
text: "Refresh list",
|
||||
text: tr("Refresh list"),
|
||||
img: "images/Refresh-icon.png"
|
||||
},
|
||||
"Image.create_dialog" : {
|
||||
type: "create_dialog",
|
||||
text: "+ New"
|
||||
text: tr('+ New')
|
||||
},
|
||||
"Image.update_dialog" : {
|
||||
type: "action",
|
||||
text: "Update a template",
|
||||
text: tr("Update a template"),
|
||||
alwaysActive: true
|
||||
},
|
||||
"Image.chown" : {
|
||||
type: "confirm_with_select",
|
||||
text: "Change owner",
|
||||
text: tr("Change owner"),
|
||||
select: users_sel,
|
||||
tip: "Select the new owner:",
|
||||
tip: tr("Select the new owner")+":",
|
||||
condition: mustBeAdmin
|
||||
},
|
||||
"Image.chgrp" : {
|
||||
type: "confirm_with_select",
|
||||
text: "Change group",
|
||||
text: tr("Change group"),
|
||||
select: groups_sel,
|
||||
tip: "Select the new group:",
|
||||
tip: tr("Select the new group")+":",
|
||||
condition: mustBeAdmin
|
||||
},
|
||||
"action_list" : {
|
||||
@ -427,51 +428,51 @@ var image_buttons = {
|
||||
actions: {
|
||||
"Image.enable" : {
|
||||
type: "action",
|
||||
text: "Enable"
|
||||
text: tr("Enable")
|
||||
},
|
||||
"Image.disable" : {
|
||||
type: "action",
|
||||
text: "Disable"
|
||||
text: tr("Disable")
|
||||
},
|
||||
"Image.publish" : {
|
||||
type: "action",
|
||||
text: "Publish"
|
||||
text: tr("Publish")
|
||||
},
|
||||
"Image.unpublish" : {
|
||||
type: "action",
|
||||
text: "Unpublish"
|
||||
text: tr("Unpublish")
|
||||
},
|
||||
"Image.persistent" : {
|
||||
type: "action",
|
||||
text: "Make persistent"
|
||||
text: tr("Make persistent")
|
||||
},
|
||||
"Image.nonpersistent" : {
|
||||
type: "action",
|
||||
text: "Make non persistent"
|
||||
text: tr("Make non persistent")
|
||||
}
|
||||
}
|
||||
},
|
||||
"Image.delete" : {
|
||||
type: "action",
|
||||
text: "Delete"
|
||||
text: tr("Delete")
|
||||
}
|
||||
}
|
||||
|
||||
var image_info_panel = {
|
||||
"image_info_tab" : {
|
||||
title: "Image information",
|
||||
title: tr("Image information"),
|
||||
content: ""
|
||||
},
|
||||
|
||||
"image_template_tab" : {
|
||||
title: "Image template",
|
||||
title: tr("Image template"),
|
||||
content: ""
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var images_tab = {
|
||||
title: "Images",
|
||||
title: tr("Images"),
|
||||
content: images_tab_content,
|
||||
buttons: image_buttons
|
||||
}
|
||||
@ -492,13 +493,13 @@ function imageElementArray(image_json){
|
||||
var image = image_json.IMAGE;
|
||||
|
||||
var type = $('<select>\
|
||||
<option value="OS">OS</option>\
|
||||
<option value="CDROM">CD-ROM</option>\
|
||||
<option value="DATABLOCK">Datablock</option>\
|
||||
<option value="OS">'+tr("OS")+'</option>\
|
||||
<option value="CDROM">'+tr("CD-ROM")+'</option>\
|
||||
<option value="DATABLOCK">'+tr("Datablock")+'</option>\
|
||||
</select>');
|
||||
|
||||
var value = OpenNebula.Helper.image_type(image.TYPE);
|
||||
$('option[value="'+value+'"]',type).replaceWith('<option value="'+value+'" selected="selected">'+value+'</option>');
|
||||
$('option[value="'+value+'"]',type).replaceWith('<option value="'+value+'" selected="selected">'+tr(value)+'</option>');
|
||||
|
||||
|
||||
|
||||
@ -570,75 +571,76 @@ function updateImagesView(request, images_list){
|
||||
function updateImageInfo(request,img){
|
||||
var img_info = img.IMAGE;
|
||||
var info_tab = {
|
||||
title: "Image information",
|
||||
title: tr("Image information"),
|
||||
content:
|
||||
'<table id="info_img_table" class="info_table" style="width:80%;">\
|
||||
<thead>\
|
||||
<tr><th colspan="2">Image "'+img_info.NAME+'" information</th></tr>\
|
||||
<tr><th colspan="2">'+tr("Image")+' "'+img_info.NAME+'" '+
|
||||
tr("information")+'</th></tr>\
|
||||
</thead>\
|
||||
<tr>\
|
||||
<td class="key_td">ID</td>\
|
||||
<td class="key_td">'+tr("ID")+'</td>\
|
||||
<td class="value_td">'+img_info.ID+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Name</td>\
|
||||
<td class="key_td">'+tr("Name")+'</td>\
|
||||
<td class="value_td">'+img_info.NAME+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Owner</td>\
|
||||
<td class="key_td">'+tr("Owner")+'</td>\
|
||||
<td class="value_td">'+img_info.UNAME+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Group</td>\
|
||||
<td class="key_td">'+tr("Group")+'</td>\
|
||||
<td class="value_td">'+img_info.GNAME+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Type</td>\
|
||||
<td class="key_td">'+tr("Type")+'</td>\
|
||||
<td class="value_td">'+OpenNebula.Helper.image_type(img_info.TYPE)+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Register time</td>\
|
||||
<td class="key_td">'+tr("Register time")+'</td>\
|
||||
<td class="value_td">'+pretty_time(img_info.REGTIME)+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Public</td>\
|
||||
<td class="value_td">'+(parseInt(img_info.PUBLIC) ? "yes" : "no")+'</td>\
|
||||
<td class="key_td">'+tr("Public")+'</td>\
|
||||
<td class="value_td">'+(parseInt(img_info.PUBLIC) ? tr("yes") : tr("no"))+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Persistent</td>\
|
||||
<td class="value_td">'+(parseInt(img_info.PERSISTENT) ? "yes" : "no")+'</td>\
|
||||
<td class="key_td">'+tr("Persistent")+'</td>\
|
||||
<td class="value_td">'+(parseInt(img_info.PERSISTENT) ? tr("yes") : tr("no"))+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Source</td>\
|
||||
<td class="key_td">'+tr("Source")+'</td>\
|
||||
<td class="value_td">'+(typeof img_info.SOURCE === "string" ? img_info.SOURCE : "--")+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Path</td>\
|
||||
<td class="key_td">'+tr("Path")+'</td>\
|
||||
<td class="value_td">'+(typeof img_info.PATH === "string" ? img_info.PATH : "--")+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Filesystem type</td>\
|
||||
<td class="key_td">'+tr("Filesystem type")+'</td>\
|
||||
<td class="value_td">'+(typeof img_info.FSTYPE === "string" ? img_info.FSTYPE : "--")+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Size (Mb)</td>\
|
||||
<td class="key_td">'+tr("Size (Mb)")+'</td>\
|
||||
<td class="value_td">'+img_info.SIZE+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">State</td>\
|
||||
<td class="key_td">'+tr("State")+'</td>\
|
||||
<td class="value_td">'+OpenNebula.Helper.resource_state("image",img_info.STATE)+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Running #VMS</td>\
|
||||
<td class="key_td">'+tr("Running #VMS")+'</td>\
|
||||
<td class="value_td">'+img_info.RUNNING_VMS+'</td>\
|
||||
</tr>\
|
||||
</table>'
|
||||
}
|
||||
|
||||
var template_tab = {
|
||||
title: "Image template",
|
||||
title: tr("Image template"),
|
||||
content: '<table id="img_template_table" class="info_table" style="width:80%;">\
|
||||
<thead><tr><th colspan="2">Image template</th></tr></thead>'+
|
||||
<thead><tr><th colspan="2">'+tr("Image template")+'</th></tr></thead>'+
|
||||
prettyPrintJSON(img_info.TEMPLATE)+
|
||||
'</table>'
|
||||
}
|
||||
@ -652,7 +654,7 @@ function updateImageInfo(request,img){
|
||||
|
||||
// Prepare the image creation dialog
|
||||
function setupCreateImageDialog(){
|
||||
dialogs_context.append('<div title="Create Image" id="create_image_dialog"></div>');
|
||||
dialogs_context.append('<div title="'+tr("Create Image")+'" id="create_image_dialog"></div>');
|
||||
$create_image_dialog = $('#create_image_dialog',dialogs_context);
|
||||
var dialog = $create_image_dialog;
|
||||
dialog.html(create_image_tmpl);
|
||||
@ -669,8 +671,8 @@ function setupCreateImageDialog(){
|
||||
|
||||
$('#img_tabs',dialog).tabs();
|
||||
$('button',dialog).button();
|
||||
$('#img_type option',dialog).first().attr("selected","selected");
|
||||
$('#datablock_img',dialog).attr("disabled","disabled");
|
||||
$('#img_type option',dialog).first().attr('selected','selected');
|
||||
$('#datablock_img',dialog).attr('disabled','disabled');
|
||||
|
||||
$('select#img_type',dialog).change(function(){
|
||||
var value = $(this).val();
|
||||
@ -680,23 +682,23 @@ function setupCreateImageDialog(){
|
||||
$('#datablock_img',context).removeAttr("disabled");
|
||||
break;
|
||||
default:
|
||||
$('#datablock_img',context).attr("disabled","disabled");
|
||||
$('#path_img',context).attr("checked","checked");
|
||||
$('#datablock_img',context).attr('disabled','disabled');
|
||||
$('#path_img',context).attr('checked','checked');
|
||||
$('#img_source,#img_fstype,#img_size',context).parent().hide();
|
||||
$('#img_path',context).parent().show();
|
||||
}
|
||||
});
|
||||
|
||||
$('#img_source,#img_fstype,#img_size',dialog).parent().hide();
|
||||
$('#path_img',dialog).attr("checked","checked");
|
||||
$('#path_img',dialog).attr('checked','checked');
|
||||
$('#img_path',dialog).parent().addClass("img_man");
|
||||
|
||||
$('#img_public',dialog).click(function(){
|
||||
$('#img_persistent',$create_image_dialog).removeAttr("checked");
|
||||
$('#img_persistent',$create_image_dialog).removeAttr('checked');
|
||||
});
|
||||
|
||||
$('#img_persistent',dialog).click(function(){
|
||||
$('#img_public',$create_image_dialog).removeAttr("checked");
|
||||
$('#img_public',$create_image_dialog).removeAttr('checked');
|
||||
});
|
||||
|
||||
|
||||
@ -732,7 +734,7 @@ function setupCreateImageDialog(){
|
||||
var name = $('#custom_var_image_name',$create_image_dialog).val();
|
||||
var value = $('#custom_var_image_value',$create_image_dialog).val();
|
||||
if (!name.length || !value.length) {
|
||||
notifyError("Custom attribute name and value must be filled in");
|
||||
notifyError(tr("Custom attribute name and value must be filled in"));
|
||||
return false;
|
||||
}
|
||||
option= '<option value=\''+value+'\' name=\''+name+'\'>'+
|
||||
@ -755,7 +757,7 @@ function setupCreateImageDialog(){
|
||||
var exit = false;
|
||||
$('.img_man',this).each(function(){
|
||||
if (!$('input',this).val().length){
|
||||
notifyError("There are mandatory parameters missing");
|
||||
notifyError(tr("There are mandatory parameters missing"));
|
||||
exit = true;
|
||||
return false;
|
||||
}
|
||||
@ -799,7 +801,7 @@ function setupCreateImageDialog(){
|
||||
source = $('#img_source',this).val();
|
||||
img_json["SOURCE"] = source;
|
||||
break;
|
||||
case "datablock":
|
||||
case "datablock":
|
||||
size = $('#img_size',this).val();
|
||||
fstype = $('#img_fstype',this).val();
|
||||
img_json["SIZE"] = size;
|
||||
@ -809,7 +811,7 @@ function setupCreateImageDialog(){
|
||||
|
||||
//Time to add custom attributes
|
||||
$('#custom_var_image_box option',$create_image_dialog).each(function(){
|
||||
var attr_name = $(this).attr("name");
|
||||
var attr_name = $(this).attr('name');
|
||||
var attr_value = $(this).val();
|
||||
img_json[attr_name] = attr_value;
|
||||
});
|
||||
@ -839,7 +841,7 @@ function popUpCreateImageDialog(){
|
||||
function setupImageTemplateUpdateDialog(){
|
||||
|
||||
//Append to DOM
|
||||
dialogs_context.append('<div id="image_template_update_dialog" title="Update image template"></div>');
|
||||
dialogs_context.append('<div id="image_template_update_dialog" title="'+tr("Update image template")+'"></div>');
|
||||
var dialog = $('#image_template_update_dialog',dialogs_context);
|
||||
|
||||
//Put HTML in place
|
||||
@ -860,21 +862,22 @@ function setupImageTemplateUpdateDialog(){
|
||||
var id = $(this).val();
|
||||
if (id && id.length){
|
||||
var dialog = $('#image_template_update_dialog');
|
||||
$('#image_template_update_textarea',dialog).val("Loading...");
|
||||
$('#image_template_update_textarea',dialog).val(tr("Loading")+
|
||||
"...");
|
||||
|
||||
var img_public = is_public_image(id);
|
||||
var img_persistent = is_persistent_image(id)
|
||||
|
||||
if (img_public){
|
||||
$('#image_template_update_public',dialog).attr("checked","checked")
|
||||
$('#image_template_update_public',dialog).attr('checked','checked')
|
||||
} else {
|
||||
$('#image_template_update_public',dialog).removeAttr("checked")
|
||||
$('#image_template_update_public',dialog).removeAttr('checked')
|
||||
}
|
||||
|
||||
if (img_persistent){
|
||||
$('#image_template_update_persistent',dialog).attr("checked","checked")
|
||||
$('#image_template_update_persistent',dialog).attr('checked','checked')
|
||||
} else {
|
||||
$('#image_template_update_persistent',dialog).removeAttr("checked")
|
||||
$('#image_template_update_persistent',dialog).removeAttr('checked')
|
||||
}
|
||||
|
||||
Sunstone.runAction("Image.fetch_template",id);
|
||||
@ -928,12 +931,12 @@ function popUpImageTemplateUpdateDialog(){
|
||||
var dialog = $('#image_template_update_dialog');
|
||||
$('#image_template_update_select',dialog).html(select);
|
||||
$('#image_template_update_textarea',dialog).val("");
|
||||
$('#image_template_update_public',dialog).removeAttr("checked")
|
||||
$('#image_template_update_persistent',dialog).removeAttr("checked")
|
||||
$('#image_template_update_public',dialog).removeAttr('checked')
|
||||
$('#image_template_update_persistent',dialog).removeAttr('checked')
|
||||
|
||||
if (sel_elems.length >= 1){ //several items in the list are selected
|
||||
//grep them
|
||||
var new_select= sel_elems.length > 1? '<option value="">Please select</option>' : "";
|
||||
var new_select= sel_elems.length > 1? '<option value="">'+tr("Please select")+'</option>' : "";
|
||||
$('option','<select>'+select+'</select>').each(function(){
|
||||
var val = $(this).val();
|
||||
if ($.inArray(val,sel_elems) >= 0){
|
||||
@ -942,7 +945,7 @@ function popUpImageTemplateUpdateDialog(){
|
||||
});
|
||||
$('#image_template_update_select',dialog).html(new_select);
|
||||
if (sel_elems.length == 1) {
|
||||
$('#image_template_update_select option',dialog).attr("selected","selected");
|
||||
$('#image_template_update_select option',dialog).attr('selected','selected');
|
||||
$('#image_template_update_select',dialog).trigger("change");
|
||||
}
|
||||
|
||||
@ -958,7 +961,7 @@ function setImageAutorefresh() {
|
||||
setInterval(function(){
|
||||
var checked = $('input.check_item:checked',dataTable_images);
|
||||
var filter = $("#datatable_images_filter input",
|
||||
dataTable_images.parents("#datatable_images_wrapper")).attr("value");
|
||||
dataTable_images.parents("#datatable_images_wrapper")).attr('value');
|
||||
if (!checked.length && !filter.length){
|
||||
Sunstone.runAction("Image.autorefresh");
|
||||
}
|
||||
@ -967,23 +970,23 @@ function setImageAutorefresh() {
|
||||
|
||||
function is_public_image(id){
|
||||
var data = getElementData(id,"#image",dataTable_images)[7];
|
||||
return $(data).attr("checked");
|
||||
return $(data).attr('checked');
|
||||
};
|
||||
|
||||
function is_persistent_image(id){
|
||||
var data = getElementData(id,"#image",dataTable_images)[8];
|
||||
return $(data).attr("checked");
|
||||
return $(data).attr('checked');
|
||||
};
|
||||
|
||||
function setupImageActionCheckboxes(){
|
||||
$('input.action_cb#cb_public_image',dataTable_images).live("click",function(){
|
||||
var $this = $(this)
|
||||
var id=$this.attr("elem_id");
|
||||
if ($this.attr("checked")){
|
||||
var id=$this.attr('elem_id');
|
||||
if ($this.attr('checked')){
|
||||
if (!is_persistent_image(id))
|
||||
Sunstone.runAction("Image.publish",id);
|
||||
else {
|
||||
notifyError("Image cannot be public and persistent");
|
||||
notifyError(tr("Image cannot be public and persistent"));
|
||||
return false;
|
||||
};
|
||||
} else Sunstone.runAction("Image.unpublish",id);
|
||||
@ -993,12 +996,12 @@ function setupImageActionCheckboxes(){
|
||||
|
||||
$('input.action_cb#cb_persistent_image',dataTable_images).live("click",function(){
|
||||
var $this = $(this)
|
||||
var id=$this.attr("elem_id");
|
||||
if ($this.attr("checked")){
|
||||
var id=$this.attr('elem_id');
|
||||
if ($this.attr('checked')){
|
||||
if (!is_public_image(id))
|
||||
Sunstone.runAction("Image.persistent",id);
|
||||
else {
|
||||
notifyError("Image cannot be public and persistent");
|
||||
notifyError(tr("Image cannot be public and persistent"));
|
||||
return false;
|
||||
};
|
||||
} else Sunstone.runAction("Image.nonpersistent",id);
|
||||
@ -1009,7 +1012,7 @@ function setupImageActionCheckboxes(){
|
||||
$('select.action_cb#select_chtype_image', dataTable_images).live("change",function(){
|
||||
var $this = $(this);
|
||||
var value = $this.val();
|
||||
var id = $this.attr("elem_id");
|
||||
var id = $this.attr('elem_id');
|
||||
|
||||
Sunstone.runAction("Image.chtype", id, value);
|
||||
});
|
||||
@ -1030,7 +1033,11 @@ $(document).ready(function(){
|
||||
{ "sWidth": "35px", "aTargets": [1,5,11] },
|
||||
{ "sWidth": "100px", "aTargets": [6] },
|
||||
{ "sWidth": "150px", "aTargets": [7] }
|
||||
]
|
||||
],
|
||||
"oLanguage": (datatable_lang != "") ?
|
||||
{
|
||||
sUrl: "locale/"+lang+"/"+datatable_lang
|
||||
} : ""
|
||||
});
|
||||
|
||||
dataTable_images.fnClearTable();
|
||||
@ -1048,4 +1055,6 @@ $(document).ready(function(){
|
||||
initCheckAllBoxes(dataTable_images);
|
||||
tableCheckboxesListener(dataTable_images);
|
||||
imageInfoListener();
|
||||
|
||||
|
||||
})
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -27,11 +27,11 @@ var users_tab_content =
|
||||
<table id="datatable_users" class="display">\
|
||||
<thead>\
|
||||
<tr>\
|
||||
<th class="check"><input type="checkbox" class="check_all" value="">All</input></th>\
|
||||
<th>ID</th>\
|
||||
<th>Name</th>\
|
||||
<th>Group</th>\
|
||||
<th>Authentication driver</th>\
|
||||
<th class="check"><input type="checkbox" class="check_all" value="">'+tr("All")+'</input></th>\
|
||||
<th>'+tr("ID")+'</th>\
|
||||
<th>'+tr("Name")+'</th>\
|
||||
<th>'+tr("Group")+'</th>\
|
||||
<th>'+tr("Authentication driver")+'</th>\
|
||||
</tr>\
|
||||
</thead>\
|
||||
<tbody id="tbodyusers">\
|
||||
@ -43,18 +43,18 @@ var create_user_tmpl =
|
||||
'<form id="create_user_form" action="">\
|
||||
<fieldset>\
|
||||
<div>\
|
||||
<label for="username">Username:</label>\
|
||||
<label for="username">'+tr("Username")+':</label>\
|
||||
<input type="text" name="username" id="username" /><br />\
|
||||
<label for="pass">Password:</label>\
|
||||
<label for="pass">'+tr("Password")+':</label>\
|
||||
<input type="password" name="pass" id="pass" />\
|
||||
<label for="driver">Authentication:</label>\
|
||||
<label for="driver">'+tr("Authentication")+':</label>\
|
||||
<select name="driver" id="driver">\
|
||||
<option value="core" selected="selected">Core</option>\
|
||||
<option value="ssh">SSH</option>\
|
||||
<option value="x509">x509</option>\
|
||||
<option value="server_cipher">Server (Cipher)</option>\
|
||||
<option value="server_x509">Server (x509)</option>\
|
||||
<option value="public">Public</option>\
|
||||
<option value="core" selected="selected">'+tr("Core")+'</option>\
|
||||
<option value="ssh">'+tr("SSH")+'</option>\
|
||||
<option value="x509">'+tr("x509")+'</option>\
|
||||
<option value="server_cipher">'+tr("Server (Cipher)")+'</option>\
|
||||
<option value="server_x509">'+tr("Server (x509)")+'</option>\
|
||||
<option value="public">'+tr("Public")+'</option>\
|
||||
</select>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
@ -69,15 +69,15 @@ var create_user_tmpl =
|
||||
var update_pw_tmpl = '<form id="update_user_pw_form" action="">\
|
||||
<fieldset>\
|
||||
<div>\
|
||||
<div>This will change the password for the selected users:</div>\
|
||||
<label for="new_password">New password:</label>\
|
||||
<div>'+tr("This will change the password for the selected users")+':</div>\
|
||||
<label for="new_password">'+tr("New password")+':</label>\
|
||||
<input type="password" name="new_password" id="new_password" />\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
<fieldset>\
|
||||
<div class="form_buttons">\
|
||||
<button class="button" id="update_pw_submit" value="user/create">Change</button>\
|
||||
<button class="button" type="reset" value="reset">Reset</button>\
|
||||
<button class="button" id="update_pw_submit" value="User.update">'+tr("Change")+'</button>\
|
||||
<button class="button" type="reset" value="reset">'+tr("Reset")+'</button>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
</form>';
|
||||
@ -222,7 +222,7 @@ var user_actions = {
|
||||
type: "single",
|
||||
call: OpenNebula.User.update,
|
||||
callback: function() {
|
||||
notifyMessage("Template updated correctly");
|
||||
notifyMessage(tr("Template updated correctly"));
|
||||
},
|
||||
error: onError
|
||||
}
|
||||
@ -232,40 +232,40 @@ var user_actions = {
|
||||
var user_buttons = {
|
||||
"User.refresh" : {
|
||||
type: "image",
|
||||
text: "Refresh list",
|
||||
text: tr("Refresh list"),
|
||||
img: "images/Refresh-icon.png"
|
||||
},
|
||||
"User.create_dialog" : {
|
||||
type: "create_dialog",
|
||||
text: "+ New"
|
||||
text: tr("+ New")
|
||||
},
|
||||
"User.update_dialog" : {
|
||||
type: "action",
|
||||
text: "Update a template",
|
||||
text: tr("Update a template"),
|
||||
alwaysActive: true
|
||||
},
|
||||
"User.update_password" : {
|
||||
type : "action",
|
||||
text : "Change password",
|
||||
text : tr("Change password"),
|
||||
},
|
||||
"User.chgrp" : {
|
||||
type: "confirm_with_select",
|
||||
text: "Change group",
|
||||
text: tr("Change group"),
|
||||
select: groups_sel,
|
||||
tip: "This will change the main group of the selected users. Select the new group:"
|
||||
tip: tr("This will change the main group of the selected users. Select the new group")+":"
|
||||
},
|
||||
"User.chauth" : {
|
||||
type: "confirm_with_select",
|
||||
text: "Change authentication",
|
||||
text: tr("Change authentication"),
|
||||
select: function() {
|
||||
return '<option value="core" selected="selected">Core</option>\
|
||||
<option value="ssh">SSH</option>\
|
||||
<option value="x509">x509</option>\
|
||||
<option value="server_cipher">Server (Cipher)</option>\
|
||||
<option value="server_x509">Server (x509)</option>\
|
||||
<option value="public">Public</option>'
|
||||
return '<option value="core" selected="selected">'+tr("Core")+'</option>\
|
||||
<option value="ssh">'+tr("SSH")+'</option>\
|
||||
<option value="x509">'+tr("x509")+'</option>\
|
||||
<option value="server_cipher">'+tr("Server (Cipher)")+'</option>\
|
||||
<option value="server_x509">'+tr("Server (x509)")+'</option>\
|
||||
<option value="public">'+tr("Public")+'</option>'
|
||||
},
|
||||
tip: "Please choose the new type of authentication for the selected users:"
|
||||
tip: tr("Please choose the new type of authentication for the selected users")+":"
|
||||
},
|
||||
// "User.addgroup" : {
|
||||
// type: "confirm_with_select",
|
||||
@ -288,7 +288,7 @@ var user_buttons = {
|
||||
}
|
||||
|
||||
var users_tab = {
|
||||
title: "Users",
|
||||
title: tr("Users"),
|
||||
content: users_tab_content,
|
||||
buttons: user_buttons
|
||||
}
|
||||
@ -358,7 +358,7 @@ function updateUsersView(request,users_list){
|
||||
|
||||
// Prepare the user creation dialog
|
||||
function setupCreateUserDialog(){
|
||||
dialogs_context.append('<div title="Create user" id="create_user_dialog"></div>');
|
||||
dialogs_context.append('<div title=\"'+tr("Create user")+'\" id="create_user_dialog"></div>');
|
||||
$create_user_dialog = $('#create_user_dialog',dialogs_context);
|
||||
var dialog = $create_user_dialog;
|
||||
dialog.html(create_user_tmpl);
|
||||
@ -378,7 +378,7 @@ function setupCreateUserDialog(){
|
||||
var driver = $('#driver', this).val();
|
||||
|
||||
if (!user_name.length || !user_password.length){
|
||||
notifyError("User name and password must be filled in");
|
||||
notifyError(tr("User name and password must be filled in"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -395,7 +395,7 @@ function setupCreateUserDialog(){
|
||||
}
|
||||
|
||||
function setupUpdatePasswordDialog(){
|
||||
dialogs_context.append('<div title="Change password" id="update_user_pw_dialog"></div>');
|
||||
dialogs_context.append('<div title="'+tr("Change password")+'" id="update_user_pw_dialog"></div>');
|
||||
$update_pw_dialog = $('#update_user_pw_dialog',dialogs_context);
|
||||
var dialog = $update_pw_dialog;
|
||||
dialog.html(update_pw_tmpl);
|
||||
@ -413,7 +413,7 @@ function setupUpdatePasswordDialog(){
|
||||
var pw=$('#new_password',this).val();
|
||||
|
||||
if (!pw.length){
|
||||
notifyError("Fill in a new password");
|
||||
notifyError(tr("Fill in a new password"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -439,7 +439,7 @@ function setUserAutorefresh(){
|
||||
setInterval(function(){
|
||||
var checked = $('input.check_item:checked',dataTable_users);
|
||||
var filter = $("#datatable_users_filter input",
|
||||
dataTable_users.parents("#datatable_users_wrapper")).attr("value");
|
||||
dataTable_users.parents("#datatable_users_wrapper")).attr('value');
|
||||
if (!checked.length && !filter.length){
|
||||
Sunstone.runAction("User.autorefresh");
|
||||
}
|
||||
@ -458,7 +458,11 @@ $(document).ready(function(){
|
||||
{ "sWidth": "60px", "aTargets": [0] },
|
||||
{ "sWidth": "35px", "aTargets": [1] },
|
||||
{ "sWidth": "150px", "aTargets": [4] }
|
||||
]
|
||||
],
|
||||
"oLanguage": (datatable_lang != "") ?
|
||||
{
|
||||
sUrl: "locale/"+lang+"/"+datatable_lang
|
||||
} : ""
|
||||
});
|
||||
dataTable_users.fnClearTable();
|
||||
addElement([
|
||||
|
@ -25,22 +25,22 @@ function loadVNC(){
|
||||
loadVNC();
|
||||
|
||||
var vm_graphs = [
|
||||
{ title : "CPU",
|
||||
{ title : tr("CPU"),
|
||||
monitor_resources : "cpu_usage",
|
||||
humanize_figures : false,
|
||||
history_length : VM_HISTORY_LENGTH
|
||||
},
|
||||
{ title : "Memory",
|
||||
{ title : tr("Memory"),
|
||||
monitor_resources : "mem_usage",
|
||||
humanize_figures : true,
|
||||
history_length : VM_HISTORY_LENGTH
|
||||
},
|
||||
{ title : "Network transmission",
|
||||
{ title : tr("Network transmission"),
|
||||
monitor_resources : "net_tx",
|
||||
humanize_figures : true,
|
||||
history_length : VM_HISTORY_LENGTH
|
||||
},
|
||||
{ title : "Network reception",
|
||||
{ title : tr("Network reception"),
|
||||
monitor_resources : "net_rx",
|
||||
humanize_figures : true,
|
||||
history_length : VM_HISTORY_LENGTH
|
||||
@ -54,17 +54,17 @@ var vms_tab_content =
|
||||
<table id="datatable_vmachines" class="display">\
|
||||
<thead>\
|
||||
<tr>\
|
||||
<th class="check"><input type="checkbox" class="check_all" value="">All</input></th>\
|
||||
<th>ID</th>\
|
||||
<th>Owner</th>\
|
||||
<th>Group</th>\
|
||||
<th>Name</th>\
|
||||
<th>Status</th>\
|
||||
<th>CPU</th>\
|
||||
<th>Memory</th>\
|
||||
<th>Hostname</th>\
|
||||
<th>Start Time</th>\
|
||||
<th>VNC Access</th>\
|
||||
<th class="check"><input type="checkbox" class="check_all" value="">'+tr("All")+'</input></th>\
|
||||
<th>'+tr("ID")+'</th>\
|
||||
<th>'+tr("Owner")+'</th>\
|
||||
<th>'+tr("Group")+'</th>\
|
||||
<th>'+tr("Name")+'</th>\
|
||||
<th>'+tr("Status")+'</th>\
|
||||
<th>'+tr("CPU")+'</th>\
|
||||
<th>'+tr("Memory")+'</th>\
|
||||
<th>'+tr("Hostname")+'</th>\
|
||||
<th>'+tr("Start Time")+'</th>\
|
||||
<th>'+tr("VNC Access")+'</th>\
|
||||
</tr>\
|
||||
</thead>\
|
||||
<tbody id="tbodyvmachines">\
|
||||
@ -75,19 +75,19 @@ var vms_tab_content =
|
||||
var create_vm_tmpl ='<form id="create_vm_form" action="">\
|
||||
<fieldset>\
|
||||
<div>\
|
||||
<label for="vm_name">VM Name:</label>\
|
||||
<label for="vm_name">'+tr("VM Name")+':</label>\
|
||||
<input type="text" name="vm_name" id="vm_name" /><br />\
|
||||
<label for="template_id">Select template:</label>\
|
||||
<label for="template_id">'+tr("Select template")+':</label>\
|
||||
<select id="template_id">\
|
||||
</select><br />\
|
||||
<label for="vm_n_times">Deploy # VMs:</label>\
|
||||
<label for="vm_n_times">'+tr("Deploy # VMs")+':</label>\
|
||||
<input type="text" name="vm_n_times" id="vm_n_times" value="1">\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
<fieldset>\
|
||||
<div class="form_buttons">\
|
||||
<button class="button" id="create_vm_proceed" value="VM.create">Create</button>\
|
||||
<button class="button" type="reset" value="reset">Reset</button>\
|
||||
<button class="button" id="create_vm_proceed" value="VM.create">'+tr("Create")+'</button>\
|
||||
<button class="button" type="reset" value="reset">'+tr("Reset")+'</button>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
</form>';
|
||||
@ -372,36 +372,36 @@ var vm_actions = {
|
||||
var vm_buttons = {
|
||||
"VM.refresh" : {
|
||||
type: "image",
|
||||
text: "Refresh list",
|
||||
text: tr("Refresh list"),
|
||||
img: "images/Refresh-icon.png"
|
||||
},
|
||||
|
||||
"VM.create_dialog" : {
|
||||
type: "action",
|
||||
text: "+ New",
|
||||
text: tr("+ New"),
|
||||
alwaysActive: true
|
||||
},
|
||||
|
||||
"VM.chown" : {
|
||||
type: "confirm_with_select",
|
||||
text: "Change owner",
|
||||
text: tr("Change owner"),
|
||||
select: users_sel,
|
||||
tip: "Select the new owner:",
|
||||
tip: tr("Select the new owner")+":",
|
||||
condition: mustBeAdmin
|
||||
},
|
||||
|
||||
"VM.chgrp" : {
|
||||
type: "confirm_with_select",
|
||||
text: "Change group",
|
||||
text: tr("Change group"),
|
||||
select: groups_sel,
|
||||
tip: "Select the new group:",
|
||||
tip: tr("Select the new group")+":",
|
||||
condition: mustBeAdmin
|
||||
},
|
||||
|
||||
"VM.shutdown" : {
|
||||
type: "confirm",
|
||||
text: "Shutdown",
|
||||
tip: "This will initiate the shutdown process in the selected VMs"
|
||||
text: tr("Shutdown"),
|
||||
tip: tr("This will initiate the shutdown process in the selected VMs")
|
||||
},
|
||||
|
||||
"action_list" : {
|
||||
@ -409,97 +409,97 @@ var vm_buttons = {
|
||||
actions: {
|
||||
"VM.deploy" : {
|
||||
type: "confirm_with_select",
|
||||
text: "Deploy",
|
||||
tip: "This will deploy the selected VMs on the chosen host",
|
||||
text: tr("Deploy"),
|
||||
tip: tr("This will deploy the selected VMs on the chosen host"),
|
||||
select: hosts_sel,
|
||||
condition: mustBeAdmin
|
||||
},
|
||||
"VM.migrate" : {
|
||||
type: "confirm_with_select",
|
||||
text: "Migrate",
|
||||
tip: "This will migrate the selected VMs to the chosen host",
|
||||
text: tr("Migrate"),
|
||||
tip: tr("This will migrate the selected VMs to the chosen host"),
|
||||
select: hosts_sel,
|
||||
condition: mustBeAdmin
|
||||
|
||||
},
|
||||
"VM.livemigrate" : {
|
||||
type: "confirm_with_select",
|
||||
text: "Live migrate",
|
||||
tip: "This will live-migrate the selected VMs to the chosen host",
|
||||
text: tr("Live migrate"),
|
||||
tip: tr("This will live-migrate the selected VMs to the chosen host"),
|
||||
select: hosts_sel,
|
||||
condition: mustBeAdmin
|
||||
},
|
||||
"VM.hold" : {
|
||||
type: "confirm",
|
||||
text: "Hold",
|
||||
tip: "This will hold selected pending VMs from being deployed"
|
||||
text: tr("Hold"),
|
||||
tip: tr("This will hold selected pending VMs from being deployed")
|
||||
},
|
||||
"VM.release" : {
|
||||
type: "confirm",
|
||||
text: "Release",
|
||||
tip: "This will release held machines"
|
||||
text: tr("Release"),
|
||||
tip: tr("This will release held machines")
|
||||
},
|
||||
"VM.suspend" : {
|
||||
type: "confirm",
|
||||
text: "Suspend",
|
||||
tip: "This will suspend selected machines"
|
||||
text: tr("Suspend"),
|
||||
tip: tr("This will suspend selected machines")
|
||||
},
|
||||
"VM.resume" : {
|
||||
type: "confirm",
|
||||
text: "Resume",
|
||||
tip: "This will resume selected stopped or suspended VMs"
|
||||
text: tr("Resume"),
|
||||
tip: tr("This will resume selected stopped or suspended VMs")
|
||||
},
|
||||
"VM.stop" : {
|
||||
type: "confirm",
|
||||
text: "Stop",
|
||||
text: tr("Stop"),
|
||||
tip: "This will stop selected VMs"
|
||||
},
|
||||
"VM.restart" : {
|
||||
type: "confirm",
|
||||
text: "Restart",
|
||||
tip: "This will redeploy selected VMs (in UNKNOWN or BOOT state)"
|
||||
text: tr("Restart"),
|
||||
tip: tr("This will redeploy selected VMs (in UNKNOWN or BOOT state)")
|
||||
},
|
||||
"VM.resubmit" : {
|
||||
type: "confirm",
|
||||
text: "Resubmit",
|
||||
tip: "This will resubmits VMs to PENDING state"
|
||||
text: tr("Resubmit"),
|
||||
tip: tr("This will resubmits VMs to PENDING state")
|
||||
},
|
||||
"VM.saveasmultiple" : {
|
||||
type: "action",
|
||||
text: "Save as"
|
||||
text: tr("Save as")
|
||||
},
|
||||
"VM.cancel" : {
|
||||
type: "confirm",
|
||||
text: "Cancel",
|
||||
tip: "This will cancel selected VMs"
|
||||
text: tr("Cancel"),
|
||||
tip: tr("This will cancel selected VMs")
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"VM.delete" : {
|
||||
type: "confirm",
|
||||
text: "Delete",
|
||||
tip: "This will delete the selected VMs from the database"
|
||||
text: tr("Delete"),
|
||||
tip: tr("This will delete the selected VMs from the database")
|
||||
}
|
||||
}
|
||||
|
||||
var vm_info_panel = {
|
||||
"vm_info_tab" : {
|
||||
title: "Virtual Machine information",
|
||||
title: tr("Virtual Machine information"),
|
||||
content: ""
|
||||
},
|
||||
"vm_template_tab" : {
|
||||
title: "VM template",
|
||||
title: tr("VM template"),
|
||||
content: ""
|
||||
},
|
||||
"vm_log_tab" : {
|
||||
title: "VM log",
|
||||
title: tr("VM log"),
|
||||
content: ""
|
||||
}
|
||||
}
|
||||
|
||||
var vms_tab = {
|
||||
title: "Virtual Machines",
|
||||
title: tr("Virtual Machines"),
|
||||
content: vms_tab_content,
|
||||
buttons: vm_buttons
|
||||
}
|
||||
@ -617,73 +617,73 @@ function updateVMInfo(request,vm){
|
||||
};
|
||||
|
||||
var info_tab = {
|
||||
title : "VM information",
|
||||
title : tr("VM information"),
|
||||
content:
|
||||
'<table id="info_vm_table" class="info_table">\
|
||||
<thead>\
|
||||
<tr><th colspan="2">Virtual Machine information - '+vm_info.NAME+'</th></tr>\
|
||||
<tr><th colspan="2">'+tr("Virtual Machine information")+' - '+vm_info.NAME+'</th></tr>\
|
||||
</thead>\
|
||||
<tbody>\
|
||||
<tr>\
|
||||
<td class="key_td">ID</td>\
|
||||
<td class="key_td">'+tr("ID")+'</td>\
|
||||
<td class="value_td">'+vm_info.ID+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Name</td>\
|
||||
<td class="key_td">'+tr("Name")+'</td>\
|
||||
<td class="value_td">'+vm_info.NAME+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Owner</td>\
|
||||
<td class="key_td">'+tr("Owner")+'</td>\
|
||||
<td class="value_td">'+vm_info.UNAME+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Group</td>\
|
||||
<td class="key_td">'+tr("Group")+'</td>\
|
||||
<td class="value_td">'+vm_info.GNAME+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">State</td>\
|
||||
<td class="value_td">'+vm_state+'</td>\
|
||||
<td class="key_td">'+tr("State")+'</td>\
|
||||
<td class="value_td">'+tr(vm_state)+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">LCM State</td>\
|
||||
<td class="value_td">'+OpenNebula.Helper.resource_state("vm_lcm",vm_info.LCM_STATE)+'</td>\
|
||||
<td class="key_td">'+tr("LCM State")+'</td>\
|
||||
<td class="value_td">'+tr(OpenNebula.Helper.resource_state("vm_lcm",vm_info.LCM_STATE))+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Hostname</td>\
|
||||
<td class="key_td">'+tr("Hostname")+'</td>\
|
||||
<td class="value_td">'+ hostname +'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Start time</td>\
|
||||
<td class="key_td">'+tr("Start time")+'</td>\
|
||||
<td class="value_td">'+pretty_time(vm_info.STIME)+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Deploy ID</td>\
|
||||
<td class="key_td">'+tr("Deploy ID")+'</td>\
|
||||
<td class="value_td">'+(typeof(vm_info.DEPLOY_ID) == "object" ? "-" : vm_info.DEPLOY_ID)+'</td>\
|
||||
</tr></tbody>\
|
||||
</table>\
|
||||
<table id="vm_monitoring_table" class="info_table">\
|
||||
<thead>\
|
||||
<tr><th colspan="2">Monitoring information</th></tr>\
|
||||
<tr><th colspan="2">'+tr("Monitoring information")+'</th></tr>\
|
||||
</thead>\
|
||||
<tbody>\
|
||||
<tr>\
|
||||
<td class="key_td">Net_TX</td>\
|
||||
<td class="key_td">'+tr("Net_TX")+'</td>\
|
||||
<td class="value_td">'+vm_info.NET_TX+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Net_RX</td>\
|
||||
<td class="key_td">'+tr("Net_RX")+'</td>\
|
||||
<td class="value_td">'+vm_info.NET_RX+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Used Memory</td>\
|
||||
<td class="key_td">'+tr("Used Memory")+'</td>\
|
||||
<td class="value_td">'+humanize_size(vm_info.MEMORY)+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Used CPU</td>\
|
||||
<td class="key_td">'+tr("Used CPU")+'</td>\
|
||||
<td class="value_td">'+vm_info.CPU+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">VNC Session</td>\
|
||||
<td class="key_td">'+tr("VNC Session")+'</td>\
|
||||
<td class="value_td">'+vncIcon(vm_info)+'</td>\
|
||||
</tr>\
|
||||
</tbody>\
|
||||
@ -691,21 +691,21 @@ function updateVMInfo(request,vm){
|
||||
}
|
||||
|
||||
var template_tab = {
|
||||
title: "VM Template",
|
||||
title: tr("VM Template"),
|
||||
content:
|
||||
'<table id="vm_template_table" class="info_table" style="width:80%">\
|
||||
<thead><tr><th colspan="2">VM template</th></tr></thead>'+
|
||||
<thead><tr><th colspan="2">'+tr("VM template")+'</th></tr></thead>'+
|
||||
prettyPrintJSON(vm_info.TEMPLATE)+
|
||||
'</table>'
|
||||
}
|
||||
|
||||
var log_tab = {
|
||||
title: "VM log",
|
||||
title: tr("VM log"),
|
||||
content: '<div>'+spinner+'</div>'
|
||||
}
|
||||
|
||||
var monitoring_tab = {
|
||||
title: "Monitoring information",
|
||||
title: tr("Monitoring information"),
|
||||
content: generateMonitoringDivs(vm_graphs,"vm_monitor_")
|
||||
}
|
||||
|
||||
@ -726,7 +726,7 @@ function updateVMInfo(request,vm){
|
||||
// which is a lot.
|
||||
function setupCreateVMDialog(){
|
||||
|
||||
dialogs_context.append('<div title="Create Virtual Machine" id="create_vm_dialog"></div>');
|
||||
dialogs_context.append('<div title=\"'+tr("Create Virtual Machine")+'\" id="create_vm_dialog"></div>');
|
||||
//Insert HTML in place
|
||||
$create_vm_dialog = $('#create_vm_dialog')
|
||||
var dialog = $create_vm_dialog;
|
||||
@ -748,7 +748,7 @@ function setupCreateVMDialog(){
|
||||
var n_times_int=1;
|
||||
|
||||
if (!template_id.length){
|
||||
notifyError("You have not selected a template");
|
||||
notifyError(tr("You have not selected a template"));
|
||||
return false;
|
||||
};
|
||||
|
||||
@ -778,7 +778,7 @@ function popUpCreateVMDialog(){
|
||||
//Prepares a dialog to saveas a VM
|
||||
function setupSaveasDialog(){
|
||||
//Append to DOM
|
||||
dialogs_context.append('<div id="saveas_vm_dialog" title="VM Save As"></div>');
|
||||
dialogs_context.append('<div id="saveas_vm_dialog" title=\"'+tr("VM Save As")+'\"></div>');
|
||||
$saveas_vm_dialog = $('#saveas_vm_dialog',dialogs_context);
|
||||
var dialog = $saveas_vm_dialog;
|
||||
|
||||
@ -788,8 +788,8 @@ function setupSaveasDialog(){
|
||||
<div id="saveas_tabs">\
|
||||
</div>\
|
||||
<div class="form_buttons">\
|
||||
<button id="vm_saveas_proceed" value="">OK</button>\
|
||||
<button id="vm_saveas_cancel" value="">Cancel</button>\
|
||||
<button id="vm_saveas_proceed" value="">'+tr("OK")+'</button>\
|
||||
<button id="vm_saveas_cancel" value="">'+tr("Cancel")+'</button>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
</form>');
|
||||
@ -812,8 +812,8 @@ function setupSaveasDialog(){
|
||||
var type = $('#image_type',this).val();
|
||||
|
||||
if (!id.length || !disk_id.length || !image_name.length) {
|
||||
notifyError("Skipping VM "+id+
|
||||
". No disk id or image name specified");
|
||||
notifyError(tr("Skipping VM ")+id+". "+
|
||||
tr("No disk id or image name specified"));
|
||||
}
|
||||
else {
|
||||
var obj = {
|
||||
@ -850,25 +850,25 @@ function popUpSaveasDialog(elems){
|
||||
var li = '<li><a href="#saveas_tab_'+this+'">VM '+this+'</a></li>'
|
||||
$('#saveas_tabs ul',dialog).append(li);
|
||||
var tab = '<div class="saveas_tab" id="saveas_tab_'+this+'">\
|
||||
<div id="vm_id_text">Saveas for VM with ID <span id="vm_id">'+this+'</span></div>\
|
||||
<div id="vm_id_text">'+tr("Saveas for VM with ID")+' <span id="vm_id">'+this+'</span></div>\
|
||||
<fieldset>\
|
||||
<div>\
|
||||
<label for="vm_disk_id">Select disk:</label>\
|
||||
<label for="vm_disk_id">'+tr("Select disk")+':</label>\
|
||||
<select id="vm_disk_id" name="vm_disk_id">\
|
||||
<option value="">Retrieving...</option>\
|
||||
<option value="">'+tr("Retrieving")+'...</option>\
|
||||
</select>\
|
||||
</div>\
|
||||
<div>\
|
||||
<label for="image_name">Image name:</label>\
|
||||
<label for="image_name">'+tr("Image name")+':</label>\
|
||||
<input type="text" id="image_name" name="image_name" value="" />\
|
||||
</div>\
|
||||
<div>\
|
||||
<label for="img_attr_value">Type:</label>\
|
||||
<label for="img_attr_value">'+tr("Type")+':</label>\
|
||||
<select id="image_type" name="image_type">\
|
||||
<option value="">Default (current image type)</option>\
|
||||
<option value="os">OS</option>\
|
||||
<option value="datablock">Datablock</option>\
|
||||
<option value="cdrom">CD-ROM</option>\
|
||||
<option value="">'+tr("Default (current image type)")+'</option>\
|
||||
<option value="os">'+tr("OS")+'</option>\
|
||||
<option value="datablock">'+tr("Datablock")+'</option>\
|
||||
<option value="cdrom">'+tr("CD-ROM")+'</oqption>\
|
||||
</select>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
@ -888,15 +888,15 @@ function saveasDisksCallback(req,response){
|
||||
|
||||
var gen_option = function(id, name, source){
|
||||
if (name){
|
||||
return '<option value="'+id+'">'+name+' (disk id: '+id+')</option>';
|
||||
return '<option value="'+id+'">'+name+" ("+tr("disk id")+"): "+id+')</option>';
|
||||
}
|
||||
else {
|
||||
return '<option value="'+id+'">'+source+' (disk id: '+id+')</option>';
|
||||
return '<option value="'+id+'">'+source+" ("+tr("disk id")+"): "+id+')</option>';
|
||||
}
|
||||
}
|
||||
|
||||
var disks = vm_info.TEMPLATE.DISK;
|
||||
if (!disks) { select = '<option value="">No disks defined</option>';}
|
||||
if (!disks) { select = '<option value="">'+tr("No disks defined")+'</option>';}
|
||||
else if (disks.constructor == Array) //several disks
|
||||
{
|
||||
for (var i=0;i<disks.length;i++){
|
||||
@ -915,7 +915,7 @@ function setVMAutorefresh(){
|
||||
setInterval(function(){
|
||||
var checked = $('input.check_item:checked',dataTable_vMachines);
|
||||
var filter = $("#datatable_vmachines_filter input",
|
||||
dataTable_vMachines.parents('#datatable_vmachines_wrapper')).attr("value");
|
||||
dataTable_vMachines.parents('#datatable_vmachines_wrapper')).attr('value');
|
||||
if (!checked.length && !filter.length){
|
||||
Sunstone.runAction("VM.autorefresh");
|
||||
};
|
||||
@ -960,14 +960,14 @@ function updateVNCState(rfb, state, oldstate, msg) {
|
||||
function setupVNC(){
|
||||
|
||||
//Append to DOM
|
||||
dialogs_context.append('<div id="vnc_dialog" title="VNC connection"></div>');
|
||||
dialogs_context.append('<div id="vnc_dialog" title=\"'+tr("VNC connection")+'\"></div>');
|
||||
$vnc_dialog = $('#vnc_dialog',dialogs_context);
|
||||
var dialog = $vnc_dialog;
|
||||
|
||||
dialog.html('\
|
||||
<div id="VNC_status_bar" class="VNC_status_bar" style="margin-top: 0px;">\
|
||||
<table border=0 width="100%"><tr>\
|
||||
<td><div id="VNC_status">Loading</div></td>\
|
||||
<td><div id="VNC_status">'+tr("Loading")+'</div></td>\
|
||||
<td width="1%"><div id="VNC_buttons">\
|
||||
<input type=button value="Send CtrlAltDel"\
|
||||
id="sendCtrlAltDelButton">\
|
||||
@ -975,7 +975,7 @@ function setupVNC(){
|
||||
</tr></table>\
|
||||
</div>\
|
||||
<canvas id="VNC_canvas" width="640px" height="20px">\
|
||||
Canvas not supported.\
|
||||
'+tr("Canvas not supported.")+'\
|
||||
</canvas>\
|
||||
');
|
||||
|
||||
@ -993,16 +993,16 @@ function setupVNC(){
|
||||
});
|
||||
|
||||
dialog.bind( "dialogclose", function(event, ui) {
|
||||
var id = $vnc_dialog.attr("vm_id");
|
||||
var id = $vnc_dialog.attr('vm_id');
|
||||
rfb.disconnect();
|
||||
Sunstone.runAction("VM.stopvnc",id);
|
||||
});
|
||||
|
||||
$('.vnc',main_tabs_context).live("click",function(){
|
||||
//Which VM is it?
|
||||
var id = $(this).attr("vm_id");
|
||||
var id = $(this).attr('vm_id');
|
||||
//Set attribute to dialog
|
||||
$vnc_dialog.attr("vm_id",id);
|
||||
$vnc_dialog.attr('vm_id',id);
|
||||
//Request proxy server start
|
||||
Sunstone.runAction("VM.startvnc",id);
|
||||
return false;
|
||||
@ -1037,10 +1037,10 @@ function vncIcon(vm){
|
||||
var gr_icon;
|
||||
if (graphics && graphics.TYPE == "vnc" && state == "RUNNING"){
|
||||
gr_icon = '<a class="vnc" href="#" vm_id="'+vm.ID+'">';
|
||||
gr_icon += '<img src="images/vnc_on.png" alt="Open VNC Session" /></a>';
|
||||
gr_icon += '<img src="images/vnc_on.png" alt=\"'+tr("Open VNC Session")+'\" /></a>';
|
||||
}
|
||||
else {
|
||||
gr_icon = '<img src="images/vnc_off.png" alt="VNC Disabled" />';
|
||||
gr_icon = '<img src="images/vnc_off.png" alt=\"'+tr("VNC Disabled")+'\" />';
|
||||
}
|
||||
return gr_icon;
|
||||
}
|
||||
@ -1068,7 +1068,11 @@ $(document).ready(function(){
|
||||
{ "sWidth": "35px", "aTargets": [1,10] },
|
||||
{ "sWidth": "150px", "aTargets": [5,9] },
|
||||
{ "sWidth": "100px", "aTargets": [2,3] }
|
||||
]
|
||||
],
|
||||
"oLanguage": (datatable_lang != "") ?
|
||||
{
|
||||
sUrl: "locale/"+lang+"/"+datatable_lang
|
||||
} : ""
|
||||
});
|
||||
|
||||
dataTable_vMachines.fnClearTable();
|
||||
|
@ -23,15 +23,15 @@ var vnets_tab_content =
|
||||
<table id="datatable_vnetworks" class="display">\
|
||||
<thead>\
|
||||
<tr>\
|
||||
<th class="check"><input type="checkbox" class="check_all" value="">All</input></th>\
|
||||
<th>ID</th>\
|
||||
<th>Owner</th>\
|
||||
<th>Group</th>\
|
||||
<th>Name</th>\
|
||||
<th>Type</th>\
|
||||
<th>Bridge</th>\
|
||||
<th>Public</th>\
|
||||
<th>Total Leases</th>\
|
||||
<th class="check"><input type="checkbox" class="check_all" value="">'+tr("All")+'</input></th>\
|
||||
<th>'+tr("ID")+'</th>\
|
||||
<th>'+tr("Owner")+'</th>\
|
||||
<th>'+tr("Group")+'</th>\
|
||||
<th>'+tr("Name")+'</th>\
|
||||
<th>'+tr("Type")+'</th>\
|
||||
<th>'+tr("Bridge")+'</th>\
|
||||
<th>'+tr("Public")+'</th>\
|
||||
<th>'+tr("Total Leases")+'</th>\
|
||||
</tr>\
|
||||
</thead>\
|
||||
<tbody id="tbodyvnetworks">\
|
||||
@ -42,40 +42,40 @@ var vnets_tab_content =
|
||||
var create_vn_tmpl =
|
||||
'<div id="vn_tabs">\
|
||||
<ul>\
|
||||
<li><a href="#easy">Wizard</a></li>\
|
||||
<li><a href="#manual">Advanced mode</a></li>\
|
||||
<li><a href="#easy">'+tr("Wizard")+'</a></li>\
|
||||
<li><a href="#manual">'+tr("Advanced mode")+'</a></li>\
|
||||
</ul>\
|
||||
<div id="easy">\
|
||||
<form id="create_vn_form_easy" action="">\
|
||||
<fieldset>\
|
||||
<label for="name">Name:</label>\
|
||||
<label for="name">'+tr("Name")+':</label>\
|
||||
<input type="text" name="name" id="name" /><br />\
|
||||
</fieldset>\
|
||||
<fieldset>\
|
||||
<label for="bridge">Bridge:</label>\
|
||||
<label for="bridge">'+tr("Bridge")+':</label>\
|
||||
<input type="text" name="bridge" id="bridge" /><br />\
|
||||
</fieldset>\
|
||||
<fieldset>\
|
||||
<label style="height:2em;">Network type:</label>\
|
||||
<input type="radio" name="fixed_ranged" id="fixed_check" value="fixed" checked="checked">Fixed network</input><br />\
|
||||
<input type="radio" name="fixed_ranged" id="ranged_check" value="ranged">Ranged network</input><br />\
|
||||
<label style="height:2em;">'+tr("Network type")+':</label>\
|
||||
<input type="radio" name="fixed_ranged" id="fixed_check" value="fixed" checked="checked">'+tr("Fixed network")+'</input><br />\
|
||||
<input type="radio" name="fixed_ranged" id="ranged_check" value="ranged">'+tr("Ranged network")+'</input><br />\
|
||||
</fieldset>\
|
||||
<div class="clear"></div>\
|
||||
<div id="easy_tabs">\
|
||||
<div id="fixed">\
|
||||
<fieldset>\
|
||||
<label for="leaseip">Lease IP:</label>\
|
||||
<label for="leaseip">'+tr("Lease IP")+':</label>\
|
||||
<input type="text" name="leaseip" id="leaseip" /><br />\
|
||||
<label for="leasemac">Lease MAC (opt):</label>\
|
||||
<label for="leasemac">'+tr("Lease MAC (opt):")+'</label>\
|
||||
<input type="text" name="leasemac" id="leasemac" />\
|
||||
<div class="clear"></div>\
|
||||
<button class="add_remove_button add_button" id="add_lease" value="add/lease">\
|
||||
Add\
|
||||
'+tr("Add")+'\
|
||||
</button>\
|
||||
<button class="add_remove_button" id="remove_lease" value="remove/lease">\
|
||||
Remove selected\
|
||||
'+tr("Remove selected")+'\
|
||||
</button>\
|
||||
<label for="leases">Current leases:</label>\
|
||||
<label for="leases">'+tr("Current leases")+':</label>\
|
||||
<select id="leases" name="leases" style="height:10em;" multiple>\
|
||||
<!-- insert leases -->\
|
||||
</select><br />\
|
||||
@ -83,15 +83,15 @@ var create_vn_tmpl =
|
||||
</div>\
|
||||
<div id="ranged">\
|
||||
<fieldset>\
|
||||
<label for="net_address">Network Address:</label>\
|
||||
<label for="net_address">'+tr("Network Address")+':</label>\
|
||||
<input type="text" name="net_address" id="net_address" /><br />\
|
||||
<label for="net_mask">Network Mask:</label>\
|
||||
<label for="net_mask">'+tr("Network Mask")+':</label>\
|
||||
<input type="text" name="net_mask" id="net_mask" /><br />\
|
||||
<label for="custom_pool" style="height:2em;">Define a subnet by IP range:</label>\
|
||||
<label for="custom_pool" style="height:2em;">'+tr("Define a subnet by IP range")+':</label>\
|
||||
<input type="checkbox" name="custom_pool" id="custom_pool" style="margin-bottom:2em;" value="yes" /><br />\
|
||||
<label for="ip_start">IP start:</label>\
|
||||
<label for="ip_start">'+tr("IP Start")+':</label>\
|
||||
<input type="text" name="ip_start" id="ip_start" disabled="disabled" /><br />\
|
||||
<label for="ip_end">IP end:</label>\
|
||||
<label for="ip_end">'+tr("IP End")+':</label>\
|
||||
<input type="text" name="ip_end" id="ip_end" disabled="disabled" />\
|
||||
</fieldset>\
|
||||
</div>\
|
||||
@ -100,14 +100,14 @@ var create_vn_tmpl =
|
||||
</fieldset>\
|
||||
<fieldset>\
|
||||
<div class="">\
|
||||
<label for="custom_var_vnet_name">Name:</label>\
|
||||
<label for="custom_var_vnet_name">'+tr("Name")+':</label>\
|
||||
<input type="text" id="custom_var_vnet_name" name="custom_var_vnet_name" /><br />\
|
||||
<label for="custom_var_vnet_value">Value:</label>\
|
||||
<label for="custom_var_vnet_value">'+tr("Value")+':</label>\
|
||||
<input type="text" id="custom_var_vnet_value" name="custom_var_vnet_value" /><br />\
|
||||
<button class="add_remove_button add_button" id="add_custom_var_vnet_button" value="add_custom_vnet_var">Add</button>\
|
||||
<button class="add_remove_button" id="remove_custom_var_vnet_button" value="remove_custom_vnet_var">Remove selected</button>\
|
||||
<button class="add_remove_button add_button" id="add_custom_var_vnet_button" value="add_custom_vnet_var">'+tr("Add")+'</button>\
|
||||
<button class="add_remove_button" id="remove_custom_var_vnet_button" value="remove_custom_vnet_var">'+tr("Remove selected")+'</button>\
|
||||
<div class="clear"></div>\
|
||||
<label for="custom_var_vnet_box">Custom attributes:</label>\
|
||||
<label for="custom_var_vnet_box">'+tr("Custom attributes")+':</label>\
|
||||
<select id="custom_var_vnet_box" name="custom_var_vnet_box" style="height:100px;" multiple>\
|
||||
</select>\
|
||||
</div>\
|
||||
@ -115,16 +115,16 @@ var create_vn_tmpl =
|
||||
<fieldset>\
|
||||
<div class="form_buttons">\
|
||||
<button class="button" id="create_vn_submit_easy" value="vn/create">\
|
||||
Create\
|
||||
'+tr("Create")+'\
|
||||
</button>\
|
||||
<button class="button" type="reset" value="reset">Reset</button>\
|
||||
<button class="button" type="reset" value="reset">'+tr("Reset")+'</button>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
</form>\
|
||||
</div>\
|
||||
<div id="manual">\
|
||||
<form id="create_vn_form_manual" action="">\
|
||||
<h3 style="margin-bottom:10px;">Write the Virtual Network template here</h3>\
|
||||
<h3 style="margin-bottom:10px;">'+tr("Write the Virtual Network template here")+'</h3>\
|
||||
<fieldset style="border-top:none;">\
|
||||
<textarea id="template" rows="15" style="width:100%;"></textarea>\
|
||||
<div class="clear"></div>\
|
||||
@ -132,9 +132,9 @@ var create_vn_tmpl =
|
||||
<fieldset>\
|
||||
<div class="form_buttons">\
|
||||
<button class="button" id="create_vn_submit_manual" value="vn/create">\
|
||||
Create\
|
||||
'+tr("Create")+'\
|
||||
</button>\
|
||||
<button class="button" type="reset" value="reset">Reset</button>\
|
||||
<button class="button" type="reset" value="reset">'+tr("Reset")+'</button>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
</form>\
|
||||
@ -143,23 +143,23 @@ var create_vn_tmpl =
|
||||
|
||||
var update_vnet_tmpl =
|
||||
'<form action="javascript:alert(\'js error!\');">\
|
||||
<h3 style="margin-bottom:10px;">Please, choose and modify the virtual network you want to update:</h3>\
|
||||
<h3 style="margin-bottom:10px;">'+tr("Please, choose and modify the virtual network you want to update")+':</h3>\
|
||||
<fieldset style="border-top:none;">\
|
||||
<label for="vnet_template_update_select">Select a network:</label>\
|
||||
<label for="vnet_template_update_select">'+tr("Select a network")+':</label>\
|
||||
<select id="vnet_template_update_select" name="vnet_template_update_select"></select>\
|
||||
<div class="clear"></div>\
|
||||
<div>\
|
||||
<label for="vnet_template_update_public">Public:</label>\
|
||||
<label for="vnet_template_update_public">'+tr("Public")+':</label>\
|
||||
<input type="checkbox" name="vnet_template_update_public" id="vnet_template_update_public" />\
|
||||
</div>\
|
||||
<label for="vnet_template_update_textarea">Template:</label>\
|
||||
<label for="vnet_template_update_textarea">'+tr("Template")+':</label>\
|
||||
<div class="clear"></div>\
|
||||
<textarea id="vnet_template_update_textarea" style="width:100%; height:14em;"></textarea>\
|
||||
</fieldset>\
|
||||
<fieldset>\
|
||||
<div class="form_buttons">\
|
||||
<button class="button" id="vnet_template_update_button" value="Network.update_template">\
|
||||
Update\
|
||||
'+tr("Update")+'\
|
||||
</button>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
@ -330,36 +330,36 @@ var vnet_actions = {
|
||||
var vnet_buttons = {
|
||||
"Network.refresh" : {
|
||||
type: "image",
|
||||
text: "Refresh list",
|
||||
text: tr("Refresh list"),
|
||||
img: "images/Refresh-icon.png"
|
||||
},
|
||||
|
||||
"Network.create_dialog" : {
|
||||
type: "create_dialog",
|
||||
text: "+ New"
|
||||
text: tr("+ New")
|
||||
},
|
||||
|
||||
"Network.update_dialog" : {
|
||||
type: "action",
|
||||
text: "Update a template",
|
||||
text: tr("Update a template"),
|
||||
alwaysActive: true
|
||||
},
|
||||
|
||||
"Network.publish" : {
|
||||
type: "action",
|
||||
text: "Publish"
|
||||
text: tr("Publish")
|
||||
},
|
||||
|
||||
"Network.unpublish" : {
|
||||
type: "action",
|
||||
text: "Unpublish"
|
||||
text: tr("Unpublish")
|
||||
},
|
||||
|
||||
"Network.chown" : {
|
||||
type: "confirm_with_select",
|
||||
text: "Change owner",
|
||||
text: tr("Change owner"),
|
||||
select: users_sel,
|
||||
tip: "Select the new owner:",
|
||||
tip: tr("Select the new owner")+":",
|
||||
condition: mustBeAdmin
|
||||
},
|
||||
|
||||
@ -367,29 +367,29 @@ var vnet_buttons = {
|
||||
type: "confirm_with_select",
|
||||
text: "Change group",
|
||||
select: groups_sel,
|
||||
tip: "Select the new group:",
|
||||
tip: tr("Select the new group")+":",
|
||||
condition: mustBeAdmin,
|
||||
},
|
||||
|
||||
"Network.delete" : {
|
||||
type: "action",
|
||||
text: "Delete"
|
||||
text: tr("Delete")
|
||||
}
|
||||
}
|
||||
|
||||
var vnet_info_panel = {
|
||||
"vnet_info_tab" : {
|
||||
title: "Virtual network information",
|
||||
title: tr("Virtual network information"),
|
||||
content: ""
|
||||
},
|
||||
"vnet_leases_tab" : {
|
||||
title: "Lease management",
|
||||
title: tr("Lease management"),
|
||||
content: ""
|
||||
},
|
||||
}
|
||||
|
||||
var vnets_tab = {
|
||||
title: "Virtual Networks",
|
||||
title: tr("Virtual Networks"),
|
||||
content: vnets_tab_content,
|
||||
buttons: vnet_buttons
|
||||
}
|
||||
@ -481,49 +481,50 @@ function updateVNetworkInfo(request,vn){
|
||||
var info_tab_content =
|
||||
'<table id="info_vn_table" class="info_table">\
|
||||
<thead>\
|
||||
<tr><th colspan="2">Virtual Network '+vn_info.ID+' information</th></tr>\
|
||||
<tr><th colspan="2">'+tr("Virtual Network")+' '+vn_info.ID+' '+
|
||||
tr("information")+'</th></tr>\
|
||||
</thead>\
|
||||
<tr>\
|
||||
<td class="key_td">ID</td>\
|
||||
<td class="key_td">'+tr("ID")+'</td>\
|
||||
<td class="value_td">'+vn_info.ID+'</td>\
|
||||
<tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Name</td>\
|
||||
<td class="key_td">'+tr("Name")+'</td>\
|
||||
<td class="value_td">'+vn_info.NAME+'</td>\
|
||||
<tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Owner</td>\
|
||||
<td class="key_td">'+tr("Owner")+'</td>\
|
||||
<td class="value_td">'+vn_info.UNAME+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Group</td>\
|
||||
<td class="key_td">'+tr("Group")+'</td>\
|
||||
<td class="value_td">'+vn_info.GNAME+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Public</td>\
|
||||
<td class="key_td">'+tr("Public")+'</td>\
|
||||
<td class="value_td">'+(parseInt(vn_info.PUBLIC) ? "yes" : "no" )+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">Physical device</td>\
|
||||
<td class="key_td">'+tr("Physical device")+'</td>\
|
||||
<td class="value_td">'+ (typeof(vn_info.PHYDEV) == "object" ? "--": vn_info.PHYDEV) +'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">VNET ID</td>\
|
||||
<td class="key_td">'+tr("VNET ID")+'</td>\
|
||||
<td class="value_td">'+ (typeof(vn_info.VLAN_ID) == "object" ? "--": vn_info.VLAN_ID) +'</td>\
|
||||
</tr>\
|
||||
</table>';
|
||||
|
||||
info_tab_content += '\
|
||||
<table id="vn_template_table" class="info_table">\
|
||||
<thead><tr><th colspan="2">Virtual Network template (attributes)</th></tr></thead>'+
|
||||
<thead><tr><th colspan="2">'+tr("Virtual Network template (attributes)")+'</th></tr></thead>'+
|
||||
prettyPrintJSON(vn_info.TEMPLATE)+
|
||||
'</table>'
|
||||
'</table>';
|
||||
|
||||
|
||||
var leases_tab_content = printLeases(vn_info);
|
||||
|
||||
var info_tab = {
|
||||
title: "Virtual Network information",
|
||||
title: tr("Virtual Network information"),
|
||||
content: info_tab_content
|
||||
};
|
||||
|
||||
@ -542,30 +543,30 @@ function updateVNetworkInfo(request,vn){
|
||||
function printLeases(vn_info){
|
||||
var html ='<form style="display:inline-block;width:80%" id="leases_form" vnid="'+vn_info.ID+'"><table id="vn_leases_info_table" class="info_table" style="width:100%;">\
|
||||
<thead>\
|
||||
<tr><th colspan="2">Leases information</th></tr>\
|
||||
<tr><th colspan="2">'+tr("Leases information")+'</th></tr>\
|
||||
</thead><tbody>';
|
||||
|
||||
if (vn_info.TYPE == "0"){
|
||||
html += '<tr>\
|
||||
<td class="key_td">IP Start</td>\
|
||||
<td class="key_td">'+tr("IP Start")+'</td>\
|
||||
<td class="value_td">'+vn_info.RANGE.IP_START+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">IP End</td>\
|
||||
<td class="key_td">'+tr("IP End")+'</td>\
|
||||
<td class="value_td">'+vn_info.RANGE.IP_END+'</td>\
|
||||
</tr\>\
|
||||
<tr>\
|
||||
<td class="key_td">Network mask</td>\
|
||||
<td class="key_td">'+tr("Network mask")+'</td>\
|
||||
<td class="value_td">'+( vn_info.TEMPLATE.NETWORK_MASK ? vn_info.TEMPLATE.NETWORK_MASK : "--" )+'</td>\
|
||||
</tr\>\
|
||||
<tr><td class="key_td">\
|
||||
<label for="panel_hold_lease">Hold lease:</label></td><td class="value_td"><input type="text" id="panel_hold_lease" style="width:9em;"/>\
|
||||
<button id="panel_hold_lease_button">Hold</button>\
|
||||
<label for="panel_hold_lease">'+tr("Hold lease")+':</label></td><td class="value_td"><input type="text" id="panel_hold_lease" style="width:9em;"/>\
|
||||
<button id="panel_hold_lease_button">'+tr("Hold")+'</button>\
|
||||
</td></tr>';
|
||||
} else {
|
||||
html += '<tr><td class="key_td">\
|
||||
<label for="panel_add_lease">Add lease:</label></td><td class="value_td"><input type="text" id="panel_add_lease" style="width:9em;"/>\
|
||||
<button id="panel_add_lease_button">Add</button>\
|
||||
<label for="panel_add_lease">'+tr("Add lease")+':</label></td><td class="value_td"><input type="text" id="panel_add_lease" style="width:9em;"/>\
|
||||
<button id="panel_add_lease_button">'+tr("Add")+'</button>\
|
||||
</td></tr>';
|
||||
};
|
||||
|
||||
@ -574,7 +575,7 @@ function printLeases(vn_info){
|
||||
if (!leases) //empty
|
||||
{
|
||||
html+='<tr id="no_leases_tr"><td class="key_td">\
|
||||
No leases to show\
|
||||
'+tr("No leases to show")+'\
|
||||
</td>\
|
||||
<td class="value_td">\
|
||||
</td></tr>';
|
||||
@ -619,13 +620,13 @@ function printLeases(vn_info){
|
||||
|
||||
switch (state){
|
||||
case 0:
|
||||
html += '<a class="hold_lease" href="#">hold</a> | <a class="delete_lease" href="#">delete</a>';
|
||||
html += '<a class="hold_lease" href="#">'+tr("hold")+'</a> | <a class="delete_lease" href="#">'+tr("delete")+'</a>';
|
||||
break;
|
||||
case 1:
|
||||
html += 'Used by VM '+lease.VID;
|
||||
html += tr("Used by VM")+' '+lease.VID;
|
||||
break;
|
||||
case 2:
|
||||
html += '<a class="release_lease" href="#">release</a>';
|
||||
html += '<a class="release_lease" href="#">'+tr("release")+'</a>';
|
||||
break;
|
||||
};
|
||||
html += '</td></tr>';
|
||||
@ -638,7 +639,7 @@ function printLeases(vn_info){
|
||||
|
||||
//Prepares the vnet creation dialog
|
||||
function setupCreateVNetDialog() {
|
||||
dialogs_context.append('<div title="Create Virtual Network" id="create_vn_dialog"></div>');
|
||||
dialogs_context.append('<div title=\"'+tr("Create Virtual Network")+'\" id="create_vn_dialog"></div>');
|
||||
$create_vn_dialog = $('#create_vn_dialog',dialogs_context)
|
||||
var dialog = $create_vn_dialog;
|
||||
dialog.html(create_vn_tmpl);
|
||||
@ -677,7 +678,7 @@ function setupCreateVNetDialog() {
|
||||
|
||||
//We don't add anything to the list if there is nothing to add
|
||||
if (lease_ip == null) {
|
||||
notifyError("Please provide a lease IP");
|
||||
notifyError(tr("Please provide a lease IP"));
|
||||
return false;
|
||||
};
|
||||
|
||||
@ -743,7 +744,7 @@ function setupCreateVNetDialog() {
|
||||
//Fetch values
|
||||
var name = $('#name',this).val();
|
||||
if (!name.length){
|
||||
notifyError("Virtual Network name missing!");
|
||||
notifyError(tr("Virtual Network name missing!"));
|
||||
return false;
|
||||
}
|
||||
var bridge = $('#bridge',this).val();
|
||||
@ -783,7 +784,7 @@ function setupCreateVNetDialog() {
|
||||
var ip_end = $('#ip_end',this).val();
|
||||
|
||||
if (!network_addr.length){
|
||||
notifyError("Please provide a network address");
|
||||
notifyError(tr("Please provide a network address"));
|
||||
return false;
|
||||
};
|
||||
|
||||
@ -807,7 +808,7 @@ function setupCreateVNetDialog() {
|
||||
|
||||
//Time to add custom attributes
|
||||
$('#custom_var_vnet_box option',$create_vn_dialog).each(function(){
|
||||
var attr_name = $(this).attr("name");
|
||||
var attr_name = $(this).attr('name');
|
||||
var attr_value = $(this).val();
|
||||
network_json["vnet"][attr_name] = attr_value;
|
||||
});
|
||||
@ -835,7 +836,7 @@ function popUpCreateVnetDialog() {
|
||||
|
||||
function setupVNetTemplateUpdateDialog(){
|
||||
//Append to DOM
|
||||
dialogs_context.append('<div id="vnet_template_update_dialog" title="Update network template"></div>');
|
||||
dialogs_context.append('<div id="vnet_template_update_dialog" title="'+tr("Update network template")+'"></div>');
|
||||
var dialog = $('#vnet_template_update_dialog',dialogs_context);
|
||||
|
||||
//Put HTML in place
|
||||
@ -856,14 +857,14 @@ function setupVNetTemplateUpdateDialog(){
|
||||
var id = $(this).val();
|
||||
if (id && id.length){
|
||||
var dialog = $('#vnet_template_update_dialog');
|
||||
$('#vnet_template_update_textarea',dialog).val("Loading...");
|
||||
$('#vnet_template_update_textarea',dialog).val(tr("Loading")+"...");
|
||||
|
||||
var vnet_public = is_public_vnet(id);
|
||||
|
||||
if (vnet_public){
|
||||
$('#vnet_template_update_public',dialog).attr("checked","checked")
|
||||
$('#vnet_template_update_public',dialog).attr('checked','checked')
|
||||
} else {
|
||||
$('#vnet_template_update_public',dialog).removeAttr("checked")
|
||||
$('#vnet_template_update_public',dialog).removeAttr('checked')
|
||||
}
|
||||
|
||||
Sunstone.runAction("Network.fetch_template",id);
|
||||
@ -909,7 +910,7 @@ function popUpVNetTemplateUpdateDialog(){
|
||||
var dialog = $('#vnet_template_update_dialog');
|
||||
$('#vnet_template_update_select',dialog).html(select);
|
||||
$('#vnet_template_update_textarea',dialog).val("");
|
||||
$('#vnet_template_update_public',dialog).removeAttr("checked")
|
||||
$('#vnet_template_update_public',dialog).removeAttr('checked')
|
||||
|
||||
if (sel_elems.length >= 1){ //several items in the list are selected
|
||||
//grep them
|
||||
@ -922,7 +923,7 @@ function popUpVNetTemplateUpdateDialog(){
|
||||
});
|
||||
$('#vnet_template_update_select',dialog).html(new_select);
|
||||
if (sel_elems.length == 1) {
|
||||
$('#vnet_template_update_select option',dialog).attr("selected","selected");
|
||||
$('#vnet_template_update_select option',dialog).attr('selected','selected');
|
||||
$('#vnet_template_update_select',dialog).trigger("change");
|
||||
}
|
||||
|
||||
@ -991,7 +992,7 @@ function setVNetAutorefresh() {
|
||||
setInterval(function(){
|
||||
var checked = $('input.check_item:checked',dataTable_vNetworks);
|
||||
var filter = $("#datatable_vnetworks_filter input",
|
||||
dataTable_vNetworks.parents("#datatable_vnetworks_wrapper")).attr("value");
|
||||
dataTable_vNetworks.parents("#datatable_vnetworks_wrapper")).attr('value');
|
||||
if (!checked.length && !filter.length){
|
||||
Sunstone.runAction("Network.autorefresh");
|
||||
}
|
||||
@ -1006,8 +1007,8 @@ function is_public_vnet(id) {
|
||||
function setupVNetActionCheckboxes(){
|
||||
$('input.action_cb#cb_public_vnet',dataTable_vNetworks).live("click",function(){
|
||||
var $this = $(this)
|
||||
var id=$this.attr("elem_id");
|
||||
if ($this.attr("checked"))
|
||||
var id=$this.attr('elem_id');
|
||||
if ($this.attr('checked'))
|
||||
Sunstone.runAction("Network.publish",id);
|
||||
else Sunstone.runAction("Network.unpublish",id);
|
||||
|
||||
@ -1029,7 +1030,11 @@ $(document).ready(function(){
|
||||
{ "sWidth": "60px", "aTargets": [0,5,6,7,8] },
|
||||
{ "sWidth": "35px", "aTargets": [1] },
|
||||
{ "sWidth": "100px", "aTargets": [2,3] }
|
||||
]
|
||||
],
|
||||
"oLanguage": (datatable_lang != "") ?
|
||||
{
|
||||
sUrl: "locale/"+lang+"/"+datatable_lang
|
||||
} : ""
|
||||
});
|
||||
|
||||
dataTable_vNetworks.fnClearTable();
|
||||
@ -1040,7 +1045,6 @@ $(document).ready(function(){
|
||||
|
||||
setupCreateVNetDialog();
|
||||
setupVNetTemplateUpdateDialog();
|
||||
//setupAddRemoveLeaseDialog();
|
||||
setupLeasesOps();
|
||||
setupVNetActionCheckboxes();
|
||||
setVNetAutorefresh();
|
||||
|
@ -112,13 +112,13 @@ function recountCheckboxes(dataTable){
|
||||
};
|
||||
//enable checkall box
|
||||
if (total_length == checked_length){
|
||||
$('.check_all',dataTable).attr("checked","checked");
|
||||
$('.check_all',dataTable).attr('checked','checked');
|
||||
} else {
|
||||
$('.check_all',dataTable).removeAttr("checked");
|
||||
$('.check_all',dataTable).removeAttr('checked');
|
||||
};
|
||||
} else { //no elements cheked
|
||||
//disable action buttons, uncheck checkAll
|
||||
$('.check_all',dataTable).removeAttr("checked");
|
||||
$('.check_all',dataTable).removeAttr('checked');
|
||||
$('.top_button, .list_button',context).button("disable");
|
||||
last_action_b.button("disable");
|
||||
};
|
||||
@ -186,10 +186,12 @@ function stringJSON(json){
|
||||
function notifySubmit(action, args, extra_param){
|
||||
var action_text = action.replace(/OpenNebula\./,'').replace(/\./,' ');
|
||||
|
||||
var msg = "<h1>Submitted</h1>";
|
||||
var msg = '<h1>'+tr("Submitted")+'</h1>';
|
||||
if (!args || (typeof args == 'object' && args.constructor != Array)){
|
||||
|
||||
msg += action_text;
|
||||
} else {
|
||||
|
||||
msg += action_text + ": " + args;
|
||||
};
|
||||
if (extra_param && extra_param.constructor != Object) {
|
||||
@ -201,13 +203,13 @@ function notifySubmit(action, args, extra_param){
|
||||
|
||||
//Notification on error
|
||||
function notifyError(msg){
|
||||
msg = "<h1>Error</h1>" + msg;
|
||||
msg = "<h1>"+tr("Error")+"</h1>" + msg;
|
||||
$.jGrowl(msg, {theme: "jGrowl-notify-error", position: "bottom-right", sticky: true });
|
||||
}
|
||||
|
||||
//Standard notification
|
||||
function notifyMessage(msg){
|
||||
msg = "<h1>Info</h1>" + msg;
|
||||
msg = "<h1>"+tr("Info")+"</h1>" + msg;
|
||||
$.jGrowl(msg, {theme: "jGrowl-notify-submit", position: "bottom-right"});
|
||||
}
|
||||
|
||||
@ -248,7 +250,7 @@ function prettyPrintRowJSON(field,value,padding,weight, border_bottom,padding_to
|
||||
border-bottom:'+border_bottom+';\
|
||||
padding-top:'+padding_top_bottom+'px;\
|
||||
padding-bottom:'+padding_top_bottom+'px;">'
|
||||
+field+
|
||||
+tr(field)+
|
||||
'</td>\
|
||||
<td class="value_td" style=\
|
||||
"border-bottom:'+border_bottom+';\
|
||||
@ -275,7 +277,7 @@ function prettyPrintRowJSON(field,value,padding,weight, border_bottom,padding_to
|
||||
border-bottom:'+border_bottom+';\
|
||||
padding-top:'+padding_top_bottom+'px;\
|
||||
padding-bottom:'+padding_top_bottom+'px">'+
|
||||
field+
|
||||
tr(field)+
|
||||
'</td>\
|
||||
<td class="value_td" style="\
|
||||
border-bottom:'+border_bottom+';\
|
||||
@ -297,11 +299,11 @@ function initCheckAllBoxes(datatable){
|
||||
$('input.check_all',datatable).css({"border":"2px"});
|
||||
$('input.check_all',datatable).change(function(){
|
||||
var table = $(this).parents('table');
|
||||
var checked = $(this).attr("checked");
|
||||
var checked = $(this).attr('checked');
|
||||
if (checked) { //check all
|
||||
$('tbody input.check_item',table).attr("checked","checked");
|
||||
$('tbody input.check_item',table).attr('checked','checked');
|
||||
} else { //uncheck all
|
||||
$('tbody input.check_item',table).removeAttr("checked");
|
||||
$('tbody input.check_item',table).removeAttr('checked');
|
||||
};
|
||||
recountCheckboxes(table);
|
||||
});
|
||||
@ -332,7 +334,7 @@ function onError(request,error_json) {
|
||||
|
||||
if (!message){
|
||||
if (!onError.disabled){
|
||||
notifyError("Cannot contact server: is it running and reachable?");
|
||||
notifyError(tr("Cannot contact server: is it running and reachable?"));
|
||||
onError.disabled=true;
|
||||
}
|
||||
return false;
|
||||
@ -340,7 +342,7 @@ function onError(request,error_json) {
|
||||
|
||||
if (message.match(/^Network is unreachable .+$/)){
|
||||
if (!onError.disabled){
|
||||
notifyError("Network is unreachable: is OpenNebula running?");
|
||||
notifyError(tr("Network is unreachable: is OpenNebula running?"));
|
||||
onError.disabled=true;
|
||||
};
|
||||
return false;
|
||||
@ -361,7 +363,7 @@ function onError(request,error_json) {
|
||||
} else if (m = message.match(auth_error)) {
|
||||
method = m[1];
|
||||
object = m[3];
|
||||
reason = "Unauthorized";
|
||||
reason = tr("Unauthorized");
|
||||
};
|
||||
|
||||
if (m) {
|
||||
@ -498,7 +500,7 @@ function makeSelectOptions(dataTable,
|
||||
status_cols,
|
||||
bad_status_values){
|
||||
var nodes = dataTable.fnGetData();
|
||||
var select = '<option class="empty_value" value="">Please select</option>';
|
||||
var select = '<option class="empty_value" value="">'+tr("Please select")+'</option>';
|
||||
var array;
|
||||
for (var j=0; j<nodes.length;j++){
|
||||
var elem = nodes[j];
|
||||
@ -632,23 +634,23 @@ function shortenedInfoFields(context){
|
||||
function setupTemplateUpdateDialog(){
|
||||
|
||||
//Append to DOM
|
||||
dialogs_context.append('<div id="template_update_dialog" title="Update template"></div>');
|
||||
dialogs_context.append('<div id="template_update_dialog" title=\"'+tr("Update template")+'"></div>');
|
||||
var dialog = $('#template_update_dialog',dialogs_context);
|
||||
|
||||
//Put HTML in place
|
||||
dialog.html(
|
||||
'<form action="javascript:alert(\'js error!\');">\
|
||||
<h3 style="margin-bottom:10px;">Please, choose and modify the template you want to update:</h3>\
|
||||
<h3 style="margin-bottom:10px;">'+tr("Please, choose and modify the template you want to update")+':</h3>\
|
||||
<fieldset style="border-top:none;">\
|
||||
<label for="template_update_select">Select a template:</label>\
|
||||
<label for="template_update_select">'+tr("Select a template")+':</label>\
|
||||
<select id="template_update_select" name="template_update_select"></select>\
|
||||
<div class="clear"></div>\
|
||||
<textarea id="template_update_textarea" style="width:100%; height:14em;">Select a template</textarea>\
|
||||
<textarea id="template_update_textarea" style="width:100%; height:14em;">'+tr("Select a template")+'</textarea>\
|
||||
</fieldset>\
|
||||
<fieldset>\
|
||||
<div class="form_buttons">\
|
||||
<button class="button" id="template_update_button" value="">\
|
||||
Update\
|
||||
'+tr("Update")+'\
|
||||
</button>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
@ -706,7 +708,7 @@ function popUpTemplateUpdateDialog(elem_str,select_items,sel_elems){
|
||||
|
||||
if (sel_elems.length >= 1){ //several items in the list are selected
|
||||
//grep them
|
||||
var new_select= sel_elems.length > 1? '<option value="">Please select</option>' : "";
|
||||
var new_select= sel_elems.length > 1? '<option value="">'+tr("Please select")+'</option>' : "";
|
||||
$('option','<select>'+select_items+'</select>').each(function(){
|
||||
var val = $(this).val();
|
||||
if ($.inArray(val,sel_elems) >= 0){
|
||||
@ -715,7 +717,7 @@ function popUpTemplateUpdateDialog(elem_str,select_items,sel_elems){
|
||||
});
|
||||
$('#template_update_select',dialog).html(new_select);
|
||||
if (sel_elems.length == 1) {
|
||||
$('#template_update_select option',dialog).attr("selected","selected");
|
||||
$('#template_update_select option',dialog).attr('selected','selected');
|
||||
$('#template_update_select',dialog).trigger("change");
|
||||
}
|
||||
};
|
||||
|
@ -314,7 +314,7 @@ $(document).ready(function(){
|
||||
$('.action_button').live("click",function(){
|
||||
var error = 0;
|
||||
var table = null;
|
||||
var value = $(this).attr("value");
|
||||
var value = $(this).attr('value');
|
||||
var action = SunstoneCfg["actions"][value];
|
||||
if (!action) {
|
||||
notifyError("Action "+value+" not defined.");
|
||||
@ -549,8 +549,8 @@ function initListButtons(){
|
||||
$('.multi_action_slct',main_tabs_context).each(function(){
|
||||
//prepare replacement buttons
|
||||
var buttonset = $('<div style="display:inline-block;" class="top_button"></div');
|
||||
var button1 = $('<button class="last_action_button action_button confirm_button confirm_with_select_button" value="">Previous action</button>').button();
|
||||
button1.attr("disabled","disabled");
|
||||
var button1 = $('<button class="last_action_button action_button confirm_button confirm_with_select_button" value="">'+tr("Previous action")+'</button>').button();
|
||||
button1.attr('disabled','disabled');
|
||||
var button2 = $('<button class="list_button" value="">See more</button>').button({
|
||||
text:false,
|
||||
icons: { primary: "ui-icon-triangle-1-s" }
|
||||
@ -563,7 +563,7 @@ function initListButtons(){
|
||||
var options = $('option', $(this));
|
||||
var list = $('<ul class="action_list"></ul>');
|
||||
$.each(options,function(){
|
||||
var classes = $(this).attr("class");
|
||||
var classes = $(this).attr('class');
|
||||
var item = $('<li></li>');
|
||||
var a = $('<a href="#" class="'+classes+'" value="'+$(this).val()+'">'+$(this).text()+'</a>');
|
||||
a.val($(this).val());
|
||||
@ -590,7 +590,7 @@ function initListButtons(){
|
||||
prev_action_button.removeClass("confirm_with_select_button");
|
||||
prev_action_button.removeClass("confirm_button");
|
||||
prev_action_button.removeClass("action_button");
|
||||
prev_action_button.addClass($(this).attr("class"));
|
||||
prev_action_button.addClass($(this).attr('class'));
|
||||
prev_action_button.button("option","label",$(this).text());
|
||||
prev_action_button.button("enable");
|
||||
$(this).parents('ul').hide("blind",100);
|
||||
@ -612,19 +612,19 @@ function initListButtons(){
|
||||
|
||||
//Prepares the standard confirm dialogs
|
||||
function setupConfirmDialogs(){
|
||||
dialogs_context.append('<div id="confirm_dialog" title="Confirmation of action"></div>');
|
||||
dialogs_context.append('<div id="confirm_dialog" title=\"'+tr("Confirmation of action")+'\"></div>');
|
||||
var dialog = $('div#confirm_dialog',dialogs_context);
|
||||
|
||||
//add the HTML with the standard question and buttons.
|
||||
dialog.html(
|
||||
'<form action="javascript:alert(\'js error!\');">\
|
||||
<div id="confirm_tip">You have to confirm this action.</div>\
|
||||
<div id="confirm_tip">'+tr("You have to confirm this action.")+'</div>\
|
||||
<br />\
|
||||
<div id="question">Do you want to proceed?</div>\
|
||||
<div id="question">'+tr("Do you want to proceed?")+'</div>\
|
||||
<br />\
|
||||
<div class="form_buttons">\
|
||||
<button id="confirm_proceed" class="action_button" value="">OK</button>\
|
||||
<button class="confirm_cancel" value="">Cancel</button>\
|
||||
<button id="confirm_proceed" class="action_button" value="">'+tr("OK")+'</button>\
|
||||
<button class="confirm_cancel" value="">'+tr("Cancel")+'</button>\
|
||||
</div>\
|
||||
</form>');
|
||||
|
||||
@ -646,17 +646,17 @@ function setupConfirmDialogs(){
|
||||
return false;
|
||||
});
|
||||
|
||||
dialogs_context.append('<div id="confirm_with_select_dialog" title="Confirmation of action"></div>');
|
||||
dialogs_context.append('<div id="confirm_with_select_dialog" title=\"'+tr("Confirmation of action")+'\"></div>');
|
||||
dialog = $('div#confirm_with_select_dialog',dialogs_context);
|
||||
|
||||
dialog.html(
|
||||
'<form action="javascript:alert(\'js error!\');">\
|
||||
<div id="confirm_with_select_tip">You need to select something.</div>\
|
||||
<div id="confirm_with_select_tip">'+tr("You need to select something.")+'</div>\
|
||||
<select style="margin: 10px 0;" id="confirm_select">\
|
||||
</select>\
|
||||
<div class="form_buttons">\
|
||||
<button id="confirm_with_select_proceed" class="" value="">OK</button>\
|
||||
<button class="confirm_cancel" value="">Cancel</button>\
|
||||
<button id="confirm_with_select_proceed" class="" value="">'+tr("OK")+'</button>\
|
||||
<button class="confirm_cancel" value="">'+tr("Cancel")+'</button>\
|
||||
</div>\
|
||||
</form>');
|
||||
|
||||
|
482
src/sunstone/public/locale/en_US/en_US.js
Normal file
482
src/sunstone/public/locale/en_US/en_US.js
Normal file
@ -0,0 +1,482 @@
|
||||
//Translated by
|
||||
lang="en_US"
|
||||
datatable_lang=""
|
||||
locale={
|
||||
"Accept (default)":"",
|
||||
"Acl":"",
|
||||
"ACL Rules":"",
|
||||
"ACLs":"",
|
||||
"ACL String preview":"",
|
||||
"ACPI":"",
|
||||
"Add":"",
|
||||
"Add context variables":"",
|
||||
"Add custom variables":"",
|
||||
"Add disk/image":"",
|
||||
"Add disks/images":"",
|
||||
"Add Graphics":"",
|
||||
"Add Hypervisor raw options":"",
|
||||
"Add inputs":"",
|
||||
"Add lease":"",
|
||||
"Add network":"",
|
||||
"Add placement options":"",
|
||||
"Advanced mode":"",
|
||||
"Affected resources":"",
|
||||
"All":"",
|
||||
"Allowed operations":"",
|
||||
"Amount of RAM required for the VM, in Megabytes.":"",
|
||||
"Applies to":"",
|
||||
"Architecture":"",
|
||||
"are mandatory":"",
|
||||
"Arguments for the booting kernel":"",
|
||||
"Authentication":"",
|
||||
"Authentication driver":"",
|
||||
"Block":"",
|
||||
"Boolean expression that rules out provisioning hosts from list of machines suitable to run this VM":"",
|
||||
"Boot":"",
|
||||
"Boot device type":"",
|
||||
"Bootloader":"",
|
||||
"Boot method":"",
|
||||
"Boot/OS options":"",
|
||||
"Bridge":"",
|
||||
"Bus":"",
|
||||
"Cancel":"",
|
||||
"Cannot contact server: is it running and reachable?":"",
|
||||
"Canvas not supported.":"",
|
||||
"Capacity":"",
|
||||
"Capacity options":"",
|
||||
"cdrom":"",
|
||||
"CD-ROM":"",
|
||||
"Change":"",
|
||||
"Change authentication":"",
|
||||
"Change group":"",
|
||||
"Change owner":"",
|
||||
"Change password":"",
|
||||
"Changing language":"",
|
||||
"Clone":"",
|
||||
"Clone this image":"",
|
||||
"Community":"",
|
||||
"Configuration":"",
|
||||
"Confirmation of action":"",
|
||||
"Context":"",
|
||||
"Context variable name and value must be filled in":"",
|
||||
"Core":"",
|
||||
"CPU":"",
|
||||
"CPU architecture to virtualization":"",
|
||||
"CPU Monitoring information":"",
|
||||
"CPU Use":"",
|
||||
"Create":"",
|
||||
"Create ACL":"",
|
||||
"Create an empty datablock":"",
|
||||
"Create group":"",
|
||||
"Create host":"",
|
||||
"Create Image":"",
|
||||
"Create user":"",
|
||||
"Create Virtual Machine":"",
|
||||
"Create Virtual Network":"",
|
||||
"Create VM Template":"",
|
||||
"Current disks":"",
|
||||
"Current inputs":"",
|
||||
"Current leases":"",
|
||||
"Current NICs":"",
|
||||
"Current variables":"",
|
||||
"Custom attribute name and value must be filled in":"",
|
||||
"Custom attributes":"",
|
||||
"Custom variable name and value must be filled in":"",
|
||||
"Custom variables":"",
|
||||
"Dashboard":"",
|
||||
"Data":"",
|
||||
"Datablock":"",
|
||||
"Default":"",
|
||||
"Default (current image type)":"",
|
||||
"Define a subnet by IP range":"",
|
||||
"Delete":"",
|
||||
"Delete host":"",
|
||||
"Deploy":"",
|
||||
"Deploy ID":"",
|
||||
"Deploy # VMs":"",
|
||||
"Description":"",
|
||||
"Device prefix":"",
|
||||
"Device to be mounted as root":"",
|
||||
"Device to map image disk. If set, it will overwrite the default device mapping":"",
|
||||
"Disable":"",
|
||||
"disabled":"",
|
||||
"Disallow access to the VM through the specified ports in the TCP protocol":"",
|
||||
"Disallow access to the VM through the specified ports in the UDP protocol":"",
|
||||
"Disk":"",
|
||||
"Disk file location path or URL":"",
|
||||
"disk id":"",
|
||||
"Disks":"",
|
||||
"Disk type":"",
|
||||
"Documentation":"",
|
||||
"Do you want to proceed?":"",
|
||||
"Driver":"",
|
||||
"Driver default":"",
|
||||
"Drivers":"",
|
||||
"Drop":"",
|
||||
"Dummy":"",
|
||||
"EC2":"",
|
||||
"Enable":"",
|
||||
"English":"",
|
||||
"Error":"",
|
||||
"failed":"",
|
||||
"fd":"",
|
||||
"Features":"",
|
||||
"Fields marked with":"",
|
||||
"File":"",
|
||||
"Filesystem type":"",
|
||||
"Filesystem type for the fs images":"",
|
||||
"Fill in a new password":"",
|
||||
"Fixed network":"",
|
||||
"Floppy":"",
|
||||
"Fold / Unfold all sections":"",
|
||||
"Format":"",
|
||||
"FS":"",
|
||||
"FS type":"",
|
||||
"Get Information":"",
|
||||
"Get Pool of my/group\'s resources":"",
|
||||
"Get Pool of resources":"",
|
||||
"Graphics":"",
|
||||
"Graphics type":"",
|
||||
"Group":"",
|
||||
"Group ":"",
|
||||
"Group name":"",
|
||||
"Groups":"",
|
||||
"Hardware that will emulate this network interface. With Xen this is the type attribute of the vif.":"",
|
||||
"hd":"",
|
||||
"Historical monitoring information":"",
|
||||
"hold":"",
|
||||
"Hold":"",
|
||||
"Hold lease":"",
|
||||
"Host":"",
|
||||
"Host information":"",
|
||||
"Hostname":"",
|
||||
"Host name missing!":"",
|
||||
"Host parameters":"",
|
||||
"Hosts":"",
|
||||
"Hosts CPU":"",
|
||||
"Host shares":"",
|
||||
"Hosts memory":"",
|
||||
"Hosts (total/active)":"",
|
||||
"Host template":"",
|
||||
"Human readable description of the image for other users.":"",
|
||||
"HW address associated with the network interface":"",
|
||||
"Icmp":"",
|
||||
"ICMP policy":"",
|
||||
"id":"",
|
||||
"ID":"",
|
||||
"IDE":"",
|
||||
"Image":"",
|
||||
"Image cannot be public and persistent":"",
|
||||
"Image information":"",
|
||||
"Image name":"",
|
||||
"Images":"",
|
||||
"Images (total/public)":"",
|
||||
"Image template":"",
|
||||
"IM MAD":"",
|
||||
"Info":"",
|
||||
"information":"",
|
||||
"Information":"",
|
||||
"Information Manager":"",
|
||||
"Initrd":"",
|
||||
"Inputs":"",
|
||||
"Instantiate":"",
|
||||
"IP":"",
|
||||
"IP End":"",
|
||||
"IP Start":"",
|
||||
"IP to listen on":"",
|
||||
"Kernel":"",
|
||||
"Kernel commands":"",
|
||||
"Keyboard configuration locale to use in the VNC display":"",
|
||||
"Keymap":"",
|
||||
"KVM":"",
|
||||
"Language":"",
|
||||
"LCM State":"",
|
||||
"Lease IP":"",
|
||||
"Lease MAC (opt):":"",
|
||||
"Lease management":"",
|
||||
"Leases information":"",
|
||||
"Listen IP":"",
|
||||
"Live migrate":"",
|
||||
"Loading":"",
|
||||
"MAC":"",
|
||||
"Make non persistent":"",
|
||||
"Make persistent":"",
|
||||
"Manage":"",
|
||||
"Manual":"",
|
||||
"Max Mem":"",
|
||||
"Memory":"",
|
||||
"Memory monitoring information":"",
|
||||
"Memory use":"",
|
||||
"Migrate":"",
|
||||
"Model":"",
|
||||
"Monitoring information":"",
|
||||
"Mount image as read-only":"",
|
||||
"Mouse":"",
|
||||
"Name":"",
|
||||
"Name for the context variable":"",
|
||||
"Name for the custom variable":"",
|
||||
"Name for the tun device created for the VM":"",
|
||||
"Name of a shell script to be executed after creating the tun device for the VM":"",
|
||||
"Name of the bridge the network device is going to be attached to":"",
|
||||
"Name of the image to use":"",
|
||||
"Name of the network to attach this device":"",
|
||||
"Name that the Image will get. Every image must have a unique name.":"",
|
||||
"Name that the VM will get for description purposes. If NAME is not supplied a name generated by one will be in the form of one-<VID>.":"",
|
||||
"Net_RX":"",
|
||||
"Net_TX":"",
|
||||
"network":"",
|
||||
"Network":"",
|
||||
"Network Address":"",
|
||||
"Network is unreachable: is OpenNebula running?":"",
|
||||
"Network mask":"",
|
||||
"Network Mask":"",
|
||||
"Network reception":"",
|
||||
"Network transmission":"",
|
||||
"Network type":"",
|
||||
"New":"",
|
||||
"+ New":"",
|
||||
"+ New Group":"",
|
||||
"New password":"",
|
||||
"No":"",
|
||||
"No disk id or image name specified":"",
|
||||
"No disks defined":"",
|
||||
"No leases to show":"",
|
||||
"None":"",
|
||||
"Number of virtual cpus. This value is optional, the default hypervisor behavior is used, usually one virtual CPU.":"",
|
||||
"OK":"",
|
||||
"Open VNC Session":"",
|
||||
"Optional, please select":"",
|
||||
"OS":"",
|
||||
"OS and Boot options":"",
|
||||
"Owned by group":"",
|
||||
"Owner":"",
|
||||
"PAE":"",
|
||||
"Password":"",
|
||||
"Password for the VNC server":"",
|
||||
"Path":"",
|
||||
"Path to the bootloader executable":"",
|
||||
"Path to the initrd image":"",
|
||||
"Path to the original file that will be copied to the image repository. If not specified for a DATABLOCK type image, an empty image will be created.":"",
|
||||
"Path to the OS kernel to boot the image":"",
|
||||
"Path vs. source":"",
|
||||
"Percentage of CPU divided by 100 required for the Virtual Machine. Half a processor is written 0.5.":"",
|
||||
"Permits access to the VM only through the specified ports in the TCP protocol":"",
|
||||
"Permits access to the VM only through the specified ports in the UDP protocol":"",
|
||||
"Persistence of the image":"",
|
||||
"Persistent":"",
|
||||
"Physical address extension mode allows 32-bit guests to address more than 4 GB of memory":"",
|
||||
"Physical device":"",
|
||||
"Placement":"",
|
||||
"Please choose":"",
|
||||
"Please, choose and modify the image you want to update":"",
|
||||
"Please, choose and modify the template you want to update":"",
|
||||
"Please, choose and modify the virtual network you want to update":"",
|
||||
"Please choose path if you have a file-based image. Choose source otherwise or create an empty datablock disk.":"",
|
||||
"Please choose the new type of authentication for the selected users":"",
|
||||
"Please provide a lease IP":"",
|
||||
"Please provide a network address":"",
|
||||
"Please provide a resource ID for the resource(s) in this rule":"",
|
||||
"Please select":"",
|
||||
"Please select at least one resource":"",
|
||||
"Please specify to who this ACL applies":"",
|
||||
"Port":"",
|
||||
"Port blacklist":"",
|
||||
"Port for the VNC server":"",
|
||||
"Port whitelist":"",
|
||||
"Predefined":"",
|
||||
"Prefix for the emulated device this image will be mounted at. For instance, “hd”, “sd”. If omitted, the default value is the one defined in oned.conf (installation default is “hd”).":"",
|
||||
"Previous action":"",
|
||||
"Provide a path":"",
|
||||
"Provide a source":"",
|
||||
"PS2":"",
|
||||
"Public":"",
|
||||
"Public scope of the image":"",
|
||||
"Publish":"",
|
||||
"Quickstart":"",
|
||||
"Ranged network":"",
|
||||
"Rank":"",
|
||||
"Raw":"",
|
||||
"Raw data to be passed directly to the hypervisor":"",
|
||||
"Read only":"",
|
||||
"Refresh list":"",
|
||||
"Register time":"",
|
||||
"Registration time":"",
|
||||
"release":"",
|
||||
"Release":"",
|
||||
"Remove selected":"",
|
||||
"Request an specific IP from the Network":"",
|
||||
"Requirements":"",
|
||||
"Reset":"",
|
||||
"Resource ID":"",
|
||||
"Resource ID / Owned by":"",
|
||||
"Resource subset":"",
|
||||
"Restart":"",
|
||||
"Resubmit":"",
|
||||
"Resume":"",
|
||||
"Retrieving":"",
|
||||
"Root":"",
|
||||
"running":"",
|
||||
"Running VMs":"",
|
||||
"Running #VMS":"",
|
||||
"Russian":"",
|
||||
"Save":"",
|
||||
"Save as":"",
|
||||
"Saveas for VM with ID":"",
|
||||
"Save this image after shutting down the VM":"",
|
||||
"Script":"",
|
||||
"SCSI":"",
|
||||
"SDL":"",
|
||||
"Select a network":"",
|
||||
"Select an image":"",
|
||||
"Select a template":"",
|
||||
"Select boot method":"",
|
||||
"Select disk":"",
|
||||
"Select template":"",
|
||||
"Select the new group":"",
|
||||
"Select the new owner":"",
|
||||
"Server (Cipher)":"",
|
||||
"Server (x509)":"",
|
||||
"Setup Networks":"",
|
||||
"Shared":"",
|
||||
"Shutdown":"",
|
||||
"Sign out":"",
|
||||
"Size":"",
|
||||
"Size in MB":"",
|
||||
"Size (Mb)":"",
|
||||
"Size of the datablock in MB.":"",
|
||||
"Skipping VM ":"",
|
||||
"Source":"",
|
||||
"Source to be used in the DISK attribute. Useful for not file-based images.":"",
|
||||
"Specific ID":"",
|
||||
"Specific image mapping driver. KVM: raw, qcow2. XEN: tap:aio, file:":"",
|
||||
"Specific image mapping driver. KVM: raw, qcow2. Xen:tap:aio:, file:. VMware unsupported":"",
|
||||
"SSH":"",
|
||||
"Start time":"",
|
||||
"Start Time":"",
|
||||
"State":"",
|
||||
"Status":"",
|
||||
"Stop":"",
|
||||
"Submitted":"",
|
||||
"Summary of resources":"",
|
||||
"Sunstone UI Configuration":"",
|
||||
"Support":"",
|
||||
"Suspend":"",
|
||||
"Swap":"",
|
||||
"Tablet":"",
|
||||
"Target":"",
|
||||
"Tcp black ports":"",
|
||||
"Tcp firewall mode":"",
|
||||
"Tcp white ports":"",
|
||||
"Template":"",
|
||||
"Template information":"",
|
||||
"Templates":"",
|
||||
"Template updated correctly":"",
|
||||
"There are mandatory fields missing in the capacity section":"",
|
||||
"There are mandatory fields missing in the OS Boot options section":"",
|
||||
"There are mandatory parameters missing":"",
|
||||
"There are mandatory parameters missing in this section":"",
|
||||
"This field sets which attribute will be used to sort the suitable hosts for this VM. Basically, it defines which hosts are more suitable than others":"",
|
||||
"This rule applies to":"",
|
||||
"This will cancel selected VMs":"",
|
||||
"This will change the main group of the selected users. Select the new group":"",
|
||||
"This will change the password for the selected users":"",
|
||||
"This will delete the selected VMs from the database":"",
|
||||
"This will deploy the selected VMs on the chosen host":"",
|
||||
"This will hold selected pending VMs from being deployed":"",
|
||||
"This will initiate the shutdown process in the selected VMs":"",
|
||||
"This will live-migrate the selected VMs to the chosen host":"",
|
||||
"This will migrate the selected VMs to the chosen host":"",
|
||||
"This will redeploy selected VMs (in UNKNOWN or BOOT state)":"",
|
||||
"This will release held machines":"",
|
||||
"This will resubmits VMs to PENDING state":"",
|
||||
"This will resume selected stopped or suspended VMs":"",
|
||||
"This will suspend selected machines":"",
|
||||
"TM MAD":"",
|
||||
"total":"",
|
||||
"Total Leases":"",
|
||||
"Total VM count":"",
|
||||
"Total VM CPU":"",
|
||||
"Total VM Memory":"",
|
||||
"Transfer Manager":"",
|
||||
"Type":"",
|
||||
"Type of disk device to emulate.":"",
|
||||
"Type of disk device to emulate: ide, scsi":"",
|
||||
"Type of file system to be built. This can be any value understood by mkfs unix command.":"",
|
||||
"Type of the image, explained in detail in the following section. If omitted, the default value is the one defined in oned.conf (install default is OS).":"",
|
||||
"Udp black ports":"",
|
||||
"Udp firewall mode":"",
|
||||
"Udp white ports":"",
|
||||
"Unauthorized":"",
|
||||
"Unpublish":"",
|
||||
"Update":"",
|
||||
"Update a template":"",
|
||||
"Update image template":"",
|
||||
"Update network template":"",
|
||||
"Update template":"",
|
||||
"USB":"",
|
||||
"Use":"",
|
||||
"Used by VM":"",
|
||||
"Used CPU":"",
|
||||
"Used CPU (allocated)":"",
|
||||
"Used CPU (real)":"",
|
||||
"Used Mem (allocated)":"",
|
||||
"Used Memory":"",
|
||||
"Used Mem (real)":"",
|
||||
"Useful for power management, for example, normally required for graceful shutdown to work":"",
|
||||
"User":"",
|
||||
"Username":"",
|
||||
"User name and password must be filled in":"",
|
||||
"Users":"",
|
||||
"Value":"",
|
||||
"Value of the context variable":"",
|
||||
"Value of the custom variable":"",
|
||||
"VCPU":"",
|
||||
"Virtio":"",
|
||||
"Virtio (KVM)":"",
|
||||
"Virtualization Manager":"",
|
||||
"Virtual Machine information":"",
|
||||
"Virtual Machines":"",
|
||||
"Virtual Network":"",
|
||||
"Virtual network information":"",
|
||||
"Virtual Network information":"",
|
||||
"Virtual Network name missing!":"",
|
||||
"Virtual Networks":"",
|
||||
"Virtual Networks (total/public)":"",
|
||||
"Virtual Network template (attributes)":"",
|
||||
"VM information":"",
|
||||
"VM Instance":"",
|
||||
"VM Instances":"",
|
||||
"VM log":"",
|
||||
"VM MAD":"",
|
||||
"VM Name":"",
|
||||
"VM Network stats":"",
|
||||
"#VMS":"",
|
||||
"VM Save As":"",
|
||||
"VM template":"",
|
||||
"VM Template":"",
|
||||
"VM Templates":"",
|
||||
"VM Templates (total/public)":"",
|
||||
"VNC":"",
|
||||
"VNC Access":"",
|
||||
"VNC connection":"",
|
||||
"VNC Disabled":"",
|
||||
"VNC Session":"",
|
||||
"VNET ID":"",
|
||||
"VN MAD":"",
|
||||
"Welcome":"",
|
||||
"Wizard":"",
|
||||
"Wizard KVM":"",
|
||||
"Wizard VMware":"",
|
||||
"Wizard XEN":"",
|
||||
"Write the image template here":"",
|
||||
"Write the Virtual Machine template here":"",
|
||||
"Write the Virtual Network template here":"",
|
||||
"x509":"",
|
||||
"XEN":"",
|
||||
"Xen templates must specify a boot method":"",
|
||||
"yes":"",
|
||||
"Yes":"",
|
||||
"You have not selected a template":"",
|
||||
"You have to confirm this action.":"",
|
||||
"You need to select something.":"",
|
||||
};
|
31
src/sunstone/public/locale/generate_translation_template.rb
Executable file
31
src/sunstone/public/locale/generate_translation_template.rb
Executable file
@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env ruby
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# -------------------------------------------------------------------------- #
|
||||
# Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org) #
|
||||
# #
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
||||
# not use this file except in compliance with the License. You may obtain #
|
||||
# a copy of the License at #
|
||||
# #
|
||||
# http://www.apache.org/licenses/LICENSE-2.0 #
|
||||
# #
|
||||
# Unless required by applicable law or agreed to in writing, software #
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, #
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
|
||||
# See the License for the specific language governing permissions and #
|
||||
# limitations under the License. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
tr_strings = `grep -h -o -R -e 'tr("[[:print:]]*")' ../js/* | cut -d'"' -f 2 | sort -u`
|
||||
|
||||
puts "//Translated by"
|
||||
puts 'lang="en_US"'
|
||||
puts 'datatable_lang=""'
|
||||
puts "locale={"
|
||||
|
||||
tr_strings.each_line do | line |
|
||||
puts " \"#{line.chomp}\":\"\","
|
||||
end
|
||||
|
||||
puts "};"
|
519
src/sunstone/public/locale/ru/ru.js
Normal file
519
src/sunstone/public/locale/ru/ru.js
Normal file
@ -0,0 +1,519 @@
|
||||
//Translated by JSC "VIVOSS and OI", 2011
|
||||
//Переведено ЗАО «ВИВОСС и ОИ», 2011
|
||||
lang="ru"
|
||||
datatable_lang = "ru_datatable.txt"
|
||||
locale={
|
||||
"information":"информация",
|
||||
"#VMS":"Кол-во ВМ",
|
||||
"+ New Group":"Создать группу",
|
||||
"+ New":"Добавить",
|
||||
". No disk id or image name specified":". Не указано название образа или № диска",
|
||||
"ACL Rules":"Правила контроля доступа",
|
||||
"ACL String preview:":"Предпросмотр правила:",
|
||||
"ACLs":"Списки контроля",
|
||||
"ACPI":"ACPI",
|
||||
//"ACTIVE":"",
|
||||
"Accept (default)":"Принять (по умолчанию)",
|
||||
"Acl create":"Список контроля создан",
|
||||
"Acl delete":"Удален список контроля с номером ",
|
||||
"Acl":"Список контроля доступа",
|
||||
"Add Graphics":"Добавить графические устройства",
|
||||
"Add Hypervisor raw options":"Добавить исходные опции гипервизора",
|
||||
"Add context variables":"Добавить контекстные переменные",
|
||||
"Add custom variables":"Добавить пользовательские переменные",
|
||||
"Add disk/image":"Добавить диск/образ",
|
||||
"Add disks/images":"Добавить диски/образы",
|
||||
"Add inputs":"Добавить устройства ввода",
|
||||
"Add lease":"Добавить адрес",
|
||||
"Add network":"Добавить сеть",
|
||||
"Add placement options":"Добавить опции размещения",
|
||||
"Add to group":"Включить в группу",
|
||||
"Add":"Добавить",
|
||||
"Advanced mode":"Расширенный режим",
|
||||
"Affected resources":"Затрагиваемые правилом ресурсы",
|
||||
"All":"Все",
|
||||
"Allowed operations":"Разрешенные действия",
|
||||
"Amount of RAM required for the VM, in Megabytes.":"Объем ОЗУ (в МБ), необходимый для ВМ.",
|
||||
"Applies to":"Применено к",
|
||||
"ARCH":"Архитектура",
|
||||
"Architecture:":"Архитектура:",
|
||||
"Arguments for the booting kernel":"Параметры для загрузки ядра",
|
||||
"BOOT":"Тип ус-ва загрузки",
|
||||
"BRIDGE":"Шлюз",
|
||||
"BUS":"Тип шины",
|
||||
"Block":"Block",
|
||||
"Boolean expression that rules out provisioning hosts from list of machines suitable to run this VM":"Логическое выражение, исключающее элементы из списка узлов, подходящих для запуска данной ВМ",
|
||||
"Boot device type":"Тип устройства загрузки",
|
||||
"Boot method:":"Метод загрузки:",
|
||||
"Boot/OS options":"Загрузка и тип ОС",
|
||||
"Boot:":"Загрузка:",
|
||||
"Bootloader:":"Загрузчик:",
|
||||
"Bridge":"Шлюз",
|
||||
"Bus:":"Тип шины:",
|
||||
"CD-ROM":"CD-ROM",
|
||||
"CLONE":"Образ клонируется",
|
||||
"CPU Monitoring information":"Мониторинг ЦП",
|
||||
"CPU Use":"Использование ЦП",
|
||||
"CPU architecture to virtualization":"Архитектура ЦП для виртуализации",
|
||||
"CPU":"ЦП",
|
||||
"CPUSPEED":"Тактовая частота ЦП",
|
||||
"Cancel":"Отменить",
|
||||
"Canvas not supported.":"Canvas не поддерживается.",
|
||||
"Capacity options":"Настройки производительности",
|
||||
"Capacity":"Производительность",
|
||||
"Change group":"Сменить группу",
|
||||
"Change owner":"Сменить владельца",
|
||||
"Clone this image":"Клонировать образ",
|
||||
"Clone:":"Образ клонируется:",
|
||||
"Confirmation of action":"Подтверждение действия",
|
||||
"Context variable name and value must be filled in":"Поля «Имя переменной» и «Значение» должны быть заполнены",
|
||||
"Context":"Контекст",
|
||||
"Create ACL":"Создать список контроля",
|
||||
"Create VM Template":"Создать шаблон ВМ",
|
||||
"Create Virtual Machine":"Создать виртуальную машину",
|
||||
"Create Virtual Network":"Создать виртуальную сеть",
|
||||
"Create an empty datablock":"Создать пустой блок данных", //!!
|
||||
"Create group":"Создать группу",
|
||||
"Create host":"Создать узел",
|
||||
"Create user":"Создать пользователя",
|
||||
"Create":"Создать",
|
||||
"Current NICs:":"Текущие контроллеры сет. интерфейса:",
|
||||
"Current disks:":"Текущие диски:",
|
||||
"Current inputs:":"Текущие УВВ:",
|
||||
"Current leases:":"Текущие адреса:",
|
||||
"Current variables:":"Текущее значение:",
|
||||
"Custom variable name and value must be filled in":"Поля «Имя переменной» и «Значение» должны быть заполнены",
|
||||
"Custom variables":"Пользовательские переменные",
|
||||
"DESCRIPTION":"Краткое описание",
|
||||
"DEV_PREFIX":"Префикс устройства",
|
||||
//"DISABLED":"",
|
||||
"DISK":"Сведения о диске",
|
||||
"DISK_ID":"№ диска",
|
||||
"DRIVER":"Драйвер",
|
||||
"Dashboard":"Инф. панель",
|
||||
"Data:":"Данные:",
|
||||
"Datablock":"Блок данных",
|
||||
"Default":"По умолчанию",
|
||||
"Delete from group":"Исключить из группы",
|
||||
"Delete host":"Удалить узел",
|
||||
"Delete":"Удалить",
|
||||
"Deploy # VMs:":"Кол-во экземпляров ВМ для размещения:",
|
||||
"Deploy ID":"№ размещения",
|
||||
"Deploy":"Разместить на узле",
|
||||
"Description:":"Описание:",
|
||||
"Device prefix:":"Префикс устройства:",
|
||||
"Device to be mounted as root":"Устройство, монтируемое как корневое",
|
||||
"Device to map image disk. If set, it will overwrite the default device mapping":"Устройство для образа диска. Если установлено, то оно перезапищет устройсво картографирования по умолчанию.",
|
||||
"Disable":"Отключить",
|
||||
"Disallow access to the VM through the specified ports in the TCP protocol":"Запретить доступ к ВМ через указанные порты для TCP протокола",
|
||||
"Disallow access to the VM through the specified ports in the UDP protocol":"Запретить доступ к ВМ через указанные порты для UDP протокола",
|
||||
"Disk file location path or URL":"Путь расположения файла диска или URL",
|
||||
"Disk type":"Тип диска",
|
||||
"Disk":"Диск",
|
||||
"Disks":"Диски",
|
||||
"Do you want to proceed?":"Хотите продолжить?",
|
||||
"Driver default":"Драйвер по умолчанию",
|
||||
"Driver:":"Драйвер:",
|
||||
"Drivers":"Драйверы",
|
||||
"Drop":"Сбросить",
|
||||
"Dummy":"Заглушка",
|
||||
"EC2":"EC2",
|
||||
"ERROR":"Сведения об ошибках",
|
||||
"Enable":"Включить",
|
||||
"Error":"Ошибка",
|
||||
"FEATURES":"Особенности",
|
||||
//"FIXED":"",
|
||||
"FREECPU":"Незадействованный ресурс ЦП",
|
||||
"FREEMEMORY":"Свободно ОЗУ",
|
||||
"FS type:":"Тип ФС:",
|
||||
"FS":"FS",
|
||||
"Features":"Особенности",
|
||||
"Fields marked with":"Поля помеченные",
|
||||
"File":"Файл",
|
||||
"Filesystem type for the fs images":"Тип файловой системы для образов ФС",
|
||||
"Fixed network":"Фиксированные адреса",
|
||||
"Floppy":"Floppy",
|
||||
"Fold / Unfold all sections":"Свернуть/развернуть все разделы",
|
||||
"Format:":"Формат:",
|
||||
"GRAPHICS":"Параметры графического доступа",
|
||||
"Get Information":"Получить информацию",
|
||||
"Get Pool of my/group\'s resources":"Получить пул доступных мне/группе ресурсов",
|
||||
"Get Pool of resources":"Получить пул ресурсов",
|
||||
"Graphics type:":"Тип ГУ:",
|
||||
"Graphics":"Графические устройства",
|
||||
"Group create":"Группа создана",
|
||||
"Group delete":"Группа удалена",
|
||||
"Group name:":"Название группы:",
|
||||
"Group":"Группа пользователей",
|
||||
"Groups":"Группы",
|
||||
"HOSTNAME":"Название узла",
|
||||
"HW address associated with the network interface":"MAC-адрес, связанный с сетевым интерфейсом",
|
||||
"HYPERVISOR":"Гипервизор",
|
||||
"Hardware that will emulate this network interface. With Xen this is the type attribute of the vif.":"Аппаратное устройствое, которое будет отвечать за эмуляцию сетевого интерфейса. Для Xen это атрибут vif.",
|
||||
"Historical monitoring information":"Мониторинг состояния",
|
||||
"Hold":"Запретить размещение",
|
||||
"Host information":"Состояние узла",
|
||||
"Host parameters":"Параметры узла",
|
||||
"Host shares":"Ресурсы узла",
|
||||
"Host template":"Шаблон узла",
|
||||
"Host":"Узел",
|
||||
"Hostname":"Название узла",
|
||||
"Hosts (total/active)":"Узлы (всего/из них активных)",
|
||||
"Hosts CPU":"Загрузка ЦП",
|
||||
"Hosts memory":"Загрузка ОЗУ",
|
||||
"Hosts":"Узлы",
|
||||
"Human readable description of the image for other users.":"Краткое описание образа.",
|
||||
"ICMP policy":"Политика ICMP",
|
||||
"ID":"№",
|
||||
"IDE":"IDE",
|
||||
"IM MAD":"Модуль ср-ва мониторинга",
|
||||
"IMAGE":"Используемый образ",
|
||||
"IMAGE_ID":"№ образа",
|
||||
//"INIT":"",
|
||||
"IP to listen on":"IP-адрес для прослушивания",
|
||||
"IP":"IP-адрес",
|
||||
"IP:":"IP:",
|
||||
"Icmp:":"Icmp:",
|
||||
"Image information":"Информация об образе",
|
||||
"Image name:":"Название образа:",
|
||||
"Image template":"Шаблон образа",
|
||||
"Images (total/public)":"Образы (всего/из них открытых)",
|
||||
"Images":"Образы ВМ",
|
||||
"Image":"Образ",
|
||||
"Info":"Информация",
|
||||
"Information Manager:":"Cредство мониторинга:",
|
||||
"Information":"Информация",
|
||||
"information":" ",
|
||||
"Initrd:":"Диск нач. иниц.(initrd):",
|
||||
"Inputs":"Устройства ввода",
|
||||
"Instantiate":"Создать экземпляр ВМ",
|
||||
"KVM":"KVM",
|
||||
"Kernel commands:":"Команды ядра:",
|
||||
"Kernel:":"Ядро:",
|
||||
"Keyboard configuration locale to use in the VNC display":"Раскладка клавиатуры, используемая при работе с VNC-дисплеем",
|
||||
"Keymap":"Раскладка клавиатуры",
|
||||
"LCM State":"Текущее состояние ВМ",
|
||||
"LEASES":"АДРЕСА",
|
||||
"LISTEN":"Прослушивать IP",
|
||||
"Lease IP:":"IP-адрес:",
|
||||
"Lease MAC (opt):":"MAC-адрес (необяз.):",
|
||||
"Lease MAC:":"MAC-адрес:",
|
||||
"Leases information":"Сведения по имеющимся адресам виртуальной сети",
|
||||
"Listen IP:":"Прослушивать IP:",
|
||||
"Live migrate":"Перенести запущенную ВМ",
|
||||
"Loading":"Идет загрузка",
|
||||
"MAC":"MAC-адрес",
|
||||
"MAC:":"MAC-адрес:",
|
||||
"MEMORY":"Объем ОЗУ",
|
||||
"MESSAGE":"Сообщение",
|
||||
"MODELNAME":"Модель ЦП",
|
||||
//"MONITORED":"",
|
||||
//"MONITORING":"",
|
||||
"Make non persistent":"Сделать непостоянным",
|
||||
"Make persistent":"Сделать постоянным",
|
||||
"Manage":"Управлять",
|
||||
"Manual":"В ручную",
|
||||
"Max Mem":"Доступно ОЗУ",
|
||||
"Memory monitoring information":"Мониторинг ОЗУ",
|
||||
"Memory use":"Использование ОЗУ",
|
||||
"Memory":"Память",
|
||||
"Migrate":"Перенести ВМ",
|
||||
"Model:":"Модель:",
|
||||
"Monitoring information":"Мониторинг",
|
||||
"Mount image as read-only":"Монтировать образ только для чтения",
|
||||
"Mouse":"Мышь",
|
||||
"NAME":"Название",
|
||||
"Name for the context variable":"Имя контекстной переменной",
|
||||
"Name for the custom variable":"Имя пользовательской переменной",
|
||||
"Name for the tun device created for the VM":"Имя сетевого туннеля, созданного для ВМ",
|
||||
"Name of a shell script to be executed after creating the tun device for the VM":"shell-скрипт, который будет выполнен после создания сетевого туннеля для ВМ",
|
||||
"Name of the bridge the network device is going to be attached to":"Шлюз, с которым будет связано сетевое устройство",
|
||||
"Name of the image to use":"Название образа для использования",
|
||||
"Name of the network to attach this device":"Сеть, подключаемая к данному устройству",
|
||||
"Name that the Image will get. Every image must have a unique name.":"Название, которое получит образ. Каждый образ должен обладать уникальным названием.",
|
||||
"Name that the VM will get for description purposes. If NAME is not supplied a name generated by one will be in the form of one-<VID>.":"Название, которое получит ВМ. Если название не будет указано, то оно будет сгенерировано в формате one-<№ ВМ>.",
|
||||
"Name":"Название",
|
||||
"Net_RX":"Принято",
|
||||
"Net_TX":"Отправлено",
|
||||
"NETRX":"Принято по сети",
|
||||
"NETTX":"Отправлено по сети",
|
||||
"NETWORK":"Название вирт. сети",
|
||||
"NETWORK_ADDRESS":"Адрес сети",
|
||||
"NETWORK_ID":"№ вирт. сети",
|
||||
"NETWORK_SIZE":"Размер сети",
|
||||
"NIC":"Контроллер сетевого интерфейса",
|
||||
"NO":"нет",
|
||||
"Network Address:":"Адрес сети:",
|
||||
"Network reception":"Сеть: принято",
|
||||
"Network size:":"Размер сети:",
|
||||
"Network transmission":"Сеть: отправлено",
|
||||
"Network type:":"Тип сети:",
|
||||
"Network":"Сеть",
|
||||
"New: ":"Создать новый ресурс: ",
|
||||
"No disks defined":"Дисков не обнаружено",
|
||||
"No":"Нет",
|
||||
"None":"Никакой",
|
||||
"Number of virtual cpus. This value is optional, the default hypervisor behavior is used, usually one virtual CPU.":"Количество виртуальных процессоров. Это значение опционально, используется поведение гипервизора по умолчанию - один виртуальный ЦП.",
|
||||
"OK":"OK",
|
||||
"OS and Boot options":"Опции загрузки и ОС",
|
||||
"OS":"ОС",
|
||||
"Open VNC Session":"Открыть VNC-сессию",
|
||||
"Optional, please select":"Опционально, пожалуйста выберите",
|
||||
"Owned by group":"Принадлежит группе",
|
||||
"Owner":"Владелец",
|
||||
"PAE:":"PAE:",
|
||||
"PATH":"ПУТЬ",
|
||||
"PERSISTENT":"Постоянный",
|
||||
"PORT":"Номер порта доступа",
|
||||
"PS2":"PS/2",
|
||||
"Password for the VNC server":"Пароль для VNC сервера",
|
||||
"Password:":"Пароль:",
|
||||
"Path to the OS kernel to boot the image":"Путь к ядру ОС для загрузки образа",
|
||||
"Path to the bootloader executable":"Путь к исполняемому файлу загрузчика",
|
||||
"Path to the initrd image":"Путь к образу initrd",
|
||||
"Path to the original file that will be copied to the image repository. If not specified for a DATABLOCK type image, an empty image will be created.":"Путь к исходному файлу, который будет скопирован в хранилище образов. Если путь не указан для типа образа БЛОК ДАННЫХ, то будет создан пустой образ.",
|
||||
"Path vs. source:":"Исходные данные образа:",
|
||||
"Path:":"Путь к эталонному файлу образа:",
|
||||
"Percentage of CPU divided by 100 required for the Virtual Machine. Half a processor is written 0.5.":"Процент процессорного времени ЦП, предоставлемого ВМ, разделенный на 100. Например, для выделения половины процессорного времени следует указать 0.5.",
|
||||
"Permits access to the VM only through the specified ports in the TCP protocol":"Разрешить доступ к ВМ только через указанные порты протокола TCP",
|
||||
"Permits access to the VM only through the specified ports in the UDP protocol":"Разрешить доступ к ВМ только через указанные порты протокола UPD",
|
||||
"Persistence of the image":"Если образ является постоянным, то при каждом завершении работы с полученной на его основе виртуальной машиной все изменения будут сохранены в образе.\n\n Важно помнить, что сохранение выполнится только в случае завершения работы соответствующей ВМ при помощи операций «Выключить» и «Отменить».\n\nПостоянный образ всегда хранится в одном экземпляре.",
|
||||
"Persistent":"Постоянный",
|
||||
"Physical address extension mode allows 32-bit guests to address more than 4 GB of memory":"Режим расширенной физической адресации позволяет использовать 32-битным ВМ больше 4-х ГБ ",
|
||||
"Placement":"Размещение",
|
||||
"Please choose path if you have a file-based image. Choose source otherwise or create an empty datablock disk.":"«Путь к эталонному файлу образа» — образ создается путем копирования эталонного файла образа в хранилище образов.\n\n«Источник» — в данное поле следует указывать местоположение образа (в качестве образа будет использован ресурс, непосредственно указанный в поле «Источник», а не копия этого ресурса).",
|
||||
"Please choose":"Пожалуйста выберите",
|
||||
"Please provide a lease IP":"Необходимо указать IP-адрес",
|
||||
"Please provide a network address":"Укажите адрес сети",
|
||||
"Please provide a resource ID for the resource(s) in this rule":"Необходимо указать № ресурса(ов) для данного правила)",
|
||||
"Please select a group to which the selected resources belong to":"Необходимо выбрать группу пользователей, которой принадлежат выбранные ресурсы",
|
||||
"Please select at least one operation":"Необходимо выбрать по меньшей мере одну операцию",
|
||||
"Please select at least one resource":"Необходимо выбрать по меньшей мере один ресурс",
|
||||
"Please select":"Выберите",
|
||||
"Please specify to who this ACL applies":"Необходимо указать, к кому применять данный список контроля",
|
||||
"Please specify:":"Укажите:",
|
||||
"Please, choose and modify the template you want to update:":"Укажите шаблон, который хотите обновить:",
|
||||
"Port blacklist":"Список запрещенных портов",
|
||||
"Port for the VNC server":"Порт для сервера VNC",
|
||||
"Port whitelist":"Список разрешенных портов",
|
||||
"Port:":"Порт:",
|
||||
"Predefined":"По умолчанию",
|
||||
"Prefix for the emulated device this image will be mounted at. For instance, “hd”, “sd”. If omitted, the default value is the one defined in oned.conf (installation default is “hd”).":"Префикс эмулируемого устройства, на которое будет смонтирован образ. Например, «hd» и «sd». Если не указать префикс, его значение будет считано из конфигурационного файла oned.conf (значение по умолчанию — «hd»).",
|
||||
"Previous action":"Предыдущее действие",
|
||||
"Provide a path":"Указать путь к эталонному файлу образа",
|
||||
"Provide a source":"Указать источник для образа",
|
||||
"Public scope of the image":"Информация о доступности образа",
|
||||
"Public":"Открытый",
|
||||
"Publish":"Сделать открытым",
|
||||
"Quickstart":"Типовые операции",
|
||||
//"RANGED":""
|
||||
"RAW":"RAW",
|
||||
"READONLY":"Доступен только на чтение",
|
||||
//"READY":"",
|
||||
"Ranged network":"Диапазон адресов",
|
||||
"Rank:":"Степень:",
|
||||
"Raw data to be passed directly to the hypervisor":"Исходные данные, передаваемые напрямую гипервизору",
|
||||
"Raw":"Исходная опция",
|
||||
"Read only:":"Только чтение:",
|
||||
"Refresh list":"Обновить список",
|
||||
"Register time":"Время регистрации",
|
||||
"Registration time":"Время регистрации",
|
||||
"Release":"Разрешить размещение",
|
||||
"Remove lease":"Удалить адрес",
|
||||
"Remove selected":"Удалить выбранные",
|
||||
"Request an specific IP from the Network":"Запросить определенный IP-адрес из сети",
|
||||
"Requirements:":"Требования:",
|
||||
"Reset":"Сбросить",
|
||||
"Resource ID / Owned by":"№ ресурса / Принадлежит",
|
||||
"Resource ID:":"№ ресурса:",
|
||||
"Resource subset:":"Подмножество ресурсов:",
|
||||
"Restart":"Перезапустить",
|
||||
"Resubmit":"Разместить повторно",
|
||||
"Resume":"Возобновить работу ВМ",
|
||||
"Retrieving...":"Извлечение...",
|
||||
"Root:":"Корень:",
|
||||
"Running VMs":"Запущено ВМ",
|
||||
"SAVE":"Сохранение изменений",
|
||||
"SCSI":"SCSI",
|
||||
"SDL":"SDL",
|
||||
"SHARED":"Общий каталог",
|
||||
"SOURCE":"Источник",
|
||||
"Save as":"Сохранить как",
|
||||
"Save this image after shutting down the VM":"Сохранить образ после выключения ВМ",
|
||||
"Save:":"Сохранить:",
|
||||
"Saveas for VM with ID":"Сохранить как для ВМ с №",
|
||||
"Script:":"Скрипт:",
|
||||
"Select a template":"Выберите шаблон",
|
||||
"Select boot method":"Выберите метод загрузки",
|
||||
"Select disk:":"Выберите диск:",
|
||||
"Select template:":"Использовать шаблон:",
|
||||
"Select the group from which to delete users:":"Выберите группу, из которой требуется исключить пользователей:",
|
||||
"Select the new ":"Выбрать новую группу",
|
||||
"Select the new group to add users:":"Выберите новую группу, в которую требуется включить пользователей:",
|
||||
"Select the new group:":"Выберите новую группу:",
|
||||
"Select the new owner:":"Выбрать нового владельца:",
|
||||
"Setup Networks":"Настройка сетей",
|
||||
"Shutdown":"Выключить",
|
||||
"Size in MB":"Размер в МБ",
|
||||
"Size of the datablock in MB.":"Размер блока данных в МБ.",
|
||||
"Size:":"Размер:",
|
||||
"Skipping VM ":"Пропуск ВМ ",
|
||||
"Source to be used in the DISK attribute. Useful for not file-based images.":"В качестве источника указывается местоположение образа, который планируется использовать непосредственно.",
|
||||
"Source":"Источник",
|
||||
"Specific ID":"Ресурс с конкретным №",
|
||||
"Specific image mapping driver. KVM: raw, qcow2. Xen:tap:aio:, file:. VMware unsupported":"Формат образа виртуального диска. Для KVM: raw, qcow2. Для Xen: tap:aio:, file:. Форматы VMware не поддерживаются",
|
||||
"Start Time":"Время запуска",
|
||||
"Start time":"Время запуска",
|
||||
"State":"Состояние",
|
||||
"Status":"Статус",
|
||||
"Stop":"Остановить",
|
||||
"Submitted":"Выполнено",
|
||||
"Summary of resources":"Использование ресурсов",
|
||||
"Suspend":"Приостановить работу ВМ",
|
||||
"Swap":"Swap",
|
||||
"TARGET":"Ус-во загрузки",
|
||||
"TEMPLATE_ID":"№ шаблона ВМ",
|
||||
"TM MAD":"Модуль ср-ва передачи",
|
||||
"TYPE":"Тип",
|
||||
"Tablet":"Планшетный ПК",
|
||||
"Target:":"Ус-во загрузки:",
|
||||
"Tcp black ports:":"Запрещенные TCP-порты:",
|
||||
"Tcp firewall mode:":"TCP режим брандмауэра:",
|
||||
"Tcp white ports:":"Разрешенные TCP-порты:",
|
||||
"Template information":"Сведения о шаблоне",
|
||||
"Template updated correctly":"Шаблон успешно обновлен",
|
||||
"Template":"Шаблон",
|
||||
"Templates":"Шаблоны ВМ",
|
||||
"There are mandatory fields missing in the OS Boot options section":"В разделе «Загрузка и тип ОС» не заполнены некоторые обязательные поля",
|
||||
"There are mandatory fields missing in the capacity section":"В разделе «Производительность» не заполнены некоторые обязательные поля",
|
||||
"There are mandatory parameters missing in this section":"В данном разделе указаны не все обязательные параметры",
|
||||
"There are mandatory parameters missing":"Указаны не все обязательные параметры",
|
||||
"This field sets which attribute will be used to sort the suitable hosts for this VM. Basically, it defines which hosts are more suitable than others":"В данном поле устанавливается значение атрибута, используемое для ранжирования узлов, пригодных для размещения ВМ. Значение атрибута определяет, какие из узлов лучше подходят для размещения ВМ.",
|
||||
"This rule applies to:":"Прим. правило к:",
|
||||
"This will cancel selected VMs":"Прервать работу выбранных ВМ",
|
||||
"This will change the main group of the selected users. Select the new group:":"Изменение основной группы для выбранных пользователей. Выберите новую группу:",
|
||||
"This will delete the selected VMs from the database":"Удалить выбранные ВМ и связанные с ними образы дисков из базы данных и хранилища образов",
|
||||
"This will deploy the selected VMs on the chosen host":"Разместить выбранные ВМ на определенном узле",
|
||||
"This will hold selected pending VMs from being deployed":"Приостановить процедуру размещения ВМ на узле",
|
||||
"This will initiate the shutdown process in the selected VMs":"Запустить процесс выключения выбранных ВМ",
|
||||
"This will live-migrate the selected VMs to the chosen host":"Перенести выбранные запущенные ВМ, не завершая их работы, с текущих узлов на выбранный",
|
||||
"This will migrate the selected VMs to the chosen host":"Перенести выбранные остановленные ВМ с текущих узлов на выбранный",
|
||||
"This will redeploy selected VMs (in UNKNOWN or BOOT state)":"Повторно выполнить процедуру размещения выбранных ВМ, находящихся в состоянии UNKNOWN или BOOT, на узле",
|
||||
"This will release held machines":"Продолжить ранее приостановленное размещение ВМ на узле",
|
||||
"This will resubmits VMs to PENDING state":"Повторно выполнить попытку размещения выбранных ВМ на одном из доступных узлов системы виртуализации (перевод в состояние PENDING)",
|
||||
"This will resume selected stopped or suspended VMs":"Возобновить работу выбранных остановленных или приостановленных ВМ",
|
||||
"This will stop selected VMs":"Остановить выбранные ВМ",
|
||||
"This will suspend selected machines":"Приостановить выбранные ВМ",
|
||||
"TIMESTAMP":"Время",
|
||||
"TOTALCPU":"Ресурс ЦП",
|
||||
"TOTALMEMORY":"Объем ОЗУ",
|
||||
"Total Leases":"Суммарное количество адресов",
|
||||
"Total VM count":"Количество виртуальных машин",
|
||||
"Transfer Manager:":"Средство передачи:",
|
||||
"Type of disk device to emulate.":"Тип эмулируемого дискового устройства",
|
||||
"Type of disk device to emulate: ide, scsi":"Тип эмулируемого дискового устройства: ide, scsi",
|
||||
"Type of file system to be built. This can be any value understood by mkfs unix command.":"Тип создаваемой ФС. Может быть указан любой тип, который используется в unix-команде mkfs.",
|
||||
"Type of the image, explained in detail in the following section. If omitted, the default value is the one defined in oned.conf (install default is OS).":"Тип. Если не указать тип образа, его значение будет считано из конфигурационного файла oned.conf (значение по умолчанию — «OS»).",
|
||||
"Type":"Тип",
|
||||
"USB":"USB",
|
||||
//"USED":"",
|
||||
"USEDCPU":"Использование ресурса ЦП",
|
||||
"USEDMEMORY":"Используемый объем ОЗУ",
|
||||
"USED_BY":"Экземпляров в использовании",
|
||||
"Udp black ports:":"Запрещенные UPD-порты:",
|
||||
"Udp firewall mode:":"UPD режим брандмауэра:",
|
||||
"Udp white ports:":"Разрешенные UPD-порты:",
|
||||
"Unpublish":"Отменить статус «Открытый»",
|
||||
"Update a template":"Обновить шаблон",
|
||||
"Update template":"Обновить шаблон",
|
||||
"Update":"Обновить",
|
||||
"Use":"Использовать",
|
||||
"Used CPU (allocated)":"Использовано ОЗУ(реально)",
|
||||
"Used CPU (real)":"Использовано ЦП(реально)",
|
||||
"Used CPU":"Используется ЦП",
|
||||
"Used Mem (allocated)":"Использовано ОЗУ(выделено)",
|
||||
"Used Mem (real)":"Использовано ОЗУ(реально)",
|
||||
"Used Memory":"Используется памяти",
|
||||
"Useful for power management, for example, normally required for graceful shutdown to work":"Требуется для корректного завершения работы ВМ средствами системы виртуализации",
|
||||
"User chgrp":"Изменение группы",
|
||||
"User create":"Пользователь создан",
|
||||
"User delete":"Пользователь удален",
|
||||
"User name and password must be filled in":"Необходимо указать и имя пользователя, и пароль",
|
||||
"User":"Пользователь",
|
||||
"Username:":"Имя пользователя:",
|
||||
"Users":"Пользователи",
|
||||
"VCPU":"Кол-во вирт. ЦП",
|
||||
"VCPU:":"Кол-во вирт. ЦП:",
|
||||
"VID":"№ ВМ",
|
||||
"VM Instance":"Экземпляр ВМ",
|
||||
"VM Instances (":"Экземпляры ВМ (",
|
||||
"VM MAD":"Модуль ср-ва виртуализации",
|
||||
"VM Name:":"Название ВМ:",
|
||||
"VM Network stats":"Статистика виртуальных сетей",
|
||||
"VM Save As":"ВМ сохранить как",
|
||||
"VM Template":"Шаблон ВМ",
|
||||
"VM Templates (total/public)":"Шаблоны ВМ (всего/из них открытых)",
|
||||
"VM Templates":"Шаблоны ВМ",
|
||||
"VM information":"Информация о ВМ",
|
||||
"VM log":"Журнал ВМ",
|
||||
"VM template":"Шаблон ВМ",
|
||||
"VM":"ВМ",
|
||||
"VMID":"№ ВМ",
|
||||
"VNC Access":"Доступ по VNC",
|
||||
"VNC Disabled":"VNC недоступно",
|
||||
"VNC Session":"VNC сессия",
|
||||
"VNC connection":"VNC соединение",
|
||||
"VNC":"VNC",
|
||||
"Value of the context variable":"Значение контекстной переменной",
|
||||
"Value of the custom variable":"Значение пользовательской перменной",
|
||||
"Value:":"Значение:",
|
||||
"Virtio (KVM)":"Virtio (KVM)",
|
||||
"Virtio":"Virtio",
|
||||
"Virtual Machine information":"Информация о виртуальной машине",
|
||||
"Virtual Machines":"Вирт. машины",
|
||||
"Virtual Network name missing!":"Отсутствует название виртуальной сети!",
|
||||
"Virtual Network template":"Шаблон виртуальной сети",
|
||||
"Virtual Networks (total/public)":"Виртуальные сети (всего/из них открытых)",
|
||||
"Virtual Networks":"Вирт. сети",
|
||||
"Virtual Network":"Виртуальная сеть",
|
||||
"Virtual Network information":"Информация о виртуальной сети",
|
||||
"Virtual network information":"Информация о виртуальной сети",
|
||||
"Virtual network template":"Шаблон виртуальной сети",
|
||||
"Virtualization Manager:":"Средство виртуализации:",
|
||||
"Wizard KVM":"Шаблон KVM",
|
||||
"Wizard VMware":"Шаблон VMware",
|
||||
"Wizard XEN":"Шаблон XEN",
|
||||
"Wizard":"Мастер настройки",
|
||||
"Write the Virtual Machine template here":"Отредактируйте параметры шаблона ВМ вручную",
|
||||
"Write the Virtual Network template here":"Отредактируйте параметры шаблона вирт. сети вручную",
|
||||
"Write the image template here":"Отредактируйте параметры шаблона образа ВМ вручную",
|
||||
"XEN":"XEN",
|
||||
"Xen templates must specify a boot method":"В шаблон Xen необходимо указывать метод загрузки",
|
||||
"YES":"да",
|
||||
"Yes":"Да",
|
||||
"You have not selected a template":"Вы не выбрали шаблон",
|
||||
"You have to confirm this action.":"Необходимо подтвердить данную операцию.",
|
||||
"You need to select something.":"Вы должны что-нибудь выбрать.",
|
||||
"active":"активных",
|
||||
"are mandatory":"обязательные",
|
||||
"cdrom":"cdrom",
|
||||
"cpu_usage":"использование",
|
||||
"disk id :":"диск №: ",
|
||||
"error":"ошибок",
|
||||
"failed":"дефектных",
|
||||
"fd":"fd",
|
||||
"hd":"hd",
|
||||
"id":"№",
|
||||
"max_cpu":"максимально",
|
||||
"max_mem":"максимально",
|
||||
"mem_usage":"использование",
|
||||
"net_rx":"принято",
|
||||
"net_tx":"отправлено",
|
||||
"network":"network",
|
||||
"no":"никак нет",
|
||||
"running":"запущенных",
|
||||
"total":"всего",
|
||||
"used_cpu":"использовано",
|
||||
"used_mem":"использовано",
|
||||
"yes":"да"
|
||||
};
|
17
src/sunstone/public/locale/ru/ru_datatable.txt
Normal file
17
src/sunstone/public/locale/ru/ru_datatable.txt
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"sProcessing": "Ждите. Выполняется обработка...",
|
||||
"sLengthMenu": "Показывать _MENU_ элементов списка",
|
||||
"sZeroRecords": "Список пуст",
|
||||
"sInfo": "Показаны элементы списка с _START_ по _END_ из _TOTAL_",
|
||||
"sInfoEmpty": "Список пуст",
|
||||
"sInfoFiltered": "(отфильтровано из _MAX_ элементов списка)",
|
||||
"sInfoPostFix": "",
|
||||
"sSearch": "Поиск:",
|
||||
"sUrl": "",
|
||||
"oPaginate": {
|
||||
"sFirst": "Первая",
|
||||
"sPrevious": "Предыдущая",
|
||||
"sNext": "Следующая",
|
||||
"sLast": "Последняя"
|
||||
}
|
||||
}
|
@ -115,6 +115,12 @@ helpers do
|
||||
session[:ip] = request.ip
|
||||
session[:remember] = params[:remember]
|
||||
|
||||
if user['TEMPLATE/LANG']
|
||||
session[:lang] = user['TEMPLATE/LANG']
|
||||
else
|
||||
session[:lang] = settings.config[:lang]
|
||||
end
|
||||
|
||||
if params[:remember]
|
||||
env['rack.session.options'][:expire_after] = 30*60*60*24
|
||||
end
|
||||
@ -210,12 +216,26 @@ get '/config' do
|
||||
@SunstoneServer.get_configuration(session[:user_id])
|
||||
end
|
||||
|
||||
post '/config' do
|
||||
begin
|
||||
body = JSON.parse(request.body.read)
|
||||
rescue
|
||||
[500, OpenNebula::Error.new(msg).to_json]
|
||||
end
|
||||
|
||||
body.each do | key,value |
|
||||
case key
|
||||
when "lang" then session[:lang]=value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
get '/vm/:id/log' do
|
||||
@SunstoneServer.get_vm_log(params[:id])
|
||||
end
|
||||
|
||||
##############################################################################
|
||||
# Logs
|
||||
# Monitoring
|
||||
##############################################################################
|
||||
|
||||
get '/:resource/monitor' do
|
||||
|
@ -2,7 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>OpenNebula Sunstone: Cloud Operations Center</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
|
||||
<!-- Vendor Libraries -->
|
||||
<link rel="stylesheet" type="text/css" href="vendor/dataTables/demo_table_jui.css" />
|
||||
@ -20,6 +20,13 @@
|
||||
|
||||
<!-- End Vendor Libraries -->
|
||||
|
||||
<!--Languages-->
|
||||
<script type="text/javascript" src="js/locale.js"></script>
|
||||
<%if session[:lang]%>
|
||||
<script type="text/javascript" src="locale/<%=session[:lang]%>/<%=session[:lang]%>.js"></script>
|
||||
<%end%>
|
||||
<!--endLanguages-->
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/application.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/layout.css" />
|
||||
<script type="text/javascript" src="js/opennebula.js"></script>
|
||||
@ -42,6 +49,7 @@
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="outer-center">
|
||||
<div class="inner-center">
|
||||
</div>
|
||||
@ -58,12 +66,12 @@
|
||||
<img src="images/opennebula-sunstone-small.png"/>
|
||||
</div>
|
||||
<div id="login-info">
|
||||
Welcome <span id="user"></span> | <a href="#" id="logout">Sign Out</a>
|
||||
<span id="welcome">Welcome</span> <span id="user"></span> | <a href="#" id="logout">Sign Out</a>
|
||||
</div>
|
||||
<div id="links">
|
||||
<a href="http://opennebula.org/documentation:documentation" target="_blank">Documentation</a> |
|
||||
<a href="http://opennebula.org/support:support" target="_blank">Support</a> |
|
||||
<a href="http://opennebula.org/community:community" target="_blank">Community</a>
|
||||
<a href="http://opennebula.org/documentation:documentation" target="_blank" id="doc_link">Documentation</a> |
|
||||
<a href="http://opennebula.org/support:support" target="_blank" id="support_link">Support</a> |
|
||||
<a href="http://opennebula.org/community:community" target="_blank" id="community_link">Community</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer" class="ui-layout-south">
|
||||
|
Loading…
x
Reference in New Issue
Block a user