Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
d6e2622b
Commit
d6e2622b
authored
Feb 29, 2012
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve network API - add more gettext markers
parent
988f95ac
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
177 additions
and
158 deletions
+177
-158
Network.pm
PVE/API2/Network.pm
+31
-1
Nodes.pm
PVE/API2/Nodes.pm
+0
-50
de.po
po/de.po
+43
-22
ja.po
po/ja.po
+44
-27
messages.pot
po/messages.pot
+22
-10
NetworkEdit.js
www/manager/node/NetworkEdit.js
+12
-17
NetworkView.js
www/manager/node/NetworkView.js
+25
-31
No files found.
PVE/API2/Network.pm
View file @
d6e2622b
...
...
@@ -106,7 +106,13 @@ __PACKAGE__->register_method({
code
=>
sub
{
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
...
...
@@ -119,6 +125,30 @@ __PACKAGE__->register_method({
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
(
$config
,
$newiface
)
=
@_
;
...
...
PVE/API2/Nodes.pm
View file @
d6e2622b
...
...
@@ -112,7 +112,6 @@ __PACKAGE__->register_method ({
{
name
=>
'
vzdump
'
},
{
name
=>
'
ubcfailcnt
'
},
{
name
=>
'
network
'
},
{
name
=>
'
network_changes
'
},
{
name
=>
'
aplinfo
'
},
];
...
...
@@ -186,55 +185,6 @@ __PACKAGE__->register_method({
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
({
name
=>
'
status
',
path
=>
'
status
',
...
...
po/de.po
View file @
d6e2622b
...
...
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: pve-manager 2.0\n"
"Report-Msgid-Bugs-To: <support@proxmox.com>\n"
"POT-Creation-Date:
Tue Feb 28 11:14:36
2012\n"
"PO-Revision-Date: 2012-02-2
8 11:14
+0100\n"
"POT-Creation-Date:
Wed Feb 29 12:33:40
2012\n"
"PO-Revision-Date: 2012-02-2
9 12:33
+0100\n"
"Last-Translator: Proxmox Support Team <support@proxmox.com>\n"
"Language-Team: German\n"
"Language: de\n"
...
...
@@ -26,6 +26,7 @@ msgid "Activate"
msgstr "Aktivieren"
#: ../www/manager/form/BridgeSelector.js:46
#: ../www/manager/node/NetworkView.js:199
#: ../www/manager/storage/StatusView.js:25
msgid "Active"
msgstr "Aktiv"
...
...
@@ -201,9 +202,10 @@ msgstr "Inhalt"
msgid "Copy data"
msgstr "Daten kopieren"
#: ../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"
msgstr "Erstellen"
...
...
@@ -306,12 +308,12 @@ msgid "Download"
msgstr "Herunterladen"
#: ../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:35
0
#: ../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/
node/NetworkView.js:66 ../www/manager/dc/StorageView.js:55
#: ../www/manager/dc/
UserView.js:119 ../www/manager/dc/PoolView.js:6
0
#: ../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
...
...
@@ -343,6 +345,8 @@ msgstr "Bitte geben Sie Ihr Kennwort ein"
msgid "Enter your user name"
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/dc/StorageView.js:78 ../www/manager/dc/UserView.js:99
#: ../www/manager/dc/PoolView.js:40 ../www/manager/dc/Backup.js:370
...
...
@@ -453,6 +457,8 @@ msgstr "Laufwerk"
msgid "Hardware"
msgstr "Hardware"
#: ../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
...
...
@@ -550,14 +556,16 @@ msgstr "Mount"
#: ../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/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"
msgstr "Name"
...
...
@@ -588,6 +596,10 @@ msgstr "Nein"
msgid "No 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/LVMEdit.js:186 ../www/manager/storage/DirEdit.js:73
#: ../www/manager/storage/NFSEdit.js:134
...
...
@@ -667,7 +679,7 @@ msgstr "Kennwörter stimmen nicht überein"
msgid "Path"
msgstr "Pfad"
#: ../www/manager/dc/HAConfig.js:266
#: ../www/manager/
node/NetworkView.js:249 ../www/manager/
dc/HAConfig.js:266
msgid "Pending changes"
msgstr "Ausstehende Änderungen"
...
...
@@ -677,6 +689,10 @@ msgstr "Ausstehende Änderungen"
msgid "Permissions"
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/window/LoginWindow.js:112
msgid "Please wait..."
...
...
@@ -728,7 +744,7 @@ msgstr "Aktualisieren"
msgid "Reload"
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/dc/StorageView.js:62 ../www/manager/dc/UserView.js:78
#: ../www/manager/dc/PoolView.js:24 ../www/manager/dc/Backup.js:357
...
...
@@ -775,7 +791,7 @@ msgstr "Zurückspielen"
msgid "Resume"
msgstr "Resume"
#: ../www/manager/dc/HAConfig.js:145
#: ../www/manager/
node/NetworkView.js:165 ../www/manager/
dc/HAConfig.js:145
msgid "Revert changes"
msgstr "Änderungen zurücksetzen"
...
...
@@ -938,6 +954,11 @@ msgstr "Storage-Liste"
msgid "Storage {0} on node {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
msgid "Successful"
msgstr "Erfolgreich"
...
...
po/ja.po
View file @
d6e2622b
...
...
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pve-manager 2.0\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"
"Last-Translator: Koichi MATSUMOTO <mzch@mac.com>\n"
"Language-Team: Japanese <support@proxmox.com>\n"
...
...
@@ -27,6 +27,7 @@ msgid "Activate"
msgstr "稼働中"
#: ../www/manager/form/BridgeSelector.js:46
#: ../www/manager/node/NetworkView.js:199
#: ../www/manager/storage/StatusView.js:25
msgid "Active"
msgstr "稼働中"
...
...
@@ -210,9 +211,10 @@ msgstr "内容"
msgid "Copy data"
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"
msgstr "作成"
...
...
@@ -316,12 +318,12 @@ msgid "Download"
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:35
0
#: ../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/
node/NetworkView.js:66 ../www/manager/dc/StorageView.js:55
#: ../www/manager/dc/
UserView.js:119 ../www/manager/dc/PoolView.js:6
0
#: ../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
...
...
@@ -353,6 +355,8 @@ msgstr "パスワードを入力して下さい"
msgid "Enter your user name"
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/dc/StorageView.js:78 ../www/manager/dc/UserView.js:99
#: ../www/manager/dc/PoolView.js:40 ../www/manager/dc/Backup.js:370
...
...
@@ -466,6 +470,8 @@ msgstr "ハードディスク"
msgid "Hardware"
msgstr "ハードウェア"
#: ../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
...
...
@@ -565,14 +571,16 @@ 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/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"
msgstr "名前"
...
...
@@ -603,6 +611,11 @@ msgstr "いいえ"
msgid "No backup"
msgstr "バックアップなし"
#: ../www/manager/node/NetworkView.js:255
#, fuzzy
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
...
...
@@ -684,7 +697,7 @@ msgstr "パスワードが一致しません!"
msgid "Path"
msgstr "パス"
#: ../www/manager/dc/HAConfig.js:266
#: ../www/manager/
node/NetworkView.js:249 ../www/manager/
dc/HAConfig.js:266
#, fuzzy
msgid "Pending changes"
msgstr "変更はありません"
...
...
@@ -695,6 +708,11 @@ msgstr "変更はありません"
msgid "Permissions"
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/window/LoginWindow.js:112
msgid "Please wait..."
...
...
@@ -747,7 +765,7 @@ msgstr "再表示"
msgid "Reload"
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/dc/StorageView.js:62 ../www/manager/dc/UserView.js:78
#: ../www/manager/dc/PoolView.js:24 ../www/manager/dc/Backup.js:357
...
...
@@ -796,7 +814,7 @@ msgstr "リストア"
msgid "Resume"
msgstr "再開"
#: ../www/manager/dc/HAConfig.js:145
#: ../www/manager/
node/NetworkView.js:165 ../www/manager/
dc/HAConfig.js:145
msgid "Revert changes"
msgstr "元に戻す"
...
...
@@ -959,6 +977,11 @@ msgstr "ストレージリスト"
msgid "Storage {0} on node {1}"
msgstr "ノード {1} 上のストレージ {0}"
#: ../www/manager/node/NetworkView.js:228
#: ../www/manager/node/NetworkEdit.js:93
msgid "Subnet mask"
msgstr "サブネットマスク"
#: ../www/manager/Utils.js:248
msgid "Successful"
msgstr "正常終了"
...
...
@@ -1875,9 +1898,6 @@ msgstr "停止中"
#~ msgid "Path/Target"
#~ msgstr "パス/ターゲット"
#~ msgid "Pending changes (please reboot to activate changes)"
#~ msgstr "保留中の変更 (変更はリブートすると有効になります)"
#~ msgid "Polish"
#~ msgstr "ポーランド語"
...
...
@@ -2069,9 +2089,6 @@ msgstr "停止中"
#~ msgid "Storage ID"
#~ msgstr "ストレージ ID"
#~ msgid "Subnet mask"
#~ msgstr "サブネットマスク"
#~ msgid "Subnet mask requires option 'IP address'"
#~ msgstr ""
#~ "サブネットマスクを指定する場合は 'IP アドレス' オプションも入力して下さい"
...
...
po/messages.pot
View file @
d6e2622b
...
...
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pve-manager 2.0\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <support@proxmox.com>\n"
...
...
@@ -24,7 +24,7 @@ msgstr ""
msgid "Activate"
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"
msgstr ""
...
...
@@ -156,7 +156,7 @@ msgstr ""
msgid "Copy data"
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"
msgstr ""
...
...
@@ -244,7 +244,7 @@ msgstr ""
msgid "Download"
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"
msgstr ""
...
...
@@ -268,7 +268,7 @@ msgstr ""
msgid "Enter your user name"
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"
msgstr ""
...
...
@@ -356,7 +356,7 @@ msgstr ""
msgid "Hardware"
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"
msgstr ""
...
...
@@ -440,7 +440,7 @@ msgstr ""
msgid "Mount"
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"
msgstr ""
...
...
@@ -464,6 +464,10 @@ msgstr ""
msgid "No backup"
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
msgid "No restrictions"
msgstr ""
...
...
@@ -528,7 +532,7 @@ msgstr ""
msgid "Path"
msgstr ""
#: ../www/manager/dc/HAConfig.js:266
#: ../www/manager/
node/NetworkView.js:249 ../www/manager/
dc/HAConfig.js:266
msgid "Pending changes"
msgstr ""
...
...
@@ -536,6 +540,10 @@ msgstr ""
msgid "Permissions"
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
msgid "Please wait..."
msgstr ""
...
...
@@ -580,7 +588,7 @@ msgstr ""
msgid "Reload"
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"
msgstr ""
...
...
@@ -612,7 +620,7 @@ msgstr ""
msgid "Resume"
msgstr ""
#: ../www/manager/dc/HAConfig.js:145
#: ../www/manager/
node/NetworkView.js:165 ../www/manager/
dc/HAConfig.js:145
msgid "Revert changes"
msgstr ""
...
...
@@ -736,6 +744,10 @@ msgstr ""
msgid "Storage {0} on node {1}"
msgstr ""
#: ../www/manager/node/NetworkView.js:228 ../www/manager/node/NetworkEdit.js:93
msgid "Subnet mask"
msgstr ""
#: ../www/manager/Utils.js:248
msgid "Successful"
msgstr ""
...
...
www/manager/node/NetworkEdit.js
View file @
d6e2622b
...
...
@@ -16,21 +16,16 @@ Ext.define('PVE.node.NetworkEdit', {
me
.
create
=
!
me
.
iface
;
var
title
;
var
iface_vtype
;
if
(
me
.
create
)
{
if
(
me
.
iftype
===
'
bridge
'
)
{
title
=
"
Create Bridge
"
;
iface_vtype
=
'
BridgeName
'
;
}
else
if
(
me
.
iftype
===
'
bond
'
)
{
title
=
"
Create Bond
"
;
iface_vtype
=
'
BondName
'
;
}
else
{
throw
"
can't create unknown device type
"
;
}
if
(
me
.
iftype
===
'
bridge
'
)
{
me
.
subject
=
"
Bridge
"
;
iface_vtype
=
'
BridgeName
'
;
}
else
if
(
me
.
iftype
===
'
bond
'
)
{
me
.
subject
=
"
Bond
"
;
iface_vtype
=
'
BondName
'
;
}
else
{
t
itle
=
"
Edit network device '
"
+
me
.
iface
+
"
'
"
;
t
hrow
"
no known network device type specified
"
;
}
var
column2
=
[
...
...
@@ -78,7 +73,7 @@ Ext.define('PVE.node.NetworkEdit', {
var
column1
=
[
{
xtype
:
me
.
create
?
'
textfield
'
:
'
displayfield
'
,
fieldLabel
:
'
Name
'
,
fieldLabel
:
gettext
(
'
Name
'
)
,
height
:
22
,
// hack: set same height as text fields
name
:
'
iface
'
,
value
:
me
.
iface
,
...
...
@@ -88,14 +83,14 @@ Ext.define('PVE.node.NetworkEdit', {
{
xtype
:
'
pvetextfield
'
,
deleteEmpty
:
!
me
.
create
,
fieldLabel
:
'
IP address
'
,
fieldLabel
:
gettext
(
'
IP address
'
)
,
vtype
:
'
IPAddress
'
,
name
:
'
address
'
},
{
xtype
:
'
pvetextfield
'
,
deleteEmpty
:
!
me
.
create
,
fieldLabel
:
'
Subnet mask
'
,
fieldLabel
:
gettext
(
'
Subnet mask
'
)
,
vtype
:
'
IPAddress
'
,
name
:
'
netmask
'
,
validator
:
function
(
value
)
{
...
...
@@ -127,7 +122,6 @@ Ext.define('PVE.node.NetworkEdit', {
];
Ext
.
applyIf
(
me
,
{
title
:
title
,
url
:
url
,
method
:
method
,
items
:
{
...
...
@@ -147,12 +141,13 @@ Ext.define('PVE.node.NetworkEdit', {
var
data
=
response
.
result
.
data
;
if
(
data
.
type
!==
me
.
iftype
)
{
var
msg
=
"
Got unexpected device type
"
;
Ext
.
Msg
.
alert
(
"
Load failed
"
,
msg
,
function
()
{
Ext
.
Msg
.
alert
(
gettext
(
'
Error
'
)
,
msg
,
function
()
{
me
.
close
();
});
return
;
}
me
.
setValues
(
data
);
me
.
isValid
();
// trigger validation
}
});
}
...
...
www/manager/node/NetworkView.js
View file @
d6e2622b
...
...
@@ -11,9 +11,7 @@ Ext.define('PVE.node.NetworkView', {
throw
"
no node name specified
"
;
}
var
rstore
=
Ext
.
create
(
'
PVE.data.UpdateStore
'
,
{
interval
:
1000
,
storeid
:
'
pve-networks
'
,
var
store
=
Ext
.
create
(
'
Ext.data.Store
'
,
{
model
:
'
pve-networks
'
,
proxy
:
{
type
:
'
pve
'
,
...
...
@@ -27,31 +25,26 @@ Ext.define('PVE.node.NetworkView', {
]
});
var
store
=
Ext
.
create
(
'
PVE.data.DiffStore
'
,
{
rstore
:
rstore
});
var
view_changes
=
function
()
{
var
reload
=
function
()
{
var
changeitem
=
me
.
down
(
'
#changes
'
);
PVE
.
Utils
.
API2Request
({
url
:
'
/nodes/
'
+
nodename
+
'
/network
_changes
'
,
url
:
'
/nodes/
'
+
nodename
+
'
/network
'
,
failure
:
function
(
response
,
opts
)
{
changeitem
.
update
(
'
Error:
'
+
response
.
htmlStatus
);
store
.
loadData
({});
},
success
:
function
(
response
,
opts
)
{
var
result
=
Ext
.
decode
(
response
.
responseText
);
var
data
=
result
.
data
;
if
(
data
===
''
)
{
data
=
"
no changes
"
;
store
.
loadData
(
result
.
data
);
var
changes
=
result
.
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
grid
=
me
.
down
(
'
gridpanel
'
);
var
sm
=
grid
.
getSelectionModel
();
...
...
@@ -70,13 +63,13 @@ Ext.define('PVE.node.NetworkView', {
};
var
edit_btn
=
new
Ext
.
Button
({
text
:
'
Edit
'
,
text
:
gettext
(
'
Edit
'
)
,
disabled
:
true
,
handler
:
run_editor
});
var
del_btn
=
new
Ext
.
Button
({
text
:
'
Delete
'
,
text
:
gettext
(
'
Remove
'
)
,
disabled
:
true
,
handler
:
function
(){
var
grid
=
me
.
down
(
'
gridpanel
'
);
...
...
@@ -111,7 +104,7 @@ Ext.define('PVE.node.NetworkView', {
del_btn
.
setDisabled
(
!
rec
);
};
PVE
.
Utils
.
monStoreErrors
(
me
,
r
store
);
PVE
.
Utils
.
monStoreErrors
(
me
,
store
);
var
render_ports
=
function
(
value
,
metaData
,
record
)
{
if
(
value
===
'
bridge
'
)
{
...
...
@@ -125,7 +118,7 @@ Ext.define('PVE.node.NetworkView', {
layout
:
'
border
'
,
tbar
:
[
{
text
:
'
Create
'
,
text
:
gettext
(
'
Create
'
)
,
menu
:
new
Ext
.
menu
.
Menu
({
items
:
[
{
...
...
@@ -133,7 +126,7 @@ Ext.define('PVE.node.NetworkView', {
handler
:
function
()
{
var
next
;
for
(
next
=
0
;
next
<=
9999
;
next
++
)
{
if
(
!
r
store
.
data
.
get
(
'
vmbr
'
+
next
.
toString
()))
{
if
(
!
store
.
data
.
get
(
'
vmbr
'
+
next
.
toString
()))
{
break
;
}
}
...
...
@@ -152,7 +145,7 @@ Ext.define('PVE.node.NetworkView', {
handler
:
function
()
{
var
next
;
for
(
next
=
0
;
next
<=
9999
;
next
++
)
{
if
(
!
r
store
.
data
.
get
(
'
bond
'
+
next
.
toString
()))
{
if
(
!
store
.
data
.
get
(
'
bond
'
+
next
.
toString
()))
{
break
;
}
}
...
...
@@ -169,17 +162,17 @@ Ext.define('PVE.node.NetworkView', {
})
},
'
'
,
{
text
:
'
Revert changes
'
,
text
:
gettext
(
'
Revert changes
'
)
,
handler
:
function
()
{
PVE
.
Utils
.
API2Request
({
url
:
'
/nodes/
'
+
nodename
+
'
/network
_changes
'
,
url
:
'
/nodes/
'
+
nodename
+
'
/network
'
,
method
:
'
DELETE
'
,
waitMsgTarget
:
me
,
callback
:
function
()
{
reload
();
},
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', {
border
:
false
,
columns
:
[
{
header
:
'
Interface Name
'
,
header
:
gettext
(
'
Name
'
)
,
width
:
100
,
sortable
:
true
,
dataIndex
:
'
iface
'
},
{
xtype
:
'
booleancolumn
'
,
header
:
'
Active
'
,
header
:
gettext
(
'
Active
'
)
,
width
:
80
,
sortable
:
true
,
dataIndex
:
'
active
'
,
...
...
@@ -227,12 +220,12 @@ Ext.define('PVE.node.NetworkView', {
renderer
:
render_ports
},
{
header
:
'
IP address
'
,
header
:
gettext
(
'
IP address
'
)
,
sortable
:
true
,
dataIndex
:
'
address
'
},
{
header
:
'
Subnet mask
'
,
header
:
gettext
(
'
Subnet mask
'
)
,
sortable
:
true
,
dataIndex
:
'
netmask
'
},
...
...
@@ -253,12 +246,13 @@ Ext.define('PVE.node.NetworkView', {
autoScroll
:
true
,
itemId
:
'
changes
'
,
tbar
:
[
'
Pending changes (please reboot to activate changes)
'
gettext
(
'
Pending changes
'
)
+
'
(
'
+
gettext
(
'
Please reboot to activate changes
'
)
+
'
)
'
],
split
:
true
,
bodyPadding
:
5
,
flex
:
0.6
,
html
:
"
no changes
"
html
:
gettext
(
"
No changes
"
)
}
],
listeners
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment