mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 13:09:00 +00:00
(control) Move export data endpoint to actions controller
This commit is contained in:
parent
c0b15427fe
commit
4665af6c42
@ -79,6 +79,9 @@ public class ControlNodeActionsService {
|
|||||||
Spark.post("/public/nodes/:id/actions/new-crawl-specs", this::createNewSpecsAction,
|
Spark.post("/public/nodes/:id/actions/new-crawl-specs", this::createNewSpecsAction,
|
||||||
redirectControl.renderRedirectAcknowledgement("Creating", "../actions?view=new-crawl")
|
redirectControl.renderRedirectAcknowledgement("Creating", "../actions?view=new-crawl")
|
||||||
);
|
);
|
||||||
|
Spark.post("/public/nodes/:id/actions/export-data", this::exportData,
|
||||||
|
redirectControl.renderRedirectAcknowledgement("Exporting", "../storage/exports")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object sideloadEncyclopedia(Request request, Response response) throws Exception {
|
public Object sideloadEncyclopedia(Request request, Response response) throws Exception {
|
||||||
@ -229,4 +232,9 @@ public class ControlNodeActionsService {
|
|||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Object exportData(Request req, Response rsp) {
|
||||||
|
executorClient.exportData(Context.fromRequest(req), Integer.parseInt(req.params("id")));
|
||||||
|
return "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,9 +97,6 @@ public class ControlNodeService {
|
|||||||
Spark.post("/public/nodes/:id/storage/reset-state/:fid", this::resetState,
|
Spark.post("/public/nodes/:id/storage/reset-state/:fid", this::resetState,
|
||||||
redirectControl.renderRedirectAcknowledgement("Restoring", "..")
|
redirectControl.renderRedirectAcknowledgement("Restoring", "..")
|
||||||
);
|
);
|
||||||
Spark.post("/public/nodes/:id/actions/export-data", this::exportData,
|
|
||||||
redirectControl.renderRedirectAcknowledgement("Exporting", "../storage/exports")
|
|
||||||
);
|
|
||||||
Spark.post("/public/nodes/:id/storage/:fid/export-atags", this::exportAtags,
|
Spark.post("/public/nodes/:id/storage/:fid/export-atags", this::exportAtags,
|
||||||
redirectControl.renderRedirectAcknowledgement("Exporting", "../../storage/exports")
|
redirectControl.renderRedirectAcknowledgement("Exporting", "../../storage/exports")
|
||||||
);
|
);
|
||||||
@ -112,11 +109,6 @@ public class ControlNodeService {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
private Object exportData(Request req, Response rsp) {
|
|
||||||
executorClient.exportData(Context.fromRequest(req), Integer.parseInt(req.params("id")));
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
private Object exportAtags(Request req, Response rsp) {
|
private Object exportAtags(Request req, Response rsp) {
|
||||||
executorClient.exportAtags(Context.fromRequest(req), Integer.parseInt(req.params("id")), req.params("fid"));
|
executorClient.exportAtags(Context.fromRequest(req), Integer.parseInt(req.params("id")), req.params("fid"));
|
||||||
return "";
|
return "";
|
||||||
|
Loading…
Reference in New Issue
Block a user