feat: label editor
This commit is contained in:
@@ -120,6 +120,22 @@ class ApiClient {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async getNodeLabels(ip) {
|
||||
return this.request(`/api/node/status/${encodeURIComponent(ip)}`, { method: 'GET' });
|
||||
}
|
||||
|
||||
async setNodeLabels(ip, labels) {
|
||||
return this.request('/api/proxy-call', {
|
||||
method: 'POST',
|
||||
body: {
|
||||
ip: ip,
|
||||
method: 'POST',
|
||||
uri: '/api/node/config',
|
||||
params: [{ name: 'labels', value: JSON.stringify(labels) }]
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Global API client instance
|
||||
|
||||
Reference in New Issue
Block a user