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
d3ce3535
Commit
d3ce3535
authored
Jun 18, 2013
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve changelog viewer
parent
59c8caa9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
29 deletions
+32
-29
APT.pm
PVE/API2/APT.pm
+3
-3
APT.js
www/manager/node/APT.js
+29
-26
No files found.
PVE/API2/APT.pm
View file @
d3ce3535
...
...
@@ -10,7 +10,7 @@ use PVE::Tools qw(extract_param);
use
PVE::
Cluster
;
use
PVE::
SafeSyslog
;
use
PVE::
INotify
;
use
PVE::
Exception
qw(raise_param_exc)
;
use
PVE::
Exception
;
use
PVE::
RESTHandler
;
use
PVE::
RPCEnvironment
;
...
...
@@ -136,7 +136,7 @@ my $update_pve_pkgstatus = sub {
my
$current_ver
=
$p
->
{
CurrentVer
};
my
$candidate_ver
=
$policy
->
candidate
(
$p
);
if
(
$
pkgname
eq
'
apt
'
||
$
current_ver
->
{
VerStr
}
ne
$candidate_ver
->
{
VerStr
})
{
if
(
$current_ver
->
{
VerStr
}
ne
$candidate_ver
->
{
VerStr
})
{
my
$info
=
$pkgrecords
->
lookup
(
$pkgname
);
my
$res
=
&
$assemble_pkginfo
(
$pkgname
,
$info
,
$current_ver
,
$candidate_ver
);
push
@$pkglist
,
$res
;
...
...
@@ -365,7 +365,7 @@ __PACKAGE__->register_method({
if
(
$response
->
is_success
)
{
$data
=
$response
->
decoded_content
;
}
else
{
die
$response
->
status_line
;
PVE::Exception::
raise
(
$response
->
message
,
code
=>
$response
->
code
)
;
}
return
$data
;
...
...
www/manager/node/APT.js
View file @
d3ce3535
...
...
@@ -93,40 +93,43 @@ Ext.define('PVE.node.APT', {
return
;
}
var
view
=
Ext
.
createWidget
(
'
component
'
,
{
autoScroll
:
true
,
style
:
{
'
background-color
'
:
'
white
'
,
'
white-space
'
:
'
pre
'
,
'
font-family
'
:
'
monospace
'
,
padding
:
'
5px
'
}
});
var
win
=
Ext
.
create
(
'
Ext.window.Window
'
,
{
title
:
gettext
(
'
Changelog
'
)
+
"
:
"
+
rec
.
data
.
Package
,
width
:
800
,
height
:
400
,
layout
:
'
fit
'
,
modal
:
true
,
items
:
{
xtype
:
'
component
'
,
autoScroll
:
true
,
style
:
{
'
background-color
'
:
'
white
'
,
'
white-space
'
:
'
pre
'
,
padding
:
'
10px
'
},
loader
:
{
url
:
"
/api2/json/nodes/
"
+
nodename
+
"
/apt/changelog
"
,
params
:
{
name
:
rec
.
data
.
Package
,
version
:
rec
.
data
.
Version
},
ajaxOptions
:
{
method
:
'
GET
'
},
renderer
:
function
(
loader
,
response
,
active
)
{
var
result
=
Ext
.
decode
(
response
.
responseText
);
if
(
result
&&
result
.
data
)
{
loader
.
getTarget
().
update
(
Ext
.
htmlEncode
(
result
.
data
));
}
else
{
console
.
dir
(
response
);
}
},
autoLoad
:
true
}
items
:
[
view
]
});
PVE
.
Utils
.
API2Request
({
waitMsgTarget
:
me
,
url
:
"
/nodes/
"
+
nodename
+
"
/apt/changelog
"
,
params
:
{
name
:
rec
.
data
.
Package
,
version
:
rec
.
data
.
Version
},
method
:
'
GET
'
,
failure
:
function
(
response
,
opts
)
{
win
.
close
();
Ext
.
Msg
.
alert
(
'
Error
'
,
response
.
htmlStatus
);
},
success
:
function
(
response
,
opts
)
{
win
.
show
();
view
.
update
(
Ext
.
htmlEncode
(
response
.
result
.
data
));
}
});
win
.
show
();
};
var
changelog_btn
=
new
PVE
.
button
.
Button
({
...
...
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