api: ceph: ensure calls get proxied to correct node

If calls aren't proxied to the selected node, which seems legit in
 some cases, this will cause some misleading errors while ceph is
 not installed on that node. Therefor the calls should now always get
 proxied.

Signed-off-by: Tim Marx <t.marx@proxmox.com>
This commit is contained in:
Tim Marx 2019-03-28 12:16:06 +01:00 committed by Thomas Lamprecht
parent d6370b38ad
commit 762bea6d93
3 changed files with 10 additions and 0 deletions

View File

@ -172,6 +172,7 @@ __PACKAGE__->register_method ({
name => 'config',
path => 'config',
method => 'GET',
proxyto => 'node',
permissions => {
check => ['perm', '/', [ 'Sys.Audit', 'Datastore.Audit' ], any => 1],
},

View File

@ -19,6 +19,7 @@ __PACKAGE__->register_method ({
name => 'index',
path => '',
method => 'GET',
proxyto => 'node',
description => "Directory index.",
permissions => {
check => ['perm', '/', [ 'Sys.Audit', 'Datastore.Audit' ], any => 1],

View File

@ -152,6 +152,10 @@ Ext.define('PVE.NodeCephFSPanel', {
interval: 5 * 1000,
autoStart: true,
storeid: 'pve-ceph-fs',
proxy: {
type: 'proxmox',
url: '/api2/json/nodes/' + view.nodename + '/ceph/fs'
},
model: 'pve-ceph-fs'
});
view.setStore(Ext.create('Proxmox.data.DiffStore', {
@ -245,6 +249,10 @@ Ext.define('PVE.NodeCephFSPanel', {
interval: 3 * 1000,
autoStart: true,
storeid: 'pve-ceph-mds',
proxy: {
type: 'proxmox',
url: '/api2/json/nodes/'+ view.nodename +'/ceph/mds'
},
model: 'pve-ceph-mds'
});
view.setStore(Ext.create('Proxmox.data.DiffStore', {