]> git.proxmox.com Git - proxmox-backup.git/blob - www/DataStorePanel.js
ui: datastore: change GC/Prune title and buttons a bit
[proxmox-backup.git] / www / DataStorePanel.js
1 Ext.define('PBS.DataStorePanel', {
2 extend: 'Ext.tab.Panel',
3 alias: 'widget.pbsDataStorePanel',
4 mixins: ['Proxmox.Mixin.CBind'],
5
6 cbindData: function(initalConfig) {
7 let me = this;
8 return {
9 aclPath: `/datastore/${me.datastore}`,
10 };
11 },
12
13 stateId: 'pbs-datastore-panel',
14 stateful: true,
15
16 stateEvents: ['tabchange'],
17
18 applyState: function(state) {
19 let me = this;
20 if (state.tab !== undefined) {
21 me.setActiveTab(state.tab);
22 }
23 },
24
25 getState: function() {
26 let me = this;
27 return {
28 tab: me.getActiveTab().getItemId(),
29 };
30 },
31
32 border: false,
33 defaults: {
34 border: false,
35 },
36
37 items: [
38 {
39 xtype: 'pbsDataStoreSummary',
40 title: gettext('Summary'),
41 itemId: 'summary',
42 iconCls: 'fa fa-book',
43 cbind: {
44 datastore: '{datastore}',
45 },
46 },
47 {
48 xtype: 'pbsDataStoreContent',
49 itemId: 'content',
50 iconCls: 'fa fa-th',
51 cbind: {
52 datastore: '{datastore}',
53 },
54 },
55 {
56 title: gettext('Prune & GC'),
57 xtype: 'pbsDataStorePruneAndGC',
58 itemId: 'prunegc',
59 iconCls: 'fa fa-trash-o',
60 cbind: {
61 datastore: '{datastore}',
62 },
63 },
64 {
65 iconCls: 'fa fa-refresh',
66 itemId: 'syncjobs',
67 xtype: 'pbsSyncJobView',
68 cbind: {
69 datastore: '{datastore}',
70 },
71 },
72 {
73 iconCls: 'fa fa-check-circle',
74 itemId: 'verifyjobs',
75 xtype: 'pbsVerifyJobView',
76 cbind: {
77 datastore: '{datastore}',
78 },
79 },
80 {
81 itemId: 'acl',
82 xtype: 'pbsACLView',
83 iconCls: 'fa fa-unlock',
84 aclExact: true,
85 cbind: {
86 aclPath: '{aclPath}',
87 },
88 },
89 ],
90
91 initComponent: function() {
92 let me = this;
93 me.title = `${gettext("Datastore")}: ${me.datastore}`;
94 me.callParent();
95 },
96 });