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
9361ee7b
Commit
9361ee7b
authored
Dec 21, 2011
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use new set_result_attrib
parent
a8a20647
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
Nodes.pm
PVE/API2/Nodes.pm
+1
-1
OpenVZ.pm
PVE/API2/OpenVZ.pm
+1
-1
Tasks.pm
PVE/API2/Tasks.pm
+2
-2
REST.pm
PVE/REST.pm
+2
-2
No files found.
PVE/API2/Nodes.pm
View file @
9361ee7b
...
@@ -483,7 +483,7 @@ __PACKAGE__->register_method({
...
@@ -483,7 +483,7 @@ __PACKAGE__->register_method({
my
(
$count
,
$lines
)
=
PVE::Tools::
dump_logfile
("
/var/log/syslog
",
$param
->
{
start
},
$param
->
{
limit
});
my
(
$count
,
$lines
)
=
PVE::Tools::
dump_logfile
("
/var/log/syslog
",
$param
->
{
start
},
$param
->
{
limit
});
$rpcenv
->
set_result_
count
(
$count
);
$rpcenv
->
set_result_
attrib
('
total
',
$count
);
return
$lines
;
return
$lines
;
}});
}});
...
...
PVE/API2/OpenVZ.pm
View file @
9361ee7b
...
@@ -589,7 +589,7 @@ __PACKAGE__->register_method({
...
@@ -589,7 +589,7 @@ __PACKAGE__->register_method({
my
(
$count
,
$lines
)
=
PVE::Tools::
dump_logfile
(
$logfn
,
$param
->
{
start
},
$param
->
{
limit
});
my
(
$count
,
$lines
)
=
PVE::Tools::
dump_logfile
(
$logfn
,
$param
->
{
start
},
$param
->
{
limit
});
$rpcenv
->
set_result_
count
(
$count
);
$rpcenv
->
set_result_
attrib
('
total
',
$count
);
return
$lines
;
return
$lines
;
}});
}});
...
...
PVE/API2/Tasks.pm
View file @
9361ee7b
...
@@ -113,7 +113,7 @@ __PACKAGE__->register_method({
...
@@ -113,7 +113,7 @@ __PACKAGE__->register_method({
$bw
->
close
();
$bw
->
close
();
}
}
$rpcenv
->
set_result_
count
(
$count
);
$rpcenv
->
set_result_
attrib
('
total
',
$count
);
return
$res
;
return
$res
;
}});
}});
...
@@ -265,7 +265,7 @@ __PACKAGE__->register_method({
...
@@ -265,7 +265,7 @@ __PACKAGE__->register_method({
push
@$lines
,
{
n
=>
$count
,
t
=>
"
no content
"};
push
@$lines
,
{
n
=>
$count
,
t
=>
"
no content
"};
}
}
$rpcenv
->
set_result_
count
(
$count
);
$rpcenv
->
set_result_
attrib
('
total
',
$count
);
return
$lines
;
return
$lines
;
}});
}});
...
...
PVE/REST.pm
View file @
9361ee7b
...
@@ -426,10 +426,10 @@ sub rest_handler {
...
@@ -426,10 +426,10 @@ sub rest_handler {
eval
{
eval
{
$resp
->
{
data
}
=
$handler
->
handle
(
$info
,
$uri_param
);
$resp
->
{
data
}
=
$handler
->
handle
(
$info
,
$uri_param
);
if
(
my
$count
=
$rpcenv
->
get_result_
count
(
))
{
if
(
my
$count
=
$rpcenv
->
get_result_
attrib
('
total
'
))
{
$resp
->
{
total
}
=
$count
;
$resp
->
{
total
}
=
$count
;
}
}
if
(
my
$diff
=
$rpcenv
->
get_result_
changes
(
))
{
if
(
my
$diff
=
$rpcenv
->
get_result_
attrib
('
changes
'
))
{
$resp
->
{
changes
}
=
$diff
;
$resp
->
{
changes
}
=
$diff
;
}
}
};
};
...
...
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