]>
git.proxmox.com Git - proxmox-widget-toolkit.git/blob - src/panel/ACMEPlugin.js
1 Ext
.define('Proxmox.panel.ACMEPluginView', {
2 extend
: 'Ext.grid.Panel',
3 alias
: 'widget.pmxACMEPluginView',
5 title
: gettext('Challenge Plugins'),
9 xclass
: 'Ext.app.ViewController',
11 addPlugin: function() {
13 let view
= me
.getView();
14 Ext
.create('Proxmox.window.ACMEPluginEdit', {
15 acmeUrl
: view
.acmeUrl
,
16 url
: `${view.acmeUrl}/plugins`,
18 apiCallDone: function() {
24 editPlugin: function() {
26 let view
= me
.getView();
27 let selection
= view
.getSelection();
28 if (selection
.length
< 1) return;
29 let plugin
= selection
[0].data
.plugin
;
30 Ext
.create('Proxmox.window.ACMEPluginEdit', {
31 acmeUrl
: view
.acmeUrl
,
32 url
: `${view.acmeUrl}/plugins/${plugin}`,
33 apiCallDone: function() {
41 let view
= me
.getView();
42 view
.getStore().rstore
.load();
47 emptyText
: gettext('No Plugins configured'),
52 text
: gettext('Plugin'),
53 renderer
: Ext
.String
.htmlEncode
,
59 renderer
: Ext
.String
.htmlEncode
,
65 itemdblclick
: 'editPlugin',
71 autoDestroyRstore
: true,
74 storeid
: 'proxmox-acme-plugins',
75 model
: 'proxmox-acme-plugins',
77 filters
: item
=> !!item
.data
.api
,
82 initComponent: function() {
86 throw "no acmeUrl given";
88 me
.url
= `${me.acmeUrl}/plugins`;
93 xtype
: 'proxmoxButton',
99 xtype
: 'proxmoxButton',
100 text
: gettext('Edit'),
101 handler
: 'editPlugin',
105 xtype
: 'proxmoxStdRemoveButton',
107 baseurl
: `${me.acmeUrl}/plugins`,
114 me
.store
.rstore
.proxy
.setUrl(`/api2/json/${me.acmeUrl}/plugins`);