]>
git.proxmox.com Git - pve-manager.git/blob - www/manager6/dc/ACMEClusterView.js
1 Ext
.define('pve-acme-accounts', {
2 extend
: 'Ext.data.Model',
6 url
: "/api2/json/cluster/acme/account",
11 Ext
.define('pve-acme-plugins', {
12 extend
: 'Ext.data.Model',
13 fields
: ['type', 'plugin', 'api'],
16 url
: "/api2/json/cluster/acme/plugins",
21 Ext
.define('PVE.dc.ACMEAccountView', {
22 extend
: 'Ext.grid.Panel',
23 alias
: 'widget.pveACMEAccountView',
25 title
: gettext('Accounts'),
28 xclass
: 'Ext.app.ViewController',
30 addAccount: function() {
32 let view
= me
.getView();
33 let defaultExists
= view
.getStore().findExact('name', 'default') !== -1;
34 Ext
.create('PVE.node.ACMEAccountCreate', {
36 taskDone: function() {
42 viewAccount: function() {
44 let view
= me
.getView();
45 let selection
= view
.getSelection();
46 if (selection
.length
< 1) return;
47 Ext
.create('PVE.node.ACMEAccountView', {
48 accountname
: selection
[0].data
.name
,
54 let view
= me
.getView();
55 view
.getStore().rstore
.load();
58 showTaskAndReload: function(options
, success
, response
) {
62 let upid
= response
.result
.data
;
63 Ext
.create('Proxmox.window.TaskProgress', {
65 taskDone: function() {
73 emptyText
: gettext('No Accounts configured'),
78 text
: gettext('Name'),
79 renderer
: Ext
.String
.htmlEncode
,
86 xtype
: 'proxmoxButton',
89 handler
: 'addAccount',
92 xtype
: 'proxmoxButton',
93 text
: gettext('View'),
94 handler
: 'viewAccount',
98 xtype
: 'proxmoxStdRemoveButton',
99 baseurl
: '/cluster/acme/account',
100 callback
: 'showTaskAndReload',
105 itemdblclick
: 'viewAccount',
111 autoDestroyRstore
: true,
114 storeid
: 'pve-acme-accounts',
115 model
: 'pve-acme-accounts',
122 Ext
.define('PVE.dc.ACMEPluginView', {
123 extend
: 'Ext.grid.Panel',
124 alias
: 'widget.pveACMEPluginView',
126 title
: gettext('Challenge Plugins'),
129 xclass
: 'Ext.app.ViewController',
131 addPlugin: function() {
133 Ext
.create('PVE.dc.ACMEPluginEditor', {
135 apiCallDone: function() {
141 editPlugin: function() {
143 let view
= me
.getView();
144 let selection
= view
.getSelection();
145 if (selection
.length
< 1) return;
146 let plugin
= selection
[0].data
.plugin
;
147 Ext
.create('PVE.dc.ACMEPluginEditor', {
148 url
: `/cluster/acme/plugins/${plugin}`,
149 apiCallDone: function() {
157 let view
= me
.getView();
158 view
.getStore().rstore
.load();
163 emptyText
: gettext('No Plugins configured'),
168 text
: gettext('Plugin'),
169 renderer
: Ext
.String
.htmlEncode
,
175 renderer
: Ext
.String
.htmlEncode
,
182 xtype
: 'proxmoxButton',
183 text
: gettext('Add'),
184 handler
: 'addPlugin',
188 xtype
: 'proxmoxButton',
189 text
: gettext('Edit'),
190 handler
: 'editPlugin',
194 xtype
: 'proxmoxStdRemoveButton',
195 baseurl
: '/cluster/acme/plugins',
201 itemdblclick
: 'editPlugin',
207 autoDestroyRstore
: true,
210 storeid
: 'pve-acme-plugins',
211 model
: 'pve-acme-plugins',
213 filters
: item
=> !!item
.data
.api
,
219 Ext
.define('PVE.dc.ACMEClusterView', {
220 extend
: 'Ext.panel.Panel',
221 alias
: 'widget.pveACMEClusterView',
223 onlineHelp
: 'sysadmin_certificate_management',
229 xtype
: 'pveACMEAccountView',
234 xtype
: 'pveACMEPluginView',