]> git.proxmox.com Git - proxmox-backup.git/blob - www/datastore/Panel.js
bca663e83420244c34a5f38bb66b8453201b8710
[proxmox-backup.git] / www / datastore / Panel.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 xtype: 'pbsDatastoreOptionView',
82 itemId: 'options',
83 title: gettext('Options'),
84 iconCls: 'fa fa-cog',
85 cbind: {
86 datastore: '{datastore}',
87 },
88 },
89 {
90 itemId: 'acl',
91 xtype: 'pbsACLView',
92 iconCls: 'fa fa-unlock',
93 cbind: {
94 aclPath: '{aclPath}',
95 },
96 },
97 ],
98
99 initComponent: function() {
100 let me = this;
101 me.title = `${gettext("Datastore")}: ${me.datastore}`;
102 me.callParent();
103 },
104 });