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
feab4fa0
Commit
feab4fa0
authored
Apr 02, 2012
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug #137: API change! Return node name using 'node' property.
parent
5739a114
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
24 deletions
+13
-24
Nodes.pm
PVE/API2/Nodes.pm
+6
-19
changelog.Debian
debian/changelog.Debian
+2
-0
NodeSelector.js
www/manager/form/NodeSelector.js
+5
-5
No files found.
PVE/API2/Nodes.pm
View file @
feab4fa0
...
...
@@ -857,6 +857,7 @@ use PVE::SafeSyslog;
use
PVE::
Cluster
;
use
PVE::
RESTHandler
;
use
PVE::
RPCEnvironment
;
use
PVE::
API2Tools
;
use
base
qw(PVE::RESTHandler)
;
...
...
@@ -881,7 +882,7 @@ __PACKAGE__->register_method ({
type
=>
"
object
",
properties
=>
{},
},
links
=>
[
{
rel
=>
'
child
',
href
=>
"
{n
am
e}
"
}
],
links
=>
[
{
rel
=>
'
child
',
href
=>
"
{n
od
e}
"
}
],
},
code
=>
sub
{
my
(
$param
)
=
@_
;
...
...
@@ -889,26 +890,12 @@ __PACKAGE__->register_method ({
my
$clinfo
=
PVE::Cluster::
get_clinfo
();
my
$res
=
[]
;
my
$nodename
=
PVE::INotify::
nodename
();
my
$nodelist
=
$clinfo
->
{
nodelist
};
my
$nodelist
=
PVE::Cluster::
get_nodelist
();
my
$members
=
PVE::Cluster::
get_members
();
my
$rrd
=
PVE::Cluster::
rrd_dump
();
my
@nodes
=
$nodelist
?
(
keys
%
$nodelist
)
:
$nodename
;
foreach
my
$node
(
@nodes
)
{
my
$entry
=
{
name
=>
$node
};
if
(
my
$d
=
$rrd
->
{"
pve2-node/
$node
"})
{
$entry
->
{
uptime
}
=
$d
->
[
0
];
$entry
->
{
maxcpu
}
=
$d
->
[
3
];
$entry
->
{
cpu
}
=
$d
->
[
4
];
$entry
->
{
maxmem
}
=
$d
->
[
6
];
$entry
->
{
mem
}
=
$d
->
[
7
];
$entry
->
{
maxdisk
}
=
$d
->
[
10
];
$entry
->
{
disk
}
=
$d
->
[
11
];
}
foreach
my
$node
(
@$nodelist
)
{
my
$entry
=
PVE::API2Tools::
extract_node_stats
(
$node
,
$members
,
$rrd
);
push
@$res
,
$entry
;
}
...
...
debian/changelog.Debian
View file @
feab4fa0
...
...
@@ -2,6 +2,8 @@ pve-manager (2.0-55) unstable; urgency=low
* fix bug #135: allow single letter 'dns-name', allow to start names
with numbers
* fix bug #137: API change! Return node name using 'node' property.
-- Proxmox Support Team <support@proxmox.com> Mon, 02 Apr 2012 12:13:33 +0200
...
...
www/manager/form/NodeSelector.js
View file @
feab4fa0
...
...
@@ -9,7 +9,7 @@ Ext.define('PVE.form.NodeSelector', {
var
me
=
this
;
var
store
=
Ext
.
create
(
'
Ext.data.Store
'
,
{
fields
:
[
'
n
am
e
'
,
'
cpu
'
,
'
maxcpu
'
,
'
mem
'
,
'
maxmem
'
,
'
uptime
'
],
fields
:
[
'
n
od
e
'
,
'
cpu
'
,
'
maxcpu
'
,
'
mem
'
,
'
maxmem
'
,
'
uptime
'
],
autoLoad
:
true
,
proxy
:
{
type
:
'
pve
'
,
...
...
@@ -22,7 +22,7 @@ Ext.define('PVE.form.NodeSelector', {
direction
:
'
DESC
'
},
{
property
:
'
n
am
e
'
,
property
:
'
n
od
e
'
,
direction
:
'
ASC
'
}
]
...
...
@@ -30,13 +30,13 @@ Ext.define('PVE.form.NodeSelector', {
Ext
.
apply
(
me
,
{
store
:
store
,
valueField
:
'
n
am
e
'
,
displayField
:
'
n
am
e
'
,
valueField
:
'
n
od
e
'
,
displayField
:
'
n
od
e
'
,
listConfig
:
{
columns
:
[
{
header
:
'
Node
'
,
dataIndex
:
'
n
am
e
'
,
dataIndex
:
'
n
od
e
'
,
hideable
:
false
,
flex
:
1
},
...
...
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