]>
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 | ||
31112c79 DM |
37 | tools: [PBS.Utils.get_help_tool("datastore_intro")], |
38 | ||
c0ac2074 DC |
39 | items: [ |
40 | { | |
68931742 DC |
41 | xtype: 'pbsDataStoreSummary', |
42 | title: gettext('Summary'), | |
43 | itemId: 'summary', | |
028d0a13 | 44 | iconCls: 'fa fa-book', |
3ea14859 DC |
45 | cbind: { |
46 | datastore: '{datastore}', | |
47 | }, | |
48 | }, | |
49 | { | |
68931742 DC |
50 | xtype: 'pbsDataStoreContent', |
51 | itemId: 'content', | |
028d0a13 | 52 | iconCls: 'fa fa-th', |
c0ac2074 DC |
53 | cbind: { |
54 | datastore: '{datastore}', | |
55 | }, | |
56 | }, | |
1a0d3d11 | 57 | { |
cd828700 | 58 | title: gettext('Prune & GC'), |
68931742 DC |
59 | xtype: 'pbsDataStorePruneAndGC', |
60 | itemId: 'prunegc', | |
028d0a13 DC |
61 | iconCls: 'fa fa-trash-o', |
62 | cbind: { | |
63 | datastore: '{datastore}', | |
64 | }, | |
65 | }, | |
66 | { | |
67 | iconCls: 'fa fa-refresh', | |
68 | itemId: 'syncjobs', | |
69 | xtype: 'pbsSyncJobView', | |
70 | cbind: { | |
71 | datastore: '{datastore}', | |
72 | }, | |
73 | }, | |
74 | { | |
75 | iconCls: 'fa fa-check-circle', | |
76 | itemId: 'verifyjobs', | |
77 | xtype: 'pbsVerifyJobView', | |
1a0d3d11 DM |
78 | cbind: { |
79 | datastore: '{datastore}', | |
80 | }, | |
81 | }, | |
b614b29b TL |
82 | { |
83 | xtype: 'pbsDatastoreOptionView', | |
84 | itemId: 'options', | |
85 | title: gettext('Options'), | |
86 | iconCls: 'fa fa-cog', | |
87 | cbind: { | |
88 | datastore: '{datastore}', | |
89 | }, | |
90 | }, | |
c0ac2074 DC |
91 | { |
92 | itemId: 'acl', | |
93 | xtype: 'pbsACLView', | |
028d0a13 | 94 | iconCls: 'fa fa-unlock', |
c0ac2074 DC |
95 | cbind: { |
96 | aclPath: '{aclPath}', | |
97 | }, | |
98 | }, | |
99 | ], | |
100 | ||
101 | initComponent: function() { | |
102 | let me = this; | |
58f950c5 | 103 | me.title = `${gettext("Datastore")}: ${me.datastore}`; |
c0ac2074 DC |
104 | me.callParent(); |
105 | }, | |
106 | }); |