]> git.proxmox.com Git - proxmox-backup.git/blob - www/datastore/Panel.js
ui: add help tool to datastore panel
[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 tools: [PBS.Utils.get_help_tool("datastore_intro")],
38
39 items: [
40 {
41 xtype: 'pbsDataStoreSummary',
42 title: gettext('Summary'),
43 itemId: 'summary',
44 iconCls: 'fa fa-book',
45 cbind: {
46 datastore: '{datastore}',
47 },
48 },
49 {
50 xtype: 'pbsDataStoreContent',
51 itemId: 'content',
52 iconCls: 'fa fa-th',
53 cbind: {
54 datastore: '{datastore}',
55 },
56 },
57 {
58 title: gettext('Prune & GC'),
59 xtype: 'pbsDataStorePruneAndGC',
60 itemId: 'prunegc',
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',
78 cbind: {
79 datastore: '{datastore}',
80 },
81 },
82 {
83 xtype: 'pbsDatastoreOptionView',
84 itemId: 'options',
85 title: gettext('Options'),
86 iconCls: 'fa fa-cog',
87 cbind: {
88 datastore: '{datastore}',
89 },
90 },
91 {
92 itemId: 'acl',
93 xtype: 'pbsACLView',
94 iconCls: 'fa fa-unlock',
95 cbind: {
96 aclPath: '{aclPath}',
97 },
98 },
99 ],
100
101 initComponent: function() {
102 let me = this;
103 me.title = `${gettext("Datastore")}: ${me.datastore}`;
104 me.callParent();
105 },
106 });