]>
Commit | Line | Data |
---|---|---|
c0ac2074 DC |
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 | ||
1dceaed1 DC |
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 | ||
c0ac2074 DC |
32 | border: false, |
33 | defaults: { | |
34 | border: false, | |
35 | }, | |
36 | ||
37 | items: [ | |
38 | { | |
68931742 DC |
39 | xtype: 'pbsDataStoreSummary', |
40 | title: gettext('Summary'), | |
41 | itemId: 'summary', | |
028d0a13 | 42 | iconCls: 'fa fa-book', |
3ea14859 DC |
43 | cbind: { |
44 | datastore: '{datastore}', | |
45 | }, | |
46 | }, | |
47 | { | |
68931742 DC |
48 | xtype: 'pbsDataStoreContent', |
49 | itemId: 'content', | |
028d0a13 | 50 | iconCls: 'fa fa-th', |
c0ac2074 DC |
51 | cbind: { |
52 | datastore: '{datastore}', | |
53 | }, | |
54 | }, | |
1a0d3d11 | 55 | { |
cd828700 | 56 | title: gettext('Prune & GC'), |
68931742 DC |
57 | xtype: 'pbsDataStorePruneAndGC', |
58 | itemId: 'prunegc', | |
028d0a13 DC |
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', | |
1a0d3d11 DM |
76 | cbind: { |
77 | datastore: '{datastore}', | |
78 | }, | |
79 | }, | |
c0ac2074 DC |
80 | { |
81 | itemId: 'acl', | |
82 | xtype: 'pbsACLView', | |
028d0a13 | 83 | iconCls: 'fa fa-unlock', |
c0ac2074 DC |
84 | aclExact: true, |
85 | cbind: { | |
86 | aclPath: '{aclPath}', | |
87 | }, | |
88 | }, | |
89 | ], | |
90 | ||
91 | initComponent: function() { | |
92 | let me = this; | |
58f950c5 | 93 | me.title = `${gettext("Datastore")}: ${me.datastore}`; |
c0ac2074 DC |
94 | me.callParent(); |
95 | }, | |
96 | }); |