]>
git.proxmox.com Git - proxmox-backup.git/blob - www/DataStorePruneAndGC.js
1 Ext
.define('PBS.DataStorePruneAndGC', {
2 extend
: 'Proxmox.grid.ObjectGrid',
3 alias
: 'widget.pbsDataStorePruneAndGC',
4 mixins
: ['Proxmox.Mixin.CBind'],
6 cbindData: function(initial
) {
9 me
.datastore
= encodeURIComponent(me
.datastore
);
10 me
.url
= `/api2/json/config/datastore/${me.datastore}`;
12 url
: `/api2/extjs/config/datastore/${me.datastore}`,
18 xclass
: 'Ext.app.ViewController',
20 edit: function() { this.getView().run_editor(); },
22 garbageCollect: function() {
24 let view
= me
.getView();
25 Proxmox
.Utils
.API2Request({
26 url
: `/admin/datastore/${view.datastore}/gc`,
28 failure: function(response
) {
29 Ext
.Msg
.alert(gettext('Error'), response
.htmlStatus
);
31 success: function(response
, options
) {
32 Ext
.create('Proxmox.window.TaskViewer', {
33 upid
: response
.result
.data
,
42 xtype
: 'proxmoxButton',
43 text
: gettext('Edit'),
49 xtype
: 'proxmoxButton',
50 text
: gettext('Start GC'),
52 handler
: 'garbageCollect',
57 activate: function() { this.rstore
.startUpdate(); },
58 destroy: function() { this.rstore
.stopUpdate(); },
59 deactivate: function() { this.rstore
.stopUpdate(); },
66 defaultValue
: Proxmox
.Utils
.NoneText
,
67 header
: gettext('GC Schedule'),
69 xtype
: 'proxmoxWindowEdit',
70 title
: gettext('GC Schedule'),
72 xtype
: 'pbsCalendarEvent',
74 fieldLabel
: gettext("GC Schedule"),
75 emptyText
: Proxmox
.Utils
.noneText
,
82 defaultValue
: Proxmox
.Utils
.NoneText
,
83 header
: gettext('Prune Schedule'),
85 xtype
: 'proxmoxWindowEdit',
86 title
: gettext('Prune Schedule'),
88 xtype
: 'pbsCalendarEvent',
89 name
: 'prune-schedule',
90 fieldLabel
: gettext("Prune Schedule"),
91 emptyText
: Proxmox
.Utils
.noneText
,
98 header
: gettext('Keep Last'),
100 xtype
: 'proxmoxWindowEdit',
101 title
: gettext('Prune Options'),
103 xtype
: 'pbsPruneInputPanel',
110 header
: gettext('Keep Hourly'),
112 xtype
: 'proxmoxWindowEdit',
113 title
: gettext('Prune Options'),
115 xtype
: 'pbsPruneInputPanel',
121 header
: gettext('Keep Daily'),
123 xtype
: 'proxmoxWindowEdit',
124 title
: gettext('Prune Options'),
126 xtype
: 'pbsPruneInputPanel',
132 header
: gettext('Keep Weekly'),
134 xtype
: 'proxmoxWindowEdit',
135 title
: gettext('Prune Options'),
137 xtype
: 'pbsPruneInputPanel',
143 header
: gettext('Keep Monthly'),
145 xtype
: 'proxmoxWindowEdit',
146 title
: gettext('Prune Options'),
148 xtype
: 'pbsPruneInputPanel',
154 header
: gettext('Keep Yearly'),
156 xtype
: 'proxmoxWindowEdit',
157 title
: gettext('Prune Options'),
159 xtype
: 'pbsPruneInputPanel',