From 6235768943ff6e2b4c590f6acaa79ea0964e2072 Mon Sep 17 00:00:00 2001 From: fv3rdugo Date: Mon, 19 Jun 2017 20:21:04 +0200 Subject: [PATCH 001/170] Add Japanese --- lib/Ravada/I18N/jp.po | 303 ++++++++++++++++++++++ templates/bootstrap/user_settings.html.ep | 1 + 2 files changed, 304 insertions(+) create mode 100644 lib/Ravada/I18N/jp.po diff --git a/lib/Ravada/I18N/jp.po b/lib/Ravada/I18N/jp.po new file mode 100644 index 000000000..ad4a50092 --- /dev/null +++ b/lib/Ravada/I18N/jp.po @@ -0,0 +1,303 @@ +# Translators: +# Fernando Verdugo , 2017 +msgid "" +msgstr "" +"Project-Id-Version: 0.1.0-alpha\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-03 10:12+0300\n" +"PO-Revision-Date: 2017-05-02 16:20+0200\n" +"Last-Translator: Fernando Verdugo fernando@etsetb.upc.edu\n" +"Language-Team: \n" +"Language: jp\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "Ravada broker" +msgstr "ラヴダブローカー" + +msgid "Machine Name" +msgstr "マシン名" + +msgid "Tools" +msgstr "ツール" + +msgid "Machines List" +msgstr "マシンの一覧" + +msgid "Users" +msgstr "ユーザー" + +msgid "Choose a Machine to Start" +msgstr "開始するマシンを選択します。" + +msgid "Start" +msgstr "スタート" + +msgid "Stop" +msgstr "ストップ" + +msgid "View" +msgstr "ビュー" + +msgid "Prepare base" +msgstr "ベースを準備する" + +msgid "Clone" +msgstr "クローン" + +msgid "Can't Prepare Base, Remove Base nor Delete. Machine has" +msgstr "" + +msgid "Clone/s" +msgstr "" + +msgid "NEW" +msgstr "新しい" + +msgid "Users List" +msgstr "ユーザーリスト" + +msgid "Name" +msgstr "名" + +msgid "Log Out" +msgstr "ログアウト" + +msgid "Available Machines" +msgstr "" + +msgid "Help" +msgstr "助けて" + +msgid "Requirements" +msgstr "要件" + +msgid "About" +msgstr "約" + +msgid "Messages" +msgstr "メッセージ" + +msgid "Mark all as Read" +msgstr "" + +msgid "Settings" +msgstr "設定" + +msgid "New Machine" +msgstr "新しいマシン" + +msgid "I want to change my password" +msgstr "" + +msgid "I want to change my language" +msgstr "" + +msgid "Language:" +msgstr "言語" + +msgid "English" +msgstr "英語" + +msgid "Spanish" +msgstr "スペイン語" + +msgid "Catalan" +msgstr "カタロニア語" + +msgid "New Password:" +msgstr "新しいパスワード:" + +msgid "Confirm Password:" +msgstr "新しいパスワード:" + +msgid "Submit" +msgstr "提出する" + +msgid "Your language has been changed successfully" +msgstr "言語が変更されました" + +msgid "Your password has been changed successfully" +msgstr "パスワードが正常に変更されました" + +msgid "Password too small" +msgstr "パスワードが小さすぎます" + +msgid "Password fields aren't equal" +msgstr "" + +msgid "Some of the password's fields are empty" +msgstr "" + +msgid "Public" +msgstr "パブリック" + +msgid "Status" +msgstr "状態" + +msgid "Actions" +msgstr "行動" + +msgid "Machines" +msgstr "マシン" + +msgid "Down" +msgstr "ダウン" + +msgid "Running" +msgstr "ランニング" + +msgid "ShutDown" +msgstr "シャットダウン" + +msgid "Screenshot" +msgstr "スクリーンショット" + +msgid "Paused" +msgstr "一時停止中" + +msgid "Machine locked by" +msgstr "" + +msgid "process" +msgstr "" + +msgid "Copy" +msgstr "" + +msgid "Error!" +msgstr "" + +msgid "Backend no available!" +msgstr "" + +msgid "Subject" +msgstr "" + +msgid "Date" +msgstr "" + +msgid "Mark as Read" +msgstr "" + +msgid "Mark as UnRead" +msgstr "" + +msgid "No message to show!" +msgstr "" + +msgid "Admin" +msgstr "" + +msgid "machines" +msgstr "機械" + +msgid "users" +msgstr "ユーザー" + +msgid "messages" +msgstr "メッセージ" + +msgid "Admin tools" +msgstr "管理ツール" + +msgid "Remove base" +msgstr "ベースを取り外す" + +msgid "public" +msgstr "パブリック" + +msgid "Restore" +msgstr "リストア" + +msgid "Hybernate" +msgstr "休止状態" + +msgid "Shutdown" +msgstr "シャットダウン" + +msgid "action" +msgstr "アクション" + +msgid "New Base" +msgstr "新しい基地" + +msgid "will remove all the contents of the machine" +msgstr "" + +msgid "Are you sure?" +msgstr "本気ですか?" + +msgid "Yes" +msgstr "はい" + +msgid "No" +msgstr "いいえ" + +msgid "Make public" +msgstr "" + +msgid "Machine settings" +msgstr "" + +msgid "Cannot remove base, machine has clones" +msgstr "" + +msgid "Show/Hide clones" +msgstr "" + +msgid "For spice redirection you'll need to install" +msgstr "" + +msgid "in your computer." +msgstr "" + +msgid "Search in your distro, e.g. in Debian/Ubuntu with" +msgstr "" + +msgid "You'll need to install" +msgstr "" + +msgid "e.g. VirtViewer v5.0-256, and USB drivers (" +msgstr "" + +msgid "" +"Be aware that in Windows, spice redirection is not automatically. It's " +"necessary associate protocol with the app." +msgstr "" + +msgid "To make this possible, download" +msgstr "" + +msgid "" +"or copy the following lines in an ASCII file and save with extension .reg, " +"then execute the file." +msgstr "" + +msgid "Login" +msgstr "" + +msgid "Welcome" +msgstr "" + +msgid "It is required a viewer to run the virtual machines." +msgstr "" + +msgid "Virtual Machines" +msgstr "仮想マシン" + +msgid "user" +msgstr "ユーザー" + +msgid "password" +msgstr "" + +msgid "Start session" +msgstr "" + +msgid "Login with Intranet UPC's username." +msgstr "" + +msgid "bits) in your computer." +msgstr "" diff --git a/templates/bootstrap/user_settings.html.ep b/templates/bootstrap/user_settings.html.ep index 9958d86ae..711af6be6 100644 --- a/templates/bootstrap/user_settings.html.ep +++ b/templates/bootstrap/user_settings.html.ep @@ -32,6 +32,7 @@ + % if ($changed_lang) { <%=l 'Your language has been changed successfully' %> From bcccbb515da2d27be2a0dc28cfb9ddfd92a0a49d Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Thu, 6 Jul 2017 12:21:59 +0200 Subject: [PATCH 002/170] init connector when initialazing domain --- lib/Ravada/Domain.pm | 5 +++++ lib/Ravada/Domain/KVM.pm | 10 ---------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/Ravada/Domain.pm b/lib/Ravada/Domain.pm index b60e516f5..8aa568f52 100644 --- a/lib/Ravada/Domain.pm +++ b/lib/Ravada/Domain.pm @@ -160,6 +160,11 @@ after 'rename' => \&_post_rename; after 'screenshot' => \&_post_screenshot; ################################################## +sub BUILD { + my $self = shift; + $self->_init_connector(); +} + sub _vm_connect { my $self = shift; $self->_vm->connect(); diff --git a/lib/Ravada/Domain/KVM.pm b/lib/Ravada/Domain/KVM.pm index 85a7fd64b..db8ead15d 100644 --- a/lib/Ravada/Domain/KVM.pm +++ b/lib/Ravada/Domain/KVM.pm @@ -791,16 +791,6 @@ sub _new_pci_slot{ } } -=head2 BUILD - -internal build method - -=cut - -sub BUILD { - my $self = shift; -} - =head2 list_volumes Returns a list of the disk volumes. Each element of the list is a string with the filename. From 13ecd9b26a93519d004a1a14296a49be04b89cf1 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Thu, 6 Jul 2017 12:22:28 +0200 Subject: [PATCH 003/170] [#291] Rename message --- public/js/ravada.js | 1 + templates/main/vm_rename.html.ep | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/public/js/ravada.js b/public/js/ravada.js index ba7acf652..7500f7f37 100644 --- a/public/js/ravada.js +++ b/public/js/ravada.js @@ -154,6 +154,7 @@ if ($scope.new_name_duplicated) return; $http.get('/machine/rename/'+machineId+'/' +$scope.new_name); + $scope.message_rename = 1; }; $scope.validate_new_name = function(old_name) { diff --git a/templates/main/vm_rename.html.ep b/templates/main/vm_rename.html.ep index 02d79539f..1c95e7596 100644 --- a/templates/main/vm_rename.html.ep +++ b/templates/main/vm_rename.html.ep @@ -23,7 +23,7 @@ ng-change="validate_new_name(showmachine.name)" ng-disabled="<%= $disable_rename %>" > - @@ -33,6 +33,8 @@ This name is duplicated +
Renaming machine
From 3789586574c8f1e9d28a412cfc6f7f612c461efc Mon Sep 17 00:00:00 2001 From: joelalju Date: Wed, 4 Oct 2017 19:14:32 +0200 Subject: [PATCH 004/170] [#274] Disk, Swap and Ram Sizes in new machine turned into sliders. --- public/css/admin.css | 35 +++++++++++++++++++ .../ng-templates/new_machine_template.html.ep | 25 +++++++------ 2 files changed, 50 insertions(+), 10 deletions(-) diff --git a/public/css/admin.css b/public/css/admin.css index 663461979..65a2d7b30 100644 --- a/public/css/admin.css +++ b/public/css/admin.css @@ -16,3 +16,38 @@ .lgMachActions{ width: 200px; } + +#slidecontainer { + width: 100%; /* Width of the outside container */ +} +/* The slider itself */ +.slider { + -webkit-appearance: none; /* Override default CSS styles */ + appearance: none; + width: 100%; /* Full-width */ + height: 25px; /* Specified height */ + background: #d3d3d3; /* Grey background */ + outline: none; /* Remove outline */ + opacity: 0.7; /* Set transparency (for mouse-over effects on hover) */ + -webkit-transition: .2s; /* 0.2 seconds transition on hover */ + transition: opacity .2s; +} +/* Mouse-over effects */ +.slider:hover { + opacity: 1; /* Fully shown on mouse-over */ +} +/* The slider handle (use webkit (Chrome, Opera, Safari, Edge) and moz (Firefox) to override default look) */ +.slider::-webkit-slider-thumb { + -webkit-appearance: none; /* Override default look */ + appearance: none; + width: 25px; /* Set a specific slider handle width */ + height: 25px; /* Slider handle height */ + background: #4CAF50; /* Green background */ + cursor: pointer; /* Cursor on hover */ +} +.slider::-moz-range-thumb { + width: 25px; /* Set a specific slider handle width */ + height: 25px; /* Slider handle height */ + background: #4CAF50; /* Green background */ + cursor: pointer; /* Cursor on hover */ +} diff --git a/templates/ng-templates/new_machine_template.html.ep b/templates/ng-templates/new_machine_template.html.ep index 255263326..9b473d219 100644 --- a/templates/ng-templates/new_machine_template.html.ep +++ b/templates/ng-templates/new_machine_template.html.ep @@ -75,11 +75,11 @@
- +
- -
+ +
{{ddsize}} Remove swap -
- +
+
- -
+ +
{{swapsize.value}}
+ +
{{ramsize}} + +
From 85e8b71fbfb9ff18e051a72fcefe34732fbd60cf Mon Sep 17 00:00:00 2001 From: joelalju Date: Wed, 4 Oct 2017 19:19:46 +0200 Subject: [PATCH 005/170] [#274] Erased obsolete code. --- templates/ng-templates/new_machine_template.html.ep | 5 ----- 1 file changed, 5 deletions(-) diff --git a/templates/ng-templates/new_machine_template.html.ep b/templates/ng-templates/new_machine_template.html.ep index 9b473d219..1690a2d20 100644 --- a/templates/ng-templates/new_machine_template.html.ep +++ b/templates/ng-templates/new_machine_template.html.ep @@ -103,11 +103,6 @@
{{ramsize}} - -
From a4b50cc041f7c88fef67865916b8fcac1033ee33 Mon Sep 17 00:00:00 2001 From: joelalju Date: Fri, 6 Oct 2017 16:58:55 +0200 Subject: [PATCH 006/170] [#386] Bug solved --- rvd_front.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rvd_front.pl b/rvd_front.pl index 483bb0d65..7d330b3eb 100644 --- a/rvd_front.pl +++ b/rvd_front.pl @@ -957,8 +957,8 @@ sub req_new_domain { ,id_owner => $USER->id ,swap => $swap ); - $args{memory} = int($c->param('memory')*1024*1024) if $args{memory}; - $args{disk} = int($c->param('disk')*1024*1024*1024) if $args{disk}; + $args{memory} = int($c->param('memory')*1024*1024) if $c->param('memory'); + $args{disk} = int($c->param('disk')*1024*1024*1024) if $c->param('disk'); $args{id_template} = $c->param('id_template') if $vm =~ /^LX/; $args{id_iso} = $c->param('id_iso') if $vm eq 'KVM'; From 9953994709831d32a6bf5607e9b191f59f432b0a Mon Sep 17 00:00:00 2001 From: joelalju Date: Fri, 6 Oct 2017 17:08:15 +0200 Subject: [PATCH 007/170] [#274] Swap value goes to 1 when enabled, and 0 when disabled. --- public/js/admin.js | 3 ++- templates/ng-templates/new_machine_template.html.ep | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/js/admin.js b/public/js/admin.js index 3a0041b2a..0adb9784b 100644 --- a/public/js/admin.js +++ b/public/js/admin.js @@ -74,7 +74,8 @@ ravadaApp.directive("solShowMachine", swMach) $scope.show_swap = function() { $scope.seeswap = !($scope.seeswap); - $scope.swapsize.value=0; + if ($scope.seeswap == 1) $scope.swapsize.value=1; + else $scope.swapsize.value = 0; }; $http.get('/list_machines.json').then(function(response) { diff --git a/templates/ng-templates/new_machine_template.html.ep b/templates/ng-templates/new_machine_template.html.ep index 1690a2d20..1fb5ddad4 100644 --- a/templates/ng-templates/new_machine_template.html.ep +++ b/templates/ng-templates/new_machine_template.html.ep @@ -93,7 +93,7 @@
+ type="range" name="swap" min="1" max="4">
{{swapsize.value}}
From b9605f2bff040c134de4b3dea75e5ff00756953e Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Mon, 9 Oct 2017 11:45:45 +0200 Subject: [PATCH 008/170] [#202] Defining an unique uuid --- lib/Ravada/VM/KVM.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/Ravada/VM/KVM.pm b/lib/Ravada/VM/KVM.pm index 06996a5bd..a6861f644 100644 --- a/lib/Ravada/VM/KVM.pm +++ b/lib/Ravada/VM/KVM.pm @@ -1254,6 +1254,15 @@ sub _xml_modify_uuid { } } +sub _unique_uuid { + my ($self, $uuid, @uuids) = @_; + my ($first,$last) = $uuid =~ m{(.*)([0-9a-f]{6})}; + + my $new_last = int(rand(0x100000)); + my $new_uuid = sprintf("%s%04d",$first,$new_last); + +} + sub _xml_modify_cdrom { my ($doc, $iso) = @_; From fab5de9067fe654997954c185222d277516fe8b9 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Mon, 9 Oct 2017 11:47:27 +0200 Subject: [PATCH 009/170] [#202] check a new random uuid not duplicated --- lib/Ravada/VM/KVM.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Ravada/VM/KVM.pm b/lib/Ravada/VM/KVM.pm index a6861f644..af9844e02 100644 --- a/lib/Ravada/VM/KVM.pm +++ b/lib/Ravada/VM/KVM.pm @@ -1258,9 +1258,13 @@ sub _unique_uuid { my ($self, $uuid, @uuids) = @_; my ($first,$last) = $uuid =~ m{(.*)([0-9a-f]{6})}; - my $new_last = int(rand(0x100000)); - my $new_uuid = sprintf("%s%04d",$first,$new_last); + for (1..100) { + my $new_last = int(rand(0x100000)); + my $new_uuid = sprintf("%s%06d",$first,$new_last); + return $new_uuid if !grep /^$new_uuid$/,@uuids; + } + confess "I can't find a new unique uuid"; } sub _xml_modify_cdrom { From a5ed09c8054e3e43e48c6e2154266c61162ac17b Mon Sep 17 00:00:00 2001 From: fv3rdugo Date: Wed, 11 Oct 2017 14:35:16 +0200 Subject: [PATCH 010/170] [#390] Fix problems in Debian or Ubuntu 16.04 OS If Ravada server has Debian or Ubuntu Xenial not supported machine type: pc-i440fx-xenial or pc-i440fx-yakkety respectively Fix with pc machine type is Standard PC (i440FX + PIIX, 1996) (alias of pc-i440fx-2.5) supported by both. List machine supported in your server: $qemu-system-x86_64 -machine help --- etc/xml/dsl-i386.xml | 2 +- etc/xml/jessie-amd64.xml | 2 +- etc/xml/jessie-i386.xml | 2 +- etc/xml/trusty-amd64.xml | 2 +- etc/xml/trusty-i386.xml | 2 +- etc/xml/win10.xml | 2 +- etc/xml/win7pro.xml | 2 +- etc/xml/win8.1.xml | 2 +- etc/xml/windows_10.xml | 2 +- etc/xml/windows_12.xml | 2 +- etc/xml/windows_7.xml | 2 +- etc/xml/windows_8.xml | 2 +- etc/xml/windows_xp.xml | 2 +- etc/xml/xenial-i386.xml | 2 +- etc/xml/xenial64-amd64.xml | 2 +- etc/xml/yakkety64-amd64.xml | 2 +- etc/xml/zesty-amd64.xml | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/etc/xml/dsl-i386.xml b/etc/xml/dsl-i386.xml index c57ef09e8..332793ffd 100644 --- a/etc/xml/dsl-i386.xml +++ b/etc/xml/dsl-i386.xml @@ -5,7 +5,7 @@ 1048576 1 - hvm + hvm diff --git a/etc/xml/jessie-amd64.xml b/etc/xml/jessie-amd64.xml index 8fb6d90f7..95bd26522 100644 --- a/etc/xml/jessie-amd64.xml +++ b/etc/xml/jessie-amd64.xml @@ -5,7 +5,7 @@ 1048576 1 - hvm + hvm diff --git a/etc/xml/jessie-i386.xml b/etc/xml/jessie-i386.xml index 62388faf2..7dc7e278a 100644 --- a/etc/xml/jessie-i386.xml +++ b/etc/xml/jessie-i386.xml @@ -5,7 +5,7 @@ 1048576 1 - hvm + hvm diff --git a/etc/xml/trusty-amd64.xml b/etc/xml/trusty-amd64.xml index c633f1f68..7dd58d2d1 100644 --- a/etc/xml/trusty-amd64.xml +++ b/etc/xml/trusty-amd64.xml @@ -5,7 +5,7 @@ 1048576 1 - hvm + hvm diff --git a/etc/xml/trusty-i386.xml b/etc/xml/trusty-i386.xml index 247b835f6..221e14e96 100644 --- a/etc/xml/trusty-i386.xml +++ b/etc/xml/trusty-i386.xml @@ -5,7 +5,7 @@ 1048576 1 - hvm + hvm diff --git a/etc/xml/win10.xml b/etc/xml/win10.xml index 1e1e0cc78..fcc38f48e 100644 --- a/etc/xml/win10.xml +++ b/etc/xml/win10.xml @@ -5,7 +5,7 @@ 4194304 4 - hvm + hvm diff --git a/etc/xml/win7pro.xml b/etc/xml/win7pro.xml index 89f072c6f..3091d5dbc 100644 --- a/etc/xml/win7pro.xml +++ b/etc/xml/win7pro.xml @@ -12,7 +12,7 @@ or other application using the libvirt API. 4194304 2 - hvm + hvm diff --git a/etc/xml/win8.1.xml b/etc/xml/win8.1.xml index 01c6621d7..39091f85d 100644 --- a/etc/xml/win8.1.xml +++ b/etc/xml/win8.1.xml @@ -12,7 +12,7 @@ or other application using the libvirt API. 4194304 2 - hvm + hvm diff --git a/etc/xml/windows_10.xml b/etc/xml/windows_10.xml index 19d648ffb..4553d0d4d 100644 --- a/etc/xml/windows_10.xml +++ b/etc/xml/windows_10.xml @@ -5,7 +5,7 @@ 1048576 1 - hvm + hvm diff --git a/etc/xml/windows_12.xml b/etc/xml/windows_12.xml index 7e0c6e2ea..892e47fa5 100644 --- a/etc/xml/windows_12.xml +++ b/etc/xml/windows_12.xml @@ -5,7 +5,7 @@ 1048576 1 - hvm + hvm diff --git a/etc/xml/windows_7.xml b/etc/xml/windows_7.xml index 87976833d..51134d14b 100644 --- a/etc/xml/windows_7.xml +++ b/etc/xml/windows_7.xml @@ -5,7 +5,7 @@ 1048576 1 - hvm + hvm diff --git a/etc/xml/windows_8.xml b/etc/xml/windows_8.xml index f31ac6ff5..b3e7ff865 100644 --- a/etc/xml/windows_8.xml +++ b/etc/xml/windows_8.xml @@ -8,7 +8,7 @@ /machine - hvm + hvm diff --git a/etc/xml/windows_xp.xml b/etc/xml/windows_xp.xml index 30e84b1ba..55003ecd3 100644 --- a/etc/xml/windows_xp.xml +++ b/etc/xml/windows_xp.xml @@ -5,7 +5,7 @@ 524288 1 - hvm + hvm diff --git a/etc/xml/xenial-i386.xml b/etc/xml/xenial-i386.xml index 1067e8245..eacc20486 100644 --- a/etc/xml/xenial-i386.xml +++ b/etc/xml/xenial-i386.xml @@ -5,7 +5,7 @@ 1048576 1 - hvm + hvm diff --git a/etc/xml/xenial64-amd64.xml b/etc/xml/xenial64-amd64.xml index 0ae7ee439..df94d60f8 100644 --- a/etc/xml/xenial64-amd64.xml +++ b/etc/xml/xenial64-amd64.xml @@ -5,7 +5,7 @@ 1048576 1 - hvm + hvm diff --git a/etc/xml/yakkety64-amd64.xml b/etc/xml/yakkety64-amd64.xml index 7236e04cf..1e9128bc6 100644 --- a/etc/xml/yakkety64-amd64.xml +++ b/etc/xml/yakkety64-amd64.xml @@ -5,7 +5,7 @@ 1048576 1 - hvm + hvm diff --git a/etc/xml/zesty-amd64.xml b/etc/xml/zesty-amd64.xml index 7236e04cf..1e9128bc6 100644 --- a/etc/xml/zesty-amd64.xml +++ b/etc/xml/zesty-amd64.xml @@ -5,7 +5,7 @@ 1048576 1 - hvm + hvm From 5c67de50b8f5756644b6067d98a3819d64f111f9 Mon Sep 17 00:00:00 2001 From: joelalju Date: Wed, 11 Oct 2017 18:57:58 +0200 Subject: [PATCH 011/170] [#395]Bug solved --- templates/bootstrap/user_settings.html.ep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/bootstrap/user_settings.html.ep b/templates/bootstrap/user_settings.html.ep index ae3d9595e..2228c98e1 100644 --- a/templates/bootstrap/user_settings.html.ep +++ b/templates/bootstrap/user_settings.html.ep @@ -7,7 +7,7 @@
-
+
diff --git a/templates/main/vm_rename.html.ep b/templates/main/vm_rename.html.ep index e2dc2a60e..7cefa7188 100644 --- a/templates/main/vm_rename.html.ep +++ b/templates/main/vm_rename.html.ep @@ -28,7 +28,7 @@ ng-click="rename(showmachine.id, showmachine.name)"> Rename - +
- +
diff --git a/templates/main/vm_description.html.ep b/templates/main/vm_description.html.ep index 7fbc5de57..1a0a05f41 100644 --- a/templates/main/vm_description.html.ep +++ b/templates/main/vm_description.html.ep @@ -16,7 +16,7 @@
- +
diff --git a/templates/main/vm_drivers.html.ep b/templates/main/vm_drivers.html.ep index 157a19999..038c3b472 100644 --- a/templates/main/vm_drivers.html.ep +++ b/templates/main/vm_drivers.html.ep @@ -42,7 +42,6 @@ -
@@ -54,13 +53,11 @@
- % } - - +
diff --git a/templates/main/vm_options.html.ep b/templates/main/vm_options.html.ep index fcbb88e85..9738fb0aa 100644 --- a/templates/main/vm_options.html.ep +++ b/templates/main/vm_options.html.ep @@ -28,7 +28,7 @@
The machine will shutdown after these minutes
- + diff --git a/templates/main/vm_remove.html.ep b/templates/main/vm_remove.html.ep index 6b0e6175b..f543272e1 100644 --- a/templates/main/vm_remove.html.ep +++ b/templates/main/vm_remove.html.ep @@ -23,7 +23,7 @@ > <%=l 'Delete this machine' %> - +
diff --git a/templates/main/vm_rename.html.ep b/templates/main/vm_rename.html.ep index 7cefa7188..40588c8ad 100644 --- a/templates/main/vm_rename.html.ep +++ b/templates/main/vm_rename.html.ep @@ -28,7 +28,7 @@ ng-click="rename(showmachine.id, showmachine.name)"> Rename - +
% }
-
+
From 263eac73ec1fa440c5ff4ac33930c0cfa572cc6c Mon Sep 17 00:00:00 2001 From: Tim Fechner Date: Fri, 27 Oct 2017 10:37:21 +0200 Subject: [PATCH 048/170] Correct german translations --- lib/Ravada/I18N/de.po | 56 ++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/lib/Ravada/I18N/de.po b/lib/Ravada/I18N/de.po index 9e52d65cf..9076dfec4 100644 --- a/lib/Ravada/I18N/de.po +++ b/lib/Ravada/I18N/de.po @@ -23,13 +23,13 @@ msgid "Tools" msgstr "Werkzeuge" msgid "Machines list" -msgstr "Maschinen liste" +msgstr "Maschinenliste" msgid "Users" msgstr "Benutzer" msgid "Choose a machine to start" -msgstr "Wähle eine Maschine zum starten" +msgstr "Wähle eine Maschine zum starten aus" msgid "Start" msgstr "Start" @@ -44,10 +44,10 @@ msgid "Prepare base" msgstr "Basis Vorbereiten" msgid "Clone" -msgstr "Klon" +msgstr "Klonen" msgid "Can't prepare base, remove base or delete. Machine has" -msgstr "Basis kann nicht vorbereitet werden, entferne oder loesche die Basis" +msgstr "Basis kann nicht vorbereitet werden, entferne oder lösche die Basis" msgid "Clone/s" msgstr "Klone" @@ -56,13 +56,13 @@ msgid "New" msgstr "Neu" msgid "Users List" -msgstr "Benutzer Liste" +msgstr "Benutzerliste" msgid "Name" msgstr "Name" msgid "Log Out" -msgstr "Ausloggen" +msgstr "Abmelden" msgid "Available machines" msgstr "Verfügbare Maschinen" @@ -77,10 +77,10 @@ msgid "About" msgstr "Über" msgid "Messages" -msgstr "Nachricht" +msgstr "Nachrichten" msgid "Mark all as read" -msgstr "Markiere alle als gelesen" +msgstr "Alle als gelesen markieren" msgid "Settings" msgstr "Einstellungen" @@ -89,10 +89,10 @@ msgid "New machine" msgstr "Neue Maschine" msgid "I want to change my password" -msgstr "Ich möchte mein Passwort aendern" +msgstr "Ich möchte mein Passwort ändern" msgid "I want to change my Language" -msgstr "Ich will meine Sprache aendern" +msgstr "Ich will meine Sprache ändern" msgid "Language:" msgstr "Sprache:" @@ -107,31 +107,31 @@ msgid "Catalan" msgstr "Katalanisch" msgid "New Password:" -msgstr "Neues Passwort" +msgstr "Neues Passwort:" msgid "Confirm Password:" -msgstr "Bestätige Passwort" +msgstr "Bestätige Passwort:" msgid "Submit" msgstr "Einreichen" msgid "Your language has been successfully changed" -msgstr "Deine Sprache wurde erfolgreich geaendert" +msgstr "Deine Sprache wurde erfolgreich geändert" msgid "Your password has been successfully changed" -msgstr "Dein Passwort wurde erfolgreich geaendert" +msgstr "Dein Passwort wurde erfolgreich ge#ndert" msgid "Password is too short" msgstr "Passwort ist zu kurz" msgid "Password fields are not matching" -msgstr "Die Passwoerter stimmen nicht ueberein" +msgstr "Die Passwörter stimmen nicht überein" msgid "Some of the password fields are empty" msgstr "Einige der Passwortfelder sind leer" msgid "Public" -msgstr "Oeffentlich" +msgstr "Öffentlich" msgid "Status" msgstr "Status" @@ -146,7 +146,7 @@ msgid "Down" msgstr "Runter" msgid "Running" -msgstr "Laeuft" +msgstr "Läuft" msgid "Shutdown" msgstr "Herunterfahren" @@ -203,13 +203,13 @@ msgid "Messages" msgstr "Nachrichten" msgid "Admin tools" -msgstr "Administrator Werkzeuge" +msgstr "Administratorwerkzeuge" msgid "Remove base" msgstr "Entferne Basis" msgid "Public" -msgstr "Oeffentlich" +msgstr "Öffentlich" msgid "New Base" msgstr "Neue Basis" @@ -230,7 +230,7 @@ msgid "Will remove all the contents of the machine" msgstr "Entfernt den gesamten Inhalt der Maschine" msgid "Are you sure?" -msgstr "Bist du dir Sicher?" +msgstr "Sind Sie sicher?" msgid "Yes" msgstr "Ja" @@ -239,13 +239,13 @@ msgid "No" msgstr "Nein" msgid "Make public" -msgstr "Oeffentlich machen" +msgstr "Öffentlich machen" msgid "Machine settings" -msgstr "Maschinen einstellungen" +msgstr "Maschineneinstellungen" msgid "Cannot remove base, machine has clones" -msgstr "Base kann nicht entfernt werden, Maschine hat Klone" +msgstr "Basis kann nicht entfernt werden, Maschine hat Klone" msgid "Show/hide clones" msgstr "Zeige/Verstecke Klone" @@ -257,7 +257,7 @@ msgid "on your computer." msgstr "auf deinem Computer" msgid "Search in your distro, e.g. in Debian/Ubuntu with" -msgstr "" +msgstr "Suche in deiner Distribution (Debian/Ubuntu)" msgid "You'll need to install" msgstr "Suchen Sie in Ihrer Distribution, z.B. in Debian / Ubuntu mit" @@ -279,6 +279,8 @@ msgid "" "or copy the following lines in an ASCII file and save with extension .reg, " "then execute the file." msgstr "" +"oder kopieren Sie folgende zeilen in eine ASCII Datei und Speichern Sie diese mit" +"der .reg Erweiterung" msgid "Login" msgstr "Login" @@ -296,7 +298,7 @@ msgid "User" msgstr "Benutzer" msgid "Password" -msgstr "Password" +msgstr "Passwort" msgid "Start session" msgstr "Starte Sitzung" @@ -377,7 +379,7 @@ msgid "From Machine" msgstr "Von Maschine" msgid "Backend" -msgstr "Hintergrund" +msgstr "Server" msgid "Select Template" msgstr "Vorlage auswählen" @@ -404,7 +406,7 @@ msgid "Ram: (GB)" msgstr "Arbeitsspeicher: (GB)" msgid "Machine name is required." -msgstr "Maschinen name is erforderlich" +msgstr "Name der Maschinen ist erforderlich" msgid "Machine name can't exceed 20 characters." msgstr "Der Computername darf nicht länger als 20 Zeichen sein." From fe78f065ddb21ca06b94f2f7cbb51e3f1f8107c6 Mon Sep 17 00:00:00 2001 From: joelalju Date: Fri, 27 Oct 2017 17:50:00 +0200 Subject: [PATCH 049/170] [#405] list_bases edited. --- lib/Ravada/Front.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Ravada/Front.pm b/lib/Ravada/Front.pm index dbf8eccd4..396fc6792 100644 --- a/lib/Ravada/Front.pm +++ b/lib/Ravada/Front.pm @@ -75,7 +75,7 @@ Returns a list of the base domains as a listref sub list_bases { my $self = shift; - my $sth = $CONNECTOR->dbh->prepare("SELECT id, id_base FROM domains where is_base=1"); + my $sth = $CONNECTOR->dbh->prepare("SELECT name, id FROM domains where is_base=1"); $sth->execute(); my @bases = (); From e5d4d5901fe57fb3d945aa00c88e84165469c646 Mon Sep 17 00:00:00 2001 From: Marc Schwede Date: Sat, 28 Oct 2017 21:54:50 +0200 Subject: [PATCH 050/170] Removed repeated occurence of msgid in en.po --- lib/Ravada/I18N/en.po | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/Ravada/I18N/en.po b/lib/Ravada/I18N/en.po index cc19ef9d9..02e344ec2 100644 --- a/lib/Ravada/I18N/en.po +++ b/lib/Ravada/I18N/en.po @@ -27,9 +27,6 @@ msgstr "" msgid "Machines list" msgstr "" -msgid "Users" -msgstr "" - msgid "Choose a machine to start" msgstr "" From cf16971680733ab9f91f7a8a2e8004cf5b7d2fca Mon Sep 17 00:00:00 2001 From: Marc Schwede Date: Sat, 28 Oct 2017 22:00:06 +0200 Subject: [PATCH 051/170] Removed repeated occurence of msgid in de.po --- lib/Ravada/I18N/de.po | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/lib/Ravada/I18N/de.po b/lib/Ravada/I18N/de.po index 9076dfec4..fcd30f3f7 100644 --- a/lib/Ravada/I18N/de.po +++ b/lib/Ravada/I18N/de.po @@ -25,9 +25,6 @@ msgstr "Werkzeuge" msgid "Machines list" msgstr "Maschinenliste" -msgid "Users" -msgstr "Benutzer" - msgid "Choose a machine to start" msgstr "Wähle eine Maschine zum starten aus" @@ -139,18 +136,12 @@ msgstr "Status" msgid "Actions" msgstr "Aktion" -msgid "Machines" -msgstr "Maschine" - msgid "Down" msgstr "Runter" msgid "Running" msgstr "Läuft" -msgid "Shutdown" -msgstr "Herunterfahren" - msgid "Screenshot" msgstr "Bildschirmfoto" @@ -199,18 +190,12 @@ msgstr "Maschinen" msgid "Users" msgstr "Benutzer" -msgid "Messages" -msgstr "Nachrichten" - msgid "Admin tools" msgstr "Administratorwerkzeuge" msgid "Remove base" msgstr "Entferne Basis" -msgid "Public" -msgstr "Öffentlich" - msgid "New Base" msgstr "Neue Basis" @@ -434,4 +419,4 @@ msgid "" "cloned from one base owned by the user." msgstr "" "kann die Einstellungen aller virtuellen Maschinen ändern " -"geklont von einer Basis, die dem Benutzer gehört."" +"geklont von einer Basis, die dem Benutzer gehört." \ No newline at end of file From cce4e84949aa43ad7370cec1e00b44e69f0e86ba Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Mon, 30 Oct 2017 11:41:28 +0100 Subject: [PATCH 052/170] Set type = KVM instead qemu --- lib/Ravada.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/Ravada.pm b/lib/Ravada.pm index fa2ffb63e..2c714ab3b 100644 --- a/lib/Ravada.pm +++ b/lib/Ravada.pm @@ -522,6 +522,15 @@ sub _update_data { $self->_update_user_grants(); $self->_update_domain_drivers_types(); $self->_update_domain_drivers_options(); + $self->_update_old_qemus(); +} + +sub _update_old_qemus($self) { + my $sth = $CONNECTOR->dbh->prepare("UPDATE vms SET vm_type='KVM'" + ." WHERE vm_type='qemu' AND name ='KVM_localhost'" + ); + $sth->execute; + } sub _set_url_isos($self, $new_url='http://localhost/iso/') { @@ -754,7 +763,7 @@ sub _create_vm_kvm { my $vm_kvm; - $vm_kvm = Ravada::VM::KVM->new( connector => ( $self->connector or $CONNECTOR )); + $vm_kvm = Ravada::VM::KVM->new( ); my ($internal_vm , $storage); $storage = $vm_kvm->dir_img(); From 301cd9567878c89586c9a9f87ec5beb6c7259e54 Mon Sep 17 00:00:00 2001 From: Tititesouris Date: Mon, 30 Oct 2017 13:57:18 +0100 Subject: [PATCH 053/170] Partially fixed French --- lib/Ravada/I18N/fr.po | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/lib/Ravada/I18N/fr.po b/lib/Ravada/I18N/fr.po index 7a8189781..ee7dbc886 100644 --- a/lib/Ravada/I18N/fr.po +++ b/lib/Ravada/I18N/fr.po @@ -22,43 +22,43 @@ msgid "Restore" msgstr "Restaurer" msgid "Machine Name" -msgstr "Nom du Machine" +msgstr "Nom de la machine" msgid "Tools" msgstr "Outils" msgid "Machines List" -msgstr "Liste de Machines" +msgstr "Liste des machines" msgid "Users" msgstr "Utilisateurs" msgid "Choose a Machine to Start" -msgstr "Choisisez une Machine pour Débuter" +msgstr "Choisisez une machine pour commencer" msgid "Start" -msgstr "Début" +msgstr "Commencer" msgid "Stop" -msgstr "Arrêt" +msgstr "Arrêter" msgid "View" -msgstr "Vue" +msgstr "Voir" msgid "Prepare Base" -msgstr "Preparer Base" +msgstr "Preparer la base" msgid "Clone" msgstr "Cloner" msgid "Can't Prepare Base, Remove Base nor Delete. Machine has" -msgstr "Ne peut pas preparer la base, retirez ou effacez la base" +msgstr "La base ne peut pas être preparée, supprimée ou effacée. La machine a" msgid "Clone/s" -msgstr "Clones" +msgstr "Clone(s)" msgid "NEW" -msgstr "Nouveau" +msgstr "NOUVEAU" msgid "Users List" msgstr "Liste d'utilisateurs" @@ -67,16 +67,16 @@ msgid "Name" msgstr "Nom" msgid "Log Out" -msgstr "Déconnecter" +msgstr "Déconnexion" msgid "Available Machines" -msgstr "Machines Disponibles" +msgstr "Machines disponibles" msgid "Help" msgstr "Aide" msgid "Requirements" -msgstr "Exigences" +msgstr "Requis" msgid "About" msgstr "À propos" @@ -91,16 +91,16 @@ msgid "Settings" msgstr "Paramètres" msgid "New Machine" -msgstr "Nouvelle Machine" +msgstr "Nouvelle machine" msgid "Paused" -msgstr "En Pause" +msgstr "En pause" msgid "Prepare base" -msgstr "Preparez Base" +msgstr "Preparer la base" msgid "Machine locked by requested" -msgstr "Machine verrouillée par demande" +msgstr "Machine verrouillée sur demande" msgid "process" msgstr "Processus" @@ -109,10 +109,10 @@ msgid "Copy" msgstr "Copie" msgid "Error!" -msgstr "Erreur" +msgstr "Erreur !" msgid "Backend no available!" -msgstr "Interne indisponible" +msgstr "Système indisponible" msgid "Subject" msgstr "Sujet" From ffe6899d4358af5d0f827f76a63243564342cc6e Mon Sep 17 00:00:00 2001 From: Tititesouris Date: Mon, 30 Oct 2017 15:27:18 +0100 Subject: [PATCH 054/170] Fixed french translation --- lib/Ravada/I18N/fr.po | 106 +++++++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/lib/Ravada/I18N/fr.po b/lib/Ravada/I18N/fr.po index ee7dbc886..828d1a7df 100644 --- a/lib/Ravada/I18N/fr.po +++ b/lib/Ravada/I18N/fr.po @@ -137,13 +137,13 @@ msgid "Mark as UnRead" msgstr "Marquer comme non lu" msgid "No message to show!" -msgstr "Aucune Message à Lire" +msgstr "Aucun message à lire" msgid "Admin" msgstr "Administrateur" msgid "Show/Hide clones" -msgstr "Afficher/Masquer des clones" +msgstr "Afficher/Masquer les clones" msgid "I want to change my password" msgstr "Je veut changer mon mot de passe" @@ -152,7 +152,7 @@ msgid "I want to change my language" msgstr "Je veut modifier ma langue" msgid "Language:" -msgstr "Langue:" +msgstr "Langue :" msgid "English" msgstr "Anglais" @@ -164,10 +164,10 @@ msgid "Catalan" msgstr "Catalan" msgid "New Password:" -msgstr "Nouvelle mot de passe:" +msgstr "Nouveau mot de passe :" msgid "Confirm Password:" -msgstr "Confirmer mot de passe" +msgstr "Confirmer le mot de passe" msgid "Submit" msgstr "Soumettre" @@ -176,16 +176,16 @@ msgid "Your language has been changed successfully" msgstr "Votre langue a été modifiée avec succès" msgid "Your password has been changed successfully" -msgstr "votre mot de passe a été modifiée avec succès" +msgstr "votre mot de passe a été modifié avec succès" msgid "Password too small" msgstr "Votre mot de passe est trop court" msgid "Password fields aren't equal" -msgstr "Les mots de passe ne sont pas égales" +msgstr "Les mots de passe sont différents" msgid "Some of the password's fields are empty" -msgstr "Quelques mots de passe sont vides" +msgstr "Un mot de passe n'a pas été renseigné" msgid "Public" msgstr "Public" @@ -200,10 +200,10 @@ msgid "Down" msgstr "Arrêté" msgid "Running" -msgstr "Fonctionne" +msgstr "En marche" msgid "ShutDown" -msgstr "Fermer" +msgstr "Éteindre" msgid "Screenshot" msgstr "Capture d'écran" @@ -224,7 +224,7 @@ msgid "Admin tools" msgstr "Outils d'administration" msgid "Remove base" -msgstr "Supprimer base" +msgstr "Supprimer la base" msgid "public" msgstr "Public" @@ -233,19 +233,19 @@ msgid "Hybernate" msgstr "Hiberner" msgid "Shutdown" -msgstr "Fermer" +msgstr "Éteindre" msgid "action" msgstr "action" msgid "New Base" -msgstr "Base Nouveau" +msgstr "Nouvelle base" msgid "will remove all the contents of the machine" -msgstr "supprimer tout les contenus de machine" +msgstr "supprimera tous les éléments de la machine" msgid "Are you sure?" -msgstr "Vous êtes certain?" +msgstr "Êtes-vous certain ?" msgid "Yes" msgstr "Oui" @@ -254,45 +254,45 @@ msgid "No" msgstr "Non" msgid "Make public" -msgstr "Rendre publique" +msgstr "Rendre public" msgid "Machine settings" -msgstr "Réglage de machine" +msgstr "Réglage de la machine" msgid "Cannot remove base, machine has clones" -msgstr "Ne peut pas enlever la base, la machine a un clone" +msgstr "La base ne peut pas être supprimée car elle a des clones" msgid "For spice redirection you'll need to install" -msgstr "Pour Spice redirection vous necessitez installer" +msgstr "Pour utiliser la redirection Spice vous devez installer" msgid "in your computer." -msgstr "dans votre ordinateur" +msgstr "sur votre ordinateur." msgid "Search in your distro, e.g. in Debian/Ubuntu with" -msgstr "Cherchez dans votre distro, par example dans Debian/Ubuntu avec" +msgstr "Cherchez dans votre distro, par exemple dans Debian/Ubuntu avec" msgid "You'll need to install" -msgstr "vous necessitez installer" +msgstr "Vous devez installer" msgid "e.g. VirtViewer v5.0-256 in your computer." -msgstr "par example VirtViewer v5.0-256 dans votre ordinateur. " +msgstr "par exemple VirtViewer v5.0-256 sur votre ordinateur." msgid "" "Be aware that in Windows, spice redirection is not automatically. It's " "necessary associate protocol with the app." msgstr "" -"Faites attention quoi dans Windows, Spice redirection n'est pas automatiquement activée." -"Il est necessaire d'associer le protocole avec l'application." +"Notez que sur Windows, la redirection Spice n'est pas automatiquement activée." +"Il est nécessaire d'associer le protocole à l'application." msgid "To make this possible, download" -msgstr "pour rendre cela possible, téléchargez" +msgstr "Pour que ce soit possible, téléchargez" msgid "" "or copy the following lines in an ASCII file and save with extension .reg, " "then execute the file." msgstr "" -"ou copiez les lingnes suivantes dans un fichier et enregistrez avec extension .reg" -"ensuit exécutez le fichier" +"ou copiez les lignes suivantes dans un fichier ASCII et enregistrez le avec l'extension .reg, " +"ensuite exécutez le fichier" msgid "Login" @@ -302,10 +302,10 @@ msgid "Welcome" msgstr "Bienvenue" msgid "It is required a viewer to run the virtual machines." -msgstr "Il necessite un logiciel visionneuse pour demarrer les machines virtuelles." +msgstr "Il est nécessaire d'avoir une visionneuse pour démarrer les machines virtuelles." msgid "Virtual Machines" -msgstr "Machine Virtuelle" +msgstr "Machines Virtuelles" msgid "user" msgstr "Utilisateur" @@ -314,74 +314,74 @@ msgid "password" msgstr "Mot de passe" msgid "Start session" -msgstr "Commencer session" +msgstr "Commencer la session" msgid "Login with Intranet UPC's username." -msgstr "Connectez avec le Nom d'utilisateur de la UPC" +msgstr "Connectez avec le nom d'utilisateur de l'intranet UPC." msgid "Permissions" msgstr "Permissions" msgid "can change the settings of owned virtual machines." -msgstr "Peut changer les reglages des machines virtuelles possédees" +msgstr "peut changer les réglages des machines virtuelles appartenant à l'utilisateur." msgid "can change the settings of any virtual machines." -msgstr "Peut changer les reglages de n'importe quelle machine virtuelle" +msgstr "peut changer les réglages de n'importe quelle machine virtuelle." msgid "" "can change the settings of any virtual machines " "cloned from one base owned by the user." msgstr "" -"Peut changer les reglages des n'importe quelle machine virtuelle" -"clonées d'une base sous posession de l'utilisateur" +"peut changer les réglages des n'importe quelle machine virtuelle " +"clonée d'une base appartenant à l'utilisateur." msgid "can clone public virtual machines." -msgstr "Peut cloner les machines virtuelles publiques" +msgstr "peut cloner les machines virtuelles publiques." msgid "can clone any virtual machine." -msgstr "Ppeut cloner n'importe quelle machine virtuelle" +msgstr "peut cloner n'importe quelle machine virtuelle." msgid "can create bases." -msgstr "Peut créer des bases" +msgstr "peut créer des bases." msgid "can create virtual machines." -msgstr "Peut créer des machines virtuelles" +msgstr "peut créer des machines virtuelles." msgid "can grant permissions to other users" -msgstr "Peut donner des permissions á autres utilisateurs" +msgstr "peut donner des permissions à d'autres utilisateurs" msgid "can hibernate any virtual machine." -msgstr "Peut hiberner n'importe quelle machine virtuelle" +msgstr "peut hiberner n'importe quelle machine virtuelle." msgid "can hibernate clones from virtual machines owned by the user." -msgstr "Peut hiberner des clones des machines virtuelles possédees" +msgstr "peut hiberner les clones des machines virtuelles appartenant à l'utilisateur." msgid "can hibernate any clone." -msgstr "Peut hiberner n'importe quelle clones" +msgstr "peut hiberner n'importe quel clone." msgid "can remove any virtual machines owned by the user." -msgstr "Peut supprimer n'importe quelle machine virtuelle possédée par l'utilizateur" +msgstr "peut supprimer n'importe quelle machine virtuelle appartenant à l'utilisateur." msgid "can remove any virtual machine." -msgstr "Peut supprimer n'importe quelle machine virtuelle" +msgstr "peut supprimer n'importe quelle machine virtuelle." msgid "can remove clones from virtual machines owned by the user." -msgstr "Peut supprimer des clones des machines virtuelles possédées par l'utilizateur" +msgstr "peut supprimer les clones des machines virtuelles appartenant à l'utilisateur." msgid "can remove any clone." -msgstr "Peut supprimer n'importe quelle clones" +msgstr "peut supprimer n'importe quel clone." msgid "can take a screenshot of any virtual machine owned by the user." -msgstr "Peut prendre une capture d'écran de n'importe quelle machine virtuelle possédée par l'utilizateur" +msgstr "peut prendre une capture d'écran de n'importe quelle machine virtuelle appartenant à l'utilisateur." msgid "can take a screenshot of any virtual machine." -msgstr "Peut prendre une capture d'écran de n'importe quelle machine virtuelle possédée" +msgstr "peut prendre une capture d'écran de n'importe quelle machine virtuelle." msgid "can shutdown any virtual machine." -msgstr "Peut fermer n'importe quelle machine virtuelle" +msgstr "peut éteindre n'importe quelle machine virtuelle." msgid "can shutdown clones from virtual machines owned by the user." -msgstr "Peut fermer les clones des machines virtuelles possédées par l'utilizateur" +msgstr "peut éteindre les clones des machines virtuelles appartenant à l'utilizateur" msgid "Submit Query" -msgstr "Soumettre Requête" +msgstr "Soumettre la requête" From 0a4368e7f2fa6059358b94abd5c4a393212efc5e Mon Sep 17 00:00:00 2001 From: Matthew Musgrove Date: Mon, 30 Oct 2017 14:18:16 -0500 Subject: [PATCH 055/170] Review English Translation --- lib/Ravada/I18N/en.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Ravada/I18N/en.po b/lib/Ravada/I18N/en.po index 02e344ec2..ad08a3586 100644 --- a/lib/Ravada/I18N/en.po +++ b/lib/Ravada/I18N/en.po @@ -18,7 +18,7 @@ msgstr "" msgid "Ravada broker" msgstr "" -msgid "Name of the machine" +msgid "Machine name" msgstr "" msgid "Tools" @@ -90,7 +90,7 @@ msgstr "" msgid "I want to change my password" msgstr "" -msgid "I want to change my Language" +msgid "I want to change my language" msgstr "" msgid "Language:" @@ -123,7 +123,7 @@ msgstr "" msgid "Password is too short" msgstr "" -msgid "Password fields are not matching" +msgid "Password fields do not match" msgstr "" msgid "Some of the password fields are empty" From b94b9bad6bdf19901fbb0d83e7453ac5dd1758bc Mon Sep 17 00:00:00 2001 From: Luca Bezerra Date: Mon, 30 Oct 2017 21:45:36 -0300 Subject: [PATCH 056/170] Fixed PT translation. --- lib/Ravada/I18N/pt.po | 59 ++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/lib/Ravada/I18N/pt.po b/lib/Ravada/I18N/pt.po index 8110874e9..ee8c301a9 100644 --- a/lib/Ravada/I18N/pt.po +++ b/lib/Ravada/I18N/pt.po @@ -1,13 +1,14 @@ # Translators: # Joel Alarcón , 2017 # Fernando Verdugo , 2017 +# Luca Bezerra , 2017 msgid "" msgstr "" "Project-Id-Version: 0.1.0-alpha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-01-03 10:12+0300\n" "PO-Revision-Date: 2017-05-02 16:20+0200\n" -"Last-Translator: Fernando Verdugo fernando@etsetb.upc.edu\n" +"Last-Translator: Luca Bezerra lucabezerra@gmail.com\n" "Language-Team: \n" "Language: ca\n" "MIME-Version: 1.0\n" @@ -48,7 +49,7 @@ msgid "Clone" msgstr "Clonar" msgid "Can't Prepare Base, Remove Base nor Delete. Machine has" -msgstr "Não se pôde Preaparar ou Remover a Base. A Máquina tem" +msgstr "Não é possível Preparar Base, Remover Base ou Deletar. A Máquina tem" msgid "Clone/s" msgstr "Clone/s" @@ -81,7 +82,7 @@ msgid "Messages" msgstr "Mensagens" msgid "Mark all as Read" -msgstr "Marcar Tudo como Lido" +msgstr "Marcar tudo como Lido" msgid "Settings" msgstr "Configurações" @@ -93,10 +94,10 @@ msgid "I want to change my password" msgstr "Eu quero mudar a minha senha" msgid "I want to change my language" -msgstr "Eu quero alterar a minha linguagem" +msgstr "Eu quero alterar o meu idioma" msgid "Language:" -msgstr "Linguagem:" +msgstr "Idioma:" msgid "English" msgstr "Inglês" @@ -117,7 +118,7 @@ msgid "Submit" msgstr "Enviar" msgid "Your language has been changed successfully" -msgstr "Sua linguagem foi alterada com sucesso" +msgstr "Seu idioma foi alterado com sucesso" msgid "Your password has been changed successfully" msgstr "Sua senha foi alterada com sucesso" @@ -150,7 +151,7 @@ msgid "Running" msgstr "Em execução" msgid "ShutDown" -msgstr "Desligada" +msgstr "Desligar" msgid "Screenshot" msgstr "Captura de Tela" @@ -186,7 +187,7 @@ msgid "Mark as Read" msgstr "Marcar como Lido" msgid "Mark as UnRead" -msgstr "Marcar como não Lido" +msgstr "Marcar como Não Lido" msgid "No message to show!" msgstr "Nenhuma mensagem para mostrar!" @@ -210,7 +211,7 @@ msgid "Remove base" msgstr "Remover base" msgid "public" -msgstr "pública" +msgstr "público" msgid "New Base" msgstr "Nova base" @@ -228,7 +229,7 @@ msgid "action" msgstr "ação" msgid "will remove all the contents of the machine" -msgstr "vai remover todos os conteúdos da máquina" +msgstr "vai remover todo o conteúdo da máquina" msgid "Are you sure?" msgstr "Você tem certeza?" @@ -271,7 +272,7 @@ msgid "" "necessary associate protocol with the app." msgstr "" "Note que no Windows o redirecionamento de spice não é automático. É " -"necessário associar o protocol com a aplicação." +"necessário associar o protocolo com a aplicação." msgid "To make this possible, download" msgstr "Para tornar isto possível, faça o download de" @@ -280,8 +281,8 @@ msgid "" "or copy the following lines in an ASCII file and save with extension .reg, " "then execute the file." msgstr "" -"Ou copie as seguintes linhas em um arquivo ASCII e salve-o com uma extensão " -".reg, então o execute" +"ou copie as seguintes linhas em um arquivo ASCII e salve-o com uma extensão " +".reg, então o execute." msgid "Login" msgstr "Entrar" @@ -290,7 +291,7 @@ msgid "Welcome" msgstr "Bem vindo" msgid "It is required a viewer to run the virtual machines." -msgstr "É necessário que um visualizador execute as máquinas virtuais" +msgstr "É necessário um visualizador para execute as máquinas virtuais." msgid "Virtual Machines" msgstr "Máquinas Virtuais" @@ -302,13 +303,13 @@ msgid "password" msgstr "senha" msgid "Start session" -msgstr "Iniciar seção" +msgstr "Iniciar sessão" msgid "Login with Intranet UPC's username." -msgstr "Entrar com o usuário da Intranet UPC" +msgstr "Entrar com o nome de usuário da Intranet UPC." msgid "bits) in your computer." -msgstr "bits) em seu computador" +msgstr "bits) em seu computador." msgid "Permissions" msgstr "Permissões" @@ -317,13 +318,13 @@ msgid "can change the settings of owned virtual machines." msgstr "pode alterar configurações de máquinas virtuais que possuir." msgid "can change the settings of any virtual machines." -msgstr "pode alterar as configurações de qualquer máquina virtual." +msgstr "pode alterar as configurações de quaisquer máquinas virtuais." msgid "can change the settings of any virtual machines " -msgstr "pode alterar as configurações de qualquer máquina virtual " +msgstr "pode alterar as configurações de quaisquer máquinas virtuais " msgid "cloned from one base owned by the user." -msgstr "clonada de uma das bases que o usuário possuir." +msgstr "clonada de uma das bases que o usuário possui." msgid "can clone public virtual machines." msgstr "pode clinar máquinas virtuais públicas." @@ -344,34 +345,34 @@ msgid "can hibernate any virtual machine." msgstr "pode hibernar qualquer máquina virtual." msgid "can hibernate clones from virtual machines owned by the user." -msgstr "pode hibernar clones de qualquer máquina virtual que o usuário possuir." +msgstr "pode hibernar clones de máquinas virtuais que o usuário possua." msgid "can hibernate any clone." -msgstr "pode hibernar qualquer clone" +msgstr "pode hibernar qualquer clone." msgid "can remove any virtual machines owned by the user." -msgstr "pode remover qualquer máquina virtuai que o usuário possuir." +msgstr "pode remover quaisquer máquinas virtuais que o usuário possua." msgid "can remove any virtual machine." msgstr "pode remover qualquer máquina virtual." msgid "can remove clones from virtual machines owned by the user." -msgstr "pode remover clones de qualquer máquina virtual que o usuário possuir." +msgstr "pode remover clones de máquinas virtuais que o usuário possua." msgid "can remove any clone." msgstr "pode remover qualquer clone." msgid "can take a screenshot of any virtual machine owned by the user." -msgstr "pode tirar capturas de tela de qualquer máquina virtual que o usuário possuir." +msgstr "pode tirar uma captura de tela de qualquer máquina virtual que o usuário possua." msgid "can take a screenshot of any virtual machine." -msgstr "pode tirar capturas de tela de qualquer máquina virtual." +msgstr "pode tirar uma captura de tela de qualquer máquina virtual." msgid "can shutdown any virtual machine." msgstr "pode desligar qualquer máquina virtual." msgid "can shutdown clones from virtual machines owned by the user." -msgstr "pode desligar clones de máquinas virtuais que o usuário possuir." +msgstr "pode desligar clones de máquinas virtuais que o usuário possua." msgid "Submit Query" msgstr "Submeter Consulta" @@ -439,5 +440,5 @@ msgid "" "can change the settings of any virtual machines " "cloned from one base owned by the user." msgstr "" -"pode alterar as configurações de qualquer máquina virtual " -"clonada de uma base possuída pelo usuário." +"pode alterar as configurações de quaisquer máquinas virtuais " +"clonadas de uma base possuída pelo usuário." From 3dc36f615799e057f98426b12c74516a73a0fb07 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Tue, 31 Oct 2017 09:09:23 +0100 Subject: [PATCH 057/170] [#411] Removed duplicated entries Thanks @mrmuskrat for pointing that out --- lib/Ravada/I18N/en.po | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lib/Ravada/I18N/en.po b/lib/Ravada/I18N/en.po index ad08a3586..76b00c8f8 100644 --- a/lib/Ravada/I18N/en.po +++ b/lib/Ravada/I18N/en.po @@ -75,9 +75,6 @@ msgstr "" msgid "About" msgstr "" -msgid "Messages" -msgstr "" - msgid "Mark all as read" msgstr "" @@ -129,18 +126,12 @@ msgstr "" msgid "Some of the password fields are empty" msgstr "" -msgid "Public" -msgstr "" - msgid "Status" msgstr "" msgid "Actions" msgstr "" -msgid "Machines" -msgstr "" - msgid "Down" msgstr "" @@ -219,9 +210,6 @@ msgstr "" msgid "Hibernate" msgstr "" -msgid "Shutdown" -msgstr "" - msgid "Action" msgstr "" From 2fc31c9210a9c041fb826d5c7b54ca5ecb8a9a22 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Tue, 31 Oct 2017 09:16:08 +0100 Subject: [PATCH 058/170] translators should read this --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 509a969e0..018176c22 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,6 +50,8 @@ everyone is a beginner at first :smile_cat: Follow this guide about running [Ravada in development mode](http://ravada.readthedocs.io/en/latest/devel-docs/run.html). +If you change a translation or language file make sure you follow this small [guide](http://ravada.readthedocs.io/en/latest/devel-docs/translations.html?highlight=translate) and don't forget to add the issue number when committing. + ### 6. Make a Pull Request At this point, you should switch back to your master branch and make sure it's From 393bde82ac353c6e5e45aee582e6ea90931d1de0 Mon Sep 17 00:00:00 2001 From: Varpie Date: Tue, 31 Oct 2017 11:14:58 +0000 Subject: [PATCH 059/170] Improving french translation Fixing a few typos, normalizing capital letters according to original text. --- lib/Ravada/I18N/fr.po | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/Ravada/I18N/fr.po b/lib/Ravada/I18N/fr.po index 828d1a7df..ae69d7537 100644 --- a/lib/Ravada/I18N/fr.po +++ b/lib/Ravada/I18N/fr.po @@ -34,7 +34,7 @@ msgid "Users" msgstr "Utilisateurs" msgid "Choose a Machine to Start" -msgstr "Choisisez une machine pour commencer" +msgstr "Choisissez une machine pour commencer" msgid "Start" msgstr "Commencer" @@ -46,13 +46,13 @@ msgid "View" msgstr "Voir" msgid "Prepare Base" -msgstr "Preparer la base" +msgstr "Préparer la base" msgid "Clone" msgstr "Cloner" msgid "Can't Prepare Base, Remove Base nor Delete. Machine has" -msgstr "La base ne peut pas être preparée, supprimée ou effacée. La machine a" +msgstr "La base ne peut pas être préparée, supprimée ou effacée. La machine a" msgid "Clone/s" msgstr "Clone(s)" @@ -76,7 +76,7 @@ msgid "Help" msgstr "Aide" msgid "Requirements" -msgstr "Requis" +msgstr "Prérequis" msgid "About" msgstr "À propos" @@ -97,7 +97,7 @@ msgid "Paused" msgstr "En pause" msgid "Prepare base" -msgstr "Preparer la base" +msgstr "Préparer la base" msgid "Machine locked by requested" msgstr "Machine verrouillée sur demande" @@ -167,7 +167,7 @@ msgid "New Password:" msgstr "Nouveau mot de passe :" msgid "Confirm Password:" -msgstr "Confirmer le mot de passe" +msgstr "Confirmer le mot de passe :" msgid "Submit" msgstr "Soumettre" @@ -176,7 +176,7 @@ msgid "Your language has been changed successfully" msgstr "Votre langue a été modifiée avec succès" msgid "Your password has been changed successfully" -msgstr "votre mot de passe a été modifié avec succès" +msgstr "Votre mot de passe a été modifié avec succès" msgid "Password too small" msgstr "Votre mot de passe est trop court" @@ -212,13 +212,13 @@ msgid "Machine locked by" msgstr "Machine verrouillée par" msgid "machines" -msgstr "Machines" +msgstr "machines" msgid "users" -msgstr "Utilisateurs" +msgstr "utilisateurs" msgid "messages" -msgstr "Messages" +msgstr "messages" msgid "Admin tools" msgstr "Outils d'administration" @@ -227,7 +227,7 @@ msgid "Remove base" msgstr "Supprimer la base" msgid "public" -msgstr "Public" +msgstr "public" msgid "Hybernate" msgstr "Hiberner" @@ -242,7 +242,7 @@ msgid "New Base" msgstr "Nouvelle base" msgid "will remove all the contents of the machine" -msgstr "supprimera tous les éléments de la machine" +msgstr "supprimera tout le contenu de la machine" msgid "Are you sure?" msgstr "Êtes-vous certain ?" From e781c8f4a01211df4e38e3acffdddebec1a90faf Mon Sep 17 00:00:00 2001 From: joelalju Date: Tue, 31 Oct 2017 16:21:58 +0100 Subject: [PATCH 060/170] [#405] Deleted unnecessary password fields on some selects from Front.pm --- lib/Ravada/Front.pm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/Ravada/Front.pm b/lib/Ravada/Front.pm index 396fc6792..4e5eff3d5 100644 --- a/lib/Ravada/Front.pm +++ b/lib/Ravada/Front.pm @@ -373,13 +373,12 @@ Returns a reference to a list of the users =cut sub list_users($self,$name=undef) { - my $sth = $CONNECTOR->dbh->prepare("SELECT id, name, password FROM users "); + my $sth = $CONNECTOR->dbh->prepare("SELECT id, name FROM users "); $sth->execute(); my @users = (); while ( my $row = $sth->fetchrow_hashref) { next if defined $name && $row->{name} !~ /$name/; - delete $row->{password}; push @users, ($row); } $sth->finish; @@ -574,8 +573,7 @@ sub search_domain { my $name = shift; - my $sth = $CONNECTOR->dbh->prepare("SELECT vm, id_owner, id_base, description, - spice_password FROM domains WHERE name=?"); + my $sth = $CONNECTOR->dbh->prepare("SELECT vm, id_owner, id_base, description FROM domains WHERE name=?"); $sth->execute($name); my $row = $sth->fetchrow_hashref; @@ -741,13 +739,12 @@ sub list_bases_anonymous { my $net = Ravada::Network->new(address => $ip); - my $sth = $CONNECTOR->dbh->prepare("SELECT id, id_base, spice_password FROM domains where is_base=1 AND is_public=1"); + my $sth = $CONNECTOR->dbh->prepare("SELECT id, id_base FROM domains where is_base=1 AND is_public=1"); $sth->execute(); my @bases = (); while ( my $row = $sth->fetchrow_hashref) { next if !$net->allowed_anonymous($row->{id}); - delete $row->{spice_password}; push @bases, ($row); } $sth->finish; From f798954b6ef8a428c4211b47ecb407e384c1d067 Mon Sep 17 00:00:00 2001 From: joelalju Date: Tue, 31 Oct 2017 17:44:35 +0100 Subject: [PATCH 061/170] [#425]Icon buttons added --- .../ng-templates/new_machine_template.html.ep | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/templates/ng-templates/new_machine_template.html.ep b/templates/ng-templates/new_machine_template.html.ep index 1fb5ddad4..f25be4a67 100644 --- a/templates/ng-templates/new_machine_template.html.ep +++ b/templates/ng-templates/new_machine_template.html.ep @@ -1,8 +1,8 @@
- -
+ +

- -
+ +
- -
+ +
@@ -90,7 +90,7 @@ align="right">Remove swap
- +
@@ -98,7 +98,7 @@
- +
From 9491c822492936b39df5395a3a018acf2672b14e Mon Sep 17 00:00:00 2001 From: joelalju Date: Tue, 31 Oct 2017 18:09:11 +0100 Subject: [PATCH 062/170] [#425] The info icons now have a field for the info --- templates/ng-templates/new_machine_template.html.ep | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/templates/ng-templates/new_machine_template.html.ep b/templates/ng-templates/new_machine_template.html.ep index f25be4a67..80366ea62 100644 --- a/templates/ng-templates/new_machine_template.html.ep +++ b/templates/ng-templates/new_machine_template.html.ep @@ -1,7 +1,8 @@
- +

- +
+ title="Choose the OS you want to install.">
Date: Fri, 3 Nov 2017 08:26:00 +0100 Subject: [PATCH 064/170] Get driver for any domain kind empty by default --- lib/Ravada/Domain.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/Ravada/Domain.pm b/lib/Ravada/Domain.pm index 199902b12..0674e9a8d 100644 --- a/lib/Ravada/Domain.pm +++ b/lib/Ravada/Domain.pm @@ -1554,6 +1554,19 @@ sub list_requests { return map { Ravada::Request->open($_->{id}) } @list; } +=head2 get_driver + +Returns the driver from a domain + +Argument: name of the device [ optional ] +Returns all the drivers if not passwed + + my $driver = $domain->get_driver('video'); + +=cut + +sub get_driver {} + sub _dbh { my $self = shift; _init_connector() if !$CONNECTOR || !$$CONNECTOR; From 3be21f3e608dd19722345cd448f103c5219c4d69 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Fri, 3 Nov 2017 12:23:23 +0100 Subject: [PATCH 065/170] [#443] fixed unique mac --- lib/Ravada/VM/KVM.pm | 49 ++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/lib/Ravada/VM/KVM.pm b/lib/Ravada/VM/KVM.pm index a5fb0cc51..6bea4ef27 100644 --- a/lib/Ravada/VM/KVM.pm +++ b/lib/Ravada/VM/KVM.pm @@ -1606,7 +1606,10 @@ sub _unique_mac { for my $nic ( $doc->findnodes('/domain/devices/interface/mac')) { my $nic_mac = $nic->getAttribute('address'); - return 0 if $mac eq lc($nic_mac); + if ( $mac eq lc($nic_mac) ) { + warn "mac clashes with domain ".$dom->get_name; + return 0; + } } } return 1; @@ -1631,31 +1634,37 @@ sub _xml_modify_mac { my @macparts = split/:/,$mac; + my @old_macs; + + for my $dom ($self->vm->list_all_domains) { + my $doc = $XML->load_xml(string => $dom->get_xml_description()) or die "ERROR: $!\n"; + + for my $nic ( $doc->findnodes('/domain/devices/interface/mac')) { + my $nic_mac = $nic->getAttribute('address'); + push @old_macs,($nic_mac); + } + } + + my $new_mac; - my $n_part = scalar(@macparts) -2; + for my $cont ( 1 .. 1000 ) { + my $pos = int(rand(2))+4; + my $num =sprintf "%02X", rand(0xff); + die "Missing num " if !defined $num; + $macparts[$pos] = $num; + $new_mac = lc(join(":",@macparts)); + my $n_part = scalar(@macparts) -2; + + last if (! grep /^$new_mac$/i,@old_macs); + } - for (;;) { - for my $last ( 0 .. 254 ) { - $last = sprintf("%X", $last); - $last = "0$last" if length($last)<2; - $macparts[-1] = $last; - $new_mac = join(":",@macparts); - if ( $self->_unique_mac($new_mac) ) { + if ( $self->_unique_mac($new_mac) ) { $if_mac->setAttribute(address => $new_mac); return; - } - $new_mac = undef; - } - my $new_part = hex($macparts[$n_part])+1; - if ($new_part > 255) { - $n_part--; - $new_part = 0; - die "I can't find a new unique mac" if !$n_part<0; - } - $macparts[$n_part] = sprintf("%X", $new_part); + } else { + die "I can't find a new unique mac"; } - die "I can't find a new unique mac" if !$new_mac; } From 5fc21453e89ea002499039a3c1d19109a145b48f Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Tue, 31 Oct 2017 16:25:05 +0100 Subject: [PATCH 066/170] [#439] test many nodes --- t/vm/z_101.t | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 t/vm/z_101.t diff --git a/t/vm/z_101.t b/t/vm/z_101.t new file mode 100644 index 000000000..65ad41e63 --- /dev/null +++ b/t/vm/z_101.t @@ -0,0 +1,97 @@ +use warnings; +use strict; + +use Data::Dumper; +use Test::More; +use Test::SQL::Data; + +use lib 't/lib'; +use Test::Ravada; + +my $test = Test::SQL::Data->new(config => 't/etc/sql.conf'); + +use_ok('Ravada'); + +my $FILE_CONFIG = 't/etc/ravada.conf'; + +my $RVD_BACK = rvd_back($test->connector, $FILE_CONFIG); +my $RVD_FRONT= rvd_front($test->connector, $FILE_CONFIG); + +my %ARG_CREATE_DOM = ( + KVM => [ id_iso => 1 ] + ,Void => [ ] +); + +my @ARG_RVD = ( config => $FILE_CONFIG, connector => $test->connector); + +my @VMS = keys %ARG_CREATE_DOM; + +############################################################# + +clean(); + +for my $vm_name (reverse sort @VMS) { + + diag("Testing $vm_name VM"); + + my $vm; + + eval { $vm = rvd_back->search_vm($vm_name) }; + + SKIP: { + my $msg = "SKIPPED test: No $vm_name VM found "; + if ($vm && $vm_name =~ /kvm/i && $>) { + $msg = "SKIPPED: Test must run as root"; + $vm = undef; + } + + diag($msg) if !$vm; + skip $msg,10 if !$vm; + + my $domain = create_domain($vm_name); + my $t0 = time; + my $clone0; + + my $n_clones = 102; + for my $count ( 1 .. $n_clones ) { + my $name = new_domain_name(); + my $clone; + eval { + $clone = $domain->clone( + name => $name + ,user => user_admin + ); + }; + is(''.$@,'') or next; + ok($clone,"Expecting a clone from ".$domain->name) or next; + + eval { $clone->start(user_admin) }; + is(''.$@,''); + is($clone->is_active,1); + + if ($clone0 ) { + eval { $clone0->shutdown_now(user_admin) }; + is(''.$@,''); + is($clone0->is_active,0); + + if (time - $t0 > 5 ) { + $t0 = time; + diag("[$vm_name] testing clone $count of $n_clones ".$clone0->name); + } + } + $clone0 = $clone; + if ($clone->can_hybernate) { + eval { $clone->hybernate(user_admin) }; + is(''.$@,''); + is($clone->is_paused,1); + + eval { $clone->start(user_admin) }; + is(''.$@,''); + is($clone->is_active,1); + } + } + } +} + +clean(); +done_testing(); From 99e3278bdae580d87d875f1ee6030bed59ddf27b Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Tue, 31 Oct 2017 16:25:26 +0100 Subject: [PATCH 067/170] [#439] Create the new uuid from a large random number --- lib/Ravada/VM/KVM.pm | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/Ravada/VM/KVM.pm b/lib/Ravada/VM/KVM.pm index a5fb0cc51..5924c2035 100644 --- a/lib/Ravada/VM/KVM.pm +++ b/lib/Ravada/VM/KVM.pm @@ -1244,25 +1244,24 @@ sub _xml_modify_uuid { my $doc = shift; my ($uuid) = $doc->findnodes('/domain/uuid/text()'); - random:while (1) { - my $new_uuid = _new_uuid($uuid); - next if $new_uuid eq $uuid; - for my $dom ($self->vm->list_all_domains) { - next random if $dom->get_uuid_string eq $new_uuid; - } - $uuid->setData($new_uuid); - last; + my @known_uuids; + for my $dom ($self->vm->list_all_domains) { + push @known_uuids,($dom->get_uuid_string); } + my $new_uuid = _unique_uuid($uuid,@known_uuids); + $uuid->setData($new_uuid); } sub _unique_uuid { my ($self, $uuid, @uuids) = @_; my ($first,$last) = $uuid =~ m{(.*)([0-9a-f]{6})}; - for (1..100) { + for (1..1000) { my $new_last = int(rand(0x100000)); - my $new_uuid = sprintf("%s%06d",$first,$new_last); + my $new_uuid = sprintf("%s%06d",$first,substr($new_last,0,6)); + confess "Wrong uuid size ".length($new_uuid)." <> ".length($uuid) + if length($new_uuid) != length($uuid); return $new_uuid if !grep /^$new_uuid$/,@uuids; } confess "I can't find a new unique uuid"; From f404ee28d864b92ca182c6b711737e746cc43682 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Mon, 6 Nov 2017 12:27:24 +0100 Subject: [PATCH 068/170] [#408] added xubuntu artful 17.10 --- lib/Ravada.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/Ravada.pm b/lib/Ravada.pm index b770163c0..bd747d95a 100644 --- a/lib/Ravada.pm +++ b/lib/Ravada.pm @@ -212,6 +212,16 @@ sub _update_isos { ,xml_volume => 'xenial64-volume.xml' ,sha256_url => 'http://fedora.mirrors.ovh.net/linux/releases/25/Workstation/x86_64/iso/Fedora-Workstation-25-.*-x86_64-CHECKSUM' } + ,xubuntu_artful => { + name => 'Xubuntu Artful Aardvark' + ,description => 'Xubuntu 17.10 Artful Aardvark 64 bits' + ,arch => 'amd64' + ,xml => 'yakkety64-amd64.xml' + ,xml_volume => 'yakkety64-volume.xml' + ,md5_url => 'http://archive.ubuntu.com/ubuntu/dists/artful/main/installer-amd64/current/images/MD5SUMS' + ,url => 'http://archive.ubuntu.com/ubuntu/dists/artful/main/installer-amd64/current/images/netboot/mini.iso' + ,rename_file => 'xubuntu_artful.iso' + } ,xubuntu_zesty => { name => 'Xubuntu Zesty Zapus' ,description => 'Xubuntu 17.04 Zesty Zapus 64 bits' From 4ced2a100b0519d979bef3d3d5329b886dc9e626 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Mon, 6 Nov 2017 12:43:11 +0100 Subject: [PATCH 069/170] Allow install in older ubuntus --- Makefile.PL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.PL b/Makefile.PL index 55dd35e79..c51cad995 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -6,7 +6,7 @@ use ExtUtils::MakeMaker; WriteMakefile( VERSION => '0.01', PREREQ_PM => { - 'Mojolicious' => '7.14' + 'Mojolicious' => '7.01' ,'DBIx::Connector' => 0 ,'Authen::Passphrase' => 0 ,'IPC::Run3' => 0 From 0e0585cbf1f1dbc95bdc56c072a546ee73c52804 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Mon, 6 Nov 2017 19:34:43 +0100 Subject: [PATCH 070/170] [#420] test storage refresh --- t/request/50_refresh_storage.t | 48 ++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 t/request/50_refresh_storage.t diff --git a/t/request/50_refresh_storage.t b/t/request/50_refresh_storage.t new file mode 100644 index 000000000..2837f698b --- /dev/null +++ b/t/request/50_refresh_storage.t @@ -0,0 +1,48 @@ +use warnings; +use strict; + +use Carp qw(carp confess cluck); +use Data::Dumper; +use POSIX qw(WNOHANG); +use Test::More; +use Test::SQL::Data; + +use_ok('Ravada'); +use_ok('Ravada::Request'); + +use lib 't/lib'; +use Test::Ravada; + +my $test = Test::SQL::Data->new(config => 't/etc/sql.conf'); + +init($test->connector, 't/etc/ravada.conf'); + +my $USER = create_user("foo","bar"); + +################################################################### + +clean(); + +for my $vm_name (qw(KVM)) { + my $vm; + my $msg = "SKIPPED: virtual manager $vm_name not found"; + eval { + $vm= rvd_back->search_vm($vm_name) if rvd_back(); + + if ($vm && $vm_name =~ /kvm/i && $>) { + $msg = "SKIPPED: Test must run as root"; + $vm= undef; + } + + }; + + SKIP: { + diag($msg) if $msg; + skip($msg,10) if !$vm; + + diag("Testing requests with $vm_name"); + } +} + +done_testing(); +clean(); From 46709e1af774c7698fc44252cdb593db92c9ebf3 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Tue, 7 Nov 2017 11:02:14 +0100 Subject: [PATCH 071/170] [#420] test refresh VM --- t/request/50_refresh_storage.t | 58 ++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/t/request/50_refresh_storage.t b/t/request/50_refresh_storage.t index 2837f698b..683e90bb1 100644 --- a/t/request/50_refresh_storage.t +++ b/t/request/50_refresh_storage.t @@ -21,6 +21,55 @@ my $USER = create_user("foo","bar"); ################################################################### +sub test_request { + my $vm_name = shift; + my $id_vm = shift; + + my $file = "a.iso"; + + my $vm = rvd_back->search_vm($vm_name); + + # clean old files + my @files = $vm->search_volume_path($file); + for my $old_file (@files) { + unlink $old_file or die "$! $old_file" + if -e $old_file; + } + $vm->_refresh_storage_pools(); + + # check there are no files + @files = $vm->search_volume_path($file); + ok(!scalar @files) or next; + + my $file_out = $vm->dir_img."/$file"; + unlink $file_out or die "$! $file_out" + if -e $file_out; + + open my $out,'>',$file_out or die "$! $file_out"; + print $out "rosa d'abril\n"; + close $out; + ok(-e $file_out,"Expecting a file $file_out"); + + my $request; + + eval { + my @args; + @args = (id_vm => $id_vm ) if $id_vm; + $request = Ravada::Request->refresh_storage(@args); + }; + is($@,''); + ok($request,"Expecting a request") or next; + rvd_back->_process_all_requests_dont_fork(); + + is($request->status,'done'); + is($request->error,''); + + @files = $vm->search_volume_path($file); + ok(scalar @files,"Expecting $file exists on storage pool"); +} + +######################################################### + clean(); for my $vm_name (qw(KVM)) { @@ -37,12 +86,17 @@ for my $vm_name (qw(KVM)) { }; SKIP: { - diag($msg) if $msg; + diag($msg) if !$vm; skip($msg,10) if !$vm; diag("Testing requests with $vm_name"); + + test_request($vm_name, $vm->id); + test_request($vm_name); } + + } -done_testing(); clean(); +done_testing(); From 2b02261c2d894d81362ca6c8da4087b304e07b45 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Tue, 7 Nov 2017 11:02:40 +0100 Subject: [PATCH 072/170] [#420] call to refresh storage from request --- lib/Ravada.pm | 12 ++++++++++++ lib/Ravada/Request.pm | 24 ++++++++++++++++++++++++ lib/Ravada/VM/KVM.pm | 10 ++++++++++ 3 files changed, 46 insertions(+) diff --git a/lib/Ravada.pm b/lib/Ravada.pm index 2c714ab3b..f63e2d81b 100644 --- a/lib/Ravada.pm +++ b/lib/Ravada.pm @@ -1858,6 +1858,17 @@ sub _cmd_set_driver { $domain->set_driver_id($request->args('id_option')); } +sub _cmd_refresh_storage($self, $request) { + + my $vm; + if ($request->defined_arg('id_vm')) { + $vm = Ravada::VM->open($request->defined_arg('id_vm')); + } else { + $vm = $self->search_vm('KVM'); + } + $vm->refresh_storage(); +} + sub _req_method { my $self = shift; my $cmd = shift; @@ -1882,6 +1893,7 @@ sub _req_method { ,open_iptables => \&_cmd_open_iptables ,list_vm_types => \&_cmd_list_vm_types ,force_shutdown => \&_cmd_force_shutdown +,refresh_storage => \&_cmd_refresh_storage ); return $methods{$cmd}; diff --git a/lib/Ravada/Request.pm b/lib/Ravada/Request.pm index 75a48c841..a129cb5c6 100644 --- a/lib/Ravada/Request.pm +++ b/lib/Ravada/Request.pm @@ -60,6 +60,7 @@ our %VALID_ARG = ( ,set_driver => {uid => 1, id_domain => 1, id_option => 1} ,hybernate=> {uid => 1, id_domain => 1} ,download => {uid => 2, id_iso => 1, id_vm => 2, delay => 2} + ,refresh_storage => { id_vm => 2 } ); our %CMD_SEND_MESSAGE = map { $_ => 1 } @@ -808,6 +809,29 @@ sub download { } +=head2 refresh_storage + +Refreshes a storage pool + +=cut + +sub refresh_storage { + my $proto = shift; + my $class = ref($proto) || $proto; + + my $args = _check_args('refresh_storage', @_ ); + + my $self = {}; + bless($self,$class); + + return $self->_new_request( + command => 'refresh_storage' + , args => $args + ); + + +} + sub AUTOLOAD { my $self = shift; diff --git a/lib/Ravada/VM/KVM.pm b/lib/Ravada/VM/KVM.pm index 477794835..38ad2d30b 100644 --- a/lib/Ravada/VM/KVM.pm +++ b/lib/Ravada/VM/KVM.pm @@ -272,6 +272,16 @@ sub _refresh_storage_pools($self) { } } +=head2 refresh_storage + +Refreshes all the storage pools + +=cut + +sub refresh_storage($self) { + $self->_refresh_storage_pools(); +} + =head2 search_volume_path_re Searches for a volume in all the storage pools known to the Virtual Manager From 834a3abf80e5f57169e3c0cbfc43ab06ed43bdc7 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Tue, 7 Nov 2017 11:02:54 +0100 Subject: [PATCH 073/170] [#420] refresh storage before new machine --- rvd_front.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rvd_front.pl b/rvd_front.pl index a708911b2..95d3fafc1 100644 --- a/rvd_front.pl +++ b/rvd_front.pl @@ -954,6 +954,9 @@ sub new_machine { req_new_domain($c); $c->redirect_to("/admin/machines"); } + } else { + my $req = Ravada::Request->refresh_storage(); + # TODO handle possible errors } $c->stash(errors => \@error); push @{$c->stash->{js}}, '/js/admin.js'; From daf7cf72fdace0f823684043628e999ecbf1b53c Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Tue, 7 Nov 2017 12:36:41 +0100 Subject: [PATCH 074/170] [#416] escape values as suggested by nonamed01 --- lib/Ravada/Auth/LDAP.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/Ravada/Auth/LDAP.pm b/lib/Ravada/Auth/LDAP.pm index 32974de31..1236ebc6b 100644 --- a/lib/Ravada/Auth/LDAP.pm +++ b/lib/Ravada/Auth/LDAP.pm @@ -18,6 +18,7 @@ use Moose; use Net::LDAP; use Net::LDAPS; use Net::LDAP::Entry; +use Net::LDAP::Util qw(escape_filter_value); use Net::Domain qw(hostdomain); use Ravada::Auth::SQL; @@ -65,6 +66,9 @@ sub add_user { _init_ldap_admin(); + $name = escape_filter_value($name); + $password = escape_filter_value($password); + confess "No dc base in config ".Dumper($$CONFIG->{ldap}) if !_dc_base(); my ($givenName, $sn) = $name =~ m{(\w+)\.(.*)}; @@ -124,6 +128,8 @@ Search user by uid sub search_user { my $username = shift; + $username = escape_filter_value($username); + _init_ldap(); my $ldap = (shift or $LDAP_ADMIN); @@ -172,6 +178,8 @@ sub add_group { my $name = shift; my $base = (shift or _dc_base()); + $name = escape_filter_value($name); + my $mesg = $LDAP_ADMIN->add( cn => $name ,dn => "cn=$name,ou=groups,$base" @@ -224,6 +232,8 @@ sub search_group { my $base = ( $args{base} or "ou=groups,"._dc_base() ); my $ldap = ( $args{ldap} or $LDAP ); + $name = escape_filter_value($name); + my $mesg = $ldap ->search ( filter => "cn=$name" ,base => $base From 432e00229ee42783ee92d21b6f726d5f499478ed Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Thu, 9 Nov 2017 15:27:43 +0100 Subject: [PATCH 075/170] [#457] remove old debian 9 link --- lib/Ravada.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/Ravada.pm b/lib/Ravada.pm index f63e2d81b..5a87b9153 100644 --- a/lib/Ravada.pm +++ b/lib/Ravada.pm @@ -515,9 +515,19 @@ sub _update_table($self, $table, $field, $data) { } } +sub _remove_old_isos { + my $self = shift; + my $sth = $CONNECTOR->dbh->prepare("DELETE FROM iso_images " + ." WHERE url like '%debian-9.0%iso'" + ); + $sth->execute(); + $sth->finish; +} + sub _update_data { my $self = shift; + $self->_remove_old_isos(); $self->_update_isos(); $self->_update_user_grants(); $self->_update_domain_drivers_types(); From f6f09143623b03d633924570c083e8b15b736f15 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Thu, 9 Nov 2017 16:09:12 +0100 Subject: [PATCH 076/170] [#449] copy permission does not exist --- rvd_front.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rvd_front.pl b/rvd_front.pl index 95d3fafc1..cc2903d77 100644 --- a/rvd_front.pl +++ b/rvd_front.pl @@ -438,8 +438,7 @@ any '/machine/copy' => sub { my $c = shift; - return access_denied($c) if !$USER -> can_copy(); -# return access_denied($c) if !$USER -> can_clone_all(); + return access_denied($c) if !$USER -> can_clone_all(); return copy_machine($c); }; From 384fc112aa0c6aebe5ece23da0c07680e1ada057 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Fri, 3 Nov 2017 08:38:38 +0100 Subject: [PATCH 077/170] [#443] check if domain is hibernated --- templates/main/vm_rename.html.ep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/main/vm_rename.html.ep b/templates/main/vm_rename.html.ep index 40588c8ad..4b53bdeff 100644 --- a/templates/main/vm_rename.html.ep +++ b/templates/main/vm_rename.html.ep @@ -4,7 +4,7 @@ % $message_rename = 'This VM is running and can\'t be renamed.'; % $disable_rename = 1; % } -% if ( $domain->is_hibernated ) { +% if ( $domain->is_hibernated) { % $message_rename = 'This VM has a saved hybernated state and can\'t be renamed.'; % $disable_rename = 1; % } From 2a27b5b6415c7c1440ed606d929b857d56ec4558 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Fri, 3 Nov 2017 09:09:48 +0100 Subject: [PATCH 078/170] [#443] check the domain has drivers --- lib/Ravada/Domain.pm | 2 +- templates/main/settings_machine_tabs_head.html.ep | 2 +- templates/main/vm_graphics.html.ep | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/Ravada/Domain.pm b/lib/Ravada/Domain.pm index 0674e9a8d..027bbb392 100644 --- a/lib/Ravada/Domain.pm +++ b/lib/Ravada/Domain.pm @@ -1467,7 +1467,7 @@ sub drivers { _init_connector(); - $type = 'qemu' if $type =~ /^KVM$/; + $type = 'KVM' if $type =~ /qemu/; my $query = "SELECT id from domain_drivers_types " ." WHERE vm=?"; $query .= " AND name=?" if $name; diff --git a/templates/main/settings_machine_tabs_head.html.ep b/templates/main/settings_machine_tabs_head.html.ep index 82c36584b..6ddb9840d 100644 --- a/templates/main/settings_machine_tabs_head.html.ep +++ b/templates/main/settings_machine_tabs_head.html.ep @@ -7,7 +7,7 @@ % if ($USER->can_change_settings && $domain->drivers) { % } -% if ($domain->type eq 'KVM') { +% if ($domain->drivers) { % } % if ($USER->can_clone_all){ diff --git a/templates/main/vm_graphics.html.ep b/templates/main/vm_graphics.html.ep index 0b720f80d..1069898b1 100644 --- a/templates/main/vm_graphics.html.ep +++ b/templates/main/vm_graphics.html.ep @@ -5,11 +5,9 @@
% } % my $driver = $domain->drivers("image"); -% my ($first, $second) = $driver->get_options();
" class="alert alert-danger"> This machine has not Graphics parameters!
- % my %recomend = ( % image => 'auto_glz' % ,jpeg => 'auto' @@ -22,7 +20,7 @@
% for my $driver_name (qw(image jpeg zlib playback streaming)) { -% my $driver = $domain->drivers($driver_name); +% my $driver = $domain->drivers($driver_name) or next;
From d433dca22269d43a6e2f0cd4a6a200baf21c4748 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Fri, 3 Nov 2017 12:20:40 +0100 Subject: [PATCH 079/170] [#443] check copy new name --- templates/main/vm_copy.html.ep | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/templates/main/vm_copy.html.ep b/templates/main/vm_copy.html.ep index e69b3d9ac..466775afa 100644 --- a/templates/main/vm_copy.html.ep +++ b/templates/main/vm_copy.html.ep @@ -11,7 +11,10 @@
+ value="{{showmachine.name}}-copy" + ng-model="new_name" + ng-change="validate_new_name(showmachine.name)" + >
@@ -23,9 +26,23 @@
- + +
+ + +
+
From c4e854b51953a1c4dde03d8d6e875ad634ed2dee Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Fri, 3 Nov 2017 12:21:47 +0100 Subject: [PATCH 080/170] [#443] get the current machine for angular --- public/js/ravada.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/js/ravada.js b/public/js/ravada.js index bd7addda9..8297f2bd1 100644 --- a/public/js/ravada.js +++ b/public/js/ravada.js @@ -169,8 +169,8 @@ $scope.validate_new_name = function(old_name) { $scope.new_name_duplicated = false; - if(!$scope.new_name || old_name == $scope.new_name) { - $scope.new_name_invalid=true; + if(old_name == $scope.new_name) { + $scope.new_name_invalid=false; return; } var valid_domain_name = /^[a-zA-Z][\w_-]+$/; @@ -194,6 +194,9 @@ //On load code $scope.showmachineId = window.location.pathname.split("/")[3].split(".")[0] || -1 ; + $http.get('/machine/info/'+$scope.showmachineId+'.json').then(function(response) { + $scope.showmachine=response.data; + }); // $scope.getSingleMachine(); // $scope.updatePromise = $interval($scope.getSingleMachine,3000); }; From ba2ef125eb30a2e316b7c95be3b011d8141dec7a Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Fri, 3 Nov 2017 12:23:06 +0100 Subject: [PATCH 081/170] [#443] get domain info --- lib/Ravada/Front.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Ravada/Front.pm b/lib/Ravada/Front.pm index 4e5eff3d5..b28206752 100644 --- a/lib/Ravada/Front.pm +++ b/lib/Ravada/Front.pm @@ -186,7 +186,7 @@ sub list_domains { my $self = shift; my %args = @_; - my $query = "SELECT name, id, id_base, is_base FROM domains ORDER BY name"; + my $query = "SELECT name, id, id_base, is_base FROM domains "; my $where = ''; for my $field ( sort keys %args ) { @@ -195,7 +195,7 @@ sub list_domains { } $where = "WHERE $where" if $where; - my $sth = $CONNECTOR->dbh->prepare("$query $where"); + my $sth = $CONNECTOR->dbh->prepare("$query $where ORDER BY name"); $sth->execute(map { $args{$_} } sort keys %args); my @domains = (); From b042510bb886260148ec815eaf6e8819c9ae3aac Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Fri, 3 Nov 2017 12:23:23 +0100 Subject: [PATCH 082/170] [#443] fixed unique mac From 9c2414573bd5c48d43e7bc33dc62de837c4c9ef8 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Fri, 3 Nov 2017 14:46:38 +0100 Subject: [PATCH 083/170] [#443] type KVM domains and its drivers too --- lib/Ravada.pm | 10 +++++----- lib/Ravada/Domain.pm | 8 +++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/Ravada.pm b/lib/Ravada.pm index 5a87b9153..82d480d5d 100644 --- a/lib/Ravada.pm +++ b/lib/Ravada.pm @@ -295,32 +295,32 @@ sub _update_domain_drivers_types($self) { id => 4, ,name => 'image' ,description => 'Graphics Options' - ,vm => 'qemu' + ,vm => 'KVM' }, jpeg => { id => 5, ,name => 'jpeg' ,description => 'Graphics Options' - ,vm => 'qemu' + ,vm => 'KVM' }, zlib => { id => 6, ,name => 'zlib' ,description => 'Graphics Options' - ,vm => 'qemu' + ,vm => 'KVM' }, playback => { id => 7, ,name => 'playback' ,description => 'Graphics Options' - ,vm => 'qemu' + ,vm => 'KVM' }, streaming => { id => 8, ,name => 'streaming' ,description => 'Graphics Options' - ,vm => 'qemu' + ,vm => 'KVM' } }; diff --git a/lib/Ravada/Domain.pm b/lib/Ravada/Domain.pm index 027bbb392..09b2cca10 100644 --- a/lib/Ravada/Domain.pm +++ b/lib/Ravada/Domain.pm @@ -1467,14 +1467,16 @@ sub drivers { _init_connector(); - $type = 'KVM' if $type =~ /qemu/; + my $type2 = $type; + $type2 = 'KVM' if $type =~ /qemu/; + $type2 = 'qemu' if $type =~ /KVM;/; my $query = "SELECT id from domain_drivers_types " - ." WHERE vm=?"; + ." WHERE (vm=? or vm=?)"; $query .= " AND name=?" if $name; my $sth = $$CONNECTOR->dbh->prepare($query); - my @sql_args = ($type); + my @sql_args = ($type,$type2); push @sql_args,($name) if $name; $sth->execute(@sql_args); From f1738605d5fd74e784a569d4f5b7f922b157206f Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Fri, 3 Nov 2017 14:46:57 +0100 Subject: [PATCH 084/170] [#443] testing drivers --- t/kvm/62_images.t | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/kvm/62_images.t b/t/kvm/62_images.t index 07b2a8d6c..571a70d43 100644 --- a/t/kvm/62_images.t +++ b/t/kvm/62_images.t @@ -72,6 +72,8 @@ sub test_drivers_type { isa_ok(\@drivers,'ARRAY'); my $driver_type = $domain->drivers($type); + ok($driver_type,"[$vm_name] Expecting a driver type $type") or return; + isa_ok($driver_type, "Ravada::Domain::Driver") or return; my $value = $driver_type->get_value(); is($value,undef,"Expecting no value for $type"); From 74eebf3c0aabf550c02554f02e96efc4b5078245 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Fri, 3 Nov 2017 12:23:23 +0100 Subject: [PATCH 085/170] [#443] fixed unique mac From 8df52e3bbdf753d8910883ff18fd84de24a6a0a7 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Thu, 9 Nov 2017 16:39:18 +0100 Subject: [PATCH 086/170] Check for undefined memory data --- lib/Ravada/Domain.pm | 1 + lib/Ravada/Domain/Void.pm | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib/Ravada/Domain.pm b/lib/Ravada/Domain.pm index 0674e9a8d..ad006f376 100644 --- a/lib/Ravada/Domain.pm +++ b/lib/Ravada/Domain.pm @@ -371,6 +371,7 @@ sub _check_used_memory { next if !$alive; my $info = $domain->get_info; + confess "No info memory ".Dumper($info) if !exists $info->{memory}; $used_memory += $info->{memory}; } diff --git a/lib/Ravada/Domain/Void.pm b/lib/Ravada/Domain/Void.pm index b13a1d78c..ab613ef30 100644 --- a/lib/Ravada/Domain/Void.pm +++ b/lib/Ravada/Domain/Void.pm @@ -352,6 +352,9 @@ sub can_screenshot { return $IMPORT; } sub get_info { my $self = shift; my $info = $self->_value('info'); + $self->_set_default_info() + if !$info->{memory}; + $info = $self->_value('info'); lock_keys(%$info); return $info; } From 0c2a1aa664f249a85fa58c221f497b37a8952bb6 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Thu, 9 Nov 2017 16:42:17 +0100 Subject: [PATCH 087/170] Import KVM must be run from root --- t/kvm/40_import.t | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/t/kvm/40_import.t b/t/kvm/40_import.t index 0ef7d94d5..5d245366c 100644 --- a/t/kvm/40_import.t +++ b/t/kvm/40_import.t @@ -163,6 +163,10 @@ for my $vm_name (@VMS) { my $vm = $RVD_BACK->search_vm($vm_name); SKIP : { my $msg = "SKIPPED test: No $vm_name VM found "; + if ($vm_name eq 'KVM') { + $msg = "SKIPPED test: $vm_name must be tested from root user"; + $vm = undef; + } diag($msg) if !$vm; skip $msg,10 if !$vm; From 7492d686f444ec1fb824a5d86ddb8877622ca755 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Tue, 31 Oct 2017 14:40:46 +0100 Subject: [PATCH 088/170] [#405] domains in list bases should have is_base field --- lib/Ravada/Front.pm | 2 +- t/front/10_load.t | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Ravada/Front.pm b/lib/Ravada/Front.pm index b28206752..ad1308632 100644 --- a/lib/Ravada/Front.pm +++ b/lib/Ravada/Front.pm @@ -75,7 +75,7 @@ Returns a list of the base domains as a listref sub list_bases { my $self = shift; - my $sth = $CONNECTOR->dbh->prepare("SELECT name, id FROM domains where is_base=1"); + my $sth = $CONNECTOR->dbh->prepare("SELECT name, id, is_base FROM domains where is_base=1"); $sth->execute(); my @bases = (); diff --git a/t/front/10_load.t b/t/front/10_load.t index 7ba29ef97..3a60543bf 100644 --- a/t/front/10_load.t +++ b/t/front/10_load.t @@ -69,9 +69,11 @@ sub test_add_domain_db { $bases = $RVD_FRONT->list_bases(); ok($bases,"No bases list returned"); ok(scalar @$bases == 1, "There should 1 base, got ".scalar(@$bases)) or exit; + + is($bases->[0]->{name}, $domain_name); for my $base ( @$bases ) { - ok($base->{is_base} ); + ok($base->{is_base},"[$vm_name] Expecting base for ".Dumper($base) ); } } From f67f6ae33d78bb65a4a926a3276661d16769963a Mon Sep 17 00:00:00 2001 From: fv3rdugo Date: Thu, 9 Nov 2017 18:36:01 +0100 Subject: [PATCH 089/170] [#408] Fix screenshot in 17.10 - Apply img-thumbnail class - Resize screenshot 250x188 - Fix create img in test. Problems with wayland --- lib/Ravada/Domain.pm | 2 +- lib/Ravada/Domain/KVM.pm | 28 ++++++++++++++-------------- lib/Ravada/Domain/Void.pm | 9 ++++----- templates/main/list_bases2.html.ep | 2 +- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/lib/Ravada/Domain.pm b/lib/Ravada/Domain.pm index 199902b12..d59700e5f 100644 --- a/lib/Ravada/Domain.pm +++ b/lib/Ravada/Domain.pm @@ -909,7 +909,7 @@ sub _convert_png { my $self = shift; my ($file_in ,$file_out) = @_; - my $in = Image::Magick->new(); + my $in = Image::Magick->new(size=>'250x188'); my $err = $in->Read($file_in); confess $err if $err; diff --git a/lib/Ravada/Domain/KVM.pm b/lib/Ravada/Domain/KVM.pm index 1a88bb3fc..85895267f 100644 --- a/lib/Ravada/Domain/KVM.pm +++ b/lib/Ravada/Domain/KVM.pm @@ -858,6 +858,17 @@ Takes a screenshot, it stores it in file. =cut +sub handler { + my ($stream, $data, $n) = @_; + my $file_tmp = "/var/tmp/$$.tmp"; + + open my $out ,'>>',$file_tmp; + print $out $data; + close $out; + + return $n; +} + sub screenshot { my $self = shift; my $file = (shift or $self->_file_screenshot); @@ -869,24 +880,13 @@ sub screenshot { my $stream = $self->{_vm}->vm->new_stream(); my $mimetype = $self->domain->screenshot($stream,0); + $stream->recv_all(\&handler); - my $file_tmp = "$file.tmp"; - my $data; - my $bytes = 0; - open my $out, '>', $file_tmp or die "$! $file_tmp"; - while ( my $rv =$stream->recv($data,1024)) { - $bytes += $rv; - last if $rv<=0; - print $out $data; - } - close $out; + my $file_tmp = "/var/tmp/$$.tmp"; + $stream->finish; $self->_convert_png($file_tmp,$file); unlink $file_tmp or warn "$! removing $file_tmp"; - - $stream->finish; - - return $bytes; } sub _file_screenshot { diff --git a/lib/Ravada/Domain/Void.pm b/lib/Ravada/Domain/Void.pm index b13a1d78c..11263b88d 100644 --- a/lib/Ravada/Domain/Void.pm +++ b/lib/Ravada/Domain/Void.pm @@ -27,8 +27,8 @@ has '_ip' => ( our $DIR_TMP = "/var/tmp/rvd_void"; -our $IMPORT = `which import`; -chomp $IMPORT; +our $CONVERT = `which convert`; +chomp $CONVERT; #######################################3 sub BUILD { @@ -334,8 +334,7 @@ sub screenshot { my $self = shift; my $file = (shift or $self->_file_screenshot); - my @cmd =($IMPORT,'-window','root' - ,'-resize','400x300' + my @cmd =($CONVERT,'-size', '400x300', 'xc:white' ,$file ); my ($in,$out,$err); @@ -347,7 +346,7 @@ sub _file_screenshot { return $DIR_TMP."/".$self->name.".png"; } -sub can_screenshot { return $IMPORT; } +sub can_screenshot { return $CONVERT; } sub get_info { my $self = shift; diff --git a/templates/main/list_bases2.html.ep b/templates/main/list_bases2.html.ep index 4e60b920f..989d0b2e2 100644 --- a/templates/main/list_bases2.html.ep +++ b/templates/main/list_bases2.html.ep @@ -63,7 +63,7 @@ % } % if ($machine->{screenshot} ) { - + % }
From 8140b5c66d1b4a1741ef3e62b33eed08c8aab5b2 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Fri, 10 Nov 2017 08:45:23 +0100 Subject: [PATCH 090/170] Trying to fix domain setttings wasn't testing Loads all the drivers, the test fails though --- lib/Ravada/Domain.pm | 31 +++++++++++++++++++++---------- t/kvm/65_dom_settings_req.t | 2 +- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/lib/Ravada/Domain.pm b/lib/Ravada/Domain.pm index 4abdbda71..edc62dccc 100644 --- a/lib/Ravada/Domain.pm +++ b/lib/Ravada/Domain.pm @@ -1464,21 +1464,32 @@ List the drivers available for a domain. It may filter for a given type. sub drivers { my $self = shift; my $name = shift; - my $type = (shift or $self->_vm->type); + my $type = shift; + $type = $self->_vm->type if $self && !$type; _init_connector(); - my $type2 = $type; - $type2 = 'KVM' if $type =~ /qemu/; - $type2 = 'qemu' if $type =~ /KVM;/; - my $query = "SELECT id from domain_drivers_types " - ." WHERE (vm=? or vm=?)"; - $query .= " AND name=?" if $name; + my $query = "SELECT id from domain_drivers_types "; - my $sth = $$CONNECTOR->dbh->prepare($query); + my @sql_args = (); - my @sql_args = ($type,$type2); - push @sql_args,($name) if $name; + my @where; + if ($name) { + push @where,("name=?"); + push @sql_args,($name); + } + if ($type) { + my $type2 = $type; + if ($type =~ /qemu/) { + $type2 = 'KVM'; + } elsif ($type =~ /KVM/) { + $type2 = 'qemu'; + } + push @where, ("( vm=? OR vm=?)"); + push @sql_args, ($type,$type2); + } + $query .= "WHERE ".join(" AND ",@where) if @where; + my $sth = $$CONNECTOR->dbh->prepare($query); $sth->execute(@sql_args); diff --git a/t/kvm/65_dom_settings_req.t b/t/kvm/65_dom_settings_req.t index ba2abbe12..f351bebc8 100644 --- a/t/kvm/65_dom_settings_req.t +++ b/t/kvm/65_dom_settings_req.t @@ -121,7 +121,7 @@ sub test_settings { my $vm_name = shift; for my $driver ( Ravada::Domain::drivers(undef,undef,$vm_name) ) { - next if $driver->name ne 'video'; +# next if $driver->name ne 'video'; diag("Testing drivers for $vm_name ".$driver->name); test_drivers_id($vm_name, $driver->name); } From 1b802bc9329abbba09888f671aeca03ccc288137 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Fri, 10 Nov 2017 08:51:27 +0100 Subject: [PATCH 091/170] [#408] scale the screenshot --- lib/Ravada/Domain.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Ravada/Domain.pm b/lib/Ravada/Domain.pm index d59700e5f..1d52b1178 100644 --- a/lib/Ravada/Domain.pm +++ b/lib/Ravada/Domain.pm @@ -909,10 +909,11 @@ sub _convert_png { my $self = shift; my ($file_in ,$file_out) = @_; - my $in = Image::Magick->new(size=>'250x188'); + my $in = Image::Magick->new(); my $err = $in->Read($file_in); confess $err if $err; + $in->Scale(width => 250, height => 188); $in->Write("png24:$file_out"); chmod 0755,$file_out or die "$! chmod 0755 $file_out"; From 618dcbece5d63464834f012b7058213146abbf56 Mon Sep 17 00:00:00 2001 From: fv3rdugo Date: Thu, 9 Nov 2017 18:36:01 +0100 Subject: [PATCH 092/170] [#408] Fix screenshot in 17.10 - Apply img-thumbnail class - Resize screenshot 250x188 - Fix create img in test. Problems with wayland --- lib/Ravada/Domain.pm | 2 +- lib/Ravada/Domain/KVM.pm | 28 ++++++++++++++-------------- lib/Ravada/Domain/Void.pm | 9 ++++----- templates/main/list_bases2.html.ep | 2 +- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/lib/Ravada/Domain.pm b/lib/Ravada/Domain.pm index edc62dccc..c2d13d21e 100644 --- a/lib/Ravada/Domain.pm +++ b/lib/Ravada/Domain.pm @@ -910,7 +910,7 @@ sub _convert_png { my $self = shift; my ($file_in ,$file_out) = @_; - my $in = Image::Magick->new(); + my $in = Image::Magick->new(size=>'250x188'); my $err = $in->Read($file_in); confess $err if $err; diff --git a/lib/Ravada/Domain/KVM.pm b/lib/Ravada/Domain/KVM.pm index 1a88bb3fc..85895267f 100644 --- a/lib/Ravada/Domain/KVM.pm +++ b/lib/Ravada/Domain/KVM.pm @@ -858,6 +858,17 @@ Takes a screenshot, it stores it in file. =cut +sub handler { + my ($stream, $data, $n) = @_; + my $file_tmp = "/var/tmp/$$.tmp"; + + open my $out ,'>>',$file_tmp; + print $out $data; + close $out; + + return $n; +} + sub screenshot { my $self = shift; my $file = (shift or $self->_file_screenshot); @@ -869,24 +880,13 @@ sub screenshot { my $stream = $self->{_vm}->vm->new_stream(); my $mimetype = $self->domain->screenshot($stream,0); + $stream->recv_all(\&handler); - my $file_tmp = "$file.tmp"; - my $data; - my $bytes = 0; - open my $out, '>', $file_tmp or die "$! $file_tmp"; - while ( my $rv =$stream->recv($data,1024)) { - $bytes += $rv; - last if $rv<=0; - print $out $data; - } - close $out; + my $file_tmp = "/var/tmp/$$.tmp"; + $stream->finish; $self->_convert_png($file_tmp,$file); unlink $file_tmp or warn "$! removing $file_tmp"; - - $stream->finish; - - return $bytes; } sub _file_screenshot { diff --git a/lib/Ravada/Domain/Void.pm b/lib/Ravada/Domain/Void.pm index ab613ef30..2d3b9076a 100644 --- a/lib/Ravada/Domain/Void.pm +++ b/lib/Ravada/Domain/Void.pm @@ -27,8 +27,8 @@ has '_ip' => ( our $DIR_TMP = "/var/tmp/rvd_void"; -our $IMPORT = `which import`; -chomp $IMPORT; +our $CONVERT = `which convert`; +chomp $CONVERT; #######################################3 sub BUILD { @@ -334,8 +334,7 @@ sub screenshot { my $self = shift; my $file = (shift or $self->_file_screenshot); - my @cmd =($IMPORT,'-window','root' - ,'-resize','400x300' + my @cmd =($CONVERT,'-size', '400x300', 'xc:white' ,$file ); my ($in,$out,$err); @@ -347,7 +346,7 @@ sub _file_screenshot { return $DIR_TMP."/".$self->name.".png"; } -sub can_screenshot { return $IMPORT; } +sub can_screenshot { return $CONVERT; } sub get_info { my $self = shift; diff --git a/templates/main/list_bases2.html.ep b/templates/main/list_bases2.html.ep index ce2377595..ce02ab04d 100644 --- a/templates/main/list_bases2.html.ep +++ b/templates/main/list_bases2.html.ep @@ -63,7 +63,7 @@ % } % if ($machine->{screenshot} ) { - + % }
From b3e990f3db4146d3623019e3436556393d3c79cc Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Mon, 6 Nov 2017 12:27:24 +0100 Subject: [PATCH 093/170] [#408] added xubuntu artful 17.10 --- lib/Ravada.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/Ravada.pm b/lib/Ravada.pm index 82d480d5d..fc4ee0df6 100644 --- a/lib/Ravada.pm +++ b/lib/Ravada.pm @@ -202,6 +202,16 @@ sub _update_isos { ,xml_volume => 'xenial64-volume.xml' ,sha256_url => 'http://fedora.mirrors.ovh.net/linux/releases/25/Workstation/x86_64/iso/Fedora-Workstation-25-.*-x86_64-CHECKSUM' } + ,xubuntu_artful => { + name => 'Xubuntu Artful Aardvark' + ,description => 'Xubuntu 17.10 Artful Aardvark 64 bits' + ,arch => 'amd64' + ,xml => 'yakkety64-amd64.xml' + ,xml_volume => 'yakkety64-volume.xml' + ,md5_url => 'http://archive.ubuntu.com/ubuntu/dists/artful/main/installer-amd64/current/images/MD5SUMS' + ,url => 'http://archive.ubuntu.com/ubuntu/dists/artful/main/installer-amd64/current/images/netboot/mini.iso' + ,rename_file => 'xubuntu_artful.iso' + } ,xubuntu_zesty => { name => 'Xubuntu Zesty Zapus' ,description => 'Xubuntu 17.04 Zesty Zapus 64 bits' From 53ee883989b8c28422cdd583d37aea472ce3fbc0 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Thu, 19 Oct 2017 17:03:16 +0200 Subject: [PATCH 094/170] [#408] lubuntu 17.10 --- lib/Ravada.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/Ravada.pm b/lib/Ravada.pm index fc4ee0df6..df25f5ef1 100644 --- a/lib/Ravada.pm +++ b/lib/Ravada.pm @@ -231,6 +231,14 @@ sub _update_isos { ,md5 => 'fe495d34188a9568c8d166efc5898d22' ,rename_file => 'xubuntu_xenial_mini.iso' } + ,lubuntu_aardvark => { + name => 'Lubuntu Artful Aardvark' + ,description => 'Lubuntu 17.10 Artful Aardvark 64 bits' + ,url => 'http://cdimage.ubuntu.com/lubuntu/releases/17.10/release/lubuntu-17.10-desktop-amd64.iso' + ,md5_url => 'http://cdimage.ubuntu.com/lubuntu/releases/17.10/release/MD5SUMS' + ,xml => 'yakkety64-amd64.xml' + ,xml_volume => 'yakkety64-volume.xml' + } ,lubuntu_zesty => { name => 'Lubuntu Zesty Zapus' ,description => 'Lubuntu 17.04 Zesty Zapus 64 bits' From 5975ee3e96ae846853f68746a44f17dae3f2e8a1 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Thu, 19 Oct 2017 16:28:37 +0200 Subject: [PATCH 095/170] [408] Ubuntu AA 17.10 iso location --- lib/Ravada.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/Ravada.pm b/lib/Ravada.pm index df25f5ef1..767c34af5 100644 --- a/lib/Ravada.pm +++ b/lib/Ravada.pm @@ -171,7 +171,17 @@ sub _update_isos { my $table = 'iso_images'; my $field = 'name'; my %data = ( - zesty => { + artful => { + name => 'Ubuntu Artful Aardvak' + ,description => 'Ubuntu 17.10 Artful Aardvak 64 bits' + ,arch => 'amd64' + ,xml => 'yakkety64-amd64.xml' + ,xml_volume => 'yakkety64-volume.xml' + ,url => 'http://releases.ubuntu.com/17.10/' + ,file_re => ,'ubuntu-17.10.*desktop-amd64.iso' + ,md5_url => ,'http://releases.ubuntu.com/17.10/MD5SUMS' + } + ,zesty => { name => 'Ubuntu Zesty Zapus' ,description => 'Ubuntu 17.04 Zesty Zapus 64 bits' ,arch => 'amd64' From 8767254689c5facf3aa639082e3b8af3efef8e6a Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Fri, 10 Nov 2017 08:51:27 +0100 Subject: [PATCH 096/170] [#408] scale the screenshot --- lib/Ravada/Domain.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Ravada/Domain.pm b/lib/Ravada/Domain.pm index c2d13d21e..72e37a78f 100644 --- a/lib/Ravada/Domain.pm +++ b/lib/Ravada/Domain.pm @@ -910,10 +910,11 @@ sub _convert_png { my $self = shift; my ($file_in ,$file_out) = @_; - my $in = Image::Magick->new(size=>'250x188'); + my $in = Image::Magick->new(); my $err = $in->Read($file_in); confess $err if $err; + $in->Scale(width => 250, height => 188); $in->Write("png24:$file_out"); chmod 0755,$file_out or die "$! chmod 0755 $file_out"; From fc69fa0f96e64be7f3af4561f081808728e038ce Mon Sep 17 00:00:00 2001 From: fv3rdugo Date: Fri, 10 Nov 2017 10:07:55 +0100 Subject: [PATCH 097/170] [#459] Polish select Screenshot link to start Update bootstrap to 3.3.7 Add icons in select --- templates/bootstrap/header.html.ep | 2 +- templates/bootstrap/scripts.html.ep | 2 +- templates/main/list_bases2.html.ep | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/templates/bootstrap/header.html.ep b/templates/bootstrap/header.html.ep index c299e32ac..b9f42c163 100644 --- a/templates/bootstrap/header.html.ep +++ b/templates/bootstrap/header.html.ep @@ -9,7 +9,7 @@ % } Ravada VDI - + diff --git a/templates/bootstrap/scripts.html.ep b/templates/bootstrap/scripts.html.ep index 3f1d5eaf5..c848dc03b 100644 --- a/templates/bootstrap/scripts.html.ep +++ b/templates/bootstrap/scripts.html.ep @@ -1,6 +1,6 @@ - + diff --git a/templates/main/list_bases2.html.ep b/templates/main/list_bases2.html.ep index ce2377595..55b0b1840 100644 --- a/templates/main/list_bases2.html.ep +++ b/templates/main/list_bases2.html.ep @@ -24,7 +24,7 @@