API added
This commit is contained in:
+3
-2
@@ -1,4 +1,4 @@
|
||||
function resolveServiceUrl(explicitEnv, fallbackPort, suffix = "") {
|
||||
function resolveServiceUrl(explicitEnv, fallbackPort, suffix = "") {
|
||||
const explicit = String(explicitEnv || "").trim();
|
||||
if (explicit) {
|
||||
return explicit.replace(/\/$/, "") + suffix;
|
||||
@@ -85,6 +85,7 @@ export const api = {
|
||||
getRunnerJobs: (token) => apiRequest("/runner/jobs", { token }),
|
||||
createRunnerJob: (token, body) => apiRequest("/runner/jobs", { method: "POST", token, body }),
|
||||
updateRunnerJob: (token, id, body) => apiRequest(`/runner/jobs/${encodeURIComponent(id)}`, { method: "PATCH", token, body }),
|
||||
testRunnerJob: (token, id) => apiRequest(`/runner/jobs/${encodeURIComponent(id)}/test`, { method: "POST", token }),
|
||||
deleteRunnerJob: (token, id) => apiRequest(`/runner/jobs/${encodeURIComponent(id)}`, { method: "DELETE", token }),
|
||||
getCollectorCapabilities: () => collectorRequest("/capabilities"),
|
||||
getCollectorSources: () => collectorRequest("/sources"),
|
||||
@@ -100,5 +101,5 @@ export const api = {
|
||||
importKnxXml: (body) => collectorRequest("/imports/knx-xml", { method: "POST", body }),
|
||||
scanOpcua: (body) => collectorRequest("/scan/opcua", { method: "POST", body }),
|
||||
scanBacnet: (body) => collectorRequest("/scan/bacnet", { method: "POST", body }),
|
||||
scanIpsymcon: (body) => collectorRequest("/scan/ipsymcon", { method: "POST", body }),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user