mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-04-29 04:24:07 +00:00
ui: metrics: don't send digest when creating a new influxdbupd host
we accidentally always tried to load an existing config, even when creating a new entry. This returned the list of all configured ones plus the digest (which gets set by the edit window). When the digest is set, the edit window will send it along, but that does not exist for the create api call, so it failed. To fix it, guard the load behind the `serverid` property, which is only set when we edit an existing entry. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
38fd54fbc8
commit
19458d754e
@ -205,14 +205,16 @@ Ext.define('PBS.window.InfluxDbUdpEdit', {
|
||||
let me = this;
|
||||
me.callParent();
|
||||
|
||||
me.load({
|
||||
success: function(response, options) {
|
||||
let values = response.result.data;
|
||||
let [_match, host, port] = /^(.*):(\d+)$/.exec(values.host) || [];
|
||||
values.host = host;
|
||||
values.port = port;
|
||||
me.setValues(values);
|
||||
},
|
||||
});
|
||||
if (me.serverid) {
|
||||
me.load({
|
||||
success: function(response, options) {
|
||||
let values = response.result.data;
|
||||
let [_match, host, port] = /^(.*):(\d+)$/.exec(values.host) || [];
|
||||
values.host = host;
|
||||
values.port = port;
|
||||
me.setValues(values);
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user