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
4a3cf8cc
Commit
4a3cf8cc
authored
Jan 16, 2012
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correctly display error messages in ObjectGrid
parent
afdd053c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
12 deletions
+41
-12
PVEProxy.js
www/manager/data/PVEProxy.js
+4
-0
OptionView.js
www/manager/dc/OptionView.js
+1
-1
ObjectGrid.js
www/manager/grid/ObjectGrid.js
+14
-7
ServiceView.js
www/manager/node/ServiceView.js
+22
-4
No files found.
www/manager/data/PVEProxy.js
View file @
4a3cf8cc
...
...
@@ -18,6 +18,10 @@ Ext.define('PVE.RestProxy', {
reader
:
{
type
:
'
json
'
,
root
:
'
data
'
},
afterRequest
:
function
(
request
,
success
)
{
me
.
fireEvent
(
'
afterload
'
,
me
,
request
,
success
);
return
;
}
});
...
...
www/manager/dc/OptionView.js
View file @
4a3cf8cc
...
...
@@ -107,7 +107,7 @@ Ext.define('PVE.dc.OptionView', {
});
Ext
.
applyIf
(
me
,
{
url
:
"
/api2/
extjs
/cluster/options
"
,
url
:
"
/api2/
json
/cluster/options
"
,
cwidth1
:
130
,
interval
:
1000
,
selModel
:
sm
,
...
...
www/manager/grid/ObjectGrid.js
View file @
4a3cf8cc
...
...
@@ -94,16 +94,23 @@ Ext.define('PVE.grid.ObjectGrid', {
}
});
me
.
mon
(
rstore
,
'
load
'
,
function
(
s
,
records
,
success
)
{
me
.
mon
(
rstore
.
proxy
,
'
afterload
'
,
function
(
proxy
,
request
,
success
)
{
load_count
++
;
me
.
setLoading
(
false
);
if
(
!
success
)
{
me
.
setLoading
(
"
Data load error
"
);
if
(
success
)
{
return
;
}
var
msg
;
var
operation
=
request
.
operation
;
var
error
=
operation
.
getError
();
if
(
error
.
statusText
)
{
msg
=
error
.
statusText
+
'
(
'
+
error
.
status
+
'
)
'
;
}
else
{
msg
=
gettext
(
'
Connection error
'
);
}
me
.
setLoading
(
msg
);
});
Ext
.
applyIf
(
me
,
{
...
...
www/manager/node/ServiceView.js
View file @
4a3cf8cc
...
...
@@ -107,13 +107,31 @@ Ext.define('PVE.node.ServiceView', {
me
.
mon
(
store
,
'
datachanged
'
,
set_button_status
);
me
.
mon
(
rstore
,
'
load
'
,
function
(
s
,
records
,
success
)
{
if
(
!
success
)
{
me
.
setLoading
(
"
Data load error
"
);
var
load_count
=
0
;
me
.
mon
(
rstore
,
'
beforeload
'
,
function
(
s
,
operation
,
eOpts
)
{
if
(
!
load_count
)
{
me
.
setLoading
(
true
);
}
});
me
.
mon
(
rstore
.
proxy
,
'
afterload
'
,
function
(
proxy
,
request
,
success
)
{
load_count
++
;
me
.
setLoading
(
false
);
if
(
success
)
{
return
;
}
var
msg
;
var
operation
=
request
.
operation
;
var
error
=
operation
.
getError
();
if
(
error
.
statusText
)
{
msg
=
error
.
statusText
+
'
(
'
+
error
.
status
+
'
)
'
;
}
else
{
m
e
.
setLoading
(
false
);
m
sg
=
gettext
(
'
Connection error
'
);
}
me
.
setLoading
(
msg
);
});
Ext
.
apply
(
me
,
{
...
...
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