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
03169c5a
Commit
03169c5a
authored
May 27, 2015
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
copy dc/Tasks.js from manager to manager5
parent
d1e65478
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
131 additions
and
0 deletions
+131
-0
Tasks.js
www/manager5/dc/Tasks.js
+131
-0
No files found.
www/manager5/dc/Tasks.js
0 → 100644
View file @
03169c5a
Ext
.
define
(
'
PVE.dc.Tasks
'
,
{
extend
:
'
Ext.grid.GridPanel
'
,
alias
:
[
'
widget.pveClusterTasks
'
],
initComponent
:
function
()
{
var
me
=
this
;
var
taskstore
=
new
PVE
.
data
.
UpdateStore
({
storeid
:
'
pve-cluster-tasks
'
,
model
:
'
pve-tasks
'
,
proxy
:
{
type
:
'
pve
'
,
url
:
'
/api2/json/cluster/tasks
'
},
sorters
:
[
{
property
:
'
starttime
'
,
direction
:
'
DESC
'
}
]
});
var
store
=
Ext
.
create
(
'
PVE.data.DiffStore
'
,
{
rstore
:
taskstore
,
appendAtStart
:
true
});
var
run_task_viewer
=
function
()
{
var
sm
=
me
.
getSelectionModel
();
var
rec
=
sm
.
getSelection
()[
0
];
if
(
!
rec
)
{
return
;
}
var
win
=
Ext
.
create
(
'
PVE.window.TaskViewer
'
,
{
upid
:
rec
.
data
.
upid
});
win
.
show
();
};
Ext
.
apply
(
me
,
{
store
:
store
,
stateful
:
false
,
viewConfig
:
{
trackOver
:
false
,
stripeRows
:
false
,
// does not work with getRowClass()
getRowClass
:
function
(
record
,
index
)
{
var
status
=
record
.
get
(
'
status
'
);
if
(
status
&&
status
!=
'
OK
'
)
{
return
"
x-form-invalid-field
"
;
}
}
},
sortableColumns
:
false
,
columns
:
[
{
header
:
gettext
(
"
Start Time
"
),
dataIndex
:
'
starttime
'
,
width
:
100
,
renderer
:
function
(
value
)
{
return
Ext
.
Date
.
format
(
value
,
"
M d H:i:s
"
);
}
},
{
header
:
gettext
(
"
End Time
"
),
dataIndex
:
'
endtime
'
,
width
:
100
,
renderer
:
function
(
value
,
metaData
,
record
)
{
if
(
record
.
data
.
pid
)
{
if
(
record
.
data
.
type
==
"
vncproxy
"
||
record
.
data
.
type
==
"
vncshell
"
||
record
.
data
.
type
==
"
spiceproxy
"
)
{
metaData
.
tdCls
=
"
x-grid-row-console
"
;
}
else
{
metaData
.
tdCls
=
"
x-grid-row-loading
"
;
}
return
""
;
}
return
Ext
.
Date
.
format
(
value
,
"
M d H:i:s
"
);
}
},
{
header
:
gettext
(
"
Node
"
),
dataIndex
:
'
node
'
,
width
:
100
},
{
header
:
gettext
(
"
User name
"
),
dataIndex
:
'
user
'
,
width
:
150
},
{
header
:
gettext
(
"
Description
"
),
dataIndex
:
'
upid
'
,
flex
:
1
,
renderer
:
PVE
.
Utils
.
render_upid
},
{
header
:
gettext
(
"
Status
"
),
dataIndex
:
'
status
'
,
width
:
200
,
renderer
:
function
(
value
,
metaData
,
record
)
{
if
(
record
.
data
.
pid
)
{
if
(
record
.
data
.
type
!=
"
vncproxy
"
)
{
metaData
.
tdCls
=
"
x-grid-row-loading
"
;
}
return
""
;
}
if
(
value
==
'
OK
'
)
{
return
'
OK
'
;
}
// metaData.attr = 'style="color:red;"';
return
PVE
.
Utils
.
errorText
+
'
:
'
+
value
;
}
}
],
listeners
:
{
itemdblclick
:
run_task_viewer
,
show
:
taskstore
.
startUpdate
,
hide
:
taskstore
.
stopUpdate
,
destroy
:
taskstore
.
stopUpdate
}
});
me
.
callParent
();
}
});
\ No newline at end of file
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