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
eaf82342
Commit
eaf82342
authored
Jun 13, 2013
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to view package changelog
parent
5be32a77
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
3 deletions
+49
-3
APT.js
www/manager/node/APT.js
+49
-3
No files found.
www/manager/node/APT.js
View file @
eaf82342
...
...
@@ -68,6 +68,8 @@ Ext.define('PVE.node.APT', {
});
};
var
sm
=
Ext
.
create
(
'
Ext.selection.RowModel
'
,
{});
var
update_btn
=
new
Ext
.
Button
({
text
:
gettext
(
'
Update
'
),
handler
:
function
(){
...
...
@@ -82,14 +84,55 @@ Ext.define('PVE.node.APT', {
}
});
var
show_changelog
=
function
(
rec
)
{
if
(
!
rec
||
!
rec
.
data
||
!
(
rec
.
data
.
ChangeLogUrl
&&
rec
.
data
.
Package
))
{
return
;
}
var
win
=
Ext
.
create
(
'
Ext.window.Window
'
,
{
title
:
gettext
(
'
Changelog
'
)
+
"
:
"
+
rec
.
data
.
Package
,
width
:
800
,
height
:
400
,
layout
:
'
fit
'
,
modal
:
true
,
items
:
{
xtype
:
'
component
'
,
autoEl
:
{
frameborder
:
0
,
seamless
:
1
,
sandbox
:
""
,
tag
:
"
iframe
"
,
src
:
rec
.
data
.
ChangeLogUrl
}
}
});
win
.
show
();
};
var
changelog_btn
=
new
PVE
.
button
.
Button
({
text
:
gettext
(
'
Changelog
'
),
selModel
:
sm
,
disabled
:
true
,
enableFn
:
function
(
rec
)
{
if
(
!
rec
||
!
rec
.
data
||
!
(
rec
.
data
.
ChangeLogUrl
&&
rec
.
data
.
Package
))
{
return
false
;
}
return
true
;
},
handler
:
function
(
b
,
e
,
rec
)
{
show_changelog
(
rec
);
}
});
Ext
.
apply
(
me
,
{
store
:
store
,
stateful
:
false
,
selModel
:
sm
,
viewConfig
:
{
stripeRows
:
false
,
emptyText
:
'
<div style="display:table; width:100%; height:100%;"><div style="display:table-cell; vertical-align: middle; text-align:center;"><b>
'
+
gettext
(
'
Your system is up to date.
'
)
+
'
</div></div>
'
},
tbar
:
[
update_btn
,
upgrade_btn
],
tbar
:
[
update_btn
,
upgrade_btn
,
changelog_btn
],
features
:
[
groupingFeature
,
rowBodyFeature
],
columns
:
[
{
...
...
@@ -123,7 +166,10 @@ Ext.define('PVE.node.APT', {
}
],
listeners
:
{
show
:
reload
show
:
reload
,
itemdblclick
:
function
(
v
,
rec
)
{
show_changelog
(
rec
);
}
}
});
...
...
@@ -134,7 +180,7 @@ Ext.define('PVE.node.APT', {
Ext
.
define
(
'
apt-pkglist
'
,
{
extend
:
'
Ext.data.Model
'
,
fields
:
[
'
Package
'
,
'
Title
'
,
'
Description
'
,
'
Section
'
,
'
Arch
'
,
'
Priority
'
,
'
Version
'
,
'
OldVersion
'
],
'
Priority
'
,
'
Version
'
,
'
OldVersion
'
,
'
ChangeLogUrl
'
],
idProperty
:
'
Package
'
});
...
...
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