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
1a1c0208
Commit
1a1c0208
authored
Aug 25, 2011
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement datacenter http_proxy editor
parent
c3df148f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
4 deletions
+41
-4
Utils.js
www/manager/Utils.js
+7
-2
OptionView.js
www/manager/dc/OptionView.js
+34
-2
No files found.
www/manager/Utils.js
View file @
1a1c0208
...
...
@@ -25,7 +25,7 @@ Ext.Ajax.on('beforerequest', function(conn, options) {
}
});
// custom Vtype
for vtype:'IPAddress'
// custom Vtype
s
Ext
.
apply
(
Ext
.
form
.
field
.
VTypes
,
{
IPAddress
:
function
(
v
)
{
return
(
/^
\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}
$/
).
test
(
v
);
...
...
@@ -57,7 +57,12 @@ Ext.apply(Ext.form.field.VTypes, {
StorageId
:
function
(
v
)
{
return
(
/^
[
a-z
][
a-z0-9
\-\_\.]
*
[
a-z0-9
]
$/i
).
test
(
v
);
},
StorageIdText
:
"
ID contains illegal characters (allowed characters: 'a-z', '0-9', '-', '_' and '.')
"
StorageIdText
:
"
ID contains illegal characters (allowed characters: 'a-z', '0-9', '-', '_' and '.')
"
,
HttpProxy
:
function
(
v
)
{
return
(
/^http:
\/\/
.*$/
).
test
(
v
);
},
HttpProxyText
:
"
Must confirm to schema 'http://.*' (example: 'http://username:password
\
@host:port/')
"
});
// we dont want that a displayfield set the form dirty flag!
...
...
www/manager/dc/OptionView.js
View file @
1a1c0208
Ext
.
define
(
'
PVE.dc.HttpProxyEdit
'
,
{
extend
:
'
PVE.window.Edit
'
,
initComponent
:
function
()
{
var
me
=
this
;
Ext
.
applyIf
(
me
,
{
title
:
"
Edit HTTP proxy settings
"
,
items
:
{
xtype
:
'
pvetextfield
'
,
name
:
'
http_proxy
'
,
vtype
:
'
HttpProxy
'
,
emptyText
:
'
Do not use any proxy
'
,
deleteEmpty
:
true
,
value
:
''
,
fieldLabel
:
'
HTTP proxy
'
}
});
me
.
callParent
();
me
.
load
();
}
});
Ext
.
define
(
'
PVE.dc.LanguageEdit
'
,
{
extend
:
'
PVE.window.Edit
'
,
...
...
@@ -67,8 +92,15 @@ Ext.define('PVE.dc.OptionView', {
required
:
true
},
http_proxy
:
{
header
:
'
HTTP proxy
'
,
required
:
true
header
:
'
HTTP proxy
'
,
editor
:
'
PVE.dc.HttpProxyEdit
'
,
required
:
true
,
renderer
:
function
(
value
)
{
if
(
!
value
)
{
return
"
Do not use any proxy
"
;
}
return
value
;
}
}
};
...
...
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