mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-15 07:19:39 +00:00
add panel for pools
This commit is contained in:
parent
524710d6f1
commit
0004edad8d
@ -103,9 +103,12 @@ JSSRC= \
|
||||
openvz/Options.js \
|
||||
openvz/Network.js \
|
||||
openvz/DNS.js \
|
||||
openvz/BeanCounterGrid.js \
|
||||
openvz/BeanCounterGrid.js \
|
||||
openvz/Config.js \
|
||||
openvz/CreateWizard.js \
|
||||
pool/StatusView.js \
|
||||
pool/Summary.js \
|
||||
pool/Config.js \
|
||||
storage/ContentView.js \
|
||||
storage/StatusView.js \
|
||||
storage/Summary.js \
|
||||
|
@ -40,6 +40,7 @@ Ext.define('PVE.StateProvider', {
|
||||
['ltab', 'tasks'],
|
||||
['nodetab', ''],
|
||||
['storagetab', ''],
|
||||
['pooltab', ''],
|
||||
['kvmtab', ''],
|
||||
['ovztab', ''],
|
||||
['dctab', '']
|
||||
@ -48,6 +49,7 @@ Ext.define('PVE.StateProvider', {
|
||||
hprefix: 'v1',
|
||||
|
||||
compDict: {
|
||||
pool: 26,
|
||||
syslog: 25,
|
||||
ubc: 24,
|
||||
initlog: 23,
|
||||
|
@ -245,7 +245,8 @@ Ext.define('PVE.StdWorkspace', {
|
||||
node: 'PVE.node.Config',
|
||||
qemu: 'PVE.qemu.Config',
|
||||
openvz: 'PVE.openvz.Config',
|
||||
storage: 'PVE.storage.Browser'
|
||||
storage: 'PVE.storage.Browser',
|
||||
pool: 'pvePoolConfig'
|
||||
};
|
||||
|
||||
if (selected.length > 0) {
|
||||
|
@ -92,7 +92,6 @@ Ext.define('PVE.panel.Config', {
|
||||
|
||||
var statechange = function(sp, key, state) {
|
||||
if (stateid && key === stateid) {
|
||||
console.log("scanhge");
|
||||
var atab = tab.getActiveTab().itemId;
|
||||
var ntab = state.value || items[0].itemId;
|
||||
if (state && ntab && (atab != ntab)) {
|
||||
|
33
www/manager/pool/Config.js
Normal file
33
www/manager/pool/Config.js
Normal file
@ -0,0 +1,33 @@
|
||||
Ext.define('PVE.pool.Config', {
|
||||
extend: 'PVE.panel.Config',
|
||||
alias: 'widget.pvePoolConfig',
|
||||
|
||||
initComponent: function() {
|
||||
var me = this;
|
||||
|
||||
var pool = me.pveSelNode.data.pool;
|
||||
if (!pool) {
|
||||
throw "no pool specified";
|
||||
}
|
||||
|
||||
Ext.apply(me, {
|
||||
title: Ext.String.format(gettext("Resource Pool") + ': ' + pool),
|
||||
hstateid: 'pooltab',
|
||||
items: [
|
||||
{
|
||||
title: gettext('Summary'),
|
||||
xtype: 'pvePoolSummary',
|
||||
itemId: 'summary'
|
||||
},
|
||||
{
|
||||
xtype: 'pveACLView',
|
||||
title: gettext('Permissions'),
|
||||
itemId: 'permissions',
|
||||
path: '/pool/' + pool
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
me.callParent();
|
||||
}
|
||||
});
|
31
www/manager/pool/StatusView.js
Normal file
31
www/manager/pool/StatusView.js
Normal file
@ -0,0 +1,31 @@
|
||||
Ext.define('PVE.pool.StatusView', {
|
||||
extend: 'PVE.grid.ObjectGrid',
|
||||
alias: ['widget.pvePoolStatusView'],
|
||||
|
||||
initComponent : function() {
|
||||
var me = this;
|
||||
|
||||
var pool = me.pveSelNode.data.pool;
|
||||
if (!pool) {
|
||||
throw "no pool specified";
|
||||
}
|
||||
|
||||
var rows = {
|
||||
comment: {
|
||||
header: gettext('Comment'),
|
||||
required: true
|
||||
}
|
||||
};
|
||||
|
||||
Ext.applyIf(me, {
|
||||
title: gettext('Status'),
|
||||
url: "/api2/json/pools/" + pool,
|
||||
cwidth1: 150,
|
||||
interval: 30000,
|
||||
//height: 195,
|
||||
rows: rows
|
||||
});
|
||||
|
||||
me.callParent();
|
||||
}
|
||||
});
|
36
www/manager/pool/Summary.js
Normal file
36
www/manager/pool/Summary.js
Normal file
@ -0,0 +1,36 @@
|
||||
Ext.define('PVE.pool.Summary', {
|
||||
extend: 'Ext.panel.Panel',
|
||||
alias: 'widget.pvePoolSummary',
|
||||
|
||||
initComponent: function() {
|
||||
var me = this;
|
||||
|
||||
var pool = me.pveSelNode.data.pool;
|
||||
if (!pool) {
|
||||
throw "no pool specified";
|
||||
}
|
||||
|
||||
var statusview = Ext.create('PVE.pool.StatusView', {
|
||||
pveSelNode: me.pveSelNode,
|
||||
style: 'padding-top:0px'
|
||||
});
|
||||
|
||||
var rstore = statusview.rstore;
|
||||
|
||||
Ext.apply(me, {
|
||||
autoScroll: true,
|
||||
bodyStyle: 'padding:10px',
|
||||
defaults: {
|
||||
style: 'padding-top:10px',
|
||||
width: 800
|
||||
},
|
||||
items: [ statusview ]
|
||||
});
|
||||
|
||||
me.on('show', rstore.startUpdate);
|
||||
me.on('hide', rstore.stopUpdate);
|
||||
me.on('destroy', rstore.stopUpdate);
|
||||
|
||||
me.callParent();
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue
Block a user