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
1f77dcfa
Commit
1f77dcfa
authored
Jun 16, 2015
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
copy dc/AuthView.js from manager to manager5
parent
eb139bf7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
146 additions
and
0 deletions
+146
-0
AuthView.js
www/manager5/dc/AuthView.js
+146
-0
No files found.
www/manager5/dc/AuthView.js
0 → 100644
View file @
1f77dcfa
Ext
.
define
(
'
PVE.dc.AuthView
'
,
{
extend
:
'
Ext.grid.GridPanel
'
,
alias
:
[
'
widget.pveAuthView
'
],
initComponent
:
function
()
{
var
me
=
this
;
var
store
=
new
Ext
.
data
.
Store
({
model
:
'
pve-domains
'
,
sorters
:
{
property
:
'
realm
'
,
order
:
'
DESC
'
}
});
var
reload
=
function
()
{
store
.
load
();
};
var
sm
=
Ext
.
create
(
'
Ext.selection.RowModel
'
,
{});
var
run_editor
=
function
()
{
var
rec
=
sm
.
getSelection
()[
0
];
if
(
!
rec
)
{
return
;
}
var
win
=
Ext
.
create
(
'
PVE.dc.AuthEdit
'
,{
realm
:
rec
.
data
.
realm
,
authType
:
rec
.
data
.
type
});
win
.
on
(
'
destroy
'
,
reload
);
win
.
show
();
};
var
edit_btn
=
new
PVE
.
button
.
Button
({
text
:
gettext
(
'
Edit
'
),
disabled
:
true
,
selModel
:
sm
,
handler
:
run_editor
});
var
remove_btn
=
new
PVE
.
button
.
Button
({
text
:
gettext
(
'
Remove
'
),
disabled
:
true
,
selModel
:
sm
,
confirmMsg
:
function
(
rec
)
{
return
Ext
.
String
.
format
(
gettext
(
'
Are you sure you want to remove entry {0}
'
),
"
'
"
+
rec
.
data
.
realm
+
"
'
"
);
},
enableFn
:
function
(
rec
)
{
return
!
(
rec
.
data
.
type
===
'
pve
'
||
rec
.
data
.
type
===
'
pam
'
);
},
handler
:
function
(
btn
,
event
,
rec
)
{
var
realm
=
rec
.
data
.
realm
;
PVE
.
Utils
.
API2Request
({
url
:
'
/access/domains/
'
+
realm
,
method
:
'
DELETE
'
,
waitMsgTarget
:
me
,
callback
:
function
()
{
reload
();
},
failure
:
function
(
response
,
opts
)
{
Ext
.
Msg
.
alert
(
gettext
(
'
Error
'
),
response
.
htmlStatus
);
}
});
}
});
var
tbar
=
[
{
text
:
gettext
(
'
Add
'
),
menu
:
new
Ext
.
menu
.
Menu
({
items
:
[
{
text
:
gettext
(
'
Active Directory Server
'
),
handler
:
function
()
{
var
win
=
Ext
.
create
(
'
PVE.dc.AuthEdit
'
,
{
authType
:
'
ad
'
});
win
.
on
(
'
destroy
'
,
reload
);
win
.
show
();
}
},
{
text
:
gettext
(
'
LDAP Server
'
),
handler
:
function
()
{
var
win
=
Ext
.
create
(
'
PVE.dc.AuthEdit
'
,{
authType
:
'
ldap
'
});
win
.
on
(
'
destroy
'
,
reload
);
win
.
show
();
}
}
]
})
},
edit_btn
,
remove_btn
];
Ext
.
apply
(
me
,
{
store
:
store
,
selModel
:
sm
,
stateful
:
false
,
tbar
:
tbar
,
viewConfig
:
{
trackOver
:
false
},
columns
:
[
{
header
:
gettext
(
'
Realm
'
),
width
:
100
,
sortable
:
true
,
dataIndex
:
'
realm
'
},
{
header
:
gettext
(
'
Type
'
),
width
:
100
,
sortable
:
true
,
dataIndex
:
'
type
'
},
{
header
:
gettext
(
'
TFA
'
),
width
:
100
,
sortable
:
true
,
dataIndex
:
'
tfa
'
},
{
id
:
'
comment
'
,
header
:
gettext
(
'
Comment
'
),
sortable
:
false
,
dataIndex
:
'
comment
'
,
flex
:
1
}
],
listeners
:
{
show
:
reload
,
itemdblclick
:
run_editor
}
});
me
.
callParent
();
}
});
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