Commit d6e2622b authored by Dietmar Maurer's avatar Dietmar Maurer

improve network API - add more gettext markers

parent 988f95ac
...@@ -106,7 +106,13 @@ __PACKAGE__->register_method({ ...@@ -106,7 +106,13 @@ __PACKAGE__->register_method({
code => sub { code => sub {
my ($param) = @_; my ($param) = @_;
my $config = PVE::INotify::read_file('interfaces'); my $rpcenv = PVE::RPCEnvironment::get();
my $tmp = PVE::INotify::read_file('interfaces', 1);
my $config = $tmp->{data};
my $changes = $tmp->{changes};
$rpcenv->set_result_attrib('changes', $changes) if $changes;
delete $config->{lo}; # do not list the loopback device delete $config->{lo}; # do not list the loopback device
...@@ -119,6 +125,30 @@ __PACKAGE__->register_method({ ...@@ -119,6 +125,30 @@ __PACKAGE__->register_method({
return PVE::RESTHandler::hash_to_array($config, 'iface'); return PVE::RESTHandler::hash_to_array($config, 'iface');
}}); }});
__PACKAGE__->register_method({
name => 'revert_network_changes',
path => '',
method => 'DELETE',
permissions => {
check => ['perm', '/nodes/{node}', [ 'Sys.Modify' ]],
},
protected => 1,
description => "Revert network configuration changes.",
proxyto => 'node',
parameters => {
additionalProperties => 0,
properties => {
node => get_standard_option('pve-node'),
},
},
returns => { type => "null" },
code => sub {
my ($param) = @_;
unlink "/etc/network/interfaces.new";
return undef;
}});
my $check_duplicate_gateway = sub { my $check_duplicate_gateway = sub {
my ($config, $newiface) = @_; my ($config, $newiface) = @_;
......
...@@ -112,7 +112,6 @@ __PACKAGE__->register_method ({ ...@@ -112,7 +112,6 @@ __PACKAGE__->register_method ({
{ name => 'vzdump' }, { name => 'vzdump' },
{ name => 'ubcfailcnt' }, { name => 'ubcfailcnt' },
{ name => 'network' }, { name => 'network' },
{ name => 'network_changes' },
{ name => 'aplinfo' }, { name => 'aplinfo' },
]; ];
...@@ -186,55 +185,6 @@ __PACKAGE__->register_method({ ...@@ -186,55 +185,6 @@ __PACKAGE__->register_method({
return $res; return $res;
}}); }});
__PACKAGE__->register_method({
name => 'network_changes',
path => 'network_changes',
method => 'GET',
permissions => {
check => ['perm', '/nodes/{node}', [ 'Sys.Audit' ]],
},
description => "Get network configuration changes (diff) since last boot.",
proxyto => 'node',
parameters => {
additionalProperties => 0,
properties => {
node => get_standard_option('pve-node'),
},
},
returns => { type => "string" },
code => sub {
my ($param) = @_;
my $res = PVE::INotify::read_file('interfaces', 1);
return $res->{changes} || '';
}});
__PACKAGE__->register_method({
name => 'revert_network_changes',
path => 'network_changes',
method => 'DELETE',
permissions => {
check => ['perm', '/nodes/{node}', [ 'Sys.Modify' ]],
},
protected => 1,
description => "Revert network configuration changes.",
proxyto => 'node',
parameters => {
additionalProperties => 0,
properties => {
node => get_standard_option('pve-node'),
},
},
returns => { type => "null" },
code => sub {
my ($param) = @_;
unlink "/etc/network/interfaces.new";
return undef;
}});
__PACKAGE__->register_method({ __PACKAGE__->register_method({
name => 'status', name => 'status',
path => 'status', path => 'status',
......
...@@ -7,8 +7,8 @@ msgid "" ...@@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: pve-manager 2.0\n" "Project-Id-Version: pve-manager 2.0\n"
"Report-Msgid-Bugs-To: <support@proxmox.com>\n" "Report-Msgid-Bugs-To: <support@proxmox.com>\n"
"POT-Creation-Date: Tue Feb 28 11:14:36 2012\n" "POT-Creation-Date: Wed Feb 29 12:33:40 2012\n"
"PO-Revision-Date: 2012-02-28 11:14+0100\n" "PO-Revision-Date: 2012-02-29 12:33+0100\n"
"Last-Translator: Proxmox Support Team <support@proxmox.com>\n" "Last-Translator: Proxmox Support Team <support@proxmox.com>\n"
"Language-Team: German\n" "Language-Team: German\n"
"Language: de\n" "Language: de\n"
...@@ -26,6 +26,7 @@ msgid "Activate" ...@@ -26,6 +26,7 @@ msgid "Activate"
msgstr "Aktivieren" msgstr "Aktivieren"
#: ../www/manager/form/BridgeSelector.js:46 #: ../www/manager/form/BridgeSelector.js:46
#: ../www/manager/node/NetworkView.js:199
#: ../www/manager/storage/StatusView.js:25 #: ../www/manager/storage/StatusView.js:25
msgid "Active" msgid "Active"
msgstr "Aktiv" msgstr "Aktiv"
...@@ -201,9 +202,10 @@ msgstr "Inhalt" ...@@ -201,9 +202,10 @@ msgstr "Inhalt"
msgid "Copy data" msgid "Copy data"
msgstr "Daten kopieren" msgstr "Daten kopieren"
#: ../www/manager/dc/UserView.js:140 ../www/manager/dc/PoolView.js:68 #: ../www/manager/node/NetworkView.js:121 ../www/manager/dc/UserView.js:140
#: ../www/manager/dc/GroupView.js:68 ../www/manager/Utils.js:376 #: ../www/manager/dc/PoolView.js:68 ../www/manager/dc/GroupView.js:68
#: ../www/manager/Utils.js:386 ../www/manager/Utils.js:729 #: ../www/manager/Utils.js:376 ../www/manager/Utils.js:386
#: ../www/manager/Utils.js:729
msgid "Create" msgid "Create"
msgstr "Erstellen" msgstr "Erstellen"
...@@ -306,12 +308,12 @@ msgid "Download" ...@@ -306,12 +308,12 @@ msgid "Download"
msgstr "Herunterladen" msgstr "Herunterladen"
#: ../www/manager/node/TimeView.js:43 ../www/manager/node/DNSView.js:32 #: ../www/manager/node/TimeView.js:43 ../www/manager/node/DNSView.js:32
#: ../www/manager/dc/StorageView.js:55 ../www/manager/dc/UserView.js:119 #: ../www/manager/node/NetworkView.js:66 ../www/manager/dc/StorageView.js:55
#: ../www/manager/dc/PoolView.js:60 ../www/manager/dc/Backup.js:350 #: ../www/manager/dc/UserView.js:119 ../www/manager/dc/PoolView.js:60
#: ../www/manager/dc/AuthView.js:42 ../www/manager/dc/GroupView.js:60 #: ../www/manager/dc/Backup.js:350 ../www/manager/dc/AuthView.js:42
#: ../www/manager/dc/OptionView.js:103 ../www/manager/dc/HAConfig.js:232 #: ../www/manager/dc/GroupView.js:60 ../www/manager/dc/OptionView.js:103
#: ../www/manager/Utils.js:732 ../www/manager/qemu/Options.js:228 #: ../www/manager/dc/HAConfig.js:232 ../www/manager/Utils.js:732
#: ../www/manager/qemu/HardwareView.js:188 #: ../www/manager/qemu/Options.js:228 ../www/manager/qemu/HardwareView.js:188
#: ../www/manager/openvz/Options.js:131 ../www/manager/openvz/DNS.js:100 #: ../www/manager/openvz/Options.js:131 ../www/manager/openvz/DNS.js:100
#: ../www/manager/openvz/Network.js:318 #: ../www/manager/openvz/Network.js:318
#: ../www/manager/openvz/RessourceView.js:86 #: ../www/manager/openvz/RessourceView.js:86
...@@ -343,6 +345,8 @@ msgstr "Bitte geben Sie Ihr Kennwort ein" ...@@ -343,6 +345,8 @@ msgstr "Bitte geben Sie Ihr Kennwort ein"
msgid "Enter your user name" msgid "Enter your user name"
msgstr "Bitte geben Sie Ihren Benutzernamen ein" msgstr "Bitte geben Sie Ihren Benutzernamen ein"
#: ../www/manager/node/NetworkView.js:175
#: ../www/manager/node/NetworkEdit.js:144
#: ../www/manager/grid/PoolMembers.js:133 ../www/manager/dc/ACLView.js:176 #: ../www/manager/grid/PoolMembers.js:133 ../www/manager/dc/ACLView.js:176
#: ../www/manager/dc/StorageView.js:78 ../www/manager/dc/UserView.js:99 #: ../www/manager/dc/StorageView.js:78 ../www/manager/dc/UserView.js:99
#: ../www/manager/dc/PoolView.js:40 ../www/manager/dc/Backup.js:370 #: ../www/manager/dc/PoolView.js:40 ../www/manager/dc/Backup.js:370
...@@ -453,6 +457,8 @@ msgstr "Laufwerk" ...@@ -453,6 +457,8 @@ msgstr "Laufwerk"
msgid "Hardware" msgid "Hardware"
msgstr "Hardware" msgstr "Hardware"
#: ../www/manager/node/NetworkView.js:223
#: ../www/manager/node/NetworkEdit.js:86
#: ../www/manager/openvz/CreateWizard.js:176 #: ../www/manager/openvz/CreateWizard.js:176
#: ../www/manager/openvz/Network.js:137 ../www/manager/openvz/Network.js:143 #: ../www/manager/openvz/Network.js:137 ../www/manager/openvz/Network.js:143
#: ../www/manager/openvz/Network.js:160 ../www/manager/openvz/Network.js:338 #: ../www/manager/openvz/Network.js:160 ../www/manager/openvz/Network.js:338
...@@ -550,14 +556,16 @@ msgstr "Mount" ...@@ -550,14 +556,16 @@ msgstr "Mount"
#: ../www/manager/data/ResourceStore.js:97 #: ../www/manager/data/ResourceStore.js:97
#: ../www/manager/node/ServiceView.js:118 #: ../www/manager/node/ServiceView.js:118
#: ../www/manager/grid/BackupView.js:156 ../www/manager/dc/UserView.js:204 #: ../www/manager/node/NetworkView.js:192
#: ../www/manager/dc/PoolView.js:90 ../www/manager/dc/Backup.js:100 #: ../www/manager/node/NetworkEdit.js:76 ../www/manager/grid/BackupView.js:156
#: ../www/manager/dc/RoleView.js:40 ../www/manager/dc/GroupEdit.js:28 #: ../www/manager/dc/UserView.js:204 ../www/manager/dc/PoolView.js:90
#: ../www/manager/dc/GroupView.js:90 ../www/manager/dc/Summary.js:30 #: ../www/manager/dc/Backup.js:100 ../www/manager/dc/RoleView.js:40
#: ../www/manager/dc/Summary.js:141 ../www/manager/dc/PoolEdit.js:28 #: ../www/manager/dc/GroupEdit.js:28 ../www/manager/dc/GroupView.js:90
#: ../www/manager/storage/ContentView.js:451 ../www/manager/qemu/Options.js:24 #: ../www/manager/dc/Summary.js:30 ../www/manager/dc/Summary.js:141
#: ../www/manager/qemu/Options.js:27 ../www/manager/qemu/Options.js:32 #: ../www/manager/dc/PoolEdit.js:28 ../www/manager/storage/ContentView.js:451
#: ../www/manager/qemu/StatusView.js:43 ../www/manager/qemu/CreateWizard.js:69 #: ../www/manager/qemu/Options.js:24 ../www/manager/qemu/Options.js:27
#: ../www/manager/qemu/Options.js:32 ../www/manager/qemu/StatusView.js:43
#: ../www/manager/qemu/CreateWizard.js:69
#: ../www/manager/openvz/StatusView.js:64 ../www/manager/openvz/Network.js:58 #: ../www/manager/openvz/StatusView.js:64 ../www/manager/openvz/Network.js:58
msgid "Name" msgid "Name"
msgstr "Name" msgstr "Name"
...@@ -588,6 +596,10 @@ msgstr "Nein" ...@@ -588,6 +596,10 @@ msgstr "Nein"
msgid "No backup" msgid "No backup"
msgstr "Kein Backup" msgstr "Kein Backup"
#: ../www/manager/node/NetworkView.js:255
msgid "No changes"
msgstr "Keine Änderungen"
#: ../www/manager/storage/IScsiEdit.js:126 #: ../www/manager/storage/IScsiEdit.js:126
#: ../www/manager/storage/LVMEdit.js:186 ../www/manager/storage/DirEdit.js:73 #: ../www/manager/storage/LVMEdit.js:186 ../www/manager/storage/DirEdit.js:73
#: ../www/manager/storage/NFSEdit.js:134 #: ../www/manager/storage/NFSEdit.js:134
...@@ -667,7 +679,7 @@ msgstr "Kennwörter stimmen nicht überein" ...@@ -667,7 +679,7 @@ msgstr "Kennwörter stimmen nicht überein"
msgid "Path" msgid "Path"
msgstr "Pfad" msgstr "Pfad"
#: ../www/manager/dc/HAConfig.js:266 #: ../www/manager/node/NetworkView.js:249 ../www/manager/dc/HAConfig.js:266
msgid "Pending changes" msgid "Pending changes"
msgstr "Ausstehende Änderungen" msgstr "Ausstehende Änderungen"
...@@ -677,6 +689,10 @@ msgstr "Ausstehende Änderungen" ...@@ -677,6 +689,10 @@ msgstr "Ausstehende Änderungen"
msgid "Permissions" msgid "Permissions"
msgstr "Rechte" msgstr "Rechte"
#: ../www/manager/node/NetworkView.js:250
msgid "Please reboot to activate changes"
msgstr "Um die Änderungen zu aktivieren müssen Sie den Rechner neu starten"
#: ../www/manager/Utils.js:295 ../www/manager/window/LoginWindow.js:11 #: ../www/manager/Utils.js:295 ../www/manager/window/LoginWindow.js:11
#: ../www/manager/window/LoginWindow.js:112 #: ../www/manager/window/LoginWindow.js:112
msgid "Please wait..." msgid "Please wait..."
...@@ -728,7 +744,7 @@ msgstr "Aktualisieren" ...@@ -728,7 +744,7 @@ msgstr "Aktualisieren"
msgid "Reload" msgid "Reload"
msgstr "Neu laden" msgstr "Neu laden"
#: ../www/manager/grid/BackupView.js:116 #: ../www/manager/node/NetworkView.js:72 ../www/manager/grid/BackupView.js:116
#: ../www/manager/grid/PoolMembers.js:107 ../www/manager/dc/ACLView.js:149 #: ../www/manager/grid/PoolMembers.js:107 ../www/manager/dc/ACLView.js:149
#: ../www/manager/dc/StorageView.js:62 ../www/manager/dc/UserView.js:78 #: ../www/manager/dc/StorageView.js:62 ../www/manager/dc/UserView.js:78
#: ../www/manager/dc/PoolView.js:24 ../www/manager/dc/Backup.js:357 #: ../www/manager/dc/PoolView.js:24 ../www/manager/dc/Backup.js:357
...@@ -775,7 +791,7 @@ msgstr "Zurückspielen" ...@@ -775,7 +791,7 @@ msgstr "Zurückspielen"
msgid "Resume" msgid "Resume"
msgstr "Resume" msgstr "Resume"
#: ../www/manager/dc/HAConfig.js:145 #: ../www/manager/node/NetworkView.js:165 ../www/manager/dc/HAConfig.js:145
msgid "Revert changes" msgid "Revert changes"
msgstr "Änderungen zurücksetzen" msgstr "Änderungen zurücksetzen"
...@@ -938,6 +954,11 @@ msgstr "Storage-Liste" ...@@ -938,6 +954,11 @@ msgstr "Storage-Liste"
msgid "Storage {0} on node {1}" msgid "Storage {0} on node {1}"
msgstr "Storage {0} auf Knoten {1}" msgstr "Storage {0} auf Knoten {1}"
#: ../www/manager/node/NetworkView.js:228
#: ../www/manager/node/NetworkEdit.js:93
msgid "Subnet mask"
msgstr "Netzmaske"
#: ../www/manager/Utils.js:248 #: ../www/manager/Utils.js:248
msgid "Successful" msgid "Successful"
msgstr "Erfolgreich" msgstr "Erfolgreich"
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: pve-manager 2.0\n" "Project-Id-Version: pve-manager 2.0\n"
"Report-Msgid-Bugs-To: <support@proxmox.com>\n" "Report-Msgid-Bugs-To: <support@proxmox.com>\n"
"POT-Creation-Date: Tue Feb 28 11:14:36 2012\n" "POT-Creation-Date: Wed Feb 29 12:33:40 2012\n"
"PO-Revision-Date: 2011-12-08 07:14+0100\n" "PO-Revision-Date: 2011-12-08 07:14+0100\n"
"Last-Translator: Koichi MATSUMOTO <mzch@mac.com>\n" "Last-Translator: Koichi MATSUMOTO <mzch@mac.com>\n"
"Language-Team: Japanese <support@proxmox.com>\n" "Language-Team: Japanese <support@proxmox.com>\n"
...@@ -27,6 +27,7 @@ msgid "Activate" ...@@ -27,6 +27,7 @@ msgid "Activate"
msgstr "稼働中" msgstr "稼働中"
#: ../www/manager/form/BridgeSelector.js:46 #: ../www/manager/form/BridgeSelector.js:46
#: ../www/manager/node/NetworkView.js:199
#: ../www/manager/storage/StatusView.js:25 #: ../www/manager/storage/StatusView.js:25
msgid "Active" msgid "Active"
msgstr "稼働中" msgstr "稼働中"
...@@ -210,9 +211,10 @@ msgstr "内容" ...@@ -210,9 +211,10 @@ msgstr "内容"
msgid "Copy data" msgid "Copy data"
msgstr "" msgstr ""
#: ../www/manager/dc/UserView.js:140 ../www/manager/dc/PoolView.js:68 #: ../www/manager/node/NetworkView.js:121 ../www/manager/dc/UserView.js:140
#: ../www/manager/dc/GroupView.js:68 ../www/manager/Utils.js:376 #: ../www/manager/dc/PoolView.js:68 ../www/manager/dc/GroupView.js:68
#: ../www/manager/Utils.js:386 ../www/manager/Utils.js:729 #: ../www/manager/Utils.js:376 ../www/manager/Utils.js:386
#: ../www/manager/Utils.js:729
msgid "Create" msgid "Create"
msgstr "作成" msgstr "作成"
...@@ -316,12 +318,12 @@ msgid "Download" ...@@ -316,12 +318,12 @@ msgid "Download"
msgstr "" msgstr ""
#: ../www/manager/node/TimeView.js:43 ../www/manager/node/DNSView.js:32 #: ../www/manager/node/TimeView.js:43 ../www/manager/node/DNSView.js:32
#: ../www/manager/dc/StorageView.js:55 ../www/manager/dc/UserView.js:119 #: ../www/manager/node/NetworkView.js:66 ../www/manager/dc/StorageView.js:55
#: ../www/manager/dc/PoolView.js:60 ../www/manager/dc/Backup.js:350 #: ../www/manager/dc/UserView.js:119 ../www/manager/dc/PoolView.js:60
#: ../www/manager/dc/AuthView.js:42 ../www/manager/dc/GroupView.js:60 #: ../www/manager/dc/Backup.js:350 ../www/manager/dc/AuthView.js:42
#: ../www/manager/dc/OptionView.js:103 ../www/manager/dc/HAConfig.js:232 #: ../www/manager/dc/GroupView.js:60 ../www/manager/dc/OptionView.js:103
#: ../www/manager/Utils.js:732 ../www/manager/qemu/Options.js:228 #: ../www/manager/dc/HAConfig.js:232 ../www/manager/Utils.js:732
#: ../www/manager/qemu/HardwareView.js:188 #: ../www/manager/qemu/Options.js:228 ../www/manager/qemu/HardwareView.js:188
#: ../www/manager/openvz/Options.js:131 ../www/manager/openvz/DNS.js:100 #: ../www/manager/openvz/Options.js:131 ../www/manager/openvz/DNS.js:100
#: ../www/manager/openvz/Network.js:318 #: ../www/manager/openvz/Network.js:318
#: ../www/manager/openvz/RessourceView.js:86 #: ../www/manager/openvz/RessourceView.js:86
...@@ -353,6 +355,8 @@ msgstr "パスワードを入力して下さい" ...@@ -353,6 +355,8 @@ msgstr "パスワードを入力して下さい"
msgid "Enter your user name" msgid "Enter your user name"
msgstr "ユーザー名を入力して下さい" msgstr "ユーザー名を入力して下さい"
#: ../www/manager/node/NetworkView.js:175
#: ../www/manager/node/NetworkEdit.js:144
#: ../www/manager/grid/PoolMembers.js:133 ../www/manager/dc/ACLView.js:176 #: ../www/manager/grid/PoolMembers.js:133 ../www/manager/dc/ACLView.js:176
#: ../www/manager/dc/StorageView.js:78 ../www/manager/dc/UserView.js:99 #: ../www/manager/dc/StorageView.js:78 ../www/manager/dc/UserView.js:99
#: ../www/manager/dc/PoolView.js:40 ../www/manager/dc/Backup.js:370 #: ../www/manager/dc/PoolView.js:40 ../www/manager/dc/Backup.js:370
...@@ -466,6 +470,8 @@ msgstr "ハードディスク" ...@@ -466,6 +470,8 @@ msgstr "ハードディスク"
msgid "Hardware" msgid "Hardware"
msgstr "ハードウェア" msgstr "ハードウェア"
#: ../www/manager/node/NetworkView.js:223
#: ../www/manager/node/NetworkEdit.js:86
#: ../www/manager/openvz/CreateWizard.js:176 #: ../www/manager/openvz/CreateWizard.js:176
#: ../www/manager/openvz/Network.js:137 ../www/manager/openvz/Network.js:143 #: ../www/manager/openvz/Network.js:137 ../www/manager/openvz/Network.js:143
#: ../www/manager/openvz/Network.js:160 ../www/manager/openvz/Network.js:338 #: ../www/manager/openvz/Network.js:160 ../www/manager/openvz/Network.js:338
...@@ -565,14 +571,16 @@ msgstr "" ...@@ -565,14 +571,16 @@ msgstr ""
#: ../www/manager/data/ResourceStore.js:97 #: ../www/manager/data/ResourceStore.js:97
#: ../www/manager/node/ServiceView.js:118 #: ../www/manager/node/ServiceView.js:118
#: ../www/manager/grid/BackupView.js:156 ../www/manager/dc/UserView.js:204 #: ../www/manager/node/NetworkView.js:192
#: ../www/manager/dc/PoolView.js:90 ../www/manager/dc/Backup.js:100 #: ../www/manager/node/NetworkEdit.js:76 ../www/manager/grid/BackupView.js:156
#: ../www/manager/dc/RoleView.js:40 ../www/manager/dc/GroupEdit.js:28 #: ../www/manager/dc/UserView.js:204 ../www/manager/dc/PoolView.js:90
#: ../www/manager/dc/GroupView.js:90 ../www/manager/dc/Summary.js:30 #: ../www/manager/dc/Backup.js:100 ../www/manager/dc/RoleView.js:40
#: ../www/manager/dc/Summary.js:141 ../www/manager/dc/PoolEdit.js:28 #: ../www/manager/dc/GroupEdit.js:28 ../www/manager/dc/GroupView.js:90
#: ../www/manager/storage/ContentView.js:451 ../www/manager/qemu/Options.js:24 #: ../www/manager/dc/Summary.js:30 ../www/manager/dc/Summary.js:141
#: ../www/manager/qemu/Options.js:27 ../www/manager/qemu/Options.js:32 #: ../www/manager/dc/PoolEdit.js:28 ../www/manager/storage/ContentView.js:451
#: ../www/manager/qemu/StatusView.js:43 ../www/manager/qemu/CreateWizard.js:69 #: ../www/manager/qemu/Options.js:24 ../www/manager/qemu/Options.js:27
#: ../www/manager/qemu/Options.js:32 ../www/manager/qemu/StatusView.js:43
#: ../www/manager/qemu/CreateWizard.js:69
#: ../www/manager/openvz/StatusView.js:64 ../www/manager/openvz/Network.js:58 #: ../www/manager/openvz/StatusView.js:64 ../www/manager/openvz/Network.js:58
msgid "Name" msgid "Name"
msgstr "名前" msgstr "名前"
...@@ -603,6 +611,11 @@ msgstr "いいえ" ...@@ -603,6 +611,11 @@ msgstr "いいえ"
msgid "No backup" msgid "No backup"
msgstr "バックアップなし" msgstr "バックアップなし"
#: ../www/manager/node/NetworkView.js:255
#, fuzzy
msgid "No changes"
msgstr "元に戻す"
#: ../www/manager/storage/IScsiEdit.js:126 #: ../www/manager/storage/IScsiEdit.js:126
#: ../www/manager/storage/LVMEdit.js:186 ../www/manager/storage/DirEdit.js:73 #: ../www/manager/storage/LVMEdit.js:186 ../www/manager/storage/DirEdit.js:73
#: ../www/manager/storage/NFSEdit.js:134 #: ../www/manager/storage/NFSEdit.js:134
...@@ -684,7 +697,7 @@ msgstr "パスワードが一致しません!" ...@@ -684,7 +697,7 @@ msgstr "パスワードが一致しません!"
msgid "Path" msgid "Path"
msgstr "パス" msgstr "パス"
#: ../www/manager/dc/HAConfig.js:266 #: ../www/manager/node/NetworkView.js:249 ../www/manager/dc/HAConfig.js:266
#, fuzzy #, fuzzy
msgid "Pending changes" msgid "Pending changes"
msgstr "変更はありません" msgstr "変更はありません"
...@@ -695,6 +708,11 @@ msgstr "変更はありません" ...@@ -695,6 +708,11 @@ msgstr "変更はありません"
msgid "Permissions" msgid "Permissions"
msgstr "アクセス権限" msgstr "アクセス権限"
#: ../www/manager/node/NetworkView.js:250
#, fuzzy
msgid "Please reboot to activate changes"
msgstr "保留中の変更 (変更はリブートすると有効になります)"
#: ../www/manager/Utils.js:295 ../www/manager/window/LoginWindow.js:11 #: ../www/manager/Utils.js:295 ../www/manager/window/LoginWindow.js:11
#: ../www/manager/window/LoginWindow.js:112 #: ../www/manager/window/LoginWindow.js:112
msgid "Please wait..." msgid "Please wait..."
...@@ -747,7 +765,7 @@ msgstr "再表示" ...@@ -747,7 +765,7 @@ msgstr "再表示"
msgid "Reload" msgid "Reload"
msgstr "再読込" msgstr "再読込"
#: ../www/manager/grid/BackupView.js:116 #: ../www/manager/node/NetworkView.js:72 ../www/manager/grid/BackupView.js:116
#: ../www/manager/grid/PoolMembers.js:107 ../www/manager/dc/ACLView.js:149 #: ../www/manager/grid/PoolMembers.js:107 ../www/manager/dc/ACLView.js:149
#: ../www/manager/dc/StorageView.js:62 ../www/manager/dc/UserView.js:78 #: ../www/manager/dc/StorageView.js:62 ../www/manager/dc/UserView.js:78
#: ../www/manager/dc/PoolView.js:24 ../www/manager/dc/Backup.js:357 #: ../www/manager/dc/PoolView.js:24 ../www/manager/dc/Backup.js:357
...@@ -796,7 +814,7 @@ msgstr "リストア" ...@@ -796,7 +814,7 @@ msgstr "リストア"
msgid "Resume" msgid "Resume"
msgstr "再開" msgstr "再開"
#: ../www/manager/dc/HAConfig.js:145 #: ../www/manager/node/NetworkView.js:165 ../www/manager/dc/HAConfig.js:145
msgid "Revert changes" msgid "Revert changes"
msgstr "元に戻す" msgstr "元に戻す"
...@@ -959,6 +977,11 @@ msgstr "ストレージリスト" ...@@ -959,6 +977,11 @@ msgstr "ストレージリスト"
msgid "Storage {0} on node {1}" msgid "Storage {0} on node {1}"
msgstr "ノード {1} 上のストレージ {0}" msgstr "ノード {1} 上のストレージ {0}"
#: ../www/manager/node/NetworkView.js:228
#: ../www/manager/node/NetworkEdit.js:93
msgid "Subnet mask"
msgstr "サブネットマスク"
#: ../www/manager/Utils.js:248 #: ../www/manager/Utils.js:248
msgid "Successful" msgid "Successful"
msgstr "正常終了" msgstr "正常終了"
...@@ -1875,9 +1898,6 @@ msgstr "停止中" ...@@ -1875,9 +1898,6 @@ msgstr "停止中"
#~ msgid "Path/Target" #~ msgid "Path/Target"
#~ msgstr "パス/ターゲット" #~ msgstr "パス/ターゲット"
#~ msgid "Pending changes (please reboot to activate changes)"
#~ msgstr "保留中の変更 (変更はリブートすると有効になります)"
#~ msgid "Polish" #~ msgid "Polish"
#~ msgstr "ポーランド語" #~ msgstr "ポーランド語"
...@@ -2069,9 +2089,6 @@ msgstr "停止中" ...@@ -2069,9 +2089,6 @@ msgstr "停止中"
#~ msgid "Storage ID" #~ msgid "Storage ID"
#~ msgstr "ストレージ ID" #~ msgstr "ストレージ ID"
#~ msgid "Subnet mask"
#~ msgstr "サブネットマスク"
#~ msgid "Subnet mask requires option 'IP address'" #~ msgid "Subnet mask requires option 'IP address'"
#~ msgstr "" #~ msgstr ""
#~ "サブネットマスクを指定する場合は 'IP アドレス' オプションも入力して下さい" #~ "サブネットマスクを指定する場合は 'IP アドレス' オプションも入力して下さい"
......
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: pve-manager 2.0\n" "Project-Id-Version: pve-manager 2.0\n"
"Report-Msgid-Bugs-To: <support@proxmox.com>\n" "Report-Msgid-Bugs-To: <support@proxmox.com>\n"
"POT-Creation-Date: Tue Feb 28 11:14:36 2012\n" "POT-Creation-Date: Wed Feb 29 12:33:40 2012\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <support@proxmox.com>\n" "Language-Team: LANGUAGE <support@proxmox.com>\n"
...@@ -24,7 +24,7 @@ msgstr "" ...@@ -24,7 +24,7 @@ msgstr ""
msgid "Activate" msgid "Activate"
msgstr "" msgstr ""
#: ../www/manager/form/BridgeSelector.js:46 ../www/manager/storage/StatusView.js:25 #: ../www/manager/form/BridgeSelector.js:46 ../www/manager/node/NetworkView.js:199 ../www/manager/storage/StatusView.js:25
msgid "Active" msgid "Active"
msgstr "" msgstr ""
...@@ -156,7 +156,7 @@ msgstr "" ...@@ -156,7 +156,7 @@ msgstr ""
msgid "Copy data" msgid "Copy data"
msgstr "" msgstr ""
#: ../www/manager/dc/UserView.js:140 ../www/manager/dc/PoolView.js:68 ../www/manager/dc/GroupView.js:68 ../www/manager/Utils.js:376 ../www/manager/Utils.js:386 ../www/manager/Utils.js:729 #: ../www/manager/node/NetworkView.js:121 ../www/manager/dc/UserView.js:140 ../www/manager/dc/PoolView.js:68 ../www/manager/dc/GroupView.js:68 ../www/manager/Utils.js:376 ../www/manager/Utils.js:386 ../www/manager/Utils.js:729
msgid "Create" msgid "Create"
msgstr "" msgstr ""
...@@ -244,7 +244,7 @@ msgstr "" ...@@ -244,7 +244,7 @@ msgstr ""
msgid "Download" msgid "Download"
msgstr "" msgstr ""
#: ../www/manager/node/TimeView.js:43 ../www/manager/node/DNSView.js:32 ../www/manager/dc/StorageView.js:55 ../www/manager/dc/UserView.js:119 ../www/manager/dc/PoolView.js:60 ../www/manager/dc/Backup.js:350 ../www/manager/dc/AuthView.js:42 ../www/manager/dc/GroupView.js:60 ../www/manager/dc/OptionView.js:103 ../www/manager/dc/HAConfig.js:232 ../www/manager/Utils.js:732 ../www/manager/qemu/Options.js:228 ../www/manager/qemu/HardwareView.js:188 ../www/manager/openvz/Options.js:131 ../www/manager/openvz/DNS.js:100 ../www/manager/openvz/Network.js:318 ../www/manager/openvz/RessourceView.js:86 #: ../www/manager/node/TimeView.js:43 ../www/manager/node/DNSView.js:32 ../www/manager/node/NetworkView.js:66 ../www/manager/dc/StorageView.js:55 ../www/manager/dc/UserView.js:119 ../www/manager/dc/PoolView.js:60 ../www/manager/dc/Backup.js:350 ../www/manager/dc/AuthView.js:42 ../www/manager/dc/GroupView.js:60 ../www/manager/dc/OptionView.js:103 ../www/manager/dc/HAConfig.js:232 ../www/manager/Utils.js:732 ../www/manager/qemu/Options.js:228 ../www/manager/qemu/HardwareView.js:188 ../www/manager/openvz/Options.js:131 ../www/manager/openvz/DNS.js:100 ../www/manager/openvz/Network.js:318 ../www/manager/openvz/RessourceView.js:86
msgid "Edit" msgid "Edit"
msgstr "" msgstr ""
...@@ -268,7 +268,7 @@ msgstr "" ...@@ -268,7 +268,7 @@ msgstr ""
msgid "Enter your user name" msgid "Enter your user name"
msgstr "" msgstr ""
#: ../www/manager/grid/PoolMembers.js:133 ../www/manager/dc/ACLView.js:176 ../www/manager/dc/StorageView.js:78 ../www/manager/dc/UserView.js:99 ../www/manager/dc/PoolView.js:40 ../www/manager/dc/Backup.js:370 ../www/manager/dc/AuthView.js:73 ../www/manager/dc/GroupView.js:40 ../www/manager/dc/HAConfig.js:138 ../www/manager/dc/HAConfig.js:159 ../www/manager/dc/HAConfig.js:181 ../www/manager/dc/HAConfig.js:252 ../www/manager/Utils.js:544 ../www/manager/storage/ContentView.js:217 ../www/manager/storage/ContentView.js:272 ../www/manager/storage/ContentView.js:281 ../www/manager/storage/ContentView.js:421 ../www/manager/qemu/CreateWizard.js:159 ../www/manager/VNCConsole.js:177 ../www/manager/window/LoginWindow.js:16 ../www/manager/window/Edit.js:94 ../www/manager/window/Edit.js:131 ../www/manager/openvz/CreateWizard.js:313 ../www/manager/openvz/Network.js:194 ../www/manager/openvz/Network.js:295 #: ../www/manager/node/NetworkView.js:175 ../www/manager/node/NetworkEdit.js:144 ../www/manager/grid/PoolMembers.js:133 ../www/manager/dc/ACLView.js:176 ../www/manager/dc/StorageView.js:78 ../www/manager/dc/UserView.js:99 ../www/manager/dc/PoolView.js:40 ../www/manager/dc/Backup.js:370 ../www/manager/dc/AuthView.js:73 ../www/manager/dc/GroupView.js:40 ../www/manager/dc/HAConfig.js:138 ../www/manager/dc/HAConfig.js:159 ../www/manager/dc/HAConfig.js:181 ../www/manager/dc/HAConfig.js:252 ../www/manager/Utils.js:544 ../www/manager/storage/ContentView.js:217 ../www/manager/storage/ContentView.js:272 ../www/manager/storage/ContentView.js:281 ../www/manager/storage/ContentView.js:421 ../www/manager/qemu/CreateWizard.js:159 ../www/manager/VNCConsole.js:177 ../www/manager/window/LoginWindow.js:16 ../www/manager/window/Edit.js:94 ../www/manager/window/Edit.js:131 ../www/manager/openvz/CreateWizard.js:313 ../www/manager/openvz/Network.js:194 ../www/manager/openvz/Network.js:295
msgid "Error" msgid "Error"
msgstr "" msgstr ""
...@@ -356,7 +356,7 @@ msgstr "" ...@@ -356,7 +356,7 @@ msgstr ""
msgid "Hardware" msgid "Hardware"
msgstr "" msgstr ""
#: ../www/manager/openvz/CreateWizard.js:176 ../www/manager/openvz/Network.js:137 ../www/manager/openvz/Network.js:143 ../www/manager/openvz/Network.js:160 ../www/manager/openvz/Network.js:338 ../www/manager/openvz/Network.js:379 #: ../www/manager/node/NetworkView.js:223 ../www/manager/node/NetworkEdit.js:86 ../www/manager/openvz/CreateWizard.js:176 ../www/manager/openvz/Network.js:137 ../www/manager/openvz/Network.js:143 ../www/manager/openvz/Network.js:160 ../www/manager/openvz/Network.js:338 ../www/manager/openvz/Network.js:379
msgid "IP address" msgid "IP address"
msgstr "" msgstr ""
...@@ -440,7 +440,7 @@ msgstr "" ...@@ -440,7 +440,7 @@ msgstr ""
msgid "Mount" msgid "Mount"
msgstr "" msgstr ""
#: ../www/manager/data/ResourceStore.js:97 ../www/manager/node/ServiceView.js:118 ../www/manager/grid/BackupView.js:156 ../www/manager/dc/UserView.js:204 ../www/manager/dc/PoolView.js:90 ../www/manager/dc/Backup.js:100 ../www/manager/dc/RoleView.js:40 ../www/manager/dc/GroupEdit.js:28 ../www/manager/dc/GroupView.js:90 ../www/manager/dc/Summary.js:30 ../www/manager/dc/Summary.js:141 ../www/manager/dc/PoolEdit.js:28 ../www/manager/storage/ContentView.js:451 ../www/manager/qemu/Options.js:24 ../www/manager/qemu/Options.js:27 ../www/manager/qemu/Options.js:32 ../www/manager/qemu/StatusView.js:43 ../www/manager/qemu/CreateWizard.js:69 ../www/manager/openvz/StatusView.js:64 ../www/manager/openvz/Network.js:58 #: ../www/manager/data/ResourceStore.js:97 ../www/manager/node/ServiceView.js:118 ../www/manager/node/NetworkView.js:192 ../www/manager/node/NetworkEdit.js:76 ../www/manager/grid/BackupView.js:156 ../www/manager/dc/UserView.js:204 ../www/manager/dc/PoolView.js:90 ../www/manager/dc/Backup.js:100 ../www/manager/dc/RoleView.js:40 ../www/manager/dc/GroupEdit.js:28 ../www/manager/dc/GroupView.js:90 ../www/manager/dc/Summary.js:30 ../www/manager/dc/Summary.js:141 ../www/manager/dc/PoolEdit.js:28 ../www/manager/storage/ContentView.js:451 ../www/manager/qemu/Options.js:24 ../www/manager/qemu/Options.js:27 ../www/manager/qemu/Options.js:32 ../www/manager/qemu/StatusView.js:43 ../www/manager/qemu/CreateWizard.js:69 ../www/manager/openvz/StatusView.js:64 ../www/manager/openvz/Network.js:58
msgid "Name" msgid "Name"
msgstr "" msgstr ""
...@@ -464,6 +464,10 @@ msgstr "" ...@@ -464,6 +464,10 @@ msgstr ""
msgid "No backup" msgid "No backup"
msgstr "" msgstr ""
#: ../www/manager/node/NetworkView.js:255
msgid "No changes"
msgstr ""
#: ../www/manager/storage/IScsiEdit.js:126 ../www/manager/storage/LVMEdit.js:186 ../www/manager/storage/DirEdit.js:73 ../www/manager/storage/NFSEdit.js:134 #: ../www/manager/storage/IScsiEdit.js:126 ../www/manager/storage/LVMEdit.js:186 ../www/manager/storage/DirEdit.js:73 ../www/manager/storage/NFSEdit.js:134
msgid "No restrictions" msgid "No restrictions"
msgstr "" msgstr ""
...@@ -528,7 +532,7 @@ msgstr "" ...@@ -528,7 +532,7 @@ msgstr ""
msgid "Path" msgid "Path"
msgstr "" msgstr ""
#: ../www/manager/dc/HAConfig.js:266 #: ../www/manager/node/NetworkView.js:249 ../www/manager/dc/HAConfig.js:266
msgid "Pending changes" msgid "Pending changes"
msgstr "" msgstr ""
...@@ -536,6 +540,10 @@ msgstr "" ...@@ -536,6 +540,10 @@ msgstr ""
msgid "Permissions" msgid "Permissions"
msgstr "" msgstr ""
#: ../www/manager/node/NetworkView.js:250
msgid "Please reboot to activate changes"
msgstr ""
#: ../www/manager/Utils.js:295 ../www/manager/window/LoginWindow.js:11 ../www/manager/window/LoginWindow.js:112 #: ../www/manager/Utils.js:295 ../www/manager/window/LoginWindow.js:11 ../www/manager/window/LoginWindow.js:112
msgid "Please wait..." msgid "Please wait..."
msgstr "" msgstr ""
...@@ -580,7 +588,7 @@ msgstr "" ...@@ -580,7 +588,7 @@ msgstr ""
msgid "Reload" msgid "Reload"
msgstr "" msgstr ""
#: ../www/manager/grid/BackupView.js:116 ../www/manager/grid/PoolMembers.js:107 ../www/manager/dc/ACLView.js:149 ../www/manager/dc/StorageView.js:62 ../www/manager/dc/UserView.js:78 ../www/manager/dc/PoolView.js:24 ../www/manager/dc/Backup.js:357 ../www/manager/dc/AuthView.js:52 ../www/manager/dc/GroupView.js:24 ../www/manager/dc/HAConfig.js:238 ../www/manager/storage/ContentView.js:402 ../www/manager/qemu/Config.js:79 ../www/manager/qemu/HardwareView.js:202 ../www/manager/openvz/Config.js:80 ../www/manager/openvz/Network.js:254 #: ../www/manager/node/NetworkView.js:72 ../www/manager/grid/BackupView.js:116 ../www/manager/grid/PoolMembers.js:107 ../www/manager/dc/ACLView.js:149 ../www/manager/dc/StorageView.js:62 ../www/manager/dc/UserView.js:78 ../www/manager/dc/PoolView.js:24 ../www/manager/dc/Backup.js:357 ../www/manager/dc/AuthView.js:52 ../www/manager/dc/GroupView.js:24 ../www/manager/dc/HAConfig.js:238 ../www/manager/storage/ContentView.js:402 ../www/manager/qemu/Config.js:79 ../www/manager/qemu/HardwareView.js:202 ../www/manager/openvz/Config.js:80 ../www/manager/openvz/Network.js:254
msgid "Remove" msgid "Remove"
msgstr "" msgstr ""
...@@ -612,7 +620,7 @@ msgstr "" ...@@ -612,7 +620,7 @@ msgstr ""
msgid "Resume" msgid "Resume"
msgstr "" msgstr ""
#: ../www/manager/dc/HAConfig.js:145 #: ../www/manager/node/NetworkView.js:165 ../www/manager/dc/HAConfig.js:145
msgid "Revert changes" msgid "Revert changes"
msgstr "" msgstr ""
...@@ -736,6 +744,10 @@ msgstr "" ...@@ -736,6 +744,10 @@ msgstr ""
msgid "Storage {0} on node {1}" msgid "Storage {0} on node {1}"
msgstr "" msgstr ""
#: ../www/manager/node/NetworkView.js:228 ../www/manager/node/NetworkEdit.js:93
msgid "Subnet mask"
msgstr ""
#: ../www/manager/Utils.js:248 #: ../www/manager/Utils.js:248
msgid "Successful" msgid "Successful"
msgstr "" msgstr ""
......
...@@ -16,21 +16,16 @@ Ext.define('PVE.node.NetworkEdit', { ...@@ -16,21 +16,16 @@ Ext.define('PVE.node.NetworkEdit', {
me.create = !me.iface; me.create = !me.iface;
var title;
var iface_vtype; var iface_vtype;
if (me.create) { if (me.iftype === 'bridge') {
if (me.iftype === 'bridge') { me.subject = "Bridge";
title = "Create Bridge"; iface_vtype = 'BridgeName';
iface_vtype = 'BridgeName'; } else if (me.iftype === 'bond') {
} else if (me.iftype === 'bond') { me.subject = "Bond";
title = "Create Bond"; iface_vtype = 'BondName';
iface_vtype = 'BondName';
} else {
throw "can't create unknown device type";
}
} else { } else {
title = "Edit network device '" + me.iface + "'"; throw "no known network device type specified";
} }
var column2 = [ var column2 = [
...@@ -78,7 +73,7 @@ Ext.define('PVE.node.NetworkEdit', { ...@@ -78,7 +73,7 @@ Ext.define('PVE.node.NetworkEdit', {
var column1 = [ var column1 = [
{ {
xtype: me.create ? 'textfield' : 'displayfield', xtype: me.create ? 'textfield' : 'displayfield',
fieldLabel: 'Name', fieldLabel: gettext('Name'),
height: 22, // hack: set same height as text fields height: 22, // hack: set same height as text fields
name: 'iface', name: 'iface',
value: me.iface, value: me.iface,
...@@ -88,14 +83,14 @@ Ext.define('PVE.node.NetworkEdit', { ...@@ -88,14 +83,14 @@ Ext.define('PVE.node.NetworkEdit', {
{ {
xtype: 'pvetextfield', xtype: 'pvetextfield',
deleteEmpty: !me.create, deleteEmpty: !me.create,
fieldLabel: 'IP address', fieldLabel: gettext('IP address'),
vtype: 'IPAddress', vtype: 'IPAddress',
name: 'address' name: 'address'
}, },
{ {
xtype: 'pvetextfield', xtype: 'pvetextfield',
deleteEmpty: !me.create, deleteEmpty: !me.create,
fieldLabel: 'Subnet mask', fieldLabel: gettext('Subnet mask'),
vtype: 'IPAddress', vtype: 'IPAddress',
name: 'netmask', name: 'netmask',
validator: function(value) { validator: function(value) {
...@@ -127,7 +122,6 @@ Ext.define('PVE.node.NetworkEdit', { ...@@ -127,7 +122,6 @@ Ext.define('PVE.node.NetworkEdit', {
]; ];
Ext.applyIf(me, { Ext.applyIf(me, {
title: title,
url: url, url: url,
method: method, method: method,
items: { items: {
...@@ -147,12 +141,13 @@ Ext.define('PVE.node.NetworkEdit', { ...@@ -147,12 +141,13 @@ Ext.define('PVE.node.NetworkEdit', {
var data = response.result.data; var data = response.result.data;
if (data.type !== me.iftype) { if (data.type !== me.iftype) {
var msg = "Got unexpected device type"; var msg = "Got unexpected device type";
Ext.Msg.alert("Load failed", msg, function() { Ext.Msg.alert(gettext('Error'), msg, function() {
me.close(); me.close();
}); });
return; return;
} }
me.setValues(data); me.setValues(data);
me.isValid(); // trigger validation
} }
}); });
} }
......
...@@ -11,9 +11,7 @@ Ext.define('PVE.node.NetworkView', { ...@@ -11,9 +11,7 @@ Ext.define('PVE.node.NetworkView', {
throw "no node name specified"; throw "no node name specified";
} }
var rstore = Ext.create('PVE.data.UpdateStore', { var store = Ext.create('Ext.data.Store', {
interval: 1000,
storeid: 'pve-networks',
model: 'pve-networks', model: 'pve-networks',
proxy: { proxy: {
type: 'pve', type: 'pve',
...@@ -27,31 +25,26 @@ Ext.define('PVE.node.NetworkView', { ...@@ -27,31 +25,26 @@ Ext.define('PVE.node.NetworkView', {
] ]
}); });
var store = Ext.create('PVE.data.DiffStore', { rstore: rstore }); var reload = function() {
var view_changes = function() {
var changeitem = me.down('#changes'); var changeitem = me.down('#changes');
PVE.Utils.API2Request({ PVE.Utils.API2Request({
url: '/nodes/' + nodename + '/network_changes', url: '/nodes/' + nodename + '/network',
failure: function(response, opts) { failure: function(response, opts) {
changeitem.update('Error: ' + response.htmlStatus); changeitem.update('Error: ' + response.htmlStatus);
store.loadData({});
}, },
success: function(response, opts) { success: function(response, opts) {
var result = Ext.decode(response.responseText); var result = Ext.decode(response.responseText);
var data = result.data; store.loadData(result.data);
if (data === '') { var changes = result.changes;
data = "no changes"; if (changes === undefined || changes === '') {
changes = gettext("No changes");
} }
changeitem.update("<pre>" + Ext.htmlEncode(data) + "</pre>"); changeitem.update("<pre>" + Ext.htmlEncode(changes) + "</pre>");
} }
}); });
}; };
var reload = function() {
rstore.load();
view_changes();
};
var run_editor = function() { var run_editor = function() {
var grid = me.down('gridpanel'); var grid = me.down('gridpanel');
var sm = grid.getSelectionModel(); var sm = grid.getSelectionModel();
...@@ -70,13 +63,13 @@ Ext.define('PVE.node.NetworkView', { ...@@ -70,13 +63,13 @@ Ext.define('PVE.node.NetworkView', {
}; };
var edit_btn = new Ext.Button({ var edit_btn = new Ext.Button({
text: 'Edit', text: gettext('Edit'),
disabled: true, disabled: true,
handler: run_editor handler: run_editor
}); });
var del_btn = new Ext.Button({ var del_btn = new Ext.Button({
text: 'Delete', text: gettext('Remove'),
disabled: true, disabled: true,
handler: function(){ handler: function(){
var grid = me.down('gridpanel'); var grid = me.down('gridpanel');
...@@ -111,7 +104,7 @@ Ext.define('PVE.node.NetworkView', { ...@@ -111,7 +104,7 @@ Ext.define('PVE.node.NetworkView', {
del_btn.setDisabled(!rec); del_btn.setDisabled(!rec);
}; };
PVE.Utils.monStoreErrors(me, rstore); PVE.Utils.monStoreErrors(me, store);
var render_ports = function(value, metaData, record) { var render_ports = function(value, metaData, record) {
if (value === 'bridge') { if (value === 'bridge') {
...@@ -125,7 +118,7 @@ Ext.define('PVE.node.NetworkView', { ...@@ -125,7 +118,7 @@ Ext.define('PVE.node.NetworkView', {
layout: 'border', layout: 'border',
tbar: [ tbar: [
{ {
text: 'Create', text: gettext('Create'),
menu: new Ext.menu.Menu({ menu: new Ext.menu.Menu({
items: [ items: [
{ {
...@@ -133,7 +126,7 @@ Ext.define('PVE.node.NetworkView', { ...@@ -133,7 +126,7 @@ Ext.define('PVE.node.NetworkView', {
handler: function() { handler: function() {
var next; var next;
for (next = 0; next <= 9999; next++) { for (next = 0; next <= 9999; next++) {
if (!rstore.data.get('vmbr' + next.toString())) { if (!store.data.get('vmbr' + next.toString())) {
break; break;
} }
} }
...@@ -152,7 +145,7 @@ Ext.define('PVE.node.NetworkView', { ...@@ -152,7 +145,7 @@ Ext.define('PVE.node.NetworkView', {
handler: function() { handler: function() {
var next; var next;
for (next = 0; next <= 9999; next++) { for (next = 0; next <= 9999; next++) {
if (!rstore.data.get('bond' + next.toString())) { if (!store.data.get('bond' + next.toString())) {
break; break;
} }
} }
...@@ -169,17 +162,17 @@ Ext.define('PVE.node.NetworkView', { ...@@ -169,17 +162,17 @@ Ext.define('PVE.node.NetworkView', {
}) })
}, ' ', }, ' ',
{ {
text: 'Revert changes', text: gettext('Revert changes'),
handler: function() { handler: function() {
PVE.Utils.API2Request({ PVE.Utils.API2Request({
url: '/nodes/' + nodename + '/network_changes', url: '/nodes/' + nodename + '/network',
method: 'DELETE', method: 'DELETE',
waitMsgTarget: me, waitMsgTarget: me,
callback: function() { callback: function() {
reload(); reload();
}, },
failure: function(response, opts) { failure: function(response, opts) {
Ext.Msg.alert('Error', response.htmlStatus); Ext.Msg.alert(gettext('Error'), response.htmlStatus);
} }
}); });
} }
...@@ -196,14 +189,14 @@ Ext.define('PVE.node.NetworkView', { ...@@ -196,14 +189,14 @@ Ext.define('PVE.node.NetworkView', {
border: false, border: false,
columns: [ columns: [
{ {
header: 'Interface Name', header: gettext('Name'),
width: 100, width: 100,
sortable: true, sortable: true,
dataIndex: 'iface' dataIndex: 'iface'
}, },
{ {
xtype: 'booleancolumn', xtype: 'booleancolumn',
header: 'Active', header: gettext('Active'),
width: 80, width: 80,
sortable: true, sortable: true,
dataIndex: 'active', dataIndex: 'active',
...@@ -227,12 +220,12 @@ Ext.define('PVE.node.NetworkView', { ...@@ -227,12 +220,12 @@ Ext.define('PVE.node.NetworkView', {
renderer: render_ports renderer: render_ports
}, },
{ {
header: 'IP address', header: gettext('IP address'),
sortable: true, sortable: true,
dataIndex: 'address' dataIndex: 'address'
}, },
{ {
header: 'Subnet mask', header: gettext('Subnet mask'),
sortable: true, sortable: true,
dataIndex: 'netmask' dataIndex: 'netmask'
}, },
...@@ -253,12 +246,13 @@ Ext.define('PVE.node.NetworkView', { ...@@ -253,12 +246,13 @@ Ext.define('PVE.node.NetworkView', {
autoScroll: true, autoScroll: true,
itemId: 'changes', itemId: 'changes',
tbar: [ tbar: [
'Pending changes (please reboot to activate changes)' gettext('Pending changes') + ' (' +
gettext('Please reboot to activate changes') + ')'
], ],
split: true, split: true,
bodyPadding: 5, bodyPadding: 5,
flex: 0.6, flex: 0.6,
html: "no changes" html: gettext("No changes")
} }
], ],
listeners: { listeners: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment