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
1e341647
Commit
1e341647
authored
May 30, 2014
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IPSet GUI: display errors
parent
778a7af5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
IPSet.js
www/manager/panel/IPSet.js
+16
-1
No files found.
www/manager/panel/IPSet.js
View file @
1e341647
...
...
@@ -363,6 +363,20 @@ Ext.define('PVE.IPSetGrid', {
}
});
var
render_errors
=
function
(
value
,
metaData
,
record
)
{
var
errors
=
record
.
data
.
errors
;
if
(
errors
)
{
var
msg
=
errors
.
cidr
||
errors
.
nomatch
;
if
(
msg
)
{
metaData
.
tdCls
=
'
x-form-invalid-field
'
;
var
html
=
'
<p>
'
+
Ext
.
htmlEncode
(
msg
)
+
'
</p>
'
;
metaData
.
tdAttr
=
'
data-qwidth=600 data-qtitle="ERROR" data-qtip="
'
+
html
.
replace
(
/
\"
/g
,
'
"
'
)
+
'
"
'
;
}
}
return
value
;
};
Ext
.
apply
(
me
,
{
tbar
:
[
'
<b>IP/CIDR:</b>
'
,
me
.
addBtn
,
me
.
removeBtn
,
me
.
editBtn
],
store
:
store
,
...
...
@@ -379,6 +393,7 @@ Ext.define('PVE.IPSetGrid', {
dataIndex
:
'
cidr
'
,
width
:
150
,
renderer
:
function
(
value
,
metaData
,
record
)
{
value
=
render_errors
(
value
,
metaData
,
record
);
if
(
record
.
data
.
nomatch
)
{
return
'
<b>! </b>
'
+
value
;
}
...
...
@@ -407,7 +422,7 @@ Ext.define('PVE.IPSetGrid', {
Ext
.
define
(
'
pve-ipset
'
,
{
extend
:
'
Ext.data.Model
'
,
fields
:
[
{
name
:
'
nomatch
'
,
type
:
'
boolean
'
},
'
cidr
'
,
'
comment
'
],
'
cidr
'
,
'
comment
'
,
'
errors
'
],
idProperty
:
'
cidr
'
});
...
...
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