]>
git.proxmox.com Git - proxmox-backup.git/blob - www/datastore/PruneAndGC.js
1 Ext
.define('PBS.DataStorePruneAndGC', {
2 extend
: 'Proxmox.grid.ObjectGrid',
3 alias
: 'widget.pbsDataStorePruneAndGC',
4 mixins
: ['Proxmox.Mixin.CBind'],
6 onlineHelp
: 'maintenance_pruning',
8 cbindData: function(initial
) {
11 me
.datastore
= encodeURIComponent(me
.datastore
);
12 me
.url
= `/api2/json/config/datastore/${me.datastore}`;
14 url
: `/api2/extjs/config/datastore/${me.datastore}`,
20 xclass
: 'Ext.app.ViewController',
22 edit: function() { this.getView().run_editor(); },
24 garbageCollect: function() {
26 let view
= me
.getView();
27 Proxmox
.Utils
.API2Request({
28 url
: `/admin/datastore/${view.datastore}/gc`,
30 failure: function(response
) {
31 Ext
.Msg
.alert(gettext('Error'), response
.htmlStatus
);
33 success: function(response
, options
) {
34 Ext
.create('Proxmox.window.TaskViewer', {
35 upid
: response
.result
.data
,
44 xtype
: 'proxmoxButton',
45 text
: gettext('Edit'),
51 xtype
: 'proxmoxButton',
52 text
: gettext('Start Garbage Collection'),
54 handler
: 'garbageCollect',
59 activate: function() { this.rstore
.startUpdate(); },
60 destroy: function() { this.rstore
.stopUpdate(); },
61 deactivate: function() { this.rstore
.stopUpdate(); },
68 defaultValue
: Proxmox
.Utils
.NoneText
,
69 header
: gettext('Garbage Collection Schedule'),
71 xtype
: 'proxmoxWindowEdit',
72 title
: gettext('GC Schedule'),
74 xtype
: 'pbsCalendarEvent',
76 fieldLabel
: gettext("GC Schedule"),
77 emptyText
: Proxmox
.Utils
.noneText
,
84 defaultValue
: Proxmox
.Utils
.NoneText
,
85 header
: gettext('Prune Schedule'),
87 xtype
: 'proxmoxWindowEdit',
88 title
: gettext('Prune Schedule'),
90 xtype
: 'pbsCalendarEvent',
91 name
: 'prune-schedule',
92 fieldLabel
: gettext("Prune Schedule"),
93 emptyText
: Proxmox
.Utils
.noneText
,
100 header
: gettext('Keep Last'),
102 xtype
: 'proxmoxWindowEdit',
103 title
: gettext('Prune Options'),
104 onlineHelp
: 'maintenance_pruning',
106 xtype
: 'pbsPruneInputPanel',
113 header
: gettext('Keep Hourly'),
115 xtype
: 'proxmoxWindowEdit',
116 title
: gettext('Prune Options'),
117 onlineHelp
: 'maintenance_pruning',
119 xtype
: 'pbsPruneInputPanel',
125 header
: gettext('Keep Daily'),
127 xtype
: 'proxmoxWindowEdit',
128 title
: gettext('Prune Options'),
129 onlineHelp
: 'maintenance_pruning',
131 xtype
: 'pbsPruneInputPanel',
137 header
: gettext('Keep Weekly'),
139 xtype
: 'proxmoxWindowEdit',
140 title
: gettext('Prune Options'),
141 onlineHelp
: 'maintenance_pruning',
143 xtype
: 'pbsPruneInputPanel',
149 header
: gettext('Keep Monthly'),
151 xtype
: 'proxmoxWindowEdit',
152 title
: gettext('Prune Options'),
153 onlineHelp
: 'maintenance_pruning',
155 xtype
: 'pbsPruneInputPanel',
161 header
: gettext('Keep Yearly'),
163 xtype
: 'proxmoxWindowEdit',
164 title
: gettext('Prune Options'),
165 onlineHelp
: 'maintenance_pruning',
167 xtype
: 'pbsPruneInputPanel',