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
207c37e8
Commit
207c37e8
authored
Jun 16, 2015
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
copy dc/OptionView.js from manager to manager5
parent
abbdd769
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
197 additions
and
0 deletions
+197
-0
OptionView.js
www/manager5/dc/OptionView.js
+197
-0
No files found.
www/manager5/dc/OptionView.js
0 → 100644
View file @
207c37e8
Ext
.
define
(
'
PVE.dc.HttpProxyEdit
'
,
{
extend
:
'
PVE.window.Edit
'
,
initComponent
:
function
()
{
var
me
=
this
;
Ext
.
applyIf
(
me
,
{
subject
:
gettext
(
'
HTTP proxy
'
),
items
:
{
xtype
:
'
pvetextfield
'
,
name
:
'
http_proxy
'
,
vtype
:
'
HttpProxy
'
,
emptyText
:
gettext
(
'
Do not use any proxy
'
),
deleteEmpty
:
true
,
value
:
''
,
fieldLabel
:
gettext
(
'
HTTP proxy
'
)
}
});
me
.
callParent
();
me
.
load
();
}
});
Ext
.
define
(
'
PVE.dc.KeyboardEdit
'
,
{
extend
:
'
PVE.window.Edit
'
,
initComponent
:
function
()
{
var
me
=
this
;
Ext
.
applyIf
(
me
,
{
subject
:
gettext
(
'
Keyboard Layout
'
),
items
:
{
xtype
:
'
VNCKeyboardSelector
'
,
name
:
'
keyboard
'
,
value
:
''
,
fieldLabel
:
gettext
(
'
Keyboard Layout
'
)
}
});
me
.
callParent
();
me
.
load
();
}
});
Ext
.
define
(
'
PVE.dc.ConsoleViewerEdit
'
,
{
extend
:
'
PVE.window.Edit
'
,
initComponent
:
function
()
{
var
me
=
this
;
var
data
=
[];
Ext
.
Array
.
each
([
''
,
'
applet
'
,
'
vv
'
,
'
html5
'
],
function
(
value
)
{
data
.
push
([
value
,
PVE
.
Utils
.
render_console_viewer
(
value
)]);
});
Ext
.
applyIf
(
me
,
{
subject
:
gettext
(
'
Console Viewer
'
),
items
:
{
xtype
:
'
pveKVComboBox
'
,
name
:
'
console
'
,
data
:
data
,
value
:
''
,
fieldLabel
:
gettext
(
'
Console Viewer
'
)
}
});
me
.
callParent
();
me
.
load
();
}
});
Ext
.
define
(
'
PVE.dc.EmailFromEdit
'
,
{
extend
:
'
PVE.window.Edit
'
,
initComponent
:
function
()
{
var
me
=
this
;
Ext
.
applyIf
(
me
,
{
subject
:
gettext
(
'
Email from address
'
),
items
:
{
xtype
:
'
pvetextfield
'
,
name
:
'
email_from
'
,
vtype
:
'
email
'
,
emptyText
:
gettext
(
'
Send emails from root@$hostname
'
),
deleteEmpty
:
true
,
value
:
''
,
fieldLabel
:
gettext
(
'
Email from address
'
)
}
});
me
.
callParent
();
me
.
load
();
}
});
Ext
.
define
(
'
PVE.dc.OptionView
'
,
{
extend
:
'
PVE.grid.ObjectGrid
'
,
alias
:
[
'
widget.pveDcOptionView
'
],
noProxyText
:
gettext
(
'
Do not use any proxy
'
),
noEmailFromText
:
gettext
(
'
Send emails from root@$hostname
'
),
initComponent
:
function
()
{
var
me
=
this
;
var
reload
=
function
()
{
me
.
rstore
.
load
();
};
var
rows
=
{
keyboard
:
{
header
:
gettext
(
'
Keyboard Layout
'
),
editor
:
'
PVE.dc.KeyboardEdit
'
,
renderer
:
PVE
.
Utils
.
render_kvm_language
,
required
:
true
},
http_proxy
:
{
header
:
gettext
(
'
HTTP proxy
'
),
editor
:
'
PVE.dc.HttpProxyEdit
'
,
required
:
true
,
renderer
:
function
(
value
)
{
if
(
!
value
)
{
return
me
.
noProxyText
;
}
return
value
;
}
},
console
:
{
header
:
gettext
(
'
Console Viewer
'
),
editor
:
'
PVE.dc.ConsoleViewerEdit
'
,
required
:
true
,
renderer
:
PVE
.
Utils
.
render_console_viewer
},
email_from
:
{
header
:
gettext
(
'
Email from address
'
),
editor
:
'
PVE.dc.EmailFromEdit
'
,
required
:
true
,
renderer
:
function
(
value
)
{
if
(
!
value
)
{
return
me
.
noEmailFromText
;
}
return
value
;
}
}
};
var
sm
=
Ext
.
create
(
'
Ext.selection.RowModel
'
,
{});
var
run_editor
=
function
()
{
var
rec
=
sm
.
getSelection
()[
0
];
if
(
!
rec
)
{
return
;
}
var
rowdef
=
rows
[
rec
.
data
.
key
];
if
(
!
rowdef
.
editor
)
{
return
;
}
var
win
=
Ext
.
create
(
rowdef
.
editor
,
{
url
:
"
/api2/extjs/cluster/options
"
,
confid
:
rec
.
data
.
key
});
win
.
show
();
win
.
on
(
'
destroy
'
,
reload
);
};
var
edit_btn
=
new
PVE
.
button
.
Button
({
text
:
gettext
(
'
Edit
'
),
disabled
:
true
,
selModel
:
sm
,
handler
:
run_editor
});
Ext
.
applyIf
(
me
,
{
url
:
"
/api2/json/cluster/options
"
,
cwidth1
:
130
,
interval
:
1000
,
selModel
:
sm
,
tbar
:
[
edit_btn
],
rows
:
rows
,
listeners
:
{
itemdblclick
:
run_editor
}
});
me
.
callParent
();
me
.
on
(
'
show
'
,
reload
);
}
});
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