]>
git.proxmox.com Git - proxmox-backup.git/blob - www/Subscription.js
1 Ext
.define('PBS.SubscriptionKeyEdit', {
2 extend
: 'Proxmox.window.Edit',
4 title
: gettext('Upload Subscription Key'),
8 onlineHelp
: 'getting_help',
14 fieldLabel
: gettext('Subscription Key'),
18 Ext
.define('PBS.Subscription', {
19 extend
: 'Proxmox.grid.ObjectGrid',
20 xtype
: 'pbsSubscription',
22 title
: gettext('Subscription'),
25 onlineHelp
: 'getting_help',
28 enableTextSelection
: true,
31 initComponent: function() {
34 let reload
= () => me
.rstore
.load();
35 let baseurl
= '/nodes/localhost/subscription';
39 header
: gettext('Type'),
42 header
: gettext('Subscription Key'),
45 header
: gettext('Status'),
46 renderer
: (value
) => {
47 value
= Ext
.String
.capitalize(value
);
48 let message
= me
.getObjectValue('message');
50 return value
+ ": " + message
;
59 header
: gettext('Server ID'),
62 header
: gettext('Last checked'),
63 renderer
: Proxmox
.Utils
.render_timestamp
,
66 header
: gettext('Next due date'),
71 url
: `/api2/json${baseurl}`,
75 text
: gettext('Upload Subscription Key'),
77 let win
= Ext
.create('PBS.SubscriptionKeyEdit', {
78 url
: '/api2/extjs/' + baseurl
,
81 win
.on('destroy', reload
);
85 text
: gettext('Check'),
87 Proxmox
.Utils
.API2Request({
92 failure: function(response
, opts
) {
93 Ext
.Msg
.alert(gettext('Error'), response
.htmlStatus
);
100 text
: gettext('Remove Subscription'),
101 xtype
: 'proxmoxStdRemoveButton',
102 confirmMsg
: gettext('Are you sure you want to remove the subscription key?'),