]>
git.proxmox.com Git - pve-manager.git/blob - www/manager/dc/GroupView.js
1 Ext
.define('PVE.dc.GroupView', {
2 extend
: 'Ext.grid.GridPanel',
4 alias
: ['widget.pveGroupView'],
6 initComponent : function() {
9 var store
= new Ext
.data
.Store({
13 url
: "/api2/json/access/groups"
21 var reload = function() {
25 var sm
= Ext
.create('Ext.selection.RowModel', {});
27 var remove_btn
= new PVE
.button
.Button({
28 text
: gettext('Remove'),
31 confirmMsg: function (rec
) {
32 return Ext
.String
.format(gettext('Are you sure you want to remove entry {0}'),
33 "'" + rec
.data
.groupid
+ "'");
35 handler: function(btn
, event
, rec
) {
36 PVE
.Utils
.API2Request({
37 url
: '/access/groups/' + rec
.data
.groupid
,
40 callback: function() {
43 failure: function (response
, opts
) {
44 Ext
.Msg
.alert(gettext('Error'),response
.htmlStatus
);
52 text
: gettext('Create'),
54 var win
= Ext
.create('PVE.dc.GroupEdit', {
56 win
.on('destroy', reload
);
73 header
: gettext('Name'),
79 header
: gettext('Comment'),
94 Ext
.define('pve-groups', {
95 extend
: 'Ext.data.Model',
96 fields
: [ 'groupid', 'comment' ],