mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2026-01-24 17:10:37 +00:00
service view: refactor assembling API path
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
26f17eb15a
commit
77ff40e479
@ -59,10 +59,10 @@ Ext.define('Proxmox.node.ServiceView', {
|
||||
};
|
||||
|
||||
let service_cmd = function(cmd) {
|
||||
let sm = me.getSelectionModel();
|
||||
let rec = sm.getSelection()[0];
|
||||
let rec = me.getSelectionModel().getSelection()[0];
|
||||
let service = rec.data.service;
|
||||
Proxmox.Utils.API2Request({
|
||||
url: "/nodes/" + me.nodename + "/services/" + rec.data.service + "/" + cmd,
|
||||
url: `/nodes/${me.nodename}/services/${service}/${cmd}`,
|
||||
method: 'POST',
|
||||
failure: function(response, opts) {
|
||||
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user