]>
Commit | Line | Data |
---|---|---|
3fffcb5d WB |
1 | Ext.define('PBS.WebauthnConfigView', { |
2 | extend: 'Proxmox.grid.ObjectGrid', | |
3 | alias: ['widget.pbsWebauthnConfigView'], | |
4 | ||
5 | url: "/api2/json/config/access/tfa/webauthn", | |
6 | cwidth1: 150, | |
7 | interval: 1000, | |
8 | ||
9 | rows: { | |
10 | rp: { | |
11 | header: gettext('Relying Party'), | |
12 | required: true, | |
a9ffa010 | 13 | defaultValue: gettext('Not configured'), |
3fffcb5d WB |
14 | }, |
15 | origin: { | |
16 | header: gettext('Origin'), | |
17 | required: true, | |
a9ffa010 | 18 | defaultValue: gettext('Not configured'), |
3fffcb5d WB |
19 | }, |
20 | id: { | |
a6a90329 | 21 | header: 'ID', |
3fffcb5d | 22 | required: true, |
a9ffa010 | 23 | defaultValue: gettext('Not configured'), |
3fffcb5d WB |
24 | }, |
25 | }, | |
26 | ||
27 | tbar: [ | |
28 | { | |
29 | text: gettext("Edit"), | |
30 | handler: 'runEditor', | |
31 | }, | |
32 | ], | |
33 | controller: { | |
34 | xclass: 'Ext.app.ViewController', | |
35 | ||
36 | runEditor: function() { | |
37 | let win = Ext.create('PBS.WebauthnConfigEdit'); | |
38 | win.show(); | |
39 | }, | |
40 | ||
41 | startStore: function() { this.getView().getStore().rstore.startUpdate(); }, | |
42 | stopStore: function() { this.getView().getStore().rstore.stopUpdate(); }, | |
43 | }, | |
44 | ||
45 | ||
46 | listeners: { | |
47 | itemdblclick: 'runEditor', | |
48 | activate: 'startStore', | |
49 | deactivate: 'stopStore', | |
50 | destroy: 'stopStore', | |
51 | }, | |
52 | }); | |
53 | ||
54 | Ext.define('PBS.WebauthnConfigEdit', { | |
55 | extend: 'Proxmox.window.Edit', | |
56 | alias: ['widget.pbsWebauthnConfigEdit'], | |
57 | ||
58 | subject: gettext('Webauthn'), | |
59 | url: "/api2/extjs/config/access/tfa/webauthn", | |
60 | autoLoad: true, | |
61 | ||
62 | fieldDefaults: { | |
63 | labelWidth: 120, | |
64 | }, | |
65 | ||
66 | items: [ | |
67 | { | |
68 | xtype: 'textfield', | |
69 | fieldLabel: gettext('Relying Party'), | |
70 | name: 'rp', | |
71 | allowBlank: false, | |
72 | }, | |
73 | { | |
74 | xtype: 'textfield', | |
75 | fieldLabel: gettext('Origin'), | |
76 | name: 'origin', | |
77 | allowBlank: false, | |
78 | }, | |
79 | { | |
80 | xtype: 'textfield', | |
a6a90329 | 81 | fieldLabel: 'ID', |
3fffcb5d WB |
82 | name: 'id', |
83 | allowBlank: false, | |
84 | }, | |
85 | ], | |
86 | }); |